[clang] [clang-tools-extra] [clang-tidy] `bugprone-unchecked-optional-access`: Add support for GTest asserts like `ASSERT_TRUE` and `ASSERT_FALSE` (PR #186363)

via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 13 08:40:54 PDT 2026


================
@@ -102,6 +99,11 @@ Improvements to clang-tidy
   manages the creation of temporary header files and ensures that diagnostics
   and fixes are verified for the specified headers.
 
+- Improved :doc:`bugprone-unchecked-optional-access
+  <clang-tidy/checks/bugprone/unchecked-optional-access>` to recognize common
+  GoogleTest macros such as `ASSERT_TRUE` and `ASSERT_FALSE`, reducing the
----------------
EugeneZelenko wrote:

```suggestion
  GoogleTest macros such as ``ASSERT_TRUE`` and ``ASSERT_FALSE``, reducing the
```

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


More information about the cfe-commits mailing list