[clang-tools-extra] r346461 - Ignore implicit things like ConstantExpr.

Bill Wendling via cfe-commits cfe-commits at lists.llvm.org
Fri Nov 9 12:30:27 PST 2018


This fix was submitted because a test was failing without it. :-)

On Thu, Nov 8, 2018 at 10:08 PM Roman Lebedev <lebedev.ri at gmail.com> wrote:

> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20181109/34f12cd5/attachment-0001.html>


More information about the cfe-commits mailing list