[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 02:08:57 PDT 2020


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 <Name>`.


================
Comment at: clang-tools-extra/clang-tidy/utils/Aliasing.cpp:25
+
+/// Return whether `Var` has a pointer or reference in `S`.
+static bool isPtrOrReferenceForVar(const Stmt *S, const VarDecl *Var) {
----------------
Ditto.


================
Comment at: clang-tools-extra/clang-tidy/utils/Aliasing.cpp:43
+
+/// Return whether `Var` has a pointer or reference in `S`.
+static bool hasPtrOrReferenceInStmt(const Stmt *S, const VarDecl *Var) {
----------------
Ditto.


================
Comment at: clang-tools-extra/clang-tidy/utils/Aliasing.h:18
+
+/// Returns whether ``Var`` has a pointer or reference in ``Func``.
+///
----------------
Don't use double ticks for param names, instead use `\p <Name>`.


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

https://reviews.llvm.org/D81396





More information about the cfe-commits mailing list