[clang] [clang] Diagnose dangling issues for the "Container<GSLPointer>" case. (PR #107213)

Utkarsh Saxena via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 5 02:10:50 PDT 2024


================
@@ -6690,6 +6690,20 @@ When the Owner's lifetime ends, it will consider the Pointer to be dangling.
     P.getInt(); // P is dangling
   }
 
+If a template class is annotated with [[gsl::Owner]], and the first instantiated
+template argument is a [[gsl::Pointer]] type, the analysis will consider the
----------------
usx95 wrote:

nit: To be consistent with rest of the documentation use \`\`[[gsl::Pointer]]\`\`. Similar for other mentions of the Owner.

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


More information about the cfe-commits mailing list