Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf0b53e2

Browse files
committed
Update expected results ofRULE-9-5-2
1 parent23aa711 commitf0b53e2

File tree

2 files changed

+13
-12
lines changed

2 files changed

+13
-12
lines changed

‎cpp/misra/src/rules/RULE-9-5-2/ForRangeInitializerAtMostOneFunctionCall.ql‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,10 @@
1919
import cpp
2020
import codingstandards.cpp.misra
2121

22-
fromRangeBasedForStmtforeach,stringmessage
22+
fromRangeBasedForStmtforeach,Exprinitializer
2323
where
2424
notisExcluded(foreach, StatementsPackage::forRangeInitializerAtMostOneFunctionCallQuery())and
25-
count(Callcall|call=foreach.getRange().getAChild*()|call)>=2and
26-
message="has nested call expression in its initializer"
27-
selectforeach,"Range-based for loop "+message+"."
25+
initializer=foreach.getRange()and
26+
count(Callcall|call=initializer.getAChild*()|call)>=2
27+
selectforeach,"Range-based for loop has nested call expression in its $@.",initializer,
28+
"initializer"
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
| test.cpp:48:3:49:3 | for(...:...) ... | Range-based for loop has nested call expression in itsinitializer. |
2-
| test.cpp:56:3:59:3 | for(...:...) ... | Range-based for loop has nested call expression in itsinitializer. |
3-
| test.cpp:71:3:73:3 | for(...:...) ... | Range-based for loop has nested call expression in itsinitializer. |
4-
| test.cpp:95:3:97:3 | for(...:...) ... | Range-based for loop has nested call expression in itsinitializer. |
5-
| test.cpp:99:3:101:3 | for(...:...) ... | Range-based for loop has nested call expression in itsinitializer. |
6-
| test.cpp:103:3:107:3 | for(...:...) ... | Range-based for loop has nested call expression in itsinitializer. |
7-
| test.cpp:116:3:119:3 | for(...:...) ... | Range-based for loop has nested call expression in itsinitializer. |
8-
| test.cpp:121:3:124:3 | for(...:...) ... | Range-based for loop has nested call expression in itsinitializer. |
1+
| test.cpp:48:3:49:3 | for(...:...) ... | Range-based for loop has nested call expression in its$@. | test.cpp:48:17:48:27 | call to processData | initializer |
2+
| test.cpp:56:3:59:3 | for(...:...) ... | Range-based for loop has nested call expression in its$@. | test.cpp:57:8:57:32 | call to vector | initializer |
3+
| test.cpp:71:3:73:3 | for(...:...) ... | Range-based for loop has nested call expression in its$@. | test.cpp:71:17:72:21 | call to MyContainer | initializer |
4+
| test.cpp:95:3:97:3 | for(...:...) ... | Range-based for loop has nested call expression in its$@. | test.cpp:95:26:95:26 | call to operator+ | initializer |
5+
| test.cpp:99:3:101:3 | for(...:...) ... | Range-based for loop has nested call expression in its$@. | test.cpp:99:31:99:31 | call to operator+ | initializer |
6+
| test.cpp:103:3:107:3 | for(...:...) ... | Range-based for loop has nested call expression in its$@. | test.cpp:104:18:104:18 | call to operator+ | initializer |
7+
| test.cpp:116:3:119:3 | for(...:...) ... | Range-based for loop has nested call expression in its$@. | test.cpp:117:8:117:25 | call to convertToIntVector | initializer |
8+
| test.cpp:121:3:124:3 | for(...:...) ... | Range-based for loop has nested call expression in its$@. | test.cpp:122:8:122:25 | call to convertToIntVector | initializer |

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp