-
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
A5-1-1
Description
Template instantiations with literal arguments can cause the creation of generated Literal
s in the program in two ways:
- If the template argument was a
constexpr
, we may generate aLiteral
expression to represent the compiler-calculated value. - If the template argument is used as an expression, we will generate a
Literal
at that location to hold the value of the compiler-calculated value.
Example
#include <limits>
constexpr std::size_t dynamic_extent = std::numeric_limits<std::size_t>::max();
template <typename _Type, std::size_t _Extent = dynamic_extent> class span {
static constexpr std::size_t extent = _Extent;
};
void test_extent() { span<int> s; }
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