[PATCH] D22507: Clang-tidy - Enum misuse check
Piotr Padlewski via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 25 08:45:06 PDT 2016
Prazek added a subscriber: Prazek.
================
Comment at: clang-tidy/misc/EnumMisuseCheck.cpp:19
@@ +18,3 @@
+
+// Stores a min and a max value which describe an interval.
+struct ValueRange {
----------------
s/\/\//\/\/\/
In other words, change // to /// (doxygen comment)
================
Comment at: clang-tidy/misc/EnumMisuseCheck.cpp:192
@@ +191,3 @@
+ const auto *LhsConstant =
+ LhsDecExpr ? dyn_cast<EnumConstantDecl>(LhsDecExpr->getDecl()) : nullptr;
+ const auto *RhsConstant =
----------------
If the pointer returned from dyn_cast<EnumConstantDecl>(LhsDeclExpr->getDecl()) is assumed to be always not null, thn you can change it to cast<> (It will assert if null instead of returning nullptr)
================
Comment at: docs/clang-tidy/checks/misc-enum-misuse.rst:29
@@ +28,3 @@
+
+.. code:: c++
+
----------------
I think all the code here needs to be indented by one or more to get into ..code:: block.
https://reviews.llvm.org/D22507
More information about the cfe-commits
mailing list