[clang-cl] Ignore /Wv and /Wv:17 flags
[llvm-project.git] / clang / test / Analysis / std-c-library-functions-restrict.cpp
blobd1cd090f5ef851a2caeb974bc86442f2cf2d2117
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
8 // The signatures for these functions are the same and they specify their
9 // parameter with the restrict qualifier. In C++, however, we are more
10 // indulgent and we do not match based on this qualifier. Thus, the given
11 // signature should match for both of the declarations below, i.e the summary
12 // should be loaded for both of them.
13 void __test_restrict_param_0(void *p);
14 void __test_restrict_param_1(void *__restrict p);
15 // The below declaration is illegal, "restrict" is not a keyword in C++.
16 // void __test_restrict_param_2(void *restrict p);
18 // CHECK: Loaded summary for: void __test_restrict_param_0(void *p)
19 // CHECK: Loaded summary for: void __test_restrict_param_1(void *__restrict p)
21 // Must have at least one call expression to initialize the summary map.
22 int bar(void);
23 void foo() {
24 bar();