[clang] Add check in SemaChecking for multiple unsequenced volatile accesses (PR #180955)

Shafik Yaghmour via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 2 16:48:24 PST 2026


================
@@ -14192,11 +14194,22 @@ class SequenceChecker : public ConstEvaluatedExprVisitor<SequenceChecker> {
     if (OtherKind == UK_Use)
       std::swap(Mod, ModOrUse);
 
+    unsigned DiagID = 0;
+    switch (WarnKind) {
+    case WK_UseAndMod:
+      DiagID = diag::warn_unsequenced_mod_use;
----------------
shafik wrote:

Your tests are only covering one of these diagnostics, we need tests that cover all three. IF we don't then we are likely to introduce regressions or perhaps it is likely there is uncaught bug.

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


More information about the cfe-commits mailing list