[PATCH] D84322: [AST][RecoveryExpr] Part3: Suppress spurious "typecheck_cond_expect_scalar" diagnostic
Sam McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Sep 18 03:52:27 PDT 2020
sammccall added inline comments.
================
Comment at: clang/test/Sema/error-dependence.c:18
+ // type is required" is not emitted.
+ ptr > f ? ptr : f; // expected-error {{invalid operands to binary expression}}
+}
----------------
nit: parens would help me understand here :-)
I don't find this example compelling because we should know that "ptr > f" is a boolean.
Can we just have `undefined ? ptr : f`, expecting the only diag to be the undeclared ident?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D84322/new/
https://reviews.llvm.org/D84322
More information about the cfe-commits
mailing list