[PATCH] D22507: Clang-tidy - Enum misuse check

Eugene Zelenko via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 19 10:14:19 PDT 2016


Eugene.Zelenko added a subscriber: Eugene.Zelenko.
Eugene.Zelenko added a comment.

Please mention this check in docs/ReleaseNotes.rst. See pre-4.0 branch versions as example.


================
Comment at: clang-tidy/misc/EnumMisuseCheck.cpp:116
@@ +115,3 @@
+}
+// if there is only one not power-of-2 value in the enum unless it is
+static bool isPossiblyBitField(const int NonPowOfTwoCounter, const int EnumLen,
----------------
Please separate with empty line.

================
Comment at: test/clang-tidy/misc-enum-misuse-weak.cpp:9
@@ +8,3 @@
+         F = 32,
+         G = 63 };
+
----------------
Please put closing }; on next line. Same in other places.

================
Comment at: test/clang-tidy/misc-enum-misuse-weak.cpp:83
@@ +82,3 @@
+  return 42;
+};
+
----------------
Please fix -Wextra-semi. Is next empty line excessive?

================
Comment at: test/clang-tidy/misc-enum-misuse.cpp:42
@@ +41,3 @@
+int trigger() {
+
+  if (bestDay() | A)
----------------
Unnecessary empty line. Same at the end of function.

================
Comment at: test/clang-tidy/misc-enum-misuse.cpp:77
@@ +76,2 @@
+  return 42;
+};
----------------
Please fix -Wextra-semi.


Repository:
  rL LLVM

https://reviews.llvm.org/D22507





More information about the cfe-commits mailing list