[clang] Check for nullptr when instantiating late attrs
authorAdam Czachorowski <adamcz@google.com>
Mon, 18 Jan 2021 22:16:05 +0000 (23:16 +0100)
committerAdam Czachorowski <adamcz@google.com>
Tue, 19 Jan 2021 12:43:15 +0000 (13:43 +0100)
commita6f9077b16da90204b296acd4f840769e83460ac
treea0ab09a6ea3ac2a8d9796bcd5bbeff5766cc3e31
parent9a60ad216d2fa2e9701849922bfb0db9917f9c93
[clang] Check for nullptr when instantiating late attrs

This was already done in SemaTemplateInstantiateDecl.cpp, but not in
SemaTemplateInstantiate.cpp.

Anecdotally I've seen some clangd crashes where coredumps point to this
being a problem, but I cannot reproduce this so far.

Differential Revision: https://reviews.llvm.org/D94933
clang/lib/Sema/SemaTemplateInstantiate.cpp