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
..
2021-02-01 16:43:21 +05:30
2022-06-26 19:22:52 +05:30
2023-07-10 11:15:48 -04:00
2012-12-12 23:02:30 +00:00
2015-06-27 19:04:55 +00:00
2023-08-18 23:36:04 -07:00
2010-05-07 00:42:33 +00:00