[clang] [clang] implement current direction of CWG2765 for string literal comparisons in constant evaluation (PR #109208)

Eli Friedman via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 19 16:06:56 PDT 2024


================
@@ -8573,7 +8661,10 @@ class LValueExprEvaluator
   bool VisitMaterializeTemporaryExpr(const MaterializeTemporaryExpr *E);
   bool VisitCompoundLiteralExpr(const CompoundLiteralExpr *E);
   bool VisitMemberExpr(const MemberExpr *E);
-  bool VisitStringLiteral(const StringLiteral *E) { return Success(E); }
+  bool VisitStringLiteral(const StringLiteral *E) {
+    uint64_t Version = Info.getASTContext().getNextStringLiteralVersion();
----------------
efriedma-quic wrote:

getNextStringLiteralVersion() returns unsigned, not uint64_t?

https://github.com/llvm/llvm-project/pull/109208


More information about the cfe-commits mailing list