diff options
author | Yan Wang <yawanng@google.com> | 2017-06-07 17:41:59 +0000 |
---|---|---|
committer | Yan Wang <yawanng@google.com> | 2017-06-07 17:41:59 +0000 |
commit | bebc9b707c50dd066fedbe0055a02db90f02f8cc (patch) | |
tree | 3c05d9a0fceb645c47712a052b58828cc321d8b3 /clang-tools-extra/clang-tidy/cert/StaticObjectExceptionCheck.cpp | |
parent | 7922ac23f1f6a51448947837921297e60a0ed8d2 (diff) | |
download | bcm5719-llvm-bebc9b707c50dd066fedbe0055a02db90f02f8cc.tar.gz bcm5719-llvm-bebc9b707c50dd066fedbe0055a02db90f02f8cc.zip |
[clang-tidy] When" -fno-exceptions is used", this warning is better to be suppressed.
Summary: clang-tidy is better not to issues this warning, which checks where the initializer for the object may throw an exception, when "-fno-exceptions" is used.
Reviewers: chh, aaron.ballman
Reviewed By: aaron.ballman
Subscribers: xazax.hun
Tags: #clang-tools-extra
Differential Revision: https://reviews.llvm.org/D33917
llvm-svn: 304931
Diffstat (limited to 'clang-tools-extra/clang-tidy/cert/StaticObjectExceptionCheck.cpp')
-rw-r--r-- | clang-tools-extra/clang-tidy/cert/StaticObjectExceptionCheck.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang-tools-extra/clang-tidy/cert/StaticObjectExceptionCheck.cpp b/clang-tools-extra/clang-tidy/cert/StaticObjectExceptionCheck.cpp index c465ecc5996..45f9433deab 100644 --- a/clang-tools-extra/clang-tidy/cert/StaticObjectExceptionCheck.cpp +++ b/clang-tools-extra/clang-tidy/cert/StaticObjectExceptionCheck.cpp @@ -19,7 +19,7 @@ namespace tidy { namespace cert { void StaticObjectExceptionCheck::registerMatchers(MatchFinder *Finder) { - if (!getLangOpts().CPlusPlus) + if ((!getLangOpts().CPlusPlus) || (!getLangOpts().CXXExceptions)) return; // Match any static or thread_local variable declaration that has an |