| Issue |
76722
|
| Summary |
clangd: iwyu export and NOLINT do not supress warning if an include is after a function declaration in a C header
|
| Labels |
new issue
|
| Assignees |
|
| Reporter |
apache-hb
|
```h
// header1.h
#pragma once
#include <stdbool.h>
int cpp_input(void *extra, char *out, int size);
#include "header2.h" // IWYU pragma: export
```
```h
// header2.h
#pragma once
#define YY_INPUT(buffer, result, size) result = flex_input(yyextra, buffer, size);
extern int i;
```
produces `Included header header2.h is not used directly (fix available)`. moving the include before the first declaration fixes this.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs