[PATCH] D21036: Misplaced const-qualification with typedef types

Samuel Benzaquen via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 7 10:01:38 PDT 2016


sbenza added inline comments.

================
Comment at: clang-tidy/misc/MisplacedConstCheck.cpp:22
@@ +21,3 @@
+  Finder->addMatcher(
+      valueDecl(allOf(hasType(isConstQualified()),
+                      hasType(typedefType(hasDeclaration(
----------------
allOf() is unnecessary

================
Comment at: clang-tidy/misc/MisplacedConstCheck.cpp:26
@@ +25,3 @@
+                                          isConstQualified(),
+                                          ignoringParens(functionType())))))))
+                              .bind("typedef"))))))
----------------
Should we ignore pointer to members?
If not, we should add a test for those.


http://reviews.llvm.org/D21036





More information about the cfe-commits mailing list