[PATCH] D84222: [AST][RecoveryExpr] Error-dependent expression should not be treat as a nullptr pointer constant.
Haojian Wu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 22 01:01:45 PDT 2020
hokein added inline comments.
================
Comment at: clang/lib/AST/Expr.cpp:3747
case NPC_ValueDependentIsNull:
- if (isTypeDependent() || getType()->isIntegralType(Ctx))
+ if ((!containsErrors() && isTypeDependent()) ||
+ getType()->isIntegralType(Ctx))
----------------
sammccall wrote:
> would it be clearer to say if (containsErrors()) return NPCK_NotNull at the top?
>
> Only difference in behavior is not hitting llvm_unreachable if we have NPC_NeverValueDependent... do you think we actually want that?
this is good point, I missed that. thanks!
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D84222/new/
https://reviews.llvm.org/D84222
More information about the cfe-commits
mailing list