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

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 2 12:20:40 PDT 2016


aaron.ballman added inline comments.

================
Comment at: test/clang-tidy/misc-enum-misuse.cpp:3
@@ +2,3 @@
+
+enum Empty {
+};
----------------
szepet wrote:
> Could you specify which part of the file seems off? I have run the clang format with the same options on testfiles as on the others.
```
enum A { A = 1,
         B = 2,
         C = 4,
         D = 8,
         E = 16,
         F = 32,
         G = 63
};
```
should be:
```
enum A {
  A = 1,
  B = 2,
  C = 4,
  D = 8,
  E = 16,
  F = 32,
  G = 63
};
```
is what I was thinking was incorrect, but perhaps clang-format allows such constructs?

================
Comment at: test/clang-tidy/misc-enum-misuse.cpp:66
@@ +65,3 @@
+    int k = T | Q;
+  return 0;
+  Empty EmptyVal;
----------------
Do you intend to have the `return 0;` here?


https://reviews.llvm.org/D22507





More information about the cfe-commits mailing list