Skip to content

Commit 0673c77

Browse files
committed
A15-4-4: Support deviation on the function declaration
1 parent 9f106d7 commit 0673c77

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import codingstandards.cpp.exceptions.ExceptionFlow
2121

2222
from Function f
2323
where
24-
not isExcluded(f, Exceptions1Package::missingNoExceptQuery()) and
24+
not isExcluded(f.getADeclarationEntry(), Exceptions1Package::missingNoExceptQuery()) and
2525
// No thrown exceptions
2626
not exists(getAFunctionThrownType(f, _)) and
2727
// But not marked noexcept(true)

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

+9-1
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+
void test_no_except_deviated_decl(); // a-15-4-4-deviation
62+
63+
void test_no_except_deviated_decl() {}
64+
65+
void test_no_except_deviated_defn();
66+
67+
void test_no_except_deviated_defn() {} // a-15-4-4-deviation

0 commit comments

Comments
 (0)