[clang] [Clang] handle invalid close location in static assert declaration (PR #108701)

Oleksandr T. via cfe-commits cfe-commits at lists.llvm.org
Sun Sep 15 06:18:19 PDT 2024


a-tarasyuk wrote:

@zyn0217 Thanks for the detailed feedback. I considered handling it earlier and skipping the validation of the closing parenthesis, but I was concerned the message `"expected ';' after 'static_assert'"` might not be accurate in this case., I assumed `""` is a valid string, even if the next token is invalid - it doesn't make this string itself invalid. 

```cpp
static_assert(true, ""  // expected ';' after 'static_assert'
                        // expected ')'
                        // to match this '('


```
 

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


More information about the cfe-commits mailing list