diff options
author | Bill Wendling <isanbard@gmail.com> | 2018-11-09 01:32:30 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2018-11-09 01:32:30 +0000 |
commit | a021bd5a827041bafeb5d14931ecbc895e9772cf (patch) | |
tree | 0babe897d33376c7d688c1d12bf320db6216d597 /clang-tidy/performance | |
parent | 69f3a508988df6e41450877c1855e50b924751d1 (diff) |
Ignore implicit things like ConstantExpr.
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@346461 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'clang-tidy/performance')
-rw-r--r-- | clang-tidy/performance/NoexceptMoveConstructorCheck.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang-tidy/performance/NoexceptMoveConstructorCheck.cpp b/clang-tidy/performance/NoexceptMoveConstructorCheck.cpp index 111f24d8..adc5910b 100644 --- a/clang-tidy/performance/NoexceptMoveConstructorCheck.cpp +++ b/clang-tidy/performance/NoexceptMoveConstructorCheck.cpp @@ -58,7 +58,8 @@ void NoexceptMoveConstructorCheck::check( // where expr evaluates to false. if (ProtoType->canThrow() == CT_Can) { Expr *E = ProtoType->getNoexceptExpr(); - if (!isa<CXXBoolLiteralExpr>(ProtoType->getNoexceptExpr())) { + E = E->IgnoreImplicit(); + if (!isa<CXXBoolLiteralExpr>(E)) { diag(E->getExprLoc(), "noexcept specifier on the move %0 evaluates to 'false'") << MethodType; |