Skip to content

Commit 55962dc

Browse files
committed
Add FP suspect case
1 parent 423328b commit 55962dc

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
@@ -29,6 +29,18 @@ static void foo(B &b) noexcept {
2929
b3->g();
3030
}
3131

32+
template <typename T> void test() {
33+
T t;
34+
t.g();
35+
}
36+
37+
template <typename T> void call_test() {
38+
// call it with type parameter B to trigger indexing
39+
test<T>();
40+
}
41+
42+
void call_call_test() { call_test<B>(); }
43+
3244
int test_useless_assignment(int &x, int p) {
3345
x = 0; // COMPLIANT - x is a reference parameter, so is visible by the caller
3446
int y = 0; // NON_COMPLIANT - never used

0 commit comments

Comments
 (0)