diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-02-25 02:25:35 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-02-25 02:25:35 +0000 |
commit | 144548072d38ab9ad76ed40674482df4704a0d43 (patch) | |
tree | 30eac55ddfdf1dfed7431700699535844aa332e8 /clang/lib/Sema/SemaTemplateInstantiate.cpp | |
parent | 0e65ce3de82cc69cd2cb0d37c8198d873ca7ddde (diff) | |
download | bcm5719-llvm-144548072d38ab9ad76ed40674482df4704a0d43.tar.gz bcm5719-llvm-144548072d38ab9ad76ed40674482df4704a0d43.zip |
Use NestedNameSpecifierLoc within out-of-line variables, function, and
tag definitions. Also, add support for template instantiation of
NestedNameSpecifierLocs.
llvm-svn: 126470
Diffstat (limited to 'clang/lib/Sema/SemaTemplateInstantiate.cpp')
-rw-r--r-- | clang/lib/Sema/SemaTemplateInstantiate.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaTemplateInstantiate.cpp b/clang/lib/Sema/SemaTemplateInstantiate.cpp index 44f5913d55c..ae0ac9cbe35 100644 --- a/clang/lib/Sema/SemaTemplateInstantiate.cpp +++ b/clang/lib/Sema/SemaTemplateInstantiate.cpp @@ -2140,6 +2140,17 @@ Sema::SubstNestedNameSpecifier(NestedNameSpecifier *NNS, return Instantiator.TransformNestedNameSpecifier(NNS, Range); } +NestedNameSpecifierLoc +Sema::SubstNestedNameSpecifierLoc(NestedNameSpecifierLoc NNS, + const MultiLevelTemplateArgumentList &TemplateArgs) { + if (!NNS) + return NestedNameSpecifierLoc(); + + TemplateInstantiator Instantiator(*this, TemplateArgs, NNS.getBeginLoc(), + DeclarationName()); + return Instantiator.TransformNestedNameSpecifierLoc(NNS); +} + /// \brief Do template substitution on declaration name info. DeclarationNameInfo Sema::SubstDeclarationNameInfo(const DeclarationNameInfo &NameInfo, |