llvm-project/clang/test/Parser/cxx-concept-declaration.cpp
Timm Bäder ef1bb11a34 [clang][Parse] Fix crash when emitting template diagnostic
This was passing a 6 to the diagnostic engine, which the diagnostic
message didn't handle.

Add the new value to the diagnosic message, remove an unused value and
add a test.

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

Differential Revision: https://reviews.llvm.org/D132821
2022-08-30 15:11:38 +02:00

13 lines
333 B
C++

// Support parsing of concepts
// Disabled for now.
// RUN: %clang_cc1 -std=c++20 -x c++ -verify %s
template<typename T> concept C1 = true;
template<class T>
concept C = true;
template<class T>
class C<int> {}; //expected-error{{identifier followed by '<' indicates a class template specialization but 'C' refers to a concept}}