summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-07-28 23:59:57 +0000
committerDouglas Gregor <dgregor@apple.com>2010-07-28 23:59:57 +0000
commit43397fc4dc2f63183d5a486448120d51f2109fcf (patch)
tree517d44a263b3d3ffc6242a7e97266e526fcec90f /clang/lib/Sema
parenta44f49f189f37afd7a853e980790e418650e4e4a (diff)
downloadbcm5719-llvm-43397fc4dc2f63183d5a486448120d51f2109fcf.tar.gz
bcm5719-llvm-43397fc4dc2f63183d5a486448120d51f2109fcf.zip
Don't set out-of-line template specialization/definition information
for AST nodes that aren't actually out-of-line (i.e., require a nested-name-specifier). Fixes <rdar://problem/8204126>. llvm-svn: 109704
Diffstat (limited to 'clang/lib/Sema')
-rw-r--r--clang/lib/Sema/SemaDecl.cpp4
-rw-r--r--clang/lib/Sema/SemaTemplate.cpp4
2 files changed, 4 insertions, 4 deletions
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp
index 1788eb77226..1836c47fdc7 100644
--- a/clang/lib/Sema/SemaDecl.cpp
+++ b/clang/lib/Sema/SemaDecl.cpp
@@ -2617,7 +2617,7 @@ Sema::ActOnVariableDeclarator(Scope* S, Declarator& D, DeclContext* DC,
SetNestedNameSpecifier(NewVD, D);
- if (NumMatchedTemplateParamLists > 0) {
+ if (NumMatchedTemplateParamLists > 0 && D.getCXXScopeSpec().isSet()) {
NewVD->setTemplateParameterListsInfo(Context,
NumMatchedTemplateParamLists,
(TemplateParameterList**)TemplateParamLists.release());
@@ -3216,7 +3216,7 @@ Sema::ActOnFunctionDeclarator(Scope* S, Declarator& D, DeclContext* DC,
}
}
- if (NumMatchedTemplateParamLists > 0) {
+ if (NumMatchedTemplateParamLists > 0 && D.getCXXScopeSpec().isSet()) {
NewFD->setTemplateParameterListsInfo(Context,
NumMatchedTemplateParamLists,
(TemplateParameterList**)TemplateParamLists.release());
diff --git a/clang/lib/Sema/SemaTemplate.cpp b/clang/lib/Sema/SemaTemplate.cpp
index 03e5281d836..d6672df3f4f 100644
--- a/clang/lib/Sema/SemaTemplate.cpp
+++ b/clang/lib/Sema/SemaTemplate.cpp
@@ -3819,7 +3819,7 @@ Sema::ActOnClassTemplateSpecialization(Scope *S, unsigned TagSpec,
PrevPartial,
SequenceNumber);
SetNestedNameSpecifier(Partial, SS);
- if (NumMatchedTemplateParamLists > 0) {
+ if (NumMatchedTemplateParamLists > 0 && SS.isSet()) {
Partial->setTemplateParameterListsInfo(Context,
NumMatchedTemplateParamLists,
(TemplateParameterList**) TemplateParameterLists.release());
@@ -3877,7 +3877,7 @@ Sema::ActOnClassTemplateSpecialization(Scope *S, unsigned TagSpec,
Converted,
PrevDecl);
SetNestedNameSpecifier(Specialization, SS);
- if (NumMatchedTemplateParamLists > 0) {
+ if (NumMatchedTemplateParamLists > 0 && SS.isSet()) {
Specialization->setTemplateParameterListsInfo(Context,
NumMatchedTemplateParamLists,
(TemplateParameterList**) TemplateParameterLists.release());
OpenPOWER on IntegriCloud