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;


_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to