summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clang-tidy/misc/NoexceptMoveConstructorCheck.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang-tools-extra/clang-tidy/misc/NoexceptMoveConstructorCheck.cpp')
-rw-r--r--clang-tools-extra/clang-tidy/misc/NoexceptMoveConstructorCheck.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/clang-tools-extra/clang-tidy/misc/NoexceptMoveConstructorCheck.cpp b/clang-tools-extra/clang-tidy/misc/NoexceptMoveConstructorCheck.cpp
index 155baf84ee9..ff6ba0c46fd 100644
--- a/clang-tools-extra/clang-tidy/misc/NoexceptMoveConstructorCheck.cpp
+++ b/clang-tools-extra/clang-tidy/misc/NoexceptMoveConstructorCheck.cpp
@@ -19,13 +19,14 @@ namespace tidy {
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) {
- Finder->addMatcher(
- methodDecl(anyOf(constructorDecl(), hasOverloadedOperatorName("=")),
- unless(isImplicit()), unless(isDeleted()))
- .bind("decl"),
- this);
- }
+ if (!getLangOpts().CPlusPlus11)
+ return;
+
+ Finder->addMatcher(
+ methodDecl(anyOf(constructorDecl(), hasOverloadedOperatorName("=")),
+ unless(isImplicit()), unless(isDeleted()))
+ .bind("decl"),
+ this);
}
void NoexceptMoveConstructorCheck::check(
OpenPOWER on IntegriCloud