danielmarjamaki marked 12 inline comments as done. ================ Comment at: clang-tidy/readability/NonConstParameterCheck.cpp:44 @@ +43,3 @@ + if (B->isAssignmentOp()) + markCanNotBeConst(B, false); + } else if (const auto *CE = dyn_cast<CallExpr>(S)) { ---------------- I tried to unify like that. It almost worked. I failed to put the stmt(...) and varDecl(...) in the same matcher.
================ Comment at: clang-tidy/readability/NonConstParameterCheck.cpp:49 @@ +48,3 @@ + for (const auto *Arg : CE->arguments()) { + markCanNotBeConst(Arg->IgnoreParenCasts(), true); + } ---------------- good question! I tested and the checker seemed to handle these. apparently the ast-matcher scanned the functions recursively. However I don't know if we know that it will work, so I changed the checker. ================ Comment at: clang-tidy/readability/NonConstParameterCheck.cpp:84 @@ +83,3 @@ +} + +void NonConstParameterCheck::onEndOfTranslationUnit() { ---------------- I believe I fixed all these. http://reviews.llvm.org/D15332 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits