[PATCH] D81396: [clang-tidy] New util `Aliasing` factored out from `bugprone-infinite-loop`

Nathan James via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 10 05:58:20 PDT 2020


njames93 accepted this revision.
njames93 added a comment.

LGTM, but with one more nit



================
Comment at: clang-tools-extra/clang-tidy/bugprone/InfiniteLoopCheck.cpp:16
 using namespace clang::ast_matchers;
+using clang::tidy::utils::hasPtrOrReferenceInFunc;
 
----------------
This function is only used once in the file, so may as well remove this line and just qualify its call further down.


================
Comment at: clang-tools-extra/clang-tidy/bugprone/InfiniteLoopCheck.cpp:60
 
       return hasPtrOrReferenceInFunc(Func, Var) ||
              isChanged(LoopStmt, Var, Context);
----------------
here.


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

https://reviews.llvm.org/D81396





More information about the cfe-commits mailing list