hokein wrote: The removal of `EnableLifetimeWarnings` flag causes some behavior change when we visit a lifetimebound function argument:
- before: the `EnableLifetimeWarnings` is always `false`, which means we never run into the GSL codepath - after: we remove this flag, we will continue to run the GSL codepath (unless the GSL diagnostic is disabled) For the following case, ``` struct Foo; struct FooView { FooView(const Foo& foo [[clang::lifetimebound]]); }; struct Foo {}; FooView test() { return std::vector<Foo>()[0]; // dangling } ``` We start to emit a dangling diagnostic after this change, this looks like a good change as we catch more cases now. Still need to look at the libcxx failure. https://github.com/llvm/llvm-project/pull/104906 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits