[clang] [clang] Don't consider the lifetimeboundCall when analyzing the gsl pointer construction. (PR #114044)
Haojian Wu via cfe-commits
cfe-commits at lists.llvm.org
Tue Oct 29 09:56:20 PDT 2024
================
@@ -780,3 +780,30 @@ void test13() {
}
} // namespace GH100526
+
+namespace test {
+
+struct [[gsl::Pointer]] FooOwner {};
+struct [[gsl::Pointer]] FooPointer {
+ FooPointer(const FooOwner&);
+};
+
+template<typename T>
+struct [[gsl::Owner]] Container {
+ const T& get() const [[clang::lifetimebound]];
+};
+
+FooPointer func() {
----------------
hokein wrote:
Yeah, we will still catch this case.
https://github.com/llvm/llvm-project/pull/114044
More information about the cfe-commits
mailing list