[clang-tidy] When" -fno-exceptions is used", this warning is better to be suppressed.
Summary: "misc-noexcept-move-constructor" is better not to be issued when "-fno-exceptions" is set.
Reviewers: chh, alexfh, aaron.ballman
Reviewed By: aaron.ballman
Subscribers: aaron.ballman, cfe-commits, xazax.hun
Tags: #clang-tools-extra
Differential Revision: https://reviews.llvm.org/D34002
llvm-svn: 304949
diff --git a/clang-tools-extra/clang-tidy/misc/NoexceptMoveConstructorCheck.cpp b/clang-tools-extra/clang-tidy/misc/NoexceptMoveConstructorCheck.cpp
index 12a360f..2fdcf75 100644
--- a/clang-tools-extra/clang-tidy/misc/NoexceptMoveConstructorCheck.cpp
+++ b/clang-tools-extra/clang-tidy/misc/NoexceptMoveConstructorCheck.cpp
@@ -20,7 +20,7 @@
void NoexceptMoveConstructorCheck::registerMatchers(MatchFinder *Finder) {
// Only register the matchers for C++11; the functionality currently does not
// provide any benefit to other languages, despite being benign.
- if (!getLangOpts().CPlusPlus11)
+ if (!getLangOpts().CPlusPlus11 || !getLangOpts().CXXExceptions)
return;
Finder->addMatcher(