alexfh requested changes to this revision. alexfh added inline comments. This revision now requires changes to proceed.
================ 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 ---------------- Function names should follow llvm conventions http://llvm.org/docs/CodingStandards.html#name-types-functions-variables-and-enumerators-properly ================ 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: > 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. ================ Comment at: clang-tidy/bugprone/ExceptionEscapeCheck.cpp:115 + return Result; + } else { + TypeVec Result; ---------------- No `else` after `return`. ================ Comment at: clang-tidy/bugprone/ExceptionEscapeCheck.cpp:142 + if (const auto *TD = ThrownType->getAsTagDecl()) { + if (TD->getNameAsString() == "bad_alloc") + return Results; ---------------- Don't use getNameAsString when not necessary. `if (TD->getDeclName().isIdentifier() && TD->getName() == "bad_alloc")` will work as good, but without unnecessary string copies. https://reviews.llvm.org/D33537 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits