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

A15-4-4: Ignore results on uninstantiated templates #415

Closed
lcartey opened this issue Oct 26, 2023 · 0 comments · Fixed by #416
Closed

A15-4-4: Ignore results on uninstantiated templates #415

lcartey opened this issue Oct 26, 2023 · 0 comments · Fixed by #416
Assignees
Labels
Difficulty-Low A false positive or false negative report which is expected to take <1 day effort to address false positive/false negative An issue related to observed false positives or false negatives. Impact-Medium user-report Issue reported by an end user of CodeQL Coding Standards

Comments

@lcartey
Copy link
Collaborator

lcartey commented Oct 26, 2023

Affected rules

  • A15-4-4

Description

If the noexcept specification of a template function is conditional on the template, then the uninstantiated template may be erroneously reported as the noexcept specification on the uninstantiated template will be considered as not true.

Example

#include <utility>
template <typename TypeA, typename TypeB>
void swap_wrapper(TypeA lhs,
                  TypeB rhs) noexcept(noexcept(std::swap(*lhs, *rhs))) {
  std::swap(*lhs, *rhs);
}
@lcartey lcartey added false positive/false negative An issue related to observed false positives or false negatives. Difficulty-Low A false positive or false negative report which is expected to take <1 day effort to address Impact-Medium user-report Issue reported by an end user of CodeQL Coding Standards labels Oct 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Difficulty-Low A false positive or false negative report which is expected to take <1 day effort to address false positive/false negative An issue related to observed false positives or false negatives. Impact-Medium user-report Issue reported by an end user of CodeQL Coding Standards
Projects
Development

Successfully merging a pull request may close this issue.

2 participants