[PATCH] D70285: Wrap C APIs with pragmas enforcing -Werror=strict-prototypes

2019-11-19 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith closed this revision. dexonsmith added a comment. In D70285#1752361 , @dexonsmith wrote: > In D70285#1752164 , @Bigcheese wrote: > > > lgtm as long as other compilers don't warn on unknown pragmas by

[PATCH] D70285: Wrap C APIs with pragmas enforcing -Werror=strict-prototypes

2019-11-19 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. In D70285#1752164 , @Bigcheese wrote: > lgtm as long as other compilers don't warn on unknown pragmas by default. godbolt.org says that GCC doesn't have `-Wunknown-pragmas` by default, but it is in `-Wall`. I'd better guard

[PATCH] D70285: Wrap C APIs with pragmas enforcing -Werror=strict-prototypes

2019-11-19 Thread Michael Spencer via Phabricator via cfe-commits
Bigcheese accepted this revision. Bigcheese added a comment. This revision is now accepted and ready to land. lgtm as long as other compilers don't warn on unknown pragmas by default. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70285/new/ https://reviews.llvm.org/D70285

[PATCH] D70285: Wrap C APIs with pragmas enforcing -Werror=strict-prototypes

2019-11-16 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith updated this revision to Diff 229624. dexonsmith marked an inline comment as done. dexonsmith added a comment. s/C_STRING_PROTOTYPES_/C_STRICT_PROTOTYPES_/ to fix some typos. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70285/new/ https://reviews.llvm.org/D70285 Files:

[PATCH] D70285: Wrap C APIs with pragmas enforcing -Werror=strict-prototypes

2019-11-16 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith marked 2 inline comments as done. dexonsmith added inline comments. Comment at: clang/include/clang-c/ExternC.h:18-19 +#define LLVM_CLANG_C_STRING_PROTOTYPES_BEGIN \ + _Pragma("clang diagnostic push")

[PATCH] D70285: Wrap C APIs with pragmas enforcing -Werror=strict-prototypes

2019-11-16 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith updated this revision to Diff 229621. dexonsmith added a comment. Adding guards for `_MSC_VER`. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70285/new/ https://reviews.llvm.org/D70285 Files: clang/include/clang-c/BuildSystem.h

[PATCH] D70285: Wrap C APIs with pragmas enforcing -Werror=strict-prototypes

2019-11-16 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang-c/ExternC.h:18-19 +#define LLVM_CLANG_C_STRING_PROTOTYPES_BEGIN \ + _Pragma("clang diagnostic push") \ + _Pragma("clang

[PATCH] D70285: Wrap C APIs with pragmas enforcing -Werror=strict-prototypes

2019-11-14 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. Note that we have C files including these headers in llvm/tools/llvm-c-test and clang/tools/c-index-test, and I tested that dropping a `(void)` to just `()` triggers the error when compiling those. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70285/new/

[PATCH] D70285: Wrap C APIs with pragmas enforcing -Werror=strict-prototypes

2019-11-14 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith created this revision. dexonsmith added reviewers: aaron.ballman, Bigcheese, jkorous-apple. Herald added subscribers: ributzka, arphaman, steven_wu, hiraditya, mehdi_amini. Herald added a reviewer: deadalnix. Herald added a project: LLVM. Force `-Werror=strict-prototypes` so that C API