[clang-cl] Ignore /Wv and /Wv:17 flags
[llvm-project.git] / clang / test / Analysis / plist-diagnostics-template-function.cpp
blob1f44a789cc922c49ce14014fc62f55fb03927bcd
1 // RUN: %clang_analyze_cc1 -analyzer-output=plist -o %t.plist -std=c++11 -analyzer-checker=core %s
2 // RUN: FileCheck --input-file=%t.plist %s
4 bool ret();
6 template <class T>
7 void f(int i) {
8 if (ret())
9 i = i / (i - 5);
12 template <>
13 void f<int>(int i) {
14 if (ret())
15 i = i / (i - 5);
18 template <int N = 0>
19 void defaultTemplateParameterFunction(int i) {
20 if (ret())
21 int a = 10 / i;
24 template <typename... Args>
25 void variadicTemplateFunction(int i) {
26 if (ret())
27 int a = 10 / i;
30 int main() {
31 f<int>(5);
32 f<float>(5);
33 defaultTemplateParameterFunction<>(0);
34 variadicTemplateFunction<char, float, double, int *>(0);
37 // CHECK: <string>Calling &apos;f&lt;float&gt;&apos;</string>
38 // CHECK: <string>Calling &apos;f&lt;int&gt;&apos;</string>
39 // CHECK: <string>Calling &apos;defaultTemplateParameterFunction&lt;0&gt;&apos;</string>
40 // CHECK: <string>Calling &apos;variadicTemplateFunction&lt;char, float, double, int *&gt;&apos;</string>