PR46859: Fix crash if declaring a template in a DeclScope with no DeclContext.
authorRichard Smith <richard@metafoo.co.uk>
Wed, 29 Jul 2020 19:01:47 +0000 (12:01 -0700)
committerRichard Smith <richard@metafoo.co.uk>
Wed, 29 Jul 2020 19:02:55 +0000 (12:02 -0700)
commite69138dad5a535c4027a1931f05cabab0f484974
tree067478e359e05ed2850a61a2e2002e6e0166736b
parent7aaa85627b5937364d4c944d8f6828a6a3759785
PR46859: Fix crash if declaring a template in a DeclScope with no DeclContext.

This can happen during error recovery; it could also happen at block
scope if we ever parsed a template declaration at block scope.
clang/lib/Sema/SemaTemplate.cpp
clang/test/SemaCXX/extern-c.cpp