Files
clang-p2996/clang/docs
Oleksandr T. 05b6c2e4b9 [Clang] fix range calculation for conditionals with throw expressions (#112081)
Fixes #111854

---

The issue arises when `GetExprRange` encounters a `ConditionalOperator`
with a `CXXThrowExpr`

```md
ConditionalOperator 0x1108658e0 'int'
|-CXXBoolLiteralExpr 0x110865878 '_Bool' true
|-CXXThrowExpr 0x1108658a8 'void'
| `-IntegerLiteral 0x110865888 'int' 0
`-IntegerLiteral 0x1108658c0 'int' 0
```


ed3d051782/clang/lib/Sema/SemaChecking.cpp (L9628-L9631)

The current behavior causes the `GetExprRange` to proceed with the throw
expression (`CO->getTrueExpr()`/`void` type)
2024-10-29 10:44:01 +01:00
..