[PATCH] D39829: add new check for property declaration

Ben Hamilton via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 13 13:41:43 PST 2017


benhamilton added inline comments.


================
Comment at: clang-tidy/objc/PropertyDeclarationCheck.cpp:89
+  assert(MatchedDecl->getName().size() > 0);
+  // Skip the check of lowerCamelCase if the name has prefix of special acronyms
+  if (startsWithSpecialAcronyms(MatchedDecl->getName(), SpecialAcronyms)) {
----------------
For the acronyms, this means we will allow properties with names like:

  URLfoo_bar_blech

when we do not want that to be legal.

Instead, let's generate the regular expression we pass to `matchesName()` from the options. I will provide a suggestion shortly.



https://reviews.llvm.org/D39829





More information about the cfe-commits mailing list