File tree 1 file changed +19
-0
lines changed 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change
1
+ // RUN: rm -rf %t*
2
+ // RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines %s
3
+ // RUN: 3c -base-dir=%S -alltypes -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null -
4
+ // RUN: 3c -base-dir=%S -output-dir=%t.checked -alltypes %s --
5
+ // RUN: 3c -base-dir=%t.checked -alltypes %t.checked/overconstrained_merge.c -- | diff %t.checked/overconstrained_merge.c -
6
+
7
+ // Test checks for merging a function after the generics code adds a constraint
8
+ // The merge succeeds because it happens earlier in the codebase than the addition
9
+
10
+ // This test only uses -alltypes because of the use of _Array_ptr in the example
11
+ // (to distinguish from the _Ptr that will be added).
12
+ _Itype_for_any (T ) void free (void * : itype (_Array_ptr < T > ));
13
+ void b (void ) {
14
+ char * * c ;
15
+ free (c );
16
+ // CHECK: _Array_ptr<_Ptr<char>> c = ((void *)0);
17
+ // CHECK: free<_Ptr<char>>(c);
18
+ }
19
+ void free (void * );
You can’t perform that action at this time.
0 commit comments