[all-commits] [llvm/llvm-project] 32a2af: [CMake] Fix -Wstrict-prototypes

Sam James via All-commits all-commits at lists.llvm.org
Mon Nov 7 17:37:48 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 32a2af44e1e882f13d1cc2817f0a8d4d8b375d4d
      https://github.com/llvm/llvm-project/commit/32a2af44e1e882f13d1cc2817f0a8d4d8b375d4d
  Author: Sam James <sam at gentoo.org>
  Date:   2022-11-08 (Tue, 08 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




More information about the All-commits mailing list