diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-05-15 06:15:11 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-05-15 06:15:11 +0000 |
commit | 8e4a3868fec3664125d82093ed13303ff368285b (patch) | |
tree | 385d8c0ddaf3af8e0ac883dbc8c4dab2dadb64c6 /clang/lib/Sema/TreeTransform.h | |
parent | 5db7f6cb1e5d044501193a5c727822a2282fd8d6 (diff) | |
download | bcm5719-llvm-8e4a3868fec3664125d82093ed13303ff368285b.tar.gz bcm5719-llvm-8e4a3868fec3664125d82093ed13303ff368285b.zip |
PR12798: Don't drop part of the nested name specifier when instantiating a
pseudo-destructor expression. This can affect whether virtual dispatch for
the destructor call is bypassed.
llvm-svn: 156806
Diffstat (limited to 'clang/lib/Sema/TreeTransform.h')
-rw-r--r-- | clang/lib/Sema/TreeTransform.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/clang/lib/Sema/TreeTransform.h b/clang/lib/Sema/TreeTransform.h index 7387eac667b..01b82aa3d75 100644 --- a/clang/lib/Sema/TreeTransform.h +++ b/clang/lib/Sema/TreeTransform.h @@ -9268,7 +9268,11 @@ TreeTransform<Derived>::RebuildCXXPseudoDestructorExpr(Expr *Base, DeclarationNameInfo NameInfo(Name, Destroyed.getLocation()); NameInfo.setNamedTypeInfo(DestroyedType); - // FIXME: the ScopeType should be tacked onto SS. + // The scope type is now known to be a valid nested name specifier + // component. Tack it on to the end of the nested name specifier. + if (ScopeType) + SS.Extend(SemaRef.Context, SourceLocation(), + ScopeType->getTypeLoc(), CCLoc); SourceLocation TemplateKWLoc; // FIXME: retrieve it from caller. return getSema().BuildMemberReferenceExpr(Base, BaseType, |