[clang] [clang][test] Add test for comma operator rejection in preprocessor conditionals (PR #155570)

NohHyeon Kwon via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 22 07:15:17 PDT 2025


swote-git wrote:

@Endilll Thanks for pointing out CWG 3017.
"Test 2" is testing exactly the same case as the CWG 3017 example:

```c
// Test 2: Comma in conditional expression
// expected-error at +1 {{comma operator in operand of #if}}
#if 1 ? 1, 0 : 3
#endif
```

Should I add a comment referencing CWG 3017 to make this connection explicit?

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


More information about the cfe-commits mailing list