[PATCH] D134286: [C2x] implement typeof and typeof_unqual
Matheus Izvekov via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Sep 20 10:46:12 PDT 2022
mizvekov added inline comments.
================
Comment at: clang/include/clang/AST/Type.h:4592
+ T->getDependence()), TOType(T), IsUnqual(IsUnqual) {
+ assert(!isa<TypedefType>(Can) && "Invalid canonical type");
}
----------------
erichkeane wrote:
> Are `TypedefType`'s EVER canonical? Should you just be asserting 'Can' is canonical?
They can't, the original assert didn't make much sense.
Though asserting on CanonicalType being canonical is a job better left to the `Type` constructor, just so we don't have to repeat it everywhere.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D134286/new/
https://reviews.llvm.org/D134286
More information about the cfe-commits
mailing list