summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/Sema/SemaInit.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaInit.cpp b/clang/lib/Sema/SemaInit.cpp
index 0361f25913f..7a5c1459d6d 100644
--- a/clang/lib/Sema/SemaInit.cpp
+++ b/clang/lib/Sema/SemaInit.cpp
@@ -3803,8 +3803,9 @@ InitializationSequence::Perform(Sema &S,
// Build a call to the selected constructor.
ASTOwningVector<&ActionBase::DeleteExpr> ConstructorArgs(S);
- SourceLocation Loc = Kind.isCopyInit() ? Kind.getEqualLoc()
- : Kind.getLocation();
+ SourceLocation Loc = (Kind.isCopyInit() && Kind.getEqualLoc().isValid())
+ ? Kind.getEqualLoc()
+ : Kind.getLocation();
// Determine the arguments required to actually perform the constructor
// call.
OpenPOWER on IntegriCloud