[PATCH] D66121: Debug Info: Nest Objective-C property function decls inside their container.
Adrian Prantl via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Aug 13 10:48:48 PDT 2019
aprantl marked an inline comment as done.
aprantl added inline comments.
================
Comment at: clang/lib/CodeGen/CGDebugInfo.h:406
+ CGBuilderTy &Builder,
+ const ObjCContainerDecl *CD = nullptr);
----------------
rjmccall wrote:
> Why does this have to be an extra parameter? The method's DC should be the container.
```
@protocol BarProto
@property struct Bar *bar;
@end
@interface Foo <BarProto>
@end
@implementation Foo {}
@synthesize bar = _bar;
@end
```
The ObjCMethodDecl for the synthesized `bar` accessors is the method decl in the protocol `BarProto`, as there is no method decl put into the AST inside of `Foo`. Its DeclContext (lexical an regular) therefor is the Protocol, which is not what we want as the decl context for a synthesized method called `-[Foo setBar:]` in the debug info.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D66121/new/
https://reviews.llvm.org/D66121
More information about the cfe-commits
mailing list