Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(5300)

Unified Diff: lib/Parse/ParseDecl.cpp

Issue 5836044: Fixed scoping problem with late parsed attributes in nested classes.
Patch Set: Created 12 years ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « include/clang/Sema/Sema.h ('k') | lib/Sema/SemaDecl.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/Parse/ParseDecl.cpp
diff --git a/lib/Parse/ParseDecl.cpp b/lib/Parse/ParseDecl.cpp
index 31a898cf5a0f0fb1b3de9e249819c222c1c34590..712defaa8d9b6aea5cded140ca546ee85c1d71c1 100644
--- a/lib/Parse/ParseDecl.cpp
+++ b/lib/Parse/ParseDecl.cpp
@@ -736,9 +736,18 @@ void Parser::ParseLexedAttributes(ParsingClass &Class) {
ParseScope ClassScope(this, ScopeFlags, !AlreadyHasClassScope);
ParseScopeFlags ClassScopeFlags(this, ScopeFlags, AlreadyHasClassScope);
+ // Enter the scope of nested classes
+ if (!AlreadyHasClassScope)
+ Actions.ActOnStartDelayedMemberDeclarations(getCurScope(),
+ Class.TagOrTemplate);
+
for (unsigned i = 0, ni = Class.LateParsedDeclarations.size(); i < ni; ++i) {
Class.LateParsedDeclarations[i]->ParseLexedAttributes();
}
+
+ if (!AlreadyHasClassScope)
+ Actions.ActOnFinishDelayedMemberDeclarations(getCurScope(),
+ Class.TagOrTemplate);
}
« no previous file with comments | « include/clang/Sema/Sema.h ('k') | lib/Sema/SemaDecl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b