[PATCH] D56924: Handle ObjCCategoryDecl class extensions for print

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 23 02:08:03 PST 2019


sammccall added a comment.

This is definitely an improvement, though I don't know if it's *right*. @akyrtzi, thoughts?



================
Comment at: unittests/AST/NamedDeclPrinterTest.cpp:206
+    "property",
+    "(class extension)::property"));
+}
----------------
One concern is that similarly-named members in extensions of different classes will have the same name (whereas categories have names, so the collision is less likely).
It's also harder to go from printed name -> source code.

`Obj::(class extension)::property` **might** be a more useful QName (including *also* the class name).
But I don't know obj-c well, would be good if Apple folks could chime in.

`(class extension)::property` is definitely an improvement over the current `::property`, though.


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