codeql-coding-standards
codeql-coding-standards copied to clipboard
`A2-7-3`: template function prototypes with comments are not correctly detected
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
.
This happens when either:
- The template function has no definition in the database.
- The template function has no definition.