[clang-tools-extra] [clang-tidy] Add performance-expensive-value-or check (PR #200166)

Endre Fülöp via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 1 02:19:05 PDT 2026


================
@@ -0,0 +1,110 @@
+// RUN: %check_clang_tidy -std=c++11-or-later %s performance-expensive-value-or %t
+
+#include <string>
+#include <utility>
+
+namespace std {
+template <typename T> class optional {
----------------
gamesh411 wrote:

I saw the opportunity to merge all optional-type usage in Clang Tidy check tests into the STL simulator headers, thought that different parts were interesting for different checks, and did not do it. But eventually it should live there, I agree.

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


More information about the cfe-commits mailing list