[clang-cl] Ignore /Wv and /Wv:17 flags
[llvm-project.git] / clang / test / SemaCXX / pr51171-crash.cpp
blob29ab422a44c2ff582cfb3da56760a675b066e0c8
1 // RUN: %clang_cc1 -fsyntax-only -verify -std=c++17 %s
3 // Ensure that we don't crash if errors are suppressed by an error limit.
4 // RUN: not %clang_cc1 -fsyntax-only -std=c++17 -ferror-limit 1 %s
6 template <bool is_const, typename tag_t = void>
7 struct tv_val {
8 };
10 template <bool is_const>
11 auto &val(const tv_val<is_const> &val) { return val.val(); } // expected-note {{possible target for call}}
13 struct Class {
14 template <bool is_const>
15 struct Entry {
16 tv_val<is_const> val;
20 enum Types : int {
21 Class = 1, // expected-note 2 {{struct 'Class' is hidden}}
24 struct Record {
25 Class *val_; // expected-error {{must use 'struct' tag}}
26 void setClass(Class *); // expected-error {{must use 'struct' tag}}
29 void Record::setClass(Class *val) { // expected-error {{variable has incomplete type 'void'}} \
30 // expected-error {{reference to overloaded function}} \
31 // expected-error {{expected ';' after top level declarator}}
32 val_ = val;