[clang-tools-extra] [clang-tidy] Filter out googletest TUs in bugprone-unchecked-optional-access (PR #115051)

Jan Voung via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 6 14:21:06 PST 2024


jvoung wrote:

> > but these are not internal implementation details - these are key elements of the public API
> 
> In the unit test, you have copied internal code from here: https://github.com/google/googletest/blob/d144031940543e15423a25ae5a8a74141044862f/googletest/include/gtest/internal/gtest-internal.h#L1477
> 
> This is not OK to do, since it may change at any time and make the test no longer useful. The test may also work for some versions of googletest but not others.
> 
> The code that has been copied is also Copyrighted and has certain License obligations, which we may not be allowed to bring into the LLVM repository. Pinging @tstellar for clarification.

Simplified the mock, since we're only matching on the top-level macro names.

https://github.com/llvm/llvm-project/pull/115051


More information about the cfe-commits mailing list