[PATCH] D85601: Fixes an assertion when IntRange processes a throw expression

2020-08-16 Thread Mark de Wever via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG827ba67e3833: [Sema] Validate calls to GetExprRange. (authored by Mordante). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85601/new/

[PATCH] D85601: Fixes an assertion when IntRange processes a throw expression

2020-08-14 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. Thanks! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85601/new/ https://reviews.llvm.org/D85601 ___ cfe-commits mailing list

[PATCH] D85601: Fixes an assertion when IntRange processes a throw expression

2020-08-14 Thread Mark de Wever via Phabricator via cfe-commits
Mordante updated this revision to Diff 285704. Mordante marked an inline comment as done. Mordante added a comment. Addresses review comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85601/new/ https://reviews.llvm.org/D85601 Files: clang/lib/Sema/SemaChecking.cpp

[PATCH] D85601: Fixes an assertion when IntRange processes a throw expression

2020-08-14 Thread Mark de Wever via Phabricator via cfe-commits
Mordante marked 3 inline comments as done. Mordante added inline comments. Comment at: clang/lib/Sema/SemaChecking.cpp:10317-10320 IntRange L = GetExprRange(C, CO->getTrueExpr(), MaxWidth, InConstantContext); IntRange R = GetExprRange(C,

[PATCH] D85601: Fixes an assertion when IntRange processes a throw expression

2020-08-10 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: clang/lib/Sema/SemaChecking.cpp:10164 const BuiltinType *BT = cast(T); -assert(BT->isInteger()); +if (!BT->isInteger()) { + // This can happen in a conditional expression with a throw statement Mordante

[PATCH] D85601: Fixes an assertion when IntRange processes a throw expression

2020-08-10 Thread Mark de Wever via Phabricator via cfe-commits
Mordante marked an inline comment as done. Mordante added a comment. I added `void g()` since that's valid code which also caused an assertion failure. So the issue isn't in the error recovery but in determining the required IntRange. It seems the code doesn't take

[PATCH] D85601: Fixes an assertion when IntRange processes a throw expression

2020-08-09 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. Did this only crash during error recovery before, or also for your `void g()` example? If we were only crashing in error recovery, that would suggest that error recovery was producing a bad AST, and perhaps we should be fixing this elsewhere. Comment

[PATCH] D85601: Fixes an assertion when IntRange processes a throw expression

2020-08-09 Thread Mark de Wever via Phabricator via cfe-commits
Mordante created this revision. Mordante added reviewers: rsmith, rjmccall. Mordante added a project: clang. Mordante requested review of this revision. Fixes PR46484: Clang crash in clang/lib/Sema/SemaChecking.cpp:10028 Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D85601