-
Notifications
You must be signed in to change notification settings - Fork 68
Closed
Labels
Difficulty-MediumA false positive or false negative report which is expected to take 1-5 days effort to addressA false positive or false negative report which is expected to take 1-5 days effort to addressImpact-Mediumfalse positive/false negativeAn issue related to observed false positives or false negatives.An issue related to observed false positives or false negatives.user-reportIssue reported by an end user of CodeQL Coding StandardsIssue reported by an end user of CodeQL Coding Standards
Description
Affected rules
All rules that are using getATypeUse for analysis.
Description
In case a query wants to check whether a type is left unused, they can do so by using the getATypeUse helper predicate. However, that predicate doesn't consider the case where a type is constructed with an aggregate literal.
Example
#define _KV(key, ...) \
[](const auto& _log_incoming_value) noexcept { \
class _log_kv_pair { \
public: \
constexpr static const char * LogKeyName() noexcept { \
return static_cast<const char*>(key); \
} \
}; \
return _log_kv_pair{_log_incoming_value}; \
}
int main()
{
_KV("pid");
return 0;
}
Metadata
Metadata
Assignees
Labels
Difficulty-MediumA false positive or false negative report which is expected to take 1-5 days effort to addressA false positive or false negative report which is expected to take 1-5 days effort to addressImpact-Mediumfalse positive/false negativeAn issue related to observed false positives or false negatives.An issue related to observed false positives or false negatives.user-reportIssue reported by an end user of CodeQL Coding StandardsIssue reported by an end user of CodeQL Coding Standards
Type
Projects
Status
Done