================ @@ -986,9 +987,22 @@ class Analyzer { if (auto *Dtor = dyn_cast<CXXDestructorDecl>(CurrentCaller.CDecl)) followDestructor(dyn_cast<CXXRecordDecl>(Dtor->getParent()), Dtor); - if (auto *FD = dyn_cast<FunctionDecl>(CurrentCaller.CDecl)) + if (auto *FD = dyn_cast<FunctionDecl>(CurrentCaller.CDecl)) { TrailingRequiresClause = FD->getTrailingRequiresClause(); + // Note that FD->getType->getAs<FunctionProtoType>() can yield a + // noexcept Expr which has been boiled down to a constant expression. + // Going through the TypeSourceInfo obtains the actual expression which + // will be traversed as part of the function -- unless we capture it + // here and have TraverseStmt skip it. + if (TypeSourceInfo *TSI = FD->getTypeSourceInfo()) { + FunctionProtoTypeLoc TL = + TSI->getTypeLoc().getAs<FunctionProtoTypeLoc>(); + if (const FunctionProtoType *FPT = TL.getTypePtr()) ---------------- dougsonos wrote:
Yup indeed the C no-prototype test was crashing :/ https://github.com/llvm/llvm-project/pull/115342 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits