================ @@ -366,3 +366,82 @@ void use() { capture3(std::string(), x3); // expected-warning {{object whose reference is captured by 'x3' will be destroyed at the end of the full-expression}} } } // namespace temporary_views + +// **************************************************************************** +// Inferring annotation for STL containers +// **************************************************************************** ---------------- hokein wrote:
Instead of thoroughly testing diagnostics triggered by the implicitly-added `lifetime_capture_by` attribute, I think we can verify the attribute directly by inspecting the AST node( see `attr-gsl-owner-pointer.cpp`), and include a few small smoke tests here. https://github.com/llvm/llvm-project/pull/117122 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits