[PATCH] D56924: Special case ObjCPropertyDecl for printing

David Goldman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 18 09:06:33 PDT 2019


dgoldman added inline comments.


================
Comment at: unittests/AST/NamedDeclPrinterTest.cpp:220
+    "property",
+    "Obj::property"));
+}
----------------
dexonsmith wrote:
> gribozavr wrote:
> > I don't think that `Obj::property` is the preferred syntax. `Obj.property`? I'd want a review from someone from Apple to confirm.
> @arphaman, @jkorous, or @benlangmuir: can you check on this?
For more context here: I'm seeing similar issues for Objective-C instance variables (they can be declared inside a class extension --> meaning the Decl has no name --> clangd fails with an assertion that the name shouldn't be empty).

It seems to me that for Objective-C we could do something like `Obj(Extension::property` or alternatively `Obj(Extension).property` and `Obj(class extension)->_instanceVar`, but I'm not sure about what relies upon this current behavior (if anything).


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D56924/new/

https://reviews.llvm.org/D56924





More information about the cfe-commits mailing list