[PATCH] D84222: [AST][RecoveryExpr] Error-dependent expression should not be treat as a nullptr pointer constant.
Sam McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jul 21 02:21:50 PDT 2020
sammccall accepted this revision.
sammccall added inline comments.
This revision is now accepted and ready to land.
================
Comment at: clang/lib/AST/Expr.cpp:3747
case NPC_ValueDependentIsNull:
- if (isTypeDependent() || getType()->isIntegralType(Ctx))
+ if ((!containsErrors() && isTypeDependent()) ||
+ getType()->isIntegralType(Ctx))
----------------
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?
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