[all-commits] [llvm/llvm-project] 1f8f87: [CMake] Disable GCC -Wnonnull

Farid Zakaria via All-commits all-commits at lists.llvm.org
Sun Jul 23 20:19:55 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 1f8f8760b586320be094daa872b298eeeedf582d
      https://github.com/llvm/llvm-project/commit/1f8f8760b586320be094daa872b298eeeedf582d
  Author: Farid Zakaria <fmzakari at google.com>
  Date:   2023-07-23 (Sun, 23 Jul 2023)

  Changed paths:
    M llvm/cmake/modules/HandleLLVMOptions.cmake

  Log Message:
  -----------
  [CMake] Disable GCC -Wnonnull

I noticed during the build that GCC would emit a ton of nonnull
warnings.

Example:
```
/usr/local/google/home/fmzakari/code/github.com/llvm/llvm-project/clang/include/clang/AST/ExternalASTSource.h:378:54: warning: ‘this’ pointer is null [-Wnonnull]
  378 |       Ptr = reinterpret_cast<uint64_t>((Source->*Get)(Ptr >> 1));
      |                                        ~~~~~~~~~~~~~~^~~~~~~~~~
```

Reviewed By: MaskRay, rsmith

Differential Revision: https://reviews.llvm.org/D155857




More information about the All-commits mailing list