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 at: clang/lib/Sema/SemaChecking.cpp:10164
const BuiltinType *BT = cast<BuiltinType>(T);
- assert(BT->isInteger());
+ if (!BT->isInteger()) {
+ // This can happen in a conditional expression with a throw statement
----------------
Can we handle this in code that's specific to conditional expressions instead?
Presumably somewhere higher up in the call graph, some code is assuming that it
can recurse from a conditional expression to its subexpressions, and that
assumption is wrong.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D85601/new/
https://reviews.llvm.org/D85601
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits