[PATCH] D99601: [-Wcompletion-handler] Don't recognize init methods as conventional

Valeriy Savchenko via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 6 03:44:28 PDT 2021


vsavchenko marked an inline comment as done.
vsavchenko added inline comments.


================
Comment at: clang/lib/Analysis/CalledOnceCheck.cpp:1017
+  static bool isInitMethod(Selector MethodSelector) {
+    return MethodSelector.getNameForSlot(0).startswith_lower(INIT_PREFIX);
+  }
----------------
NoQ wrote:
> You can formally check whether it's an init method by querying its `ObjCMethodFamily`.
That's awesome, thanks!


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D99601



More information about the cfe-commits mailing list