File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -36,12 +36,12 @@ def sed_escape(s: str) -> str:
3636compiler = lit_config .params .get ("compiler" )
3737if compiler == "clang" :
3838 config .available_features .add ("clang" )
39- config .substitutions .append (("%verify" , f"not clang++ { clang_flags } %s 2>&1 | FileCheck <({ diag_replacements } %s)" ))
40- config .substitutions .append (("%compile" , f"clang++ { clang_flags } %s 2>&1" ))
39+ config .substitutions .append (("%verify" , f"not clang++ { clang_flags } -c %s 2>&1 | FileCheck <({ diag_replacements } %s)" ))
40+ config .substitutions .append (("%compile" , f"clang++ { clang_flags } -c %s 2>&1" ))
4141elif compiler == "gcc" :
4242 config .available_features .add ("gcc" )
43- config .substitutions .append (("%verify" , f"not g++ { gcc_flags } %s 2>&1 | FileCheck <({ diag_replacements } %s)" ))
44- config .substitutions .append (("%compile" , f"g++ { gcc_flags } %s 2>&1" ))
43+ config .substitutions .append (("%verify" , f"not g++ { gcc_flags } -c %s 2>&1 | FileCheck <({ diag_replacements } %s)" ))
44+ config .substitutions .append (("%compile" , f"g++ { gcc_flags } -c %s 2>&1" ))
4545else :
4646 print (f"Invalid compiler. Select a compiler with -Dcompiler={{gcc,clang}}" )
4747 sys .exit (1 )
Original file line number Diff line number Diff line change 1+ // RUN: %verify
2+
3+ #include < chroma>
4+
5+ struct A {
6+ static constexpr auto error_message = " not in A" ;
7+ };
8+
9+ struct B : A {
10+ static constexpr auto error_message = " not in B" ;
11+ };
12+
13+ void fnc1 (callable_from<B> = {}) {}
14+
15+ void fnc2 (callable_from<A> = {}) {
16+ // STATIC_ASSERT: not in B
17+ fnc1 ();
18+ }
19+
20+ void fnc3 (callable_from<B> = {}) {
21+ fnc2 ();
22+ }
Original file line number Diff line number Diff line change 1+ // RUN: %verify
2+
3+ #include < chroma>
4+
5+ struct A {
6+ static constexpr auto error_message = " not in A" ;
7+ };
8+
9+ struct B {
10+ static constexpr auto error_message = " not in B" ;
11+ };
12+
13+ void fnc (callable_from<A> = {}) {}
14+ void other_fnc (callable_from<B> = {}) {
15+ // STATIC_ASSERT: not in A
16+ fnc ();
17+ }
18+
19+ void test () {
20+ // STATIC_ASSERT: not in B
21+ other_fnc ();
22+ }
Original file line number Diff line number Diff line change 1+ // RUN: %compile
2+
3+ #include < chroma>
4+
5+ struct A {
6+ static constexpr auto error_message = " not in A" ;
7+ };
8+
9+ struct B {
10+ static constexpr auto error_message = " not in B" ;
11+ };
12+
13+ void fnc1 (callable_from<A> = {}) {}
14+ void fnc2 (callable_from<B> = {}) {}
15+
16+ void test () {
17+ $with (A, B) {
18+ fnc1 ();
19+ fnc2 ();
20+ };
21+ }
Original file line number Diff line number Diff line change 1+ // RUN: %verify
2+
3+ #include < chroma>
4+
5+ struct A {
6+ static constexpr auto error_message = " not in A" ;
7+ };
8+
9+ struct B {
10+ static constexpr auto error_message = " not in B" ;
11+ };
12+
13+ void fnc1 (callable_from<A> = {}) {}
14+ void fnc2 (callable_from<B> = {}) {}
15+
16+ void test () {
17+ $with (A) {
18+ fnc1 ();
19+ // STATIC_ASSERT: not in B
20+ fnc2 ();
21+ };
22+ }
You can’t perform that action at this time.
0 commit comments