[clang] Do not crash on template specialization following a fatal error
authorAdam Czachorowski <adamcz@google.com>
Thu, 15 Apr 2021 20:33:05 +0000 (22:33 +0200)
committerAdam Czachorowski <adamcz@google.com>
Fri, 23 Apr 2021 11:34:05 +0000 (13:34 +0200)
commitddfbdbfefae04ea71391a38ed5e9cb6975f6630b
treee77b670383f89fabe1aeb806a455d2e28e5d02b3
parent83b8f8da828383074f59d331c262200d65a4833e
[clang] Do not crash on template specialization following a fatal error

There was a missing isInvalid() check leading to an attempt to
instantiate template with an empty instantiation stack.

Differential Revision: https://reviews.llvm.org/D100675
clang/lib/Sema/SemaTemplateDeduction.cpp
clang/test/SemaCXX/template-specialization-fatal.cpp [new file with mode: 0644]