Skip to content

A2-10-5: id name reuse false positive with template specialization #806

Open
@fjatWbyT

Description

@fjatWbyT

Affected rules

  • A2-10-5

Description

Variable template defined with an specialization is alerted as identifier reuse.

Example

template<typename T, typename S>
extern constexpr bool x = false;

template<typename T>
extern constexpr bool x<T, int> = true;

Query IdentifierNameOfANonMemberObjectWithExternalOrInternalLinkageIsReused.ql warns about x in lines 2 and 5.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Difficulty-LowA false positive or false negative report which is expected to take <1 day effort to addressImpact-Lowfalse positive/false negativeAn issue related to observed false positives or false negatives.user-reportIssue reported by an end user of CodeQL Coding Standards

    Type

    No type

    Projects

    Status

    Triaged

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions