summaryrefslogtreecommitdiffstats
path: root/clang/lib/Parse/ParseObjc.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
commit707ece60254fb3946f762594cc6d830c41d80599 (patch)
tree94c501d8a1276b52aa961f3bf0a4e8b657cec897 /clang/lib/Parse/ParseObjc.cpp
parent95ace5570124bd2af07c0a1c29269f8d02a1d35b (diff)
downloadbcm5719-llvm-707ece60254fb3946f762594cc6d830c41d80599.tar.gz
bcm5719-llvm-707ece60254fb3946f762594cc6d830c41d80599.zip
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). llvm-svn: 89160
Diffstat (limited to 'clang/lib/Parse/ParseObjc.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud