Skip to content

Commit

Permalink
Merge pull request #482 from jketema/test-fix
Browse files Browse the repository at this point in the history
Fix ODR violations in AUTOSAR A2-10-5 test
  • Loading branch information
jketema authored Jan 10, 2024
2 parents 3e1205e + 978777e commit abc280a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
| test1a.cpp:2:12:2:13 | g1 | Identifier name of non-member object $@ reuses the identifier name of non-member object $@. | test1a.cpp:2:12:2:13 | g1 | g1 | test1b.cpp:2:12:2:13 | g1 | g1 |
| test1a.cpp:6:12:6:13 | g3 | Identifier name of non-member object $@ reuses the identifier name of non-member object $@. | test1a.cpp:6:12:6:13 | g3 | g3 | test1b.cpp:6:12:6:13 | g3 | g3 |
| test1a.cpp:17:43:17:43 | number_two | Identifier name of non-member object $@ reuses the identifier name of non-member object $@. | test1a.cpp:17:43:17:43 | number_two | number_two | test1b.cpp:11:43:11:43 | number_two | number_two |
| test1a.cpp:17:50:17:50 | number_two | Identifier name of non-member object $@ reuses the identifier name of non-member object $@. | test1a.cpp:17:50:17:50 | number_two | number_two | test1b.cpp:11:50:11:50 | number_two | number_two |
| test1b.cpp:2:12:2:13 | g1 | Identifier name of non-member object $@ reuses the identifier name of non-member object $@. | test1b.cpp:2:12:2:13 | g1 | g1 | test1a.cpp:2:12:2:13 | g1 | g1 |
| test1b.cpp:6:12:6:13 | g3 | Identifier name of non-member object $@ reuses the identifier name of non-member object $@. | test1b.cpp:6:12:6:13 | g3 | g3 | test1a.cpp:6:12:6:13 | g3 | g3 |
| test1b.cpp:11:43:11:43 | number_two | Identifier name of non-member object $@ reuses the identifier name of non-member object $@. | test1b.cpp:11:43:11:43 | number_two | number_two | test1a.cpp:17:43:17:43 | number_two | number_two |
| test1b.cpp:11:50:11:50 | number_two | Identifier name of non-member object $@ reuses the identifier name of non-member object $@. | test1b.cpp:11:50:11:50 | number_two | number_two | test1a.cpp:17:50:17:50 | number_two | number_two |
2 changes: 1 addition & 1 deletion cpp/autosar/test/rules/A2-10-5/test1a.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ int test() { return number_one<int>; }

long test2() { return number_one<long>; }

template <class T> constexpr T number_two = T(1); // NON_COMPLIANT
template <class T> static constexpr T number_two = T(1); // NON_COMPLIANT

int test3() { return number_two<int>; }

Expand Down
6 changes: 3 additions & 3 deletions cpp/autosar/test/rules/A2-10-5/test1b.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ static int g3 = 0; // NON_COMPLIANT

static void f1() {} // NON_COMPLIANT

template <class T> constexpr T number_two = T(1); // NON_COMPLIANT
template <class T> static constexpr T number_two = T(1); // NON_COMPLIANT

int test3() { return number_two<int>; }
int test5() { return number_two<int>; }

long test4() { return number_two<long>; }
long test6() { return number_two<long>; }

0 comments on commit abc280a

Please sign in to comment.