Endre =?utf-8?q?Fülöp?= <[email protected]>,
Endre =?utf-8?q?Fülöp?= <[email protected]>,
Endre =?utf-8?q?Fülöp?= <[email protected]>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/[email protected]>


================
@@ -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 {
+  T val;
+  bool has;
+
+public:
+  optional();
+  optional(const optional &);
+  optional(optional &&);
+  ~optional();
+  T value_or(T default_value) const;
+};
+} // namespace std
+
----------------
unterumarmung wrote:

Since diagnostics use `Call->getExprLoc()`, a small macro case would lock down 
that the warning points somewhere useful and does not behave unexpectedly.

https://github.com/llvm/llvm-project/pull/200166
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to