Skip to content

clang-tidy misc-include-cleaner bug #172816

@thomedes-taxitronic

Description

@thomedes-taxitronic

Only happens when the macro is named 'I'. If it's renamed to 'H' it's fine.

$ clang-tidy -checks='-*,misc-include-cleaner' /tmp/prova.c --
1 warning generated.
/tmp/prova.c:3:16: warning: no header providing "I" is directly included [misc-include-cleaner]
    1 | #define I 42
    2 | 
    3 | void f(void) { I; }
      |                ^

$ clang-tidy --version
Debian LLVM version 20.1.8
  Optimized build.

prova.c

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions