From 98b74fc7d695b29a26ce3c15816002513dffd395 Mon Sep 17 00:00:00 2001 From: Yan Wang Date: Wed, 7 Jun 2017 22:39:20 +0000 Subject: [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 --- clang-tools-extra/clang-tidy/misc/NoexceptMoveConstructorCheck.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'clang-tools-extra/clang-tidy/misc/NoexceptMoveConstructorCheck.cpp') diff --git a/clang-tools-extra/clang-tidy/misc/NoexceptMoveConstructorCheck.cpp b/clang-tools-extra/clang-tidy/misc/NoexceptMoveConstructorCheck.cpp index 12a360f4ba7..2fdcf75083f 100644 --- a/clang-tools-extra/clang-tidy/misc/NoexceptMoveConstructorCheck.cpp +++ b/clang-tools-extra/clang-tidy/misc/NoexceptMoveConstructorCheck.cpp @@ -20,7 +20,7 @@ namespace misc { 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( -- cgit v1.2.3