[clang-tools-extra] r346461 - Ignore implicit things like ConstantExpr.
Roman Lebedev via cfe-commits
cfe-commits at lists.llvm.org
Thu Nov 8 22:07:47 PST 2018
Test?
On Fri, Nov 9, 2018 at 4:34 AM Bill Wendling via cfe-commits
<cfe-commits at lists.llvm.org> wrote:
>
> 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 at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
More information about the cfe-commits
mailing list