AtomLinter / linter-clang

Lint C-based files using Clang.
55 stars 29 forks source link

Error when declaring a function with a custom (typedef or struct) parameter #244

Open jseric opened 6 years ago

jseric commented 6 years ago

When I declare a function that takes a custom parameter, linter-clang reports an error. By custom, I mean a parameter which is either a struct or a typedef. Below is an example code. Note: the struct/typedef is defined in another header file, but that header file has been included correctly.

// header_file1.h
struct _node;
    typedef struct _node node;
    struct _node
    {
        int a;
        int b;
    };

// header_file2.h
#include "header_file1.h"

int DoSomething(node);
screenshot 2018-11-02 at 11 59 22