Skip to content

Do not use deprecated getFullSignature but use getIdentityString instead #239

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions change_notes/2023-03-06-A13-2-2-message.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- `A13-2-2` - `BinaryOperatorAndBitwiseOperatorReturnAPrvalue.ql`
- The formatting of the query output message has been changed and operators are now displayed starting with the return type instead of ending with it.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import cpp
import codingstandards.cpp.autosar
import codingstandards.cpp.Operator
import semmle.code.cpp.Print

from Operator o
where
Expand All @@ -30,5 +31,5 @@ where
o.getType() instanceof ReferenceType
)
select o,
"User-defined bitwise or arithmetic operator " + o.getFullSignature() +
"User-defined bitwise or arithmetic operator " + getIdentityString(o) +
" 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 operator-(const A &, int) -> const A does not return a prvalue. |
| test.cpp:20:4:20:12 | operator\| | User-defined bitwise or arithmetic operator operator\|(const A &, const A &) -> A * does not return a prvalue. |
| test.cpp:24:9:24:18 | operator<< | User-defined bitwise or arithmetic operator operator<<(const A &, const A &) -> const A does not return a prvalue. |
| test.cpp:34:6:34:14 | operator+ | User-defined bitwise or arithmetic operator NS_C::operator+(const C &, const C &) -> int & does not return a prvalue. |
| 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. |