We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 24b4a00 commit ba39b68Copy full SHA for ba39b68
cpp/autosar/src/rules/A5-1-1/LiteralValueUsedOutsideTypeInit.ql
@@ -56,5 +56,6 @@ where
56
not l instanceof CompileTimeComputedIntegralLiteral and
57
// Exclude literals to instantiate a class template per example in the standard
58
// where an type of std::array is intialized with size 5.
59
- not l = any(ClassTemplateInstantiation cti).getATemplateArgument()
+ not l = any(ClassTemplateInstantiation cti).getATemplateArgument() and
60
+ not l = any(ClassAggregateLiteral cal).getAFieldExpr(_)
61
select l, "Literal value '" + getTruncatedLiteralText(l) + "' used outside of type initialization."
0 commit comments