[clang] [FlowSensitive][Expected] Model `operator==` and `operator!=` in `UncheckedExpectedAccessModel` [PR 2/N] (PR #244872)

Valentyn Yukhymenko via cfe-commits cfe-commits at lists.llvm.org
Sat Nov 21 03:22:14 PST 2026


================
@@ -62,8 +62,9 @@ class UncheckedExpectedAccessTest
   //   for an unchecked error access on that line.
   void ExpectDiagnosticsFor(std::string SourceCode) {
     // `tl::expected` is usable since C++17, and `std::expected` since C++23.
-    for (const char *CxxMode : {"-std=c++17", "-std=c++23"})
-      ExpectDiagnosticsFor(SourceCode, CxxMode);
+    if (GetParam().NamespaceName == "tl")
+      ExpectDiagnosticsFor(SourceCode, "-std=c++17");
----------------
BaLiKfromUA wrote:

Changed this because C++17 fails to parse concepts' `requires` from  C++20.

But I still want to run `tl:expected` testing both under C++17 and C++23

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


More information about the cfe-commits mailing list