[PATCH] D52880: [clang-tidy] fix PR39167, bugprone-exception-escape hangs-up

Jonas Toth via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 4 08:51:43 PDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rL343789: [clang-tidy] fix PR39167, bugprone-exception-escape hangs-up (authored by JonasToth, committed by ).
Herald added a subscriber: llvm-commits.

Repository:
  rL LLVM

https://reviews.llvm.org/D52880

Files:
  clang-tools-extra/trunk/clang-tidy/bugprone/ExceptionEscapeCheck.cpp


Index: clang-tools-extra/trunk/clang-tidy/bugprone/ExceptionEscapeCheck.cpp
===================================================================
--- clang-tools-extra/trunk/clang-tidy/bugprone/ExceptionEscapeCheck.cpp
+++ clang-tools-extra/trunk/clang-tidy/bugprone/ExceptionEscapeCheck.cpp
@@ -186,6 +186,9 @@
 }
 
 void ExceptionEscapeCheck::registerMatchers(MatchFinder *Finder) {
+  if (!getLangOpts().CPlusPlus || !getLangOpts().CXXExceptions)
+    return;
+
   Finder->addMatcher(
       functionDecl(allOf(throws(unless(isIgnored(IgnoredExceptions))),
                          anyOf(isNoThrow(), cxxDestructorDecl(),


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D52880.168300.patch
Type: text/x-patch
Size: 624 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20181004/4c26ead9/attachment.bin>


More information about the cfe-commits mailing list