This revision was automatically updated to reflect the committed changes.
Closed by commit rG4da65c2920b6: [clang-tidy] New util `Aliasing` factored out
from `bugprone-infinite-loop` (authored by baloghadamsoftware).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
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
baloghadamsoftware updated this revision to Diff 269779.
baloghadamsoftware added a comment.
Parameters in comments changed to `\p `.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D81396/new/
https://reviews.llvm.org/D81396
Files:
njames93 added inline comments.
Comment at: clang-tools-extra/clang-tidy/utils/Aliasing.cpp:17
+
+/// Return whether `S` is a reference to the declaration of `Var`.
+static bool isAccessForVar(const Stmt *S, const VarDecl *Var) {
Ditto `\p `.
gribozavr2 accepted this revision.
gribozavr2 added inline comments.
This revision is now accepted and ready to land.
Comment at: clang-tools-extra/clang-tidy/utils/Aliasing.h:29
+/// pointer to ``n`` created in ``f()``.
+
+bool hasPtrOrReferenceInFunc(const FunctionDecl *Func,
baloghadamsoftware updated this revision to Diff 269533.
baloghadamsoftware added a comment.
Thank you for the comment, @gribozavr2! Patch updated according to them.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D81396/new/
https://reviews.llvm.org/D81396
Files:
gribozavr2 added inline comments.
Comment at: clang-tools-extra/clang-tidy/utils/Aliasing.cpp:59
+
+/// Return whether `Var` has a pointer or reference in `Func`.
+bool hasPtrOrReferenceInFunc(const FunctionDecl *Func, const VarDecl *Var) {
Please don't
baloghadamsoftware created this revision.
baloghadamsoftware added reviewers: aaron.ballman, gribozavr2, JonasToth,
alexfh, hokein.
baloghadamsoftware added a project: clang-tools-extra.
Herald added subscribers: martong, steakhal, gamesh411, Szelethus, dkrupp,
rnkovacs, xazax.hun, whisperity,