diff options
author | Nick Lewycky <nicholas@mxc.ca> | 2010-07-06 19:51:49 +0000 |
---|---|---|
committer | Nick Lewycky <nicholas@mxc.ca> | 2010-07-06 19:51:49 +0000 |
commit | c96c37f6fdf64faa8244e5692f30a059b62998be (patch) | |
tree | 756bae22e0b62fd15be218a5675ca9e9b269433b /clang/lib/Sema/SemaTemplateInstantiate.cpp | |
parent | e3ecf358d046859ee3387cb8f79cc7c913c5437b (diff) | |
download | bcm5719-llvm-c96c37f6fdf64faa8244e5692f30a059b62998be.tar.gz bcm5719-llvm-c96c37f6fdf64faa8244e5692f30a059b62998be.zip |
Fix multiple emission of the this-> fixit for each instantiation by fixing the
AST during the instantiation. Fixes PR7417!
llvm-svn: 107690
Diffstat (limited to 'clang/lib/Sema/SemaTemplateInstantiate.cpp')
-rw-r--r-- | clang/lib/Sema/SemaTemplateInstantiate.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaTemplateInstantiate.cpp b/clang/lib/Sema/SemaTemplateInstantiate.cpp index cc9f600215b..9e454bc0f25 100644 --- a/clang/lib/Sema/SemaTemplateInstantiate.cpp +++ b/clang/lib/Sema/SemaTemplateInstantiate.cpp @@ -620,6 +620,14 @@ namespace { QualType TransformTemplateTypeParmType(TypeLocBuilder &TLB, TemplateTypeParmTypeLoc TL, QualType ObjectType); + + Sema::OwningExprResult TransformCallExpr(CallExpr *CE) { + getSema().CallsUndergoingInstantiation.push_back(CE); + OwningExprResult Result = + TreeTransform<TemplateInstantiator>::TransformCallExpr(CE); + getSema().CallsUndergoingInstantiation.pop_back(); + return move(Result); + } }; } |