gribozavr added inline comments.
================ Comment at: clang/include/clang/Sema/Sema.h:6097 + + /// Add [[gsl::Owner]] and [[gsl::Pointer]] attributes for std:: types. + void addDefaultGslPointerAttribute(TypedefNameDecl *TD); ---------------- It seems like this function does not add gsl::Owner. ================ Comment at: clang/lib/Sema/SemaTemplate.cpp:1689 AddPushedVisibilityAttribute(NewClass); + addDefaultGslOwnerPointerAttribute(NewClass); ---------------- It shouldn't be necessary to perform inference here, instead, the attributes should be instantiated, see `instantiateDependentAlignedAttr` in SemaTemplateInstantiateDecl.cpp for an example. ================ Comment at: clang/lib/Sema/SemaTemplateInstantiateDecl.cpp:702 SemaRef.InstantiateAttrs(TemplateArgs, D, Typedef); + SemaRef.addDefaultGslPointerAttribute(Typedef); ---------------- Ditto, should not be necessary to perform inference here. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64448/new/ https://reviews.llvm.org/D64448 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits