-
Notifications
You must be signed in to change notification settings - Fork 77
DCL51-CPP: Only reserve function names when used within the global namespace #148
Copy link
Copy link
Open
Labels
Difficulty-HighA false positive or false negative report which is expected to take 1+ week effort to addressA false positive or false negative report which is expected to take 1+ week effort to addressImpact-HighStardard-CERT-C++false 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
Metadata
Metadata
Assignees
Labels
Difficulty-HighA false positive or false negative report which is expected to take 1+ week effort to addressA false positive or false negative report which is expected to take 1+ week effort to addressImpact-HighStardard-CERT-C++false 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
Fields
Give feedbackNo fields configured for issues without a type.
Projects
Status
In Progress
Affected rules
DCL51-CPPDescription
The rule currently enforces that function names defined in standard library headers are not reused in any namespace. However, a careful re-reading of the C++ standard suggests that's overly specific.
[reserved.names]specifically states that the only kinds of name that are reserved are macros, "global names" and "names with external linkage". In[extern.names], the standard says:So only global function signatures are reserved, and only where they have external linkage. I think we need to do the following:
We may also need to review the rules for objects and
_prefixes.Example