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

Changed prior to commit:
  https://reviews.llvm.org/D52880?vs=168262&id=168301#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D52880

Files:
  clang-tidy/bugprone/ExceptionEscapeCheck.cpp


Index: clang-tidy/bugprone/ExceptionEscapeCheck.cpp
===================================================================
--- clang-tidy/bugprone/ExceptionEscapeCheck.cpp
+++ 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-tidy/bugprone/ExceptionEscapeCheck.cpp
===================================================================
--- clang-tidy/bugprone/ExceptionEscapeCheck.cpp
+++ 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