diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2012-05-16 23:49:15 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2012-05-16 23:49:15 +0000 |
commit | 5641b0d02563840c51c33b93dc663c55306093f3 (patch) | |
tree | 0d46cbef982b95161251045b15304b6c4c20b8fd /lib/Parse/ParseDecl.cpp | |
parent | 189373170330e3d551bdb28c9762d606f3bcb931 (diff) |
[libclang/AST] When declaring a local class, don't neglect to set the end location
of the DeclStmt node, otherwise libclang will not work for anything inside that
class.
rdar://10837710
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156966 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/ParseDecl.cpp')
-rw-r--r-- | lib/Parse/ParseDecl.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/Parse/ParseDecl.cpp b/lib/Parse/ParseDecl.cpp index ba40c9b262..d1350104bc 100644 --- a/lib/Parse/ParseDecl.cpp +++ b/lib/Parse/ParseDecl.cpp @@ -1050,6 +1050,7 @@ Parser::DeclGroupPtrTy Parser::ParseSimpleDeclaration(StmtVector &Stmts, // C99 6.7.2.3p6: Handle "struct-or-union identifier;", "enum { X };" // declaration-specifiers init-declarator-list[opt] ';' if (Tok.is(tok::semi)) { + DeclEnd = Tok.getLocation(); if (RequireSemi) ConsumeToken(); Decl *TheDecl = Actions.ParsedFreeStandingDeclSpec(getCurScope(), AS_none, DS); |