aboutsummaryrefslogtreecommitdiff
path: root/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
commit428edafa9eb80e01dd40aab31d4166a787a741e1 (patch)
tree618b88a0399873548adeeeb442cb87be3426862d /lib/Sema/TreeTransform.h
parent8c5e5d6d8a316af5a9842169f541cac49717887d (diff)
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117254 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/TreeTransform.h')
-rw-r--r--lib/Sema/TreeTransform.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/Sema/TreeTransform.h b/lib/Sema/TreeTransform.h
index 0a57c3536f..9dd6bd3456 100644
--- a/lib/Sema/TreeTransform.h
+++ b/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.