Open
Description
Reproducer is 3 files
- lol.c :
#include "toto.h"
#include <stdio.h>
int main() {
toto p;
p.t = 3;
printf("loli %llx\n", p.t);
return 0;
}
- toto.h :
#include "tata.h"
typedef struct toto {
tata t;
} toto;
- tata.h :
#include <stdint.h>
typedef int64_t tata;
Program compiles and behaves as expected cf :
clang lol.c
./a.out
But running cppclean gives a false positive
cppclean toto.h
toto.h:1: 'tata.h' does not need to be #included
Removing the include fives compilation error :
clang lol.c
In file included from lol.c:1:
./toto.h:4:2: error: unknown type name 'tata'
tata t;
^
1 error generated.
Metadata
Metadata
Assignees
Labels
No labels