aaron.ballman added inline comments.
================ Comment at: clang-tidy/cppcoreguidelines/OwningMemoryCheck.cpp:140 + + assert(CheckExecuted == true && + "Non of the subroutines did execute, logic error in matcher!"); ---------------- Can assert `CheckExecuted` and drop the explicit equality test. ================ Comment at: clang-tidy/cppcoreguidelines/OwningMemoryCheck.cpp:141 + assert(CheckExecuted == true && + "Non of the subroutines did execute, logic error in matcher!"); +} ---------------- did execute, -> executed; ================ Comment at: clang-tidy/cppcoreguidelines/OwningMemoryCheck.cpp:206 + diag(OwnerInitializer->getSourceLocation(), + "expected initializing of owner member variable with value of type " + "'gsl::owner<>'; got %0") ---------------- initializing -> intialization ================ Comment at: clang-tidy/cppcoreguidelines/OwningMemoryCheck.cpp:303-305 + // diag(DeclaredOwnerMember->getLocStart(), "declared owner as member here", + // DiagnosticIDs::Note) + //<< DeclaredOwnerMember->getSourceRange(); ---------------- Please remove the commented-out lines. ================ Comment at: test/clang-tidy/cppcoreguidelines-owning-memory.cpp:39 + return new int(42); + // CHECK-MESSAGES: [[@LINE-1]]:3: warning: returning a 'gsl::owner<>' from a function but not declaring it; return type is 'int *' +} ---------------- This diagnostic confuses me -- there's no gsl::owner<> involved anywhere; am I missing something? https://reviews.llvm.org/D36354 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits