[RISCV] Simplify usage of SplatPat_simm5_plus1. NFC (#125340)
[llvm-project.git] / clang / test / SemaCXX / warn-deprecated-specializations-in-system-headers.cpp
blob79c9d339b6f2058bc081faf44aed3e12bb0ea130
1 // RUN: %clang_cc1 -fsyntax-only -verify %s
3 #ifdef BE_THE_HEADER
4 #pragma clang system_header
6 template <typename T>
7 struct traits;
9 template <>
10 struct [[deprecated]] traits<int> {}; // expected-note {{'traits<int>' has been explicitly marked deprecated here}}
12 template<typename T, typename Trait = traits<T>> // expected-warning {{'traits<int>' is deprecated}}
13 struct basic_string {};
15 // should not warn, defined and used in system headers
16 using __do_what_i_say_not_what_i_do = traits<int> ;
18 template<typename T, typename Trait = traits<double>>
19 struct should_not_warn {};
21 #else
22 #define BE_THE_HEADER
23 #include __FILE__
25 basic_string<int> test1; // expected-note {{in instantiation of default argument for 'basic_string<int>' required here}}
26 should_not_warn<int> test2;
28 #endif