Skip to content

Commit

Permalink
Merge pull request #571 from rak3-sh/rp/a13-2-2
Browse files Browse the repository at this point in the history
A13-2-2: Removes call to expensive API for pretty printing.
  • Loading branch information
lcartey committed Apr 25, 2024
2 parents c90966a + 4e35355 commit cdaffa0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
2 changes: 2 additions & 0 deletions change_notes/2024-04-22-improve-a13-2-2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- `A13-2-2` - `BinaryOperatorAndBitwiseOperatorReturnAPrvalue.ql`:
- Replaced the usage of getIdentityString() with toString() to avoid expensive computation to display the Operator names which were causing crashes on production code.
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,4 @@ where
o.getType() instanceof ReferenceType
)
select o,
"User-defined bitwise or arithmetic operator " + getIdentityString(o) +
" does not return a prvalue."
"User-defined bitwise or arithmetic operator " + o.toString() + " does not return a prvalue."
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
| test.cpp:16:9:16:17 | operator- | User-defined bitwise or arithmetic operator A const operator-(A const&, int) does not return a prvalue. |
| test.cpp:20:4:20:12 | operator\| | User-defined bitwise or arithmetic operator A* operator\|(A const&, A const&) does not return a prvalue. |
| 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. |
| 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. |
| test.cpp:16:9:16:17 | operator- | User-defined bitwise or arithmetic operator operator- does not return a prvalue. |
| test.cpp:20:4:20:12 | operator\| | User-defined bitwise or arithmetic operator operator\| does not return a prvalue. |
| test.cpp:24:9:24:18 | operator<< | User-defined bitwise or arithmetic operator operator<< does not return a prvalue. |
| test.cpp:34:6:34:14 | operator+ | User-defined bitwise or arithmetic operator operator+ does not return a prvalue. |

0 comments on commit cdaffa0

Please sign in to comment.