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

Commit83e1a8b

Browse files
authored
Merge pull request#816 from github/lcartey/a15-4-4-deviation
A15-4-4: Support deviation on the function declaration
2 parents97fabeb +7986b3b commit83e1a8b

File tree

4 files changed

+23
-2
lines changed

4 files changed

+23
-2
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
-`A15-4-4` -`MissingNoExcept.ql`:
2+
- Enable deviations on either declarations or definitions.

‎cpp/autosar/src/rules/A15-4-4/MissingNoExcept.ql‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ predicate mayCallThrowingFunctions(Function f) {
5151

5252
fromFunctionf
5353
where
54-
notisExcluded(f, Exceptions1Package::missingNoExceptQuery())and
54+
notisExcluded(f.getADeclarationEntry(), Exceptions1Package::missingNoExceptQuery())and
5555
// No thrown exceptions
5656
notexists(getAFunctionThrownType(f, _))and
5757
// But not marked noexcept(true)
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?xml version="1.0" ?>
2+
<codingstandards>
3+
<!--GENERATED: DO NOT MODIFY. Changes should be made to coding-standards.yml instead.-->
4+
<deviations>
5+
<deviations-entry>
6+
<rule-id>A15-4-4</rule-id>
7+
<justification>Suppress entry.</justification>
8+
<code-identifier>a-15-4-4-deviation</code-identifier>
9+
</deviations-entry>
10+
</deviations>
11+
</codingstandards>

‎cpp/autosar/test/rules/A15-4-4/test.cpp‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,4 +56,12 @@ std::string test_fp_reported_in_424(
5656
s3.append(s1.c_str(), s1.size());
5757
s3.append(s2.c_str(), s2.size());
5858
return s3;
59-
}
59+
}
60+
61+
voidtest_no_except_deviated_decl();// a-15-4-4-deviation
62+
63+
voidtest_no_except_deviated_decl() {}
64+
65+
voidtest_no_except_deviated_defn();
66+
67+
voidtest_no_except_deviated_defn() {}// a-15-4-4-deviation

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp