aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaInit.cpp
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2010-07-21 18:40:47 +0000
committerFariborz Jahanian <fjahanian@apple.com>2010-07-21 18:40:47 +0000
commit0a2eb5685aaef78ce33e84dd8c70ad3ff31b0e11 (patch)
tree8f184057f8e63151b0bdf66bf21f4b0e62e620fe /lib/Sema/SemaInit.cpp
parent10f8e319569c8b8b4603d8a72ce01a7a01502c85 (diff)
Added extra check when looking for location of '=' in
a copy initialization. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109025 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaInit.cpp')
-rw-r--r--lib/Sema/SemaInit.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Sema/SemaInit.cpp b/lib/Sema/SemaInit.cpp
index 0361f25913..7a5c1459d6 100644
--- a/lib/Sema/SemaInit.cpp
+++ b/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.