================ @@ -721,10 +722,17 @@ std::string PredefinedExpr::ComputeName(PredefinedIdentKind IK, return std::string(Out.str()); } if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(CurrentDecl)) { - if (IK != PredefinedIdentKind::PrettyFunction && - IK != PredefinedIdentKind::PrettyFunctionNoVirtual && - IK != PredefinedIdentKind::FuncSig && - IK != PredefinedIdentKind::LFuncSig) + const auto &LO = Context.getLangOpts(); + if ((ForceElaboratedPrinting && + (((IK == PredefinedIdentKind::Func || + IK == PredefinedIdentKind ::Function) && + !LO.MicrosoftExt) || + (IK == PredefinedIdentKind::LFunction && LO.MicrosoftExt))) || + (!ForceElaboratedPrinting && + (IK != PredefinedIdentKind::PrettyFunction && + IK != PredefinedIdentKind::PrettyFunctionNoVirtual && + IK != PredefinedIdentKind::FuncSig && + IK != PredefinedIdentKind::LFuncSig))) ---------------- Sirraide wrote:
Also, afaik you’re supposed to use `MSVCCompat`, not `MicrosoftExt` to check if we’re in ‘MSVC mode’, if you will. This isn’t really an ‘extension’ that would otherwise be disabled, so I don’t think `MicrosoftExt` is the right thing here. https://github.com/llvm/llvm-project/pull/84014 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits