[PATCH] D59802: [clang-tidy] Add new checker: llvm-avoid-cast-in-conditional
Don Hinton via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Mar 28 18:32:36 PDT 2019
hintonda marked an inline comment as done.
hintonda added a comment.
================
Comment at: clang-tools-extra/clang-tidy/llvm/AvoidCastInConditionalCheck.cpp:73
+ Result.Nodes.getNodeAs<CallExpr>("cast-assign")) {
+ auto StartLoc = MatchedDecl->getCallee()->getExprLoc();
+ auto EndLoc = StartLoc.getLocWithOffset(StringRef("cast").size() - 1);
----------------
Eugene.Zelenko wrote:
> Please don't use auto where type is not obvious.
Happy to make the change, but thought the `get.*Loc()` methods were obvious?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D59802/new/
https://reviews.llvm.org/D59802
More information about the cfe-commits
mailing list