================
@@ -15603,3 +15581,17 @@ void ASTContext::recordOffsetOfEvaluation(const
OffsetOfExpr *E) {
if (FieldDecl *FD = Comp.getField(); isPFPField(FD))
PFPFieldsWithEvaluatedOffset.insert(FD);
}
+
+bool ASTContext::maybeFoldMSConstexpr(
+ APValue &Val, SmallVectorImpl<PartialDiagnosticAt> &Notes) {
+ if (Notes.size() != 1 || !getLangOpts().MSVCCompat || Val.isLValue())
----------------
eleviant wrote:
Under what circumstances can this happen. To my understanding if evaluator sees
lvalue in sub expression then the result is either lvalue or None. The only
exception, I've found is label subtraction, e.g `(intptr_t)&&a -
(intptr_t)&&b`. I've added few examples demonstrating this behavior in latest
commit.
https://github.com/llvm/llvm-project/pull/197005
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits