From ec54d6121caceaa17aac6b16d8eb00717a66f54a Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Fri, 9 Nov 2018 01:32:30 +0000 Subject: [PATCH] Ignore implicit things like ConstantExpr. llvm-svn: 346461 --- .../clang-tidy/performance/NoexceptMoveConstructorCheck.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/clang-tools-extra/clang-tidy/performance/NoexceptMoveConstructorCheck.cpp b/clang-tools-extra/clang-tidy/performance/NoexceptMoveConstructorCheck.cpp index 111f24d8ebe9..adc5910be446 100644 --- a/clang-tools-extra/clang-tidy/performance/NoexceptMoveConstructorCheck.cpp +++ b/clang-tools-extra/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(ProtoType->getNoexceptExpr())) { + E = E->IgnoreImplicit(); + if (!isa(E)) { diag(E->getExprLoc(), "noexcept specifier on the move %0 evaluates to 'false'") << MethodType;