[Clang] Fix crash in isCXXDeclarationSpecifier when attempting to annotate template...
authorShafik Yaghmour <shafik.yaghmour@intel.com>
Thu, 29 Jun 2023 22:38:14 +0000 (15:38 -0700)
committerShafik Yaghmour <shafik.yaghmour@intel.com>
Thu, 29 Jun 2023 22:42:18 +0000 (15:42 -0700)
commitd1fcce97a6af872e64b365d80d5b85eb94487dc8
tree15e5da2586266bd5232811da98c799ab0aa8b5c7
parent40cdb220f5af63160679def0aee23aa1cbd49b60
[Clang] Fix crash in isCXXDeclarationSpecifier when attempting to annotate template name

When attempting to decide if in C++17 a type template for class template
argument deduction and the code is ill-formed the condition to break is
checking the current token is an identifier when it should be checking
if the next token is not ::.

This fixes: https://github.com/llvm/llvm-project/issues/57495
https://github.com/llvm/llvm-project/issues/63052

Differential Revision: https://reviews.llvm.org/D134334
clang/docs/ReleaseNotes.rst
clang/lib/Parse/ParseTentative.cpp
clang/test/Parser/cxx1z-class-template-argument-deduction.cpp