[PATCH] D15332: new clang-tidy checker readability-non-const-parameter
Piotr Padlewski via cfe-commits
cfe-commits at lists.llvm.org
Fri Aug 12 09:47:48 PDT 2016
Prazek added a subscriber: Prazek.
================
Comment at: clang-tidy/readability/NonConstParameterCheck.cpp:95-98
@@ +94,6 @@
+ const QualType T = VD->getType();
+ if (T->isPointerType() && !T->getPointeeType().isConstQualified())
+ markCanNotBeConst(VD->getInit(), true);
+ else if (T->isArrayType())
+ markCanNotBeConst(VD->getInit(), true);
+ }
----------------
This looks like it could be in the same if.
https://reviews.llvm.org/D15332
More information about the cfe-commits
mailing list