================
@@ -21887,9 +21689,11 @@ ExprResult Sema::CheckPlaceholderExpr(Expr *E) {
case BuiltinType::ArraySection:
// If we've already diagnosed something on the array section type, we
// shouldn't need to do any further diagnostic here.
- if (!E->containsErrors())
- Diag(E->getBeginLoc(), diag::err_array_section_use)
- << cast<ArraySectionExpr>(E)->isOMPArraySection();
+ if (!E->containsErrors()) {
+ if (auto *ASE = dyn_cast<ArraySectionExpr>(E->IgnoreParens()))
----------------
ojhunt wrote:
I don't think it's safe to skip this error at all - we're in an error path and
if we skip emitting the error I think it's possible that we'll end up trying to
emit code. If you can work out a way to trigger this path we'll need to just
adjust the diagnostic we generate, not skip it entirely.
https://github.com/llvm/llvm-project/pull/183633
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits