r366663 - [analyzer] Fix -Wunused-function in NDEBUG builds with #ifdef LLVM_DUMP_METHOD

2019-07-21 Thread Fangrui Song via cfe-commits
Author: maskray Date: Sun Jul 21 21:14:09 2019 New Revision: 33 URL: http://llvm.org/viewvc/llvm-project?rev=33&view=rev Log: [analyzer] Fix -Wunused-function in NDEBUG builds with #ifdef LLVM_DUMP_METHOD Modified: cfe/trunk/lib/StaticAnalyzer/Core/RegionStore.cpp Modified: cfe/trunk

[PATCH] D64448: gsl::Owner/gsl::Pointer: Add implicit annotations for some std types

2019-07-21 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In D64448#1595022 , @mgehre wrote: > In D64448#1595017 , @lebedev.ri > wrote: > > > Just passing-by thought: > > These attributes that are being added implicitly, it will be possible to

[PATCH] D15032: [clang-tidy] new checker cppcoreguidelines-pro-lifetime

2019-07-21 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre abandoned this revision. mgehre added a comment. Herald added subscribers: wuzish, dmgreen. Upstreaming of this checker will happen with D63954 and following revisions. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D15032/new/ https://reviews.llv

[PATCH] D64448: gsl::Owner/gsl::Pointer: Add implicit annotations for some std types

2019-07-21 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre added a comment. In D64448#1595017 , @lebedev.ri wrote: > Just passing-by thought: > These attributes that are being added implicitly, it will be possible to > differentiate > whether an attribute was actually present in the code, or was added >

[PATCH] D64448: gsl::Owner/gsl::Pointer: Add implicit annotations for some std types

2019-07-21 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre updated this revision to Diff 211010. mgehre added a comment. - Remove type traits Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64448/new/ https://reviews.llvm.org/D64448 Files: clang/include/clang/Sema/Sema.h clang/lib/Sema/SemaAttr.c

[PATCH] D64448: gsl::Owner/gsl::Pointer: Add implicit annotations for some std types

2019-07-21 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. Just passing-by thought: These attributes that are being added implicitly, it will be possible to differentiate whether an attribute was actually present in the code, or was added implicitly, say for clang-tidy check purposes? Is there some 'implicit' bit on these, or

[PATCH] D64448: gsl::Owner/gsl::Pointer: Add implicit annotations for some std types

2019-07-21 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre added a comment. This should fix all open comments. Comment at: clang/include/clang/Basic/AttrDocs.td:4167-4168 pointer/reference to the data owned by ``O``. The owned data is assumed to end -its lifetime once the owning object's lifetime ends. +its lifetime once the ow

[PATCH] D64448: gsl::Owner/gsl::Pointer: Add implicit annotations for some std types

2019-07-21 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre updated this revision to Diff 211009. mgehre marked 12 inline comments as done. mgehre added a comment. - Merge branch 'lifetime-categories' into hardcode-lifetime-categories; Split test; Move test to AST dump; fix for comments; Repository: rG LLVM Github Monorepo CHANGES SINCE LAST A

[PATCH] D63954: Add lifetime categories attributes

2019-07-21 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre updated this revision to Diff 211008. mgehre marked 6 inline comments as done. mgehre added a comment. - Disallow reference and array types as DerefType - Add example to documentation. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63954/new/

[PATCH] D63954: Add lifetime categories attributes

2019-07-21 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre added a comment. I think that I have addressed all open comments. Comment at: clang/include/clang/Basic/AttrDocs.td:4164 + let Content = [{ +When annotating a class ``O`` with ``[[gsl::Owner(T)]]``, then each function +that returns cv-qualified ``T&`` or ``T*`` is assum

[PATCH] D65050: [SemaTemplate] Mark a function type as dependent when its parameter list contains pack expansion

2019-07-21 Thread S. B. Tam via Phabricator via cfe-commits
cpplearner created this revision. cpplearner added reviewers: doug.gregor, eli.friedman, lvoufo, rsmith. Herald added subscribers: cfe-commits, dexonsmith. Herald added a project: clang. Given `template using Int = int;`, the type `void(Int...)` should be treated as a dependent type, even though

[PATCH] D63889: Check possible warnings on global initializers for reachability

2019-07-21 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: clang/lib/Sema/SemaDeclCXX.cpp:352 SetParamDefaultArgument(Param, DefaultArg, EqualLoc); + CurContext->removeDecl(Param); + CurContext = Cur; We may need to delay the diagnostics here until the default argument is *u

[PATCH] D64914: Implement P1771

2019-07-21 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. Please update cxx_status.html to mark P1771R1 as implemented in SVN. Comment at: clang/test/CXX/dcl.dcl/dcl.attr/dcl.attr.nodiscard/p2.cpp:87-88 // expected-warning@28 {{use of the 'nodiscard' attribute is a C++17 extension}} +// expected-warning@66 {{

Re: r366626 - Implement P1301R4, which allows specifying an optional message on the [[nodiscard]] attribute.

2019-07-21 Thread Richard Smith via cfe-commits
On Sat, 20 Jul 2019 at 09:55, Aaron Ballman via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: aaronballman > Date: Sat Jul 20 00:56:34 2019 > New Revision: 366626 > > URL: http://llvm.org/viewvc/llvm-project?rev=366626&view=rev > Log: > Implement P1301R4, which allows specifying an op

[PATCH] D59555: [analyzer] Add yaml parser to GenericTaintChecker

2019-07-21 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus accepted this revision. Szelethus added a comment. LGTM, thanks! Please mark inlines as done as you fix them. If you like the file description I proposed, I'm happy to commit this on your behalf (or you might as well apply for a commit access, since you have a track record of high qua