Skip to content

Commit cdaffa0

Browse files
authored
Merge pull request #571 from rak3-sh/rp/a13-2-2
A13-2-2: Removes call to expensive API for pretty printing.
2 parents c90966a + 4e35355 commit cdaffa0

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
- `A13-2-2` - `BinaryOperatorAndBitwiseOperatorReturnAPrvalue.ql`:
2+
- Replaced the usage of getIdentityString() with toString() to avoid expensive computation to display the Operator names which were causing crashes on production code.

cpp/autosar/src/rules/A13-2-2/BinaryOperatorAndBitwiseOperatorReturnAPrvalue.ql

+1-2
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,4 @@ where
3131
o.getType() instanceof ReferenceType
3232
)
3333
select o,
34-
"User-defined bitwise or arithmetic operator " + getIdentityString(o) +
35-
" does not return a prvalue."
34+
"User-defined bitwise or arithmetic operator " + o.toString() + " does not return a prvalue."
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
| test.cpp:16:9:16:17 | operator- | User-defined bitwise or arithmetic operator A const operator-(A const&, int) does not return a prvalue. |
2-
| test.cpp:20:4:20:12 | operator\| | User-defined bitwise or arithmetic operator A* operator\|(A const&, A const&) does not return a prvalue. |
3-
| test.cpp:24:9:24:18 | operator<< | User-defined bitwise or arithmetic operator A const operator<<(A const&, A const&) does not return a prvalue. |
4-
| test.cpp:34:6:34:14 | operator+ | User-defined bitwise or arithmetic operator int& NS_C::operator+(C const&, C const&) does not return a prvalue. |
1+
| test.cpp:16:9:16:17 | operator- | User-defined bitwise or arithmetic operator operator- does not return a prvalue. |
2+
| test.cpp:20:4:20:12 | operator\| | User-defined bitwise or arithmetic operator operator\| does not return a prvalue. |
3+
| test.cpp:24:9:24:18 | operator<< | User-defined bitwise or arithmetic operator operator<< does not return a prvalue. |
4+
| test.cpp:34:6:34:14 | operator+ | User-defined bitwise or arithmetic operator operator+ does not return a prvalue. |

0 commit comments

Comments
 (0)