Skip to content

Commit be2db41

Browse files
authored
Merge pull request #521 from rvermeulen/rvermeulen/fix-372
Fix FP reported in #372
2 parents e1f822a + a6f24b6 commit be2db41

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
`A7-1-1` - `DeclarationUnmodifiedObjectMissingConstSpecifier.ql`
2+
- Fix FP reported in #372. Exclude compiler generated variables.

cpp/autosar/src/rules/A7-1-1/DeclarationUnmodifiedObjectMissingConstSpecifier.ql

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,6 @@ where
3636
else cond = " is used for an object"
3737
) and
3838
not exists(LambdaExpression lc | lc.getACapture().getField() = v) and
39-
not v.isFromUninstantiatedTemplate(_)
39+
not v.isFromUninstantiatedTemplate(_) and
40+
not v.isCompilerGenerated()
4041
select v, "Non-constant variable " + v.getName() + cond + " and is not modified."

0 commit comments

Comments
 (0)