[PATCH] D132821: [clang][Parse] Fix crash when emitting template diagnostic
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Aug 29 09:16:38 PDT 2022
aaron.ballman added a comment.
Please be sure to add a release note for the fix as well.
================
Comment at: clang/include/clang/Basic/DiagnosticParseKinds.td:776-779
"identifier followed by '<' indicates a class template specialization but "
"%0 %select{does not refer to a template|refers to a function template|"
- "<unused>|refers to a variable template|<unused>|refers to a concept}1">;
+ "<unused>|refers to a variable template|<unused>|refers to a concept|"
+ "refers to a concept template}1">;
----------------
I think the issue is that `TNK_Undeclared_template` was added but this diagnostic was not updated accordingly. As best I can tell, ParseDeclCXX.cpp:1715-1725 makes that kind unused in this diagnostic as well.
================
Comment at: clang/test/Parser/cxx-concept-declaration.cpp:3
// Support parsing of concepts
// Disabled for now.
----------------
tbaeder wrote:
> I guess we can drop these two lines now.
Agreed (feel free to land as an NFC commit)
================
Comment at: clang/test/Parser/cxx-concept-declaration.cpp:6-10
+template<typename T> concept C1 = true;
+
+
+
+template<class T>
----------------
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D132821/new/
https://reviews.llvm.org/D132821
More information about the cfe-commits
mailing list