[clang] [Clang][Sema] fix crash of attribute transform (PR #78088)

via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 16 07:05:27 PST 2024


================
@@ -0,0 +1,17 @@
+// RUN: %clang_cc1 %s -verify -fsyntax-only
+
+// expected-no-diagnostics
+
+template<typename T>
+struct Bar {
+    int* data;
+
+    auto operator[](const int index) const [[clang::lifetimebound]] -> decltype(data[index]) {
+        return data[index];
+    }
+};
+
+int main() {
+    Bar<int> b;
+    (void)b[2];
+}
----------------
cor3ntin wrote:

Missing new line

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


More information about the cfe-commits mailing list