summaryrefslogtreecommitdiffstats
path: root/clang/test/Parser/cxx-concepts-ambig-constraint-expr.cpp
blob: 1cd2605ce055604e5d49bb8fa5e77ca3d3d1a40e (plain)
1
2
3
4
5
6
7
8
9
// RUN: %clang_cc1 -std=c++14 -fconcepts-ts -x c++ %s -verify

// Test parsing of constraint-expressions in cases where the grammar is
// ambiguous with the expectation that the longest token sequence which matches
// the syntax is consumed without backtracking.

// type-specifier-seq in conversion-type-id
template <typename T> requires T::operator short
unsigned int foo(); // expected-error {{C++ requires a type specifier for all declarations}}
OpenPOWER on IntegriCloud