This is an archive of the discontinued LLVM Phabricator instance.

[libclang] Use strict prototypes in header
AbandonedPublic

Authored by aaronpuchert on Sep 28 2019, 4:09 PM.

Details

Summary

When included in a C program, these function declarations are treated as
K&R declarations, which conveys no information about the number of
arguments of the function. A function with no arguments has to be
declared with parameter-type-list "void".

Event Timeline

aaronpuchert created this revision.Sep 28 2019, 4:09 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 28 2019, 4:09 PM

Can be "reproduced" with clang -fsyntax-only -Wstrict-prototypes clang/include/clang-c/*.h.

aaronpuchert abandoned this revision.Sep 30 2019, 2:37 PM

Fixed by @aaron.ballman in rC373213 along with another issue.