aaron.ballman added inline comments.

================
Comment at: clang/lib/Sema/SemaDeclAttr.cpp:5252
                                             const ParsedAttr &AL) {
+  auto *Ctx = D->getDeclContext();
+
----------------
Please don't use `auto` here.


================
Comment at: clang/lib/Sema/SemaDeclAttr.cpp:7258-7267
+  // Do this check after processing D's attributes because the attribute
+  // objc_method_family can change whether the given method is in the init
+  // family, and it can be applied after objc_designated_initializer. This is a
+  // bit of a hack, but we need it to be compatible with versions of clang that
+  // processed the attribute list in the wrong order.
+  if (D->hasAttr<ObjCDesignatedInitializerAttr>() &&
+      cast<ObjCMethodDecl>(D)->getMethodFamily() != OMF_init) {
----------------
Do you also have to handle redeclaration merging, or is that not a thing for 
ObjC method declarations?

I'm wondering if this is better handled with the `mergeFooAttr()` pattern from 
`Sema::mergeDeclAttribute()`?


Repository:
  rC Clang

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

https://reviews.llvm.org/D58152



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to