[PATCH] D65120: More warnings regarding gsl::Pointer and gsl::Owner attributes

2019-08-09 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL368446: More warnings regarding gsl::Pointer and gsl::Owner attributes (authored by xazax, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D65120: More warnings regarding gsl::Pointer and gsl::Owner attributes

2019-08-08 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun marked 4 inline comments as done. xazax.hun added inline comments. Comment at: clang/lib/Sema/SemaInit.cpp:6572 +return false; + return llvm::StringSwitch(Callee->getName()) + .Cases("begin", "rbegin", "cbegin", "crbegin", true) gribozavr wrot

[PATCH] D65120: More warnings regarding gsl::Pointer and gsl::Owner attributes

2019-08-08 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun updated this revision to Diff 214228. xazax.hun added a comment. - Fix review comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65120/new/ https://reviews.llvm.org/D65120 Files: clang/lib/Sema/SemaInit.cpp clang/test/Analysis/inner-pointer.cpp clang/test/Sema/warn

[PATCH] D65120: More warnings regarding gsl::Pointer and gsl::Owner attributes

2019-08-06 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr added inline comments. Comment at: clang/lib/Sema/SemaInit.cpp:6572 +return false; + return llvm::StringSwitch(Callee->getName()) + .Cases("begin", "rbegin", "cbegin", "crbegin", true) xazax.hun wrote: > gribozavr wrote: > > Should we also che

[PATCH] D65120: More warnings regarding gsl::Pointer and gsl::Owner attributes

2019-07-29 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun updated this revision to Diff 212206. xazax.hun marked 3 inline comments as done. xazax.hun edited the summary of this revision. xazax.hun added a comment. - Add new line to end of file. - Rebase, calls no longer need special handling. CHANGES SINCE LAST ACTION https://reviews.llvm.o

[PATCH] D65120: More warnings regarding gsl::Pointer and gsl::Owner attributes

2019-07-29 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added inline comments. Comment at: clang/lib/Sema/SemaInit.cpp:6563 +static bool shouldTrackImplicitObjectArg(const CXXMethodDecl *Callee) { + if (auto *Conv = dyn_cast_or_null(Callee)) gribozavr wrote: > This looks like an ad-hoc rule. Is there a wa

[PATCH] D65120: More warnings regarding gsl::Pointer and gsl::Owner attributes

2019-07-29 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr added inline comments. Comment at: clang/lib/Sema/SemaInit.cpp:6563 +static bool shouldTrackImplicitObjectArg(const CXXMethodDecl *Callee) { + if (auto *Conv = dyn_cast_or_null(Callee)) This looks like an ad-hoc rule. Is there a way to express it wit

[PATCH] D65120: More warnings regarding gsl::Pointer and gsl::Owner attributes

2019-07-24 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun updated this revision to Diff 211581. xazax.hun added a comment. - Remove unused parameter. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65120/new/ https://reviews.llvm.org/D65120 Files: clang/lib/Sema/SemaInit.cpp clang/test/Analysis/inner-pointer.cpp clang/test/Sema/

[PATCH] D65120: More warnings regarding gsl::Pointer and gsl::Owner attributes

2019-07-22 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun marked an inline comment as done. xazax.hun added inline comments. Comment at: clang/lib/Sema/SemaInit.cpp:6564 +static bool shouldTrackImplicitObjectArg(const CXXMethodDecl *Callee, + const CXXMemberCallExpr *MCE) { + if (auto *

[PATCH] D65120: More warnings regarding gsl::Pointer and gsl::Owner attributes

2019-07-22 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun marked an inline comment as done. xazax.hun added inline comments. Comment at: clang/test/Analysis/inner-pointer.cpp:2 // RUN: %clang_analyze_cc1 -analyzer-checker=cplusplus.InnerPointer \ -// RUN: %s -analyzer-output=text -verify I had to disable

[PATCH] D65120: More warnings regarding gsl::Pointer and gsl::Owner attributes

2019-07-22 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun created this revision. xazax.hun added reviewers: gribozavr, rsmith, mgehre. xazax.hun added a project: clang. Herald added subscribers: cfe-commits, Charusso, gamesh411, Szelethus, dkrupp, rnkovacs. This patch extends the warnings for additional cases: 1. When the temporary is the res