[PATCH] D146971: [Sema] Populate declarations inside TypeLocs for some invalid types
Erich Keane via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Mar 27 08:16:20 PDT 2023
erichkeane added a comment.
One other thing we probably should do is have an assert when creating a function type that none of its params are null. WDYT?
================
Comment at: clang/lib/Sema/SemaType.cpp:5949
assert(!T.isNull() && "T must not be null at the end of this function");
- if (D.isInvalidType())
+ if (!AreDeclaratorChunksValid)
return Context.getTrivialTypeSourceInfo(T);
----------------
Shouldn't the `D.setInvalidType(true)` in each of the branches work here? So this variable is unnecessary? Else this is a good change IMO.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D146971/new/
https://reviews.llvm.org/D146971
More information about the cfe-commits
mailing list