[clang-tools-extra] r346461 - Ignore implicit things like ConstantExpr.
Bill Wendling via cfe-commits
cfe-commits at lists.llvm.org
Thu Nov 8 17:32:30 PST 2018
Author: void
Date: Thu Nov 8 17:32:30 2018
New Revision: 346461
URL: http://llvm.org/viewvc/llvm-project?rev=346461&view=rev
Log:
Ignore implicit things like ConstantExpr.
Modified:
clang-tools-extra/trunk/clang-tidy/performance/NoexceptMoveConstructorCheck.cpp
Modified: clang-tools-extra/trunk/clang-tidy/performance/NoexceptMoveConstructorCheck.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/performance/NoexceptMoveConstructorCheck.cpp?rev=346461&r1=346460&r2=346461&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-tidy/performance/NoexceptMoveConstructorCheck.cpp (original)
+++ clang-tools-extra/trunk/clang-tidy/performance/NoexceptMoveConstructorCheck.cpp Thu Nov 8 17:32:30 2018
@@ -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;
More information about the cfe-commits
mailing list