[PATCH] D141058: [clang-tidy] fix wrong fixup for bugprone-implicit-widening-of-multiplication-result

Eugene Zelenko via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 5 12:54:52 PST 2023


Eugene.Zelenko added inline comments.


================
Comment at: clang-tools-extra/clang-tidy/bugprone/ImplicitWideningOfMultiplicationResultCheck.cpp:107
                 << E->getSourceRange();
+    auto LocForEndOfToken =
+        Lexer::getLocForEndOfToken(E->getEndLoc(), 0, SM, LangOpts);
----------------
Please don't use `auto` unless type is explicitly stated in same statement or iterator.


================
Comment at: clang-tools-extra/clang-tidy/bugprone/ImplicitWideningOfMultiplicationResultCheck.cpp:221
                 << IndexExpr->getSourceRange();
+    auto LocForEndOfToken =
+        Lexer::getLocForEndOfToken(IndexExpr->getEndLoc(), 0, SM, LangOpts);
----------------
Ditto.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D141058/new/

https://reviews.llvm.org/D141058



More information about the cfe-commits mailing list