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)); | ~~~~~~~~~~~~~~^~~~~~~~~~
Upon investigation there are actually valid places where we are passing
null as source such as:
return cast_or_null<FriendDecl>(NextFriend.get(nullptr)); if (!Bases.isOffset()) return Bases.get(nullptr);
There is an assertion to catch this but that is only in debug builds.
Added a new if protection branch and kept the assertion to keep the code
change very minimal.
Use an imperative sentence, i.e. Disable ... and append a full stop.
CMAKE_COMPILER_IS_GNUCXX is deprecated . Use CMAKE_<LANG>_COMPILER_ID