diff options
| author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2019-11-14 13:57:57 -0800 |
|---|---|---|
| committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2019-11-19 13:18:43 -0800 |
| commit | 8c48405069085a2c8b6b80816eda99e5dad31fc1 (patch) | |
| tree | af6a315cb0f8eecea89547b692c07964b0238ba1 /clang/include/clang-c/FatalErrorHandler.h | |
| parent | 3a8104a9ea3d88fb4d0ef17185e420c814757bfd (diff) | |
| download | bcm5719-llvm-8c48405069085a2c8b6b80816eda99e5dad31fc1.tar.gz bcm5719-llvm-8c48405069085a2c8b6b80816eda99e5dad31fc1.zip | |
Wrap C APIs with pragmas enforcing -Werror=strict-prototypes
Force `-Werror=strict-prototypes` so that C API tests fail to compile if
we add a non-prototype declaration. This should help avoid regressions
like bddecba4b333f7772029b4937d2c34f9f2fda6ca was fixing.
https://reviews.llvm.org/D70285
rdar://problem/57203137
Diffstat (limited to 'clang/include/clang-c/FatalErrorHandler.h')
| -rw-r--r-- | clang/include/clang-c/FatalErrorHandler.h | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/clang/include/clang-c/FatalErrorHandler.h b/clang/include/clang-c/FatalErrorHandler.h index ce8ff2cae73..22f34fa815c 100644 --- a/clang/include/clang-c/FatalErrorHandler.h +++ b/clang/include/clang-c/FatalErrorHandler.h @@ -10,9 +10,9 @@ #ifndef LLVM_CLANG_C_FATAL_ERROR_HANDLER_H #define LLVM_CLANG_C_FATAL_ERROR_HANDLER_H -#ifdef __cplusplus -extern "C" { -#endif +#include "clang-c/ExternC.h" + +LLVM_CLANG_C_EXTERN_C_BEGIN /** * Installs error handler that prints error message to stderr and calls abort(). @@ -27,7 +27,6 @@ void clang_install_aborting_llvm_fatal_error_handler(void); */ void clang_uninstall_llvm_fatal_error_handler(void); -#ifdef __cplusplus -} -#endif +LLVM_CLANG_C_EXTERN_C_END + #endif |

