diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-11-03 00:35:38 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-11-03 00:35:38 +0000 |
commit | 15417cfa56242d05f55e36da9de966ed469098f6 (patch) | |
tree | 3e58bf6edaaf7c07591af31c79d68e706abe509b /clang/lib/Sema | |
parent | 3e6c91946947050972b1ac929987e85e67ccf49d (diff) | |
download | bcm5719-llvm-15417cfa56242d05f55e36da9de966ed469098f6.tar.gz bcm5719-llvm-15417cfa56242d05f55e36da9de966ed469098f6.zip |
Improve source-location information for CXXConstructExpr nodes, by
ensuring that they cover all of their child nodes. There's still a
clang_getCursor()-related issue with CXXFunctionalCastExprs with
CXXConstructExprs as children (see FIXME in the test case); I'll look
at that separately.
llvm-svn: 118132
Diffstat (limited to 'clang/lib/Sema')
-rw-r--r-- | clang/lib/Sema/SemaExpr.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp index fdc4828cf11..51bb6315e16 100644 --- a/clang/lib/Sema/SemaExpr.cpp +++ b/clang/lib/Sema/SemaExpr.cpp @@ -4032,7 +4032,9 @@ bool Sema::CheckCastTypes(SourceRange TyR, QualType castType, Expr *&castExpr, CXXCastPath &BasePath, bool FunctionalStyle) { if (getLangOptions().CPlusPlus) - return CXXCheckCStyleCast(TyR, castType, castExpr, Kind, BasePath, + return CXXCheckCStyleCast(SourceRange(TyR.getBegin(), + castExpr->getLocEnd()), + castType, castExpr, Kind, BasePath, FunctionalStyle); DefaultFunctionArrayLvalueConversion(castExpr); |