Skip to content

Commit 4c9f192

Browse files
committed
Add FP suspect case
1 parent bf6e11d commit 4c9f192

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

cpp/autosar/test/rules/A0-1-1/test.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,18 @@ struct C {
1717
int m;
1818
};
1919

20+
template <typename T> void test() {
21+
T t;
22+
t.g();
23+
}
24+
25+
template <typename T> void call_test() {
26+
// call it with type parameter B to trigger indexing
27+
test<T>();
28+
}
29+
30+
void call_call_test() { call_test<B>(); }
31+
2032
int test_useless_assignment(int &x, int p) {
2133
x = 0; // COMPLIANT - x is a reference parameter, so is visible by the caller
2234
int y = 0; // NON_COMPLIANT - never used

0 commit comments

Comments
 (0)