================
@@ -0,0 +1,174 @@
+// RUN: %clang_cc1 -std=c2y -verify %s
+
+bool test_if() {
----------------
AaronBallman wrote:

Some additional test coverage is needed:
```
// 6.8.5.1p4
if (int scope_check = 12; scope_check) {
} else {
  scope_check = 100; // This should be fine
}
scope_check = 100; // lookup error about scope_check not being declared

if (struct ScopeCheck { int x; } s = {}; s.x == 0) {
} else if (false) {
  struct ScopeCheck works; // okay
} else {
  struct ScopeCheck works; // okay
}
struct ScopeCheck nope; // Lookup error
```

https://github.com/llvm/llvm-project/pull/198244
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to