A7-1-2
: Certain logging functions are reported because they are considered side-effect free
#227
Labels
awaiting-user-feedback
false positive/false negative
An issue related to observed false positives or false negatives.
Impact-Medium
Standard-AUTOSAR
top-25-fps
user-report
Issue reported by an end user of CodeQL Coding Standards
Affected rules
A7-1-2
Description
A logging function cannot be marked as
constexpr
because it is intended to have a side-effect (writing a log entry). In certain cases we are marking logging functions under this rule, which likely means we are not identifying the side-effect. The query takes a conservative approach to identifying side effects i.e. it will err on the side of assuming side-effects unless it can prove otherwise, so we're possibly missing an edge case here.Example
The text was updated successfully, but these errors were encountered: