aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaCodeComplete.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2009-11-17 22:58:30 +0000
committerTed Kremenek <kremenek@apple.com>2009-11-17 22:58:30 +0000
commitc32b1d82c1f6d0f0d6c615beb3b6bdfbfbea7098 (patch)
treeb7363884ffd3825b3d6d67f8deb4b4cc16378e9d /lib/Sema/SemaCodeComplete.cpp
parent269f8bc10a33e29e2951df7720cad0abb45c74cb (diff)
Do not register ObjCInterfaceDecls implicitly created by @class in the
current DeclContext. These "imaginary" declarations pose issues for clients searching DeclContext for actual declarations. Instead, register them for name lookup, and add the ObjCInterfaceDecl later to the DeclContext when we hit an actual @interface declaration. This also fixes a bug where the invariant that the Decls in a DeclContext are sorted in order of their appearance is no longer violated. What could happen is that an @class causes an ObjCInterfaceDecl to get added first to the DeclContext, then the ObjCClassDecl itself is added, and then later the SourceLocation of the ObjCInterfaceDecl is updated with the correct location (which is later in the file). This breaks an assumed invariant in ResolveLocation.cpp (and possibly other clients). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89160 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaCodeComplete.cpp')
0 files changed, 0 insertions, 0 deletions