Open llvmbot opened 10 years ago
mentioned in issue llvm/llvm-bugzilla-archive#26466
Bug llvm/llvm-bugzilla-archive#26466 has been marked as a duplicate of this bug.
Clang-modernize is deprecated in favour of Clang-tidy modernize module.
GCC had (or still has) protoize which fix function declarations.
assigned to @tetsuo-cpp
@llvm/issue-subscribers-c
Extended Description
Example: convert:
/ a.h: / void f();
struct A { int m; };
/ a.c: / void f(x,p) int x; struct A *p; {
}
.... to:
/ a.h: / struct A; void f( int x, struct A *p );
struct A { int m; };
/ a.c: / void f( int x, struct A *p ); {
}
Notice that clang-modernize would have to insert a forward-declaration of struct A before the first use of "ptr-to-A" as a function parameter. (Otherwise, the type would belong to the scope of function parameters.)