Re: [PATCH] D49922: [P0936R0] add [[clang::lifetimebound]] attribute

2018-08-02 Thread Martin Storsjö via cfe-commits
On Thu, 2 Aug 2018, Richard Smith via cfe-commits wrote: On Thu, 2 Aug 2018, 06:10 Martin Storsjö via Phabricator via cfe-commits, wrote: mstorsjo added a comment. This change made clang to start trigger failed asserts for me (although they seem to not be reproducible with

Re: [PATCH] D49922: [P0936R0] add [[clang::lifetimebound]] attribute

2018-08-02 Thread Richard Smith via cfe-commits
On Thu, 2 Aug 2018, 06:10 Martin Storsjö via Phabricator via cfe-commits, < cfe-commits@lists.llvm.org> wrote: > mstorsjo added a comment. > > This change made clang to start trigger failed asserts for me (although > they seem to not be reproducible with all compilers building clang), see >

[PATCH] D49922: [P0936R0] add [[clang::lifetimebound]] attribute

2018-08-02 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. This change made clang to start trigger failed asserts for me (although they seem to not be reproducible with all compilers building clang), see https://bugs.llvm.org/show_bug.cgi?id=38421 for full description. Repository: rC Clang https://reviews.llvm.org/D49922

[PATCH] D49922: [P0936R0] add [[clang::lifetimebound]] attribute

2018-08-02 Thread Kim Gräsman via Phabricator via cfe-commits
kimgr added a comment. Potential typo in the tests Comment at: test/SemaCXX/attr-lifetimebound.cpp:24 + + // Do not diagnose non-void return types; they can still be lifetime-bound. + long long ptrintcast(int [[clang::lifetimebound]]) { Should this say

[PATCH] D49922: [P0936R0] add [[clang::lifetimebound]] attribute

2018-07-31 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. rsmith marked 2 inline comments as done. Closed by commit rC338464: [P0936R0] add [[clang::lifetimebound]] attribute (authored by rsmith, committed by ). Changed prior to commit:

[PATCH] D49922: [P0936R0] add [[clang::lifetimebound]] attribute

2018-07-31 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith marked 3 inline comments as done. rsmith added inline comments. Comment at: lib/Sema/SemaInit.cpp:6959 + case IndirectLocalPathEntry::LifetimeBoundCall: +// FIXME: Consider adding a note for this. +break; aaron.ballman wrote: > Is

[PATCH] D49922: [P0936R0] add [[clang::lifetimebound]] attribute

2018-07-31 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM, though I raised a few questions. If you want to handle them as part of this patch, I'm happy to do another round of review. If you want to handle them in a follow-up

[PATCH] D49922: [P0936R0] add [[clang::lifetimebound]] attribute

2018-07-30 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: include/clang/Basic/AttrDocs.td:2371 +is retained by the return value of the annotated function +(or, for a constructor, in the value of the constructed object). +It is only supported in C++. aaron.ballman wrote: > I

[PATCH] D49922: [P0936R0] add [[clang::lifetimebound]] attribute

2018-07-30 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith updated this revision to Diff 158149. rsmith marked 8 inline comments as done. https://reviews.llvm.org/D49922 Files: include/clang/AST/Type.h include/clang/Basic/Attr.td include/clang/Basic/AttrDocs.td include/clang/Basic/DiagnosticSemaKinds.td lib/AST/Type.cpp

[PATCH] D49922: [P0936R0] add [[clang::lifetimebound]] attribute

2018-07-28 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: include/clang/Basic/AttrDocs.td:2371 +is retained by the return value of the annotated function +(or, for a constructor, in the value of the constructed object). +It is only supported in C++. I read this as

[PATCH] D49922: [P0936R0] add [[clang::lifetimebound]] attribute

2018-07-27 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: include/clang/AST/TypeLoc.h:96-97 /// Convert to the specified TypeLoc type, returning a null TypeLoc if - /// this TypeLock is not of the desired type. It will consider type - /// adjustments from a type that wad written as a T to

[PATCH] D49922: [P0936R0] add [[clang::lifetimebound]] attribute

2018-07-27 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith created this revision. rsmith added a reviewer: aaron.ballman. Herald added a reviewer: javed.absar. Herald added a subscriber: kristof.beyls. This patch adds support for a new attribute, [[clang::lifetimebound]], that indicates that the lifetime of a function result is related to one of