1 // RUN: %clang_analyze_cc1 %s \
2 // RUN:   -analyzer-checker=core \
3 // RUN:   -analyzer-checker=apiModeling.StdCLibraryFunctions \
4 // RUN:   -analyzer-checker=debug.StdCLibraryFunctionsTester \
5 // RUN:   -analyzer-config apiModeling.StdCLibraryFunctions:DisplayLoadedSummaries=true \
6 // RUN:   -triple i686-unknown-linux 2>&1 | FileCheck %s
7 
8 // The signatures for these functions are the same and they specify their
9 // parameter with the restrict qualifier. In C, the signature should match only
10 // if the restrict qualifier is there on the parameter. Thus, the summary
11 // should be loaded for the last two declarations only.
12 void __test_restrict_param_0(void *p);
13 void __test_restrict_param_1(void *__restrict p);
14 void __test_restrict_param_2(void *restrict p);
15 
16 // CHECK-NOT: Loaded summary for: void __test_restrict_param_0
17 //     CHECK: Loaded summary for: void __test_restrict_param_1(void *restrict p)
18 //     CHECK: Loaded summary for: void __test_restrict_param_2(void *restrict p)
19 
20 // Must have at least one call expression to initialize the summary map.
21 int bar(void);
foo()22 void foo() {
23   bar();
24 }
25