diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-11-23 20:27:36 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-11-23 20:27:36 +0000 |
commit | c14a03dffff69b5e1c55cc118fc52d8fd9f3a28d (patch) | |
tree | 8fd374c6f3d950e16cb3c22e18e6371edfcf27bb /lib/Serialization/ASTReaderDecl.cpp | |
parent | e93433db8bc4e6a8e8f0b1b55728085ce0f276a9 (diff) |
[libclang] Fix operations (token annotation, getting cursor, etc.) with a file region
inside an objc container that "contains" other file-level declarations.
When getting the array of file-level declarations that overlap with a file region,
we failed to report that the region overlaps with an objc container, if
the container had other file-level declarations declared lexically inside it.
Fix this by marking such declarations as "isTopLevelDeclInObjCContainer" in the AST
and handling them appropriately.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145109 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Serialization/ASTReaderDecl.cpp')
-rw-r--r-- | lib/Serialization/ASTReaderDecl.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/Serialization/ASTReaderDecl.cpp b/lib/Serialization/ASTReaderDecl.cpp index 3eb867f18e..d242bc39bb 100644 --- a/lib/Serialization/ASTReaderDecl.cpp +++ b/lib/Serialization/ASTReaderDecl.cpp @@ -249,6 +249,7 @@ void ASTDeclReader::VisitDecl(Decl *D) { D->setImplicit(Record[Idx++]); D->setUsed(Record[Idx++]); D->setReferenced(Record[Idx++]); + D->TopLevelDeclInObjCContainer = Record[Idx++]; D->setAccess((AccessSpecifier)Record[Idx++]); D->FromASTFile = true; D->ModulePrivate = Record[Idx++]; |