[PATCH] D33537: [clang-tidy] Exception Escape Checker

Balogh, Ádám via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 28 08:33:15 PDT 2018


baloghadamsoftware marked 4 inline comments as done.
baloghadamsoftware added inline comments.


================
Comment at: clang-tidy/bugprone/ExceptionEscapeCheck.cpp:24-25
+
+const TypeVec _throws(const FunctionDecl *Func);
+const TypeVec _throws(const Stmt *St, const TypeVec &Caught);
+} // namespace
----------------
alexfh wrote:
> alexfh wrote:
> > Function names should follow llvm conventions http://llvm.org/docs/CodingStandards.html#name-types-functions-variables-and-enumerators-properly
> If there's no need to pass nullptr to these functions, the arguments can be const references.
I agree in general, but I usually get `Stmt*` and `FunctionDecl*` from query functions, so it is simpler to pass them as they are instead of dereferencing them. The too many asterisks decrease the readability of the code. Furthermore, St may be `nullptr` in the second function.


https://reviews.llvm.org/D33537





More information about the cfe-commits mailing list