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(),


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(),
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to