================
@@ -15584,3 +15581,31 @@ void ASTContext::recordOffsetOfEvaluation(const
OffsetOfExpr *E) {
if (FieldDecl *FD = Comp.getField(); isPFPField(FD))
PFPFieldsWithEvaluatedOffset.insert(FD);
}
+
+bool ASTContext::maybeFoldMSConstexpr(
+ SmallVectorImpl<PartialDiagnosticAt> &Notes) {
+ if (Notes.size() != 1 || !getLangOpts().MSVCCompat)
+ return false;
+ auto &PD = Notes[0].second;
+ if (PD.getDiagID() != diag::note_constexpr_invalid_cast)
+ return false;
+ unsigned CastID;
+ switch (PD.getValueArg(0)) {
----------------
eleviant wrote:
Done.
https://github.com/llvm/llvm-project/pull/197005
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits