[all-commits] [llvm/llvm-project] 77e0e9: Reapply "Try enabling -Wsuggest-override again, us...

kepler-5 via All-commits all-commits at lists.llvm.org
Wed Jul 22 17:50:46 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 77e0e9e17daf0865620abcd41f692ab0642367c4
      https://github.com/llvm/llvm-project/commit/77e0e9e17daf0865620abcd41f692ab0642367c4
  Author: Logan Smith <logan.r.smith0 at gmail.com>
  Date:   2020-07-22 (Wed, 22 Jul 2020)

  Changed paths:
    M clang-tools-extra/clangd/unittests/CMakeLists.txt
    M clang-tools-extra/unittests/CMakeLists.txt
    M clang/unittests/CMakeLists.txt
    M compiler-rt/cmake/Modules/AddCompilerRT.cmake
    M compiler-rt/cmake/config-ix.cmake
    M flang/unittests/CMakeLists.txt
    M libcxx/CMakeLists.txt
    M libcxxabi/CMakeLists.txt
    M lld/unittests/CMakeLists.txt
    M lldb/unittests/CMakeLists.txt
    M llvm/cmake/modules/HandleLLVMOptions.cmake
    M llvm/lib/Testing/Support/CMakeLists.txt
    M llvm/unittests/CMakeLists.txt
    M llvm/utils/benchmark/CMakeLists.txt
    M llvm/utils/unittest/CMakeLists.txt
    M mlir/unittests/CMakeLists.txt
    M parallel-libs/acxxel/CMakeLists.txt
    M polly/unittests/CMakeLists.txt

  Log Message:
  -----------
  Reapply "Try enabling -Wsuggest-override again, using add_compile_options instead of add_compile_definitions for disabling it in unittests/ directories."

add_compile_options is more sensitive to its location in the file than add_definitions--it only takes effect for sources that are added after it. This updated patch ensures that the add_compile_options is done before adding any source files that depend on it.

Using add_definitions caused the flag to be passed to rc.exe on Windows and thus broke Windows builds.




More information about the All-commits mailing list