Skip to content

Commit e6c25d3

Browse files
rak3-shlcartey
andauthored
Apply suggestions from code review
Co-authored-by: Luke Cartey <[email protected]>
1 parent 5ecee7e commit e6c25d3

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
- Consider constexpr variables used in template instantiations as "used".
1+
- `M0-1-3` - Consider constexpr variables used in template instantiations as "used".

cpp/autosar/src/rules/M0-1-3/UnusedLocalVariable.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ private string getConstExprValue(Variable v) {
3030
// - getUseCount()
3131
int getUseCountConservatively(Variable v) {
3232
result =
33-
count(VariableAccess access | access = v.getAnAccess() and not access.isCompilerGenerated())
33+
count(VariableAccess access | access = v.getAnAccess())
3434
+ count(UserProvidedConstructorFieldInit cfi | cfi.getTarget() = v) +
3535
// For constexpr variables used as template arguments, we don't see accesses (just the
3636
// appropriate literals). We therefore take a conservative approach and count the number of

0 commit comments

Comments
 (0)