Rakete1111 added inline comments.
================ Comment at: lib/Sema/SemaDecl.cpp:9933 + llvm::any_of(FPT->param_types(), + [](QualType Q) { return hasNoexcept(Q); })) + return true; ---------------- You don't need this lambda. ================ Comment at: lib/Sema/SemaDecl.cpp:10266 auto *FPT = NewFD->getType()->castAs<FunctionProtoType>(); - bool AnyNoexcept = HasNoexcept(FPT->getReturnType()); - for (QualType T : FPT->param_types()) - AnyNoexcept |= HasNoexcept(T); - if (AnyNoexcept) + if (hasNoexcept(FPT->getReturnType()) || + llvm::any_of(FPT->param_types(), ---------------- What you're doing here is a subset of what `hasNoexcept` is doing for function types. Do you think it would make sense to use `!FPT->isNothrow() && hasNoexcept(NewFW->getType())` or something like that? ================ Comment at: lib/Sema/SemaDecl.cpp:10268 + llvm::any_of(FPT->param_types(), + [](QualType Q) { return hasNoexcept(Q); })) { Diag(NewFD->getLocation(), ---------------- Same, that lambda is unnecessary. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55039/new/ https://reviews.llvm.org/D55039 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits