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 | fbb2bb5a3dc235e39ae67763c70845f9b3d5b545 (patch) | |
tree | a04d09016eecbdae9853182b540892a8464bc7b6 /clang/lib/Parse/ParseDecl.cpp | |
parent | 06fd3c61be11db14c6855694a1f1f00c0ecabc5a (diff) | |
download | bcm5719-llvm-fbb2bb5a3dc235e39ae67763c70845f9b3d5b545.tar.gz bcm5719-llvm-fbb2bb5a3dc235e39ae67763c70845f9b3d5b545.zip |
[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
llvm-svn: 156966
Diffstat (limited to 'clang/lib/Parse/ParseDecl.cpp')
-rw-r--r-- | clang/lib/Parse/ParseDecl.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/lib/Parse/ParseDecl.cpp b/clang/lib/Parse/ParseDecl.cpp index ba40c9b2626..d1350104bc3 100644 --- a/clang/lib/Parse/ParseDecl.cpp +++ b/clang/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); |