[PATCH] D76424: [AST] Use TypeDependence bitfield to calculate dependence on Types. NFC
Haojian Wu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Mar 20 00:30:58 PDT 2020
hokein accepted this revision.
hokein added a comment.
This revision is now accepted and ready to land.
Thanks.
================
Comment at: clang/lib/AST/Type.cpp:3036
- if (epi.ExceptionSpec.NoexceptExpr->isValueDependent() ||
- epi.ExceptionSpec.NoexceptExpr->isInstantiationDependent())
----------------
sammccall wrote:
> hokein wrote:
> > when converting an ExprDep to TypeDep, we simply drop the value-dependent bit, so here we will not set the instantiation-bit for typeDep if NoexceptExpr is value dependent but not instantiation-dependent.
> > if NoexceptExpr is value dependent but not instantiation-dependent.
>
> This never happens - value-dependence implies instantiation-dependence.
> (I'm not sure instantiation-dependence is a concept from the standard - maybe it just affects diagnostic quality - but https://itanium-cxx-abi.github.io/cxx-abi/abi.html is referring to the same concept that clang uses.)
>
> (Incidentally this means we could model instantiation/value/type dependence as as `unsigned : 2` - this would save a bit and make some of the logic clearer, like that "turn type to value dependence" is a downgrade)
ah, right. I missed the fact that value-dependence implies instantiation-dependence when reading the code.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D76424/new/
https://reviews.llvm.org/D76424
More information about the cfe-commits
mailing list