[PATCH] D86671: [clang-tidy] Add new case type to check variables with Hungarian notation

Aaron Ballman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 23 06:06:45 PST 2020


aaron.ballman added inline comments.


================
Comment at: clang-tools-extra/clang-tidy/readability/IdentifierNamingCheck.cpp:616-619
+  if (CRD->isStruct() && !isHungarianNotationOptionEnabled("TreatStructAsClass",
+                                                           HNOption.General)) {
+    return "";
+  }
----------------



================
Comment at: clang-tools-extra/clang-tidy/readability/IdentifierNamingCheck.cpp:671-672
+
+  if (clang::Decl::Kind::EnumConstant == ND->getKind() ||
+      clang::Decl::Kind::Function == ND->getKind()) {
+    return "";
----------------



================
Comment at: clang-tools-extra/clang-tidy/readability/IdentifierNamingCheck.cpp:740
+    // Remove redundant tailing.
+    const static std::list<std::string> TailsOfMultiWordType = {
+        " int", " char", " double", " long", " short"};
----------------
Similar to what was suggested above.


================
Comment at: clang-tools-extra/clang-tidy/readability/IdentifierNamingCheck.cpp:718
+
+    const static std::list<std::string> Keywords = {
+        // Constexpr specifiers
----------------
njames93 wrote:
> 
This comment doesn't appear to have been handled.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D86671



More information about the llvm-commits mailing list