================
@@ -0,0 +1,17 @@
+// RUN: %clang_cc1 -fsyntax-only -Wlifetime-safety-all -verify %s
+
+struct View {
+ View(const char* data [[clang::lifetimebound]]) : mData(data) {}
+ const char * data() const {
+ return mData;
+ }
+private:
+ const char* mData;
+};
+
+void test() {
----------------
NeKon69 wrote:
BTW, you don't actually need this function :)
https://github.com/llvm/llvm-project/pull/204797
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits