[PATCH] D14824: [PATCH] Add clang-tidy check for static or thread_local objects where construction may throw

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 25 08:54:06 PST 2015


aaron.ballman added a comment.

In http://reviews.llvm.org/D14824#296574, @alexfh wrote:

> Sorry for the delay, I was sick last week.


No worries on the delay, I was sick the last two weeks as well. I hope you are feeling better!


================
Comment at: clang-tidy/cert/StaticObjectExceptionCheck.cpp:18
@@ +17,3 @@
+namespace {
+AST_MATCHER(CXXConstructorDecl, isNoThrowConstructor) {
+  const auto *FnTy = Node.getType()->getAs<FunctionProtoType>();
----------------
alexfh wrote:
> ThrownExceptionTypeCheck.cpp defines a similar matcher. Looks like we need to move the `isNothrow` part to the ASTMatchers.h already.
Agreed; implemented.

================
Comment at: clang-tidy/cert/StaticObjectExceptionCheck.h:18
@@ +17,3 @@
+
+/// FIXME: Write a short description.
+///
----------------
alexfh wrote:
> Maybe address the FIXME right away? ;)
LOL! Good catch. :-)


http://reviews.llvm.org/D14824





More information about the cfe-commits mailing list