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

Dmitri Gribenko via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 8 08:48:51 PDT 2020


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 duplicate the comment from the header in the cpp file.


================
Comment at: clang-tools-extra/clang-tidy/utils/Aliasing.h:18
+
+/// Returns whether a ``Var`` has a pointer or reference in ``Func``
+bool hasPtrOrReferenceInFunc(const FunctionDecl *Func, const VarDecl *Var);
----------------
Could you expand the comment? Best if you could add an example.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D81396





More information about the cfe-commits mailing list