Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A2-7-3: template function prototypes with comments are not correctly detected #528

Open
rvermeulen opened this issue Feb 9, 2024 · 1 comment
Assignees
Labels
Difficulty-Medium A false positive or false negative report which is expected to take 1-5 days effort to address false positive/false negative An issue related to observed false positives or false negatives. Impact-High Phase III user-report Issue reported by an end user of CodeQL Coding Standards

Comments

@rvermeulen
Copy link
Collaborator

Affected rules

  • cpp/autosar/undocumented-user-defined-type

Description

The query incorrect flags the function MyFunction.

Example

/// @brief MyFunction.
/// @tparam MyType template parameter.
/// @param  Parameter.
/// @return Return type.
template <typename MyType> auto MyFunction(MyType) -> MyType;

The condition c.getCommentedElement() = de doesn't hold for TemplateFunction.

@rvermeulen rvermeulen added false positive/false negative An issue related to observed false positives or false negatives. user-report Issue reported by an end user of CodeQL Coding Standards labels Feb 9, 2024
@lcartey lcartey added Difficulty-Medium A false positive or false negative report which is expected to take 1-5 days effort to address Impact-High labels May 31, 2024
@lcartey lcartey changed the title A2-7-3: template functions with comments are not correctly detected A2-7-3: template function prototypes with comments are not correctly detected May 31, 2024
@lcartey
Copy link
Collaborator

lcartey commented Jun 3, 2024

This happens when either:

  • The template function has no definition in the database.
  • The template function has no definition.

@nicolaswill nicolaswill self-assigned this Jul 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Difficulty-Medium A false positive or false negative report which is expected to take 1-5 days effort to address false positive/false negative An issue related to observed false positives or false negatives. Impact-High Phase III user-report Issue reported by an end user of CodeQL Coding Standards
Projects
Development

No branches or pull requests

4 participants