summaryrefslogtreecommitdiffstats
path: root/clang/lib/Parse/ParseCXXInlineMethods.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2009-12-19 10:49:29 +0000
committerJohn McCall <rjmccall@apple.com>2009-12-19 10:49:29 +0000
commit6df5fef6371d8cc02bb9466fca906a5842926556 (patch)
treef1d7850d822dbde05a1521a61b886adcd1564aed /clang/lib/Parse/ParseCXXInlineMethods.cpp
parent4d6d6137a0fe49708006c88716107239e49f7d07 (diff)
downloadbcm5719-llvm-6df5fef6371d8cc02bb9466fca906a5842926556.tar.gz
bcm5719-llvm-6df5fef6371d8cc02bb9466fca906a5842926556.zip
Refactor to remove more dependencies on PreDeclaratorDC. I seem to have made
the redeclaration problems in the [temp.explicit]p3 testcase worse, but I can live with that; they'll need to be fixed more holistically anyhow. llvm-svn: 91771
Diffstat (limited to 'clang/lib/Parse/ParseCXXInlineMethods.cpp')
-rw-r--r--clang/lib/Parse/ParseCXXInlineMethods.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/clang/lib/Parse/ParseCXXInlineMethods.cpp b/clang/lib/Parse/ParseCXXInlineMethods.cpp
index b9314d24244..f1e639c2957 100644
--- a/clang/lib/Parse/ParseCXXInlineMethods.cpp
+++ b/clang/lib/Parse/ParseCXXInlineMethods.cpp
@@ -95,9 +95,12 @@ void Parser::ParseLexedMethodDeclarations(ParsingClass &Class) {
if (HasTemplateScope)
Actions.ActOnReenterTemplateScope(CurScope, Class.TagOrTemplate);
+ // The current scope is still active if we're the top-level class.
+ // Otherwise we'll need to push and enter a new scope.
bool HasClassScope = !Class.TopLevelClass;
- ParseScope ClassScope(this, Scope::ClassScope|Scope::DeclScope,
- HasClassScope);
+ ParseScope ClassScope(this, Scope::ClassScope|Scope::DeclScope, HasClassScope);
+ if (HasClassScope)
+ Actions.ActOnStartDelayedMemberDeclarations(CurScope, Class.TagOrTemplate);
for (; !Class.MethodDecls.empty(); Class.MethodDecls.pop_front()) {
LateParsedMethodDeclaration &LM = Class.MethodDecls.front();
@@ -148,6 +151,9 @@ void Parser::ParseLexedMethodDeclarations(ParsingClass &Class) {
for (unsigned I = 0, N = Class.NestedClasses.size(); I != N; ++I)
ParseLexedMethodDeclarations(*Class.NestedClasses[I]);
+
+ if (HasClassScope)
+ Actions.ActOnFinishDelayedMemberDeclarations(CurScope, Class.TagOrTemplate);
}
/// ParseLexedMethodDefs - We finished parsing the member specification of a top
OpenPOWER on IntegriCloud