File tree Expand file tree Collapse file tree 2 files changed +2
-5
lines changed
cpp/autosar/src/rules/A7-1-2 Expand file tree Collapse file tree 2 files changed +2
-5
lines changed Original file line number Diff line number Diff line change 1
1
` A7-1-2 ` - ` VariableMissingConstexpr.ql ` :
2
- - Fix FP reported in #466 . Addresses incorrect assumption that calls to ` constexpr ` functions are always compile-time evaluated.
3
- - Exclude member that aren't ` static ` , because they cannot be ` constexpr ` .
2
+ - Fix FP reported in #466 . Addresses incorrect assumption that calls to ` constexpr ` functions are always compile-time evaluated.
Original file line number Diff line number Diff line change 89
89
// Not assigned by a user in a constructor
90
90
not exists ( ConstructorFieldInit cfi | cfi .getTarget ( ) = v and not cfi .isCompilerGenerated ( ) ) and
91
91
// Ignore union members
92
- not v .getDeclaringType ( ) instanceof Union and
93
- // If it is a member, it must be static to be constexpr
94
- ( v instanceof MemberVariable implies v .isStatic ( ) )
92
+ not v .getDeclaringType ( ) instanceof Union
95
93
select v , "Variable " + v .getName ( ) + " could be marked 'constexpr'."
You can’t perform that action at this time.
0 commit comments