[cfe-commits] r109025 - /cfe/trunk/lib/Sema/SemaInit.cpp
Fariborz Jahanian
fjahanian at apple.com
Wed Jul 21 11:40:47 PDT 2010
Author: fjahanian
Date: Wed Jul 21 13:40:47 2010
New Revision: 109025
URL: http://llvm.org/viewvc/llvm-project?rev=109025&view=rev
Log:
Added extra check when looking for location of '=' in
a copy initialization.
Modified:
cfe/trunk/lib/Sema/SemaInit.cpp
Modified: cfe/trunk/lib/Sema/SemaInit.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaInit.cpp?rev=109025&r1=109024&r2=109025&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaInit.cpp (original)
+++ cfe/trunk/lib/Sema/SemaInit.cpp Wed Jul 21 13:40:47 2010
@@ -3803,8 +3803,9 @@
// 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.
More information about the cfe-commits
mailing list