aboutsummaryrefslogtreecommitdiff
path: root/lib/Parse/ParseDeclCXX.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-06-16 23:45:56 +0000
committerDouglas Gregor <dgregor@apple.com>2010-06-16 23:45:56 +0000
commite0cc047b1984fc301bbe6e98b6d197bed39ad562 (patch)
treef08ef16f9ec2c89ec150abe299ce96456065c079 /lib/Parse/ParseDeclCXX.cpp
parent387475d0c18aaeb022108de9d33b6c9fb7998843 (diff)
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>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106175 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/ParseDeclCXX.cpp')
-rw-r--r--lib/Parse/ParseDeclCXX.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Parse/ParseDeclCXX.cpp b/lib/Parse/ParseDeclCXX.cpp
index fe3122645b..bfc5b05e73 100644
--- a/lib/Parse/ParseDeclCXX.cpp
+++ b/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)