diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-06-16 23:45:56 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-06-16 23:45:56 +0000 |
commit | 428119e39a5b2055b57ba1001acd4a885ac27c39 (patch) | |
tree | ad0dc1e3a5277c9b75d43e18a1fc2be5319945f7 /clang/lib/Parse/ParseDeclCXX.cpp | |
parent | 842eb0905e8c4bc458007db179822d6ead5948b4 (diff) | |
download | bcm5719-llvm-428119e39a5b2055b57ba1001acd4a885ac27c39.tar.gz bcm5719-llvm-428119e39a5b2055b57ba1001acd4a885ac27c39.zip |
When parsing cached C++ method declarations/definitions, save the
"previous token" location at the end of the class definition. This
eliminates a badly-placed error + Fix-It when the ';' following a
class definition is missing. Fixes <rdar://problem/8066414>.
llvm-svn: 106175
Diffstat (limited to 'clang/lib/Parse/ParseDeclCXX.cpp')
-rw-r--r-- | clang/lib/Parse/ParseDeclCXX.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/Parse/ParseDeclCXX.cpp b/clang/lib/Parse/ParseDeclCXX.cpp index fe3122645b1..bfc5b05e737 100644 --- a/clang/lib/Parse/ParseDeclCXX.cpp +++ b/clang/lib/Parse/ParseDeclCXX.cpp @@ -1619,8 +1619,10 @@ void Parser::ParseCXXMemberSpecification(SourceLocation RecordLoc, // We are not inside a nested class. This class and its nested classes // are complete and we can parse the delayed portions of method // declarations and the lexed inline method definitions. + SourceLocation SavedPrevTokLocation = PrevTokLocation; ParseLexedMethodDeclarations(getCurrentClass()); ParseLexedMethodDefs(getCurrentClass()); + PrevTokLocation = SavedPrevTokLocation; } if (TagDecl) |