Suppress spurious "typecheck_cond_expect_scalar_operand" diagnostic.
See whole context: https://reviews.llvm.org/D85025
Differential D84387
[AST][RecoveryExpr] Part4: Support dependent cast-expr in C for error-recovery. hokein on Jul 23 2020, 12:12 AM. Authored by
Details Suppress spurious "typecheck_cond_expect_scalar_operand" diagnostic. See whole context: https://reviews.llvm.org/D85025
Diff Detail
Unit Tests
Event Timeline
Comment Actions Sorry for losing track of this. Where is CDependence defined? Is this stacked on another patch? Comment Actions yes. Sorry for not being clear here, this is stacked on another patch. I have renamed these patches (Part 1, 2, 3...). The review should go Part 1 first. Comment Actions I'm not sure I love having the assertion for contains-errors every place that handles dependent code in C.
Comment Actions
My feeling is that the assertion would help for understanding the code (comparing with documenting it somewhere), and we don't have too many places. |
This is similar to the way how C++ codepath handles dependent code, https://github.com/llvm/llvm-project/blob/master/clang/lib/Sema/SemaCast.cpp#L2527-L2532.