summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/TreeTransform.h
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2010-10-25 08:47:36 +0000
committerChandler Carruth <chandlerc@gmail.com>2010-10-25 08:47:36 +0000
commit0171815ae193d08f56feade3273d9ae59ac3198a (patch)
tree8f4ed1f3ca055873595191fa56b179b820be3246 /clang/lib/Sema/TreeTransform.h
parent01769904d3ddeb9ffb238a8387663b286624214c (diff)
downloadbcm5719-llvm-0171815ae193d08f56feade3273d9ae59ac3198a.tar.gz
bcm5719-llvm-0171815ae193d08f56feade3273d9ae59ac3198a.zip
Improve the tracking of source locations for parentheses in constructor calls.
This adds them where missing, and traces them through PCH. We fix at least one bug in the extents found by the Index library, and make a lot of refactoring tools which care about the exact formulation of a constructor call easier to write. Also some minor cleanups to more consistently follow the friend pattern instead of the setter pattern when rebuilding a serialized AST. Patch originally by Samuel Benzaquen. llvm-svn: 117254
Diffstat (limited to 'clang/lib/Sema/TreeTransform.h')
-rw-r--r--clang/lib/Sema/TreeTransform.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/clang/lib/Sema/TreeTransform.h b/clang/lib/Sema/TreeTransform.h
index 0a57c3536f6..9dd6bd3456e 100644
--- a/clang/lib/Sema/TreeTransform.h
+++ b/clang/lib/Sema/TreeTransform.h
@@ -1688,7 +1688,8 @@ public:
bool IsElidable,
MultiExprArg Args,
bool RequiresZeroInit,
- CXXConstructExpr::ConstructionKind ConstructKind) {
+ CXXConstructExpr::ConstructionKind ConstructKind,
+ SourceRange ParenRange) {
ASTOwningVector<Expr*> ConvertedArgs(SemaRef);
if (getSema().CompleteConstructorCall(Constructor, move(Args), Loc,
ConvertedArgs))
@@ -1696,7 +1697,8 @@ public:
return getSema().BuildCXXConstructExpr(Loc, T, Constructor, IsElidable,
move_arg(ConvertedArgs),
- RequiresZeroInit, ConstructKind);
+ RequiresZeroInit, ConstructKind,
+ ParenRange);
}
/// \brief Build a new object-construction expression.
@@ -5725,7 +5727,8 @@ TreeTransform<Derived>::TransformCXXConstructExpr(CXXConstructExpr *E) {
Constructor, E->isElidable(),
move_arg(Args),
E->requiresZeroInitialization(),
- E->getConstructionKind());
+ E->getConstructionKind(),
+ E->getParenRange());
}
/// \brief Transform a C++ temporary-binding expression.
OpenPOWER on IntegriCloud