summaryrefslogtreecommitdiffstats
path: root/clang/lib/Parse/ParseExprCXX.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-05-14 00:28:11 +0000
committerDouglas Gregor <dgregor@apple.com>2009-05-14 00:28:11 +0000
commit2ec748cd5a66e0d8ac3c83887e5014f81e95204c (patch)
tree8028813c3ecd1d35a53eef3be7b1755a9c76a1cb /clang/lib/Parse/ParseExprCXX.cpp
parent0e78566e0207a4cfe8a512ea667f90399f2b255a (diff)
downloadbcm5719-llvm-2ec748cd5a66e0d8ac3c83887e5014f81e95204c.tar.gz
bcm5719-llvm-2ec748cd5a66e0d8ac3c83887e5014f81e95204c.zip
Implement explicit instantiations of member classes of class templates, e.g.,
template<typename T> struct X { struct Inner; }; template struct X<int>::Inner; This change is larger than it looks because it also fixes some a problem with nested-name-specifiers and tags. We weren't requiring the DeclContext associated with the scope specifier of a tag to be complete. Therefore, when looking for something like "struct X<int>::Inner", we weren't instantiating X<int>. This, naturally, uncovered a problem with member pointers, where we were requiring the left-hand side of a member pointer access expression (e.g., x->*) to be a complete type. However, this is wrong: the semantics of this expression does not require a complete type (EDG agrees). Stuart vouched for me. Blame him. llvm-svn: 71756
Diffstat (limited to 'clang/lib/Parse/ParseExprCXX.cpp')
-rw-r--r--clang/lib/Parse/ParseExprCXX.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Parse/ParseExprCXX.cpp b/clang/lib/Parse/ParseExprCXX.cpp
index 2f1b9c84d29..4becfc83c9c 100644
--- a/clang/lib/Parse/ParseExprCXX.cpp
+++ b/clang/lib/Parse/ParseExprCXX.cpp
@@ -149,7 +149,7 @@ bool Parser::ParseOptionalCXXScopeSpecifier(CXXScopeSpec &SS) {
if (TemplateId->Kind == TNK_Type_template ||
TemplateId->Kind == TNK_Dependent_template_name) {
AnnotateTemplateIdTokenAsType(&SS);
- SS.clear();
+ SS.setScopeRep(0);
assert(Tok.is(tok::annot_typename) &&
"AnnotateTemplateIdTokenAsType isn't working");
OpenPOWER on IntegriCloud