github / codeql-coding-standards

This repository contains CodeQL queries and libraries which support various Coding Standards.
MIT License
129 stars 59 forks source link

`RULE-8-13`: Consider possible macro false positives #775

Open lcartey opened 1 month ago

lcartey commented 1 month ago

Affected rules

Description

Should we flag variables generated from macro expansions as missing const?

Some considerations:

Example

#define FOO int x = 0;

..
int f() {
  FOO; // NON_COMPLIANT?
  return x;
}