summaryrefslogtreecommitdiffstats
path: root/clang/lib
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
commitda2da9c93e6a4c8f4621161715ea668b39d0017a (patch)
tree583be700228a03f75a88ac3796bd3f45f0b9a946 /clang/lib
parent3fd2a555d329a6d6c79918b5ce3ce32798bd8e3d (diff)
downloadbcm5719-llvm-da2da9c93e6a4c8f4621161715ea668b39d0017a.tar.gz
bcm5719-llvm-da2da9c93e6a4c8f4621161715ea668b39d0017a.zip
Added extra check when looking for location of '=' in
a copy initialization. llvm-svn: 109025
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