1 // RUN: %clang_analyze_cc1 -std=c++1z -analyzer-checker=alpha.clone.CloneChecker -analyzer-config alpha.clone.CloneChecker:MinimumCloneComplexity=10 -verify %s
3 // expected-no-diagnostics
8 // Calls method a with some extra code to pass the minimum complexity
17 // Calls method b with some extra code to pass the minimum complexity
26 // Test that we don't crash on function pointer calls
38 // Test that we respect the template arguments of function templates
40 template<typename T
, unsigned N
>
41 bool templateFunc() { unsigned i
= N
; return false; }
43 bool fooTemplate1(int x
) {
47 return templateFunc
<int, 1>();
51 bool fooTemplate2(int x
) {
55 return templateFunc
<long, 1>();
59 bool fooTemplate3(int x
) {
63 return templateFunc
<long, 2>();
67 // Test that we don't just concatenate the template arguments into a string
68 // without having any padding between them (e.g. foo<X, XX>() != foo<XX, X>()).
73 template<typename T1
, typename T2
>
74 bool templatePaddingFunc() { return false; }
76 bool fooTemplatePadding1(int x
) {
80 return templatePaddingFunc
<X
, XX
>();
84 bool fooTemplatePadding2(int x
) {
88 return templatePaddingFunc
<XX
, X
>();
92 // Test that we don't crash on member functions of template instantiations.
99 void fooTestInstantiation() {