[all-commits] [llvm/llvm-project] c8e7a8: [CMake] Fix -Wstrict-prototypes
Sam James via All-commits
all-commits at lists.llvm.org
Thu Nov 10 16:54:42 PST 2022
Branch: refs/heads/release/15.x
Home: https://github.com/llvm/llvm-project
Commit: c8e7a87b1ed6b00dc2c3543a80c892d5948f8849
https://github.com/llvm/llvm-project/commit/c8e7a87b1ed6b00dc2c3543a80c892d5948f8849
Author: Sam James <sam at gentoo.org>
Date: 2022-11-10 (Thu, 10 Nov 2022)
Changed paths:
M compiler-rt/cmake/Modules/CompilerRTDarwinUtils.cmake
M compiler-rt/cmake/config-ix.cmake
M compiler-rt/lib/builtins/CMakeLists.txt
M libcxx/cmake/config-ix.cmake
M libcxxabi/cmake/config-ix.cmake
M libunwind/cmake/config-ix.cmake
M lldb/tools/debugserver/source/CMakeLists.txt
M llvm/cmake/config-ix.cmake
M llvm/cmake/modules/FindFFI.cmake
M llvm/cmake/modules/FindTerminfo.cmake
M llvm/cmake/modules/FindZ3.cmake
M llvm/cmake/modules/HandleLLVMOptions.cmake
M openmp/runtime/cmake/config-ix.cmake
M polly/lib/External/CMakeLists.txt
Log Message:
-----------
[CMake] Fix -Wstrict-prototypes
Fixes warnings (or errors, if someone injects -Werror in their build system,
which happens in fact with some folks vendoring LLVM too) with Clang 16:
```
+/var/tmp/portage.notmp/portage/sys-devel/llvm-15.0.4/work/llvm_build-abi_x86_64.amd64/CMakeFiles/CMakeTmp/src.c:3:9: warning: a function declaration without a prototype
is deprecated in all versions of C [-Wstrict-prototypes]
-/var/tmp/portage.notmp/portage/sys-devel/llvm-14.0.4/work/llvm_build-abi_x86_64.amd64/CMakeFiles/CMakeTmp/src.c:3:9: error: a function declaration without a prototype is
deprecated in all versions of C [-Werror,-Wstrict-prototypes]
int main() {return 0;}
^
void
```
Differential Revision: https://reviews.llvm.org/D137503
(cherry picked from commit 32a2af44e1e882f13d1cc2817f0a8d4d8b375d4d)
More information about the All-commits
mailing list