[PATCH] D146971: [Sema] Populate declarations inside TypeLocs for some invalid types

2023-04-06 Thread Ilya Biryukov via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGf27b77e5c59a: [Sema] Populate declarations inside TypeLocs for some invalid types (authored by ilya-biryukov). Repository: rG LLVM Github

[PATCH] D146971: [Sema] Populate declarations inside TypeLocs for some invalid types

2023-04-06 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. Sorry for taking so long to land this, it fell off my radar. In D146971#4227482 , @aaron.ballman wrote: > LGTM, though the change should come with a release note. Suggestion you can > take or leave as you see fit: should

[PATCH] D146971: [Sema] Populate declarations inside TypeLocs for some invalid types

2023-04-06 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 511463. ilya-biryukov added a comment. - Another forgotten non-null assertion Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146971/new/ https://reviews.llvm.org/D146971 Files:

[PATCH] D146971: [Sema] Populate declarations inside TypeLocs for some invalid types

2023-04-06 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 511462. ilya-biryukov added a comment. - Add assertions for removed null checks Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146971/new/ https://reviews.llvm.org/D146971 Files:

[PATCH] D146971: [Sema] Populate declarations inside TypeLocs for some invalid types

2023-03-28 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. LGTM, though the change should come with a release note. Suggestion you can take or leave as you see fit: should we turn the places where we removed the null pointer check into assertions that the pointer is nonnull? Or are we

[PATCH] D146971: [Sema] Populate declarations inside TypeLocs for some invalid types

2023-03-28 Thread Erich Keane via Phabricator via cfe-commits
erichkeane accepted this revision. erichkeane added inline comments. This revision is now accepted and ready to land. 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

[PATCH] D146971: [Sema] Populate declarations inside TypeLocs for some invalid types

2023-03-28 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. In D146971#4224540 , @erichkeane wrote: > Ah, hrmph. I guess I was just hoping for some assert (perhaps even in > `GetFullTypeForDeclarator`?) to assert in order to give future folks a hint > as to why their change

[PATCH] D146971: [Sema] Populate declarations inside TypeLocs for some invalid types

2023-03-28 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. i've added a reproducer for https://reviews.llvm.org/D146634, can you patch that into here? unfortunately i couldn't get it to crash in any place other than through clangd. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D146971: [Sema] Populate declarations inside TypeLocs for some invalid types

2023-03-27 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. In D146971#4224519 , @ilya-biryukov wrote: > In D146971#4224465 , @erichkeane > wrote: > >> One other thing we probably should do is have an assert when creating a >> function type

[PATCH] D146971: [Sema] Populate declarations inside TypeLocs for some invalid types

2023-03-27 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. In D146971#4224465 , @erichkeane wrote: > One other thing we probably should do is have an assert when creating a > function type that none of its params are null. WDYT? This would definitely be great, however I don't

[PATCH] D146971: [Sema] Populate declarations inside TypeLocs for some invalid types

2023-03-27 Thread Erich Keane via Phabricator via cfe-commits
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");

[PATCH] D146971: [Sema] Populate declarations inside TypeLocs for some invalid types

2023-03-27 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov created this revision. ilya-biryukov added reviewers: aaron.ballman, erichkeane. Herald added a subscriber: arphaman. Herald added a project: All. ilya-biryukov requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This also