Re: r261506 - Fix PR24473 : Teach clang to remember to substitute into member variable templates referred to within dependent qualified ids.

2016-02-21 Thread Faisal Vali via cfe-commits
On Sun, Feb 21, 2016 at 10:06 PM, Richard Smith wrote: > On 21 Feb 2016 6:29 p.m., "Faisal Vali via cfe-commits" > wrote: >> >> Author: faisalv >> Date: Sun Feb 21 20:24:29 2016 >> New Revision: 261506 >> >> URL: http://llvm.org/viewvc/llv

Re: r261506 - Fix PR24473 : Teach clang to remember to substitute into member variable templates referred to within dependent qualified ids.

2016-02-22 Thread Faisal Vali via cfe-commits
On Sun, Feb 21, 2016 at 11:45 PM, Richard Smith wrote: > On 21 Feb 2016 8:21 p.m., "Faisal Vali" wrote: >> >> On Sun, Feb 21, 2016 at 10:06 PM, Richard Smith >> wrote: >> > On 21 Feb 2016 6:29 p.m., "Faisal Vali via cfe-commits" >> > w

Re: r261506 - Fix PR24473 : Teach clang to remember to substitute into member variable templates referred to within dependent qualified ids.

2016-02-22 Thread Faisal Vali via cfe-commits
On Mon, Feb 22, 2016 at 6:46 AM, Faisal Vali wrote: > On Sun, Feb 21, 2016 at 11:45 PM, Richard Smith wrote: >> On 21 Feb 2016 8:21 p.m., "Faisal Vali" wrote: >>> >>> On Sun, Feb 21, 2016 at 10:06 PM, Richard Smith >>> wrote: >>> &

Re: [PATCH] D17576: Fix assertion failure on MaybeODRUseExprs.

2016-02-24 Thread Faisal Vali via cfe-commits
faisalv added inline comments. Comment at: lib/Sema/SemaTemplateInstantiateDecl.cpp:2114 @@ -2113,1 +2113,3 @@ +EnterExpressionEvaluationContext ConstantEvaluated(SemaRef, + Sema::ConstantEvaluated); ExprResult Value

r261823 - Twek fix for PR24473 (r261506) - Preserve the template arguments as written

2016-02-24 Thread Faisal Vali via cfe-commits
Author: faisalv Date: Wed Feb 24 23:09:30 2016 New Revision: 261823 URL: http://llvm.org/viewvc/llvm-project?rev=261823&view=rev Log: Twek fix for PR24473 (r261506) - Preserve the template arguments as written (within the DeclRefExpr Node) when creating AST nodes that reference specializations of

Re: [PATCH] D19770: Add FixedSizeStorage to TrailingObjects; NFC

2016-05-01 Thread Faisal Vali via cfe-commits
faisalv added a comment. Thanks for running with this! =) Comment at: include/llvm/Support/TrailingObjects.h:352 @@ +351,3 @@ +template +using _ = +llvm::AlignedCharArray::Alignment, FWIW - while I see your point - the 'underscore' as a name see

Re: [PATCH] D19770: Add FixedSizeStorage to TrailingObjects; NFC

2016-05-01 Thread Faisal Vali via cfe-commits
faisalv added a comment. Thanks for your response. I don't feel strongly about either of those issues - especially since it seems you considered the options - and have good reasons for choosing the alternative. I would also favor adding in a comment an example of how users are expected to use

Re: [PATCH] D18510: [cxx1z-constexpr-lambda] Make conversion function constexpr

2016-05-01 Thread Faisal Vali via cfe-commits
faisalv added a comment. *ping* http://reviews.llvm.org/D18510 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D18495: Check default arguments of template template parameters for compatibility.

2016-05-01 Thread Faisal Vali via cfe-commits
faisalv added a comment. *ping* http://reviews.llvm.org/D18495 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D19783: Fix cv-qualification of '*this' captures (and nasty bug PR27507 introduced by commit 263921 "Implement Lambda Capture of *this by Value as [=, *this]")

2016-05-01 Thread Faisal Vali via cfe-commits
faisalv created this revision. faisalv added reviewers: rsmith, hubert.reinterpretcast. faisalv added subscribers: cfe-commits, gnzlbg. The bug report by Gonzalo (https://llvm.org/bugs/show_bug.cgi?id=27507 -- which results in clang crashing when generic lambdas that capture 'this' are instantia

Re: [PATCH] D19783: Fix cv-qualification of '*this' captures (and nasty bug PR27507 introduced by commit 263921 "Implement Lambda Capture of *this by Value as [=, *this]")

2016-05-01 Thread Faisal Vali via cfe-commits
faisalv added a comment. Is it too soon for a *ping* ;) p.s. just added some comments. Comment at: lib/Sema/SemaExprCXX.cpp:904 @@ +903,3 @@ + for (int I = FunctionScopes.size(); + I-- && dyn_cast(FunctionScopes[I]); + IsFirstIteration = false, Tha

Re: [PATCH] D20349: Fix a clang bug in lambda capture of 'this'

2016-05-18 Thread Faisal Vali via cfe-commits
Thanks for the work here - but this bug is a duplicate of this: https://llvm.org/bugs/show_bug.cgi?id=27507, which unearthed some other subtle bugs with the cv capture of *this by copy. I've submitted a patch for review here: http://reviews.llvm.org/D19783 that addresses both issues - about 2-3 wee

Re: [PATCH] D20349: Fix a clang bug in lambda capture of 'this'

2016-05-18 Thread Faisal Vali via cfe-commits
faisalv added a comment. That feedback would be greatly appreciated - thanks Taewook! Faisal Vali http://reviews.llvm.org/D20349 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D19783: Fix cv-qualification of '*this' captures (and nasty bug PR27507 introduced by commit 263921 "Implement Lambda Capture of *this by Value as [=,*this]")

2016-05-18 Thread Faisal Vali via cfe-commits
OK - thanks - will take a closer look at this hopefuly this evening or tomorrow - and respond to Richard's other comments too. Faisal Vali On Wed, May 18, 2016 at 1:46 PM, Taewook Oh wrote: > twoh added a comment. > > My patch passes check-clang and the test cases in this patch as well. > > BT

r270016 - Fix PR27601 by reverting [r267453] - Refactor traversal of bases in deduction of template parameters from base

2016-05-18 Thread Faisal Vali via cfe-commits
Author: faisalv Date: Wed May 18 21:28:21 2016 New Revision: 270016 URL: http://llvm.org/viewvc/llvm-project?rev=270016&view=rev Log: Fix PR27601 by reverting [r267453] - Refactor traversal of bases in deduction of template parameters from base This reversal is being done with r267453's author's

Re: [PATCH] D19783: Fix cv-qualification of '*this' captures (and nasty bug PR27507 introduced by commit 263921 "Implement Lambda Capture of *this by Value as [=, *this]")

2016-05-18 Thread Faisal Vali via cfe-commits
There are tests from the test file in my patch that don't pass(*) if you just apply Oh's fix . That's not surprising since Oh's patch only meant to fix the crash, but not the 'cv' qualification issue of '*this' that we didn't have to deal with prior to by-value captures of '*this' and my initial i

Re: [PATCH] D19783: Fix cv-qualification of '*this' captures (and nasty bug PR27507 introduced by commit 263921 "Implement Lambda Capture of *this by Value as [=, *this]")

2016-05-18 Thread Faisal Vali via cfe-commits
faisalv marked 5 inline comments as done. faisalv added a comment. OK - agree (and addressed in a forthcoming patch) all your comments - except for the one I could use some clarity on - please see below Comment at: lib/Sema/SemaExprCXX.cpp:910 @@ +909,3 @@ + assert(IsFirst

Re: [PATCH] D19783: Fix cv-qualification of '*this' captures (and nasty bug PR27507 introduced by commit 263921 "Implement Lambda Capture of *this by Value as [=, *this]")

2016-05-18 Thread Faisal Vali via cfe-commits
faisalv updated this revision to Diff 57733. faisalv marked an inline comment as done. faisalv added a comment. This patch addresses all of Richard's comments - except one (on which I'm awaiting some additional clarity on, before I make any changes). http://reviews.llvm.org/D19783 Files: inc

Re: [PATCH] D19783: Fix cv-qualification of '*this' captures (and nasty bug PR27507 introduced by commit 263921 "Implement Lambda Capture of *this by Value as [=, *this]")

2016-05-19 Thread Faisal Vali via cfe-commits
faisalv added inline comments. Comment at: lib/Parse/ParseDeclCXX.cpp:3651 @@ -3652,1 +3650,3 @@ + case AttributeList::AT_Unused: +return !ScopeName && AttrName->getName().equals("maybe_unused"); default: This whitespace change shouldn't have been included

Re: [PATCH] D19783: Fix cv-qualification of '*this' captures (and nasty bug PR27507 introduced by commit 263921 "Implement Lambda Capture of *this by Value as [=,*this]")

2016-05-20 Thread Faisal Vali via cfe-commits
I'm also a huge advocate of simple composable interfaces that do the 'one' task that they are expected (i.e. named) to do - and do it well. I thought about this some, but perhaps not exhaustively - and settled on being ok with getCurThisType, always returning the correct type for 'this' as typed/r

Re: [PATCH] D18510: [cxx1z-constexpr-lambda] Make conversion function constexpr

2016-04-07 Thread Faisal Vali via cfe-commits
faisalv added a comment. *ping* http://reviews.llvm.org/D18510 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D18495: Check default arguments of template template parameters for compatibility.

2016-04-07 Thread Faisal Vali via cfe-commits
faisalv added a comment. *ping* http://reviews.llvm.org/D18495 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D18510: [cxx1z-constexpr-lambda] Make conversion function constexpr

2016-04-12 Thread Faisal Vali via cfe-commits
faisalv added a comment. *ping* http://reviews.llvm.org/D18510 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r266561 - Implement CWG 941 - explicit specializations of deleted function templates

2016-04-17 Thread Faisal Vali via cfe-commits
Author: faisalv Date: Sun Apr 17 12:32:04 2016 New Revision: 266561 URL: http://llvm.org/viewvc/llvm-project?rev=266561&view=rev Log: Implement CWG 941 - explicit specializations of deleted function templates template void f(T) = delete; template<> void f(int); // OK. f(3); // OK Implemen

Re: [PATCH] D19322: Concepts: Create space for requires-clause in TemplateParameterList; NFC

2016-04-21 Thread Faisal Vali via cfe-commits
faisalv added inline comments. Comment at: include/clang/AST/DeclTemplate.h:175 @@ -152,2 +174,3 @@ + Expr *RequiresClause; public: Yuk - this entire guy (FizedSizeTemplateParameterListStorage) seems quite fragile (dependent on object layout) - are the gains

Re: [PATCH] D18139: [Cxx1z] Implement Lambda Capture of *this by Value as [=, *this] (P0018R3)

2016-04-25 Thread Faisal Vali via cfe-commits
I can't access the cpp file- tried cloning the respository - but got an error - perhaps you can email it to me as a text file? Faisal Vali On Mon, Apr 25, 2016 at 8:29 AM, Gonzalo BG wrote: > Dear Richard Smith and Faisal Vali, > > this patch broke my code. I've filled a bug report here: > http

Re: [PATCH] D19783: Fix cv-qualification of '*this' captures (and nasty bug PR27507 introduced by commit 263921 "Implement Lambda Capture of *this by Value as [=, *this]")

2016-05-23 Thread Faisal Vali via cfe-commits
faisalv added a comment. *ping* http://reviews.llvm.org/D19783 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D20732: Don't use static variables in LambdaCapture

2016-06-08 Thread Faisal Vali via cfe-commits
faisalv added a comment. Seems reasonable to me if we have the bit to spare. I wasn't a huge fan of the sentinel approach - but i appreciated Richard showing me that trick. I don't think I realized that Decl has to be aligned on an 8 byte boundary. I'm not too familiar with the alignment gym

Re: [PATCH] D21145: [Sema] Fix crash on valid where instantiation of lambda cannot access type of 'this'

2016-06-11 Thread Faisal Vali via cfe-commits
faisalv added inline comments. Comment at: lib/Sema/SemaTemplateInstantiateDecl.cpp:3922 @@ -3920,1 +3921,3 @@ + *this, Var->getDeclContext(), + /*NewThisContext=*/!isLambdaCallOperator(getCurLexicalContext())); Init = SubstInitializer(OldVar->getInit(), T

r272480 - Fix cv-qualification of '*this' captures and nasty bug PR27507

2016-06-11 Thread Faisal Vali via cfe-commits
Author: faisalv Date: Sat Jun 11 11:41:54 2016 New Revision: 272480 URL: http://llvm.org/viewvc/llvm-project?rev=272480&view=rev Log: Fix cv-qualification of '*this' captures and nasty bug PR27507 The bug report by Gonzalo (https://llvm.org/bugs/show_bug.cgi?id=27507 -- which results in clang c

Re: [PATCH] D19783: Fix cv-qualification of '*this' captures (and nasty bug PR27507 introduced by commit 263921 "Implement Lambda Capture of *this by Value as [=, *this]")

2016-06-11 Thread Faisal Vali via cfe-commits
faisalv accepted this revision. faisalv added a reviewer: faisalv. faisalv added a comment. This revision is now accepted and ready to land. Committed as r272480 http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20160606/161728.html http://reviews.llvm.org/D19783 __

Re: [PATCH] D21145: [Sema] Fix crash on valid where instantiation of lambda cannot access type of 'this'

2016-06-12 Thread Faisal Vali via cfe-commits
faisalv added a comment. Hmm - after having given this some more thought - I'm not as confident about the best approach. Should we leverage the CXXThisTypeOverride mechanism (as you had done in your initial patch) - and remove the computation entirely from getCurrentThisType - or just remove C

r272631 - Fix PR28100 - Allow redeclarations of deleted explicit specializations.

2016-06-13 Thread Faisal Vali via cfe-commits
Author: faisalv Date: Mon Jun 13 22:23:15 2016 New Revision: 272631 URL: http://llvm.org/viewvc/llvm-project?rev=272631&view=rev Log: Fix PR28100 - Allow redeclarations of deleted explicit specializations. See https://llvm.org/bugs/show_bug.cgi?id=28100. In r266561 when I implemented allowing ex

Re: [PATCH] D21030: [Sema] Fix rejects-valid where parameter pack was not expanded in type alias

2016-06-14 Thread Faisal Vali via cfe-commits
faisalv added a comment. Thanks for working on this bug too! Comment at: lib/Sema/TreeTransform.h:4784 @@ +4783,3 @@ +NewType = getDerived().RebuildPackExpansionType( +NewType, SourceRange(), Loc, NumExpansions); +if (NewType.isNull()) ---

Re: [PATCH] D20349: Fix a clang bug in lambda capture of 'this'

2016-06-26 Thread Faisal Vali via cfe-commits
faisalv resigned from this revision. faisalv removed a reviewer: faisalv. faisalv added a comment. Should be fixed by: http://reviews.llvm.org/D19783. Thanks again for your feedback and all the time you put into this =) http://reviews.llvm.org/D20349 _

Re: [PATCH] D21145: [Sema] Fix crash on valid where instantiation of lambda cannot access type of 'this'

2016-06-26 Thread Faisal Vali via cfe-commits
faisalv accepted this revision. faisalv added a comment. This revision is now accepted and ready to land. With the assert, I would feel comfortable committing the patch. It always helps to get Richard's approval too - so feel free to ping him aggressively to see if he's interested in stopping i

r274454 - [Refactor NFC] Rename the (non-CCE, fold-failure) Diag during constant expression evaluation as FFDiag.

2016-07-02 Thread Faisal Vali via cfe-commits
Author: faisalv Date: Sat Jul 2 17:34:24 2016 New Revision: 274454 URL: http://llvm.org/viewvc/llvm-project?rev=274454&view=rev Log: [Refactor NFC] Rename the (non-CCE, fold-failure) Diag during constant expression evaluation as FFDiag. Currently, we have CCEDiags (C++11 core constant expressio

Re: [PATCH] D18510: [cxx1z-constexpr-lambda] Make conversion function constexpr

2016-07-05 Thread Faisal Vali via cfe-commits
faisalv updated the summary for this revision. faisalv updated this revision to Diff 62814. faisalv added a comment. Mark the lambda's conversion to function-pointer as incontrovertibly constexpr. auto L = [](auto a) { return a; }; constexpr int* (*fp)(int*) = L; // This is now allowed. Instead

Re: [PATCH] D14905: [constexpr-lambda] Support parsing of constexpr specifier (and its inference) on lambda expressions

2016-03-04 Thread Faisal Vali via cfe-commits
faisalv added a comment. *ping* http://reviews.llvm.org/D14905 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D14905: [constexpr-lambda] Support parsing of constexpr specifier (and its inference) on lambda expressions

2016-03-05 Thread Faisal Vali via cfe-commits
faisalv removed reviewers: nwilson, aaron.ballman, hubert.reinterpretcast, doug.gregor. faisalv updated this revision to Diff 49889. faisalv marked 7 inline comments as done. faisalv added a comment. Incorporated Richard's feedback: - constexpr now elicits an extension warning in pre-cxx1z - ref

Re: [PATCH] D14905: [constexpr-lambda] Support parsing of constexpr specifier (and its inference) on lambda expressions

2016-03-12 Thread Faisal Vali via cfe-commits
faisalv added a comment. *ping* http://reviews.llvm.org/D14905 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D18139: [Cxx1z] Implement Lambda Capture of *this by Value as [=, *this] (P0018R3)

2016-03-13 Thread Faisal Vali via cfe-commits
faisalv created this revision. faisalv added a reviewer: rsmith. faisalv added a subscriber: cfe-commits. Implement lambda capture of *this. struct A { int d = 10; auto foo() { return [*this] (auto a) mutable { d+=a; return d; }; } }; auto L = A{}.foo(); // A{}'s lifetime is gone. // Below i

Re: [PATCH] D18139: [Cxx1z] Implement Lambda Capture of *this by Value as [=, *this] (P0018R3)

2016-03-14 Thread Faisal Vali via cfe-commits
faisalv updated this revision to Diff 50621. faisalv added a comment. Add warnings and extension diagnostics for C++1z, and refactor the codegen portion, simplifying it further. Thanks! http://reviews.llvm.org/D18139 Files: include/clang/AST/LambdaCapture.h include/clang/Basic/DiagnosticPa

Re: [PATCH] D18139: [Cxx1z] Implement Lambda Capture of *this by Value as [=, *this] (P0018R3)

2016-03-14 Thread Faisal Vali via cfe-commits
faisalv marked 14 inline comments as done. faisalv added a comment. Thanks for the review! An updated patch that should address your concerns will follow in a few mins. I'm still not entirely sure I follow your comment about the intialized-entity: 'directly pass the fact that the capture in que

Re: [PATCH] D18139: [Cxx1z] Implement Lambda Capture of *this by Value as [=, *this] (P0018R3)

2016-03-14 Thread Faisal Vali via cfe-commits
faisalv updated this revision to Diff 50698. faisalv marked 3 inline comments as done. faisalv added a comment. Updated patch that should incorporate Richard's feedback. Thanks! http://reviews.llvm.org/D18139 Files: include/clang/AST/LambdaCapture.h include/clang/Basic/DiagnosticParseKinds

Re: [PATCH] D18139: [Cxx1z] Implement Lambda Capture of *this by Value as [=, *this] (P0018R3)

2016-03-15 Thread Faisal Vali via cfe-commits
faisalv updated this revision to Diff 50757. faisalv added a comment. Added some more comments (hopefully didn't go overboard). Thanks again for reviewing Richard! http://reviews.llvm.org/D18139 Files: include/clang/AST/LambdaCapture.h include/clang/Basic/DiagnosticParseKinds.td include/

r263921 - [Cxx1z] Implement Lambda Capture of *this by Value as [=, *this] (P0018R3)

2016-03-21 Thread Faisal Vali via cfe-commits
Author: faisalv Date: Mon Mar 21 04:25:37 2016 New Revision: 263921 URL: http://llvm.org/viewvc/llvm-project?rev=263921&view=rev Log: [Cxx1z] Implement Lambda Capture of *this by Value as [=,*this] (P0018R3) Implement lambda capture of *this by copy. For e.g.: struct A { int d = 10; auto foo

r263922 - Reorder data members to be consistent with member initializers, to silence warnings.

2016-03-21 Thread Faisal Vali via cfe-commits
Author: faisalv Date: Mon Mar 21 05:37:42 2016 New Revision: 263922 URL: http://llvm.org/viewvc/llvm-project?rev=263922&view=rev Log: Reorder data members to be consistent with member initializers, to silence warnings. Modified: cfe/trunk/include/clang/Sema/ScopeInfo.h Modified: cfe/trunk/i

r264170 - [NFC] Delete an unused function parameter from a static function

2016-03-23 Thread Faisal Vali via cfe-commits
Author: faisalv Date: Wed Mar 23 12:39:51 2016 New Revision: 264170 URL: http://llvm.org/viewvc/llvm-project?rev=264170&view=rev Log: [NFC] Delete an unused function parameter from a static function Modified: cfe/trunk/lib/Sema/SemaExpr.cpp Modified: cfe/trunk/lib/Sema/SemaExpr.cpp URL: ht

Re: [PATCH] D14905: [constexpr-lambda] Support parsing of constexpr specifier (and its inference) on lambda expressions

2016-03-24 Thread Faisal Vali via cfe-commits
faisalv marked 8 inline comments as done. faisalv added a comment. Thanks for the review - will submit a updated patch with recommended changes, shortly. http://reviews.llvm.org/D14905 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://

Re: [PATCH] D14905: [constexpr-lambda] Support parsing of constexpr specifier (and its inference) on lambda expressions

2016-03-24 Thread Faisal Vali via cfe-commits
faisalv updated this revision to Diff 51627. faisalv added a comment. An updated patch that incorporates Richard's feedback. Thanks! http://reviews.llvm.org/D14905 Files: include/clang/Basic/DiagnosticASTKinds.td include/clang/Basic/DiagnosticParseKinds.td include/clang/Sema/Sema.h lib/

r264513 - [Cxx1z-constexpr-lambda-P0170R1] Support parsing of constexpr specifier (and its inference) on lambda expressions

2016-03-26 Thread Faisal Vali via cfe-commits
Author: faisalv Date: Sat Mar 26 11:11:37 2016 New Revision: 264513 URL: http://llvm.org/viewvc/llvm-project?rev=264513&view=rev Log: [Cxx1z-constexpr-lambda-P0170R1] Support parsing of constexpr specifier (and its inference) on lambda expressions Support the constexpr specifier on lambda expre

r264522 - [NFC] Tweak diagnostic for template template arguments, to include template aliases.

2016-03-26 Thread Faisal Vali via cfe-commits
Author: faisalv Date: Sat Mar 26 15:46:45 2016 New Revision: 264522 URL: http://llvm.org/viewvc/llvm-project?rev=264522&view=rev Log: [NFC] Tweak diagnostic for template template arguments, to include template aliases. The prior diagnostic (err_template_arg_not_class_template) would state that t

Re: r264522 - [NFC] Tweak diagnostic for template template arguments, to include template aliases.

2016-03-26 Thread Faisal Vali via cfe-commits
Thanks for pointing that out - makes sense - sorry about that! Faisal Vali On Sat, Mar 26, 2016 at 4:11 PM, Richard Smith wrote: > On 26 Mar 2016 1:52 p.m., "Faisal Vali via cfe-commits" > wrote: >> >> Author: faisalv >> Date: Sat Mar 26 15:46:45 2016 >&

Re: [PATCH] D14905: [constexpr-lambda] Support parsing of constexpr specifier (and its inference) on lambda expressions

2016-03-26 Thread Faisal Vali via cfe-commits
faisalv closed this revision. faisalv marked 3 inline comments as done. faisalv added a comment. Closed by r264513. http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20160321/153846.html http://reviews.llvm.org/D14905 ___ cfe-commits mailing l

Re: [PATCH] D18139: [Cxx1z] Implement Lambda Capture of *this by Value as [=, *this] (P0018R3)

2016-03-26 Thread Faisal Vali via cfe-commits
faisalv closed this revision. faisalv marked 3 inline comments as done. faisalv added a comment. Committed as r263921 http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20160321/153258.html http://reviews.llvm.org/D18139 ___ cfe-commits mailin

[PATCH] D18495: Check default arguments of template template parameters for compatibility.

2016-03-26 Thread Faisal Vali via cfe-commits
faisalv created this revision. faisalv added a reviewer: rsmith. faisalv added a subscriber: cfe-commits. I'm not sure why this check wasn't being done at template definition time. I can't devise a test case to trigger the concerns in the deleted comments below. Anything I might be missing by

Re: [PATCH] D18495: Check default arguments of template template parameters for compatibility.

2016-03-27 Thread Faisal Vali via cfe-commits
faisalv marked 2 inline comments as done. Comment at: lib/Sema/SemaTemplate.cpp:793-800 @@ -792,10 +792,2 @@ if (!Default.isInvalid()) { -// Check only that we have a template template argument. We don't want to -// try to check well-formedness now, because our template

Re: [PATCH] D18495: Check default arguments of template template parameters for compatibility.

2016-03-27 Thread Faisal Vali via cfe-commits
faisalv updated this revision to Diff 51742. faisalv marked 2 inline comments as done. faisalv added a comment. Updated the patch with the following: - while checking dependent template template arguments at template definition time, we must accept the more general (pack) as compatible with the

[PATCH] D18510: [cxx1z-constexpr-lambda] Make conversion function constexpr

2016-03-27 Thread Faisal Vali via cfe-commits
faisalv created this revision. faisalv added a reviewer: rsmith. faisalv added a subscriber: cfe-commits. Mark the lambda's conversion to function-pointer as incontrovertibly constexpr. auto L = [](auto a) { return a; }; constexpr int* (*fp)(int*) = L; // This is now allowed. By itself this is

Re: [PATCH] D15005: Fix PR8170: Clang does not check constructor declaration that uses a template-id

2015-12-28 Thread Faisal Vali via cfe-commits
faisalv added a comment. *ping* http://reviews.llvm.org/D15005 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r258110 - Fix PR26134: When substituting into default template arguments, keep CurContext unchanged.

2016-01-18 Thread Faisal Vali via cfe-commits
Author: faisalv Date: Mon Jan 18 21:58:55 2016 New Revision: 258110 URL: http://llvm.org/viewvc/llvm-project?rev=258110&view=rev Log: Fix PR26134: When substituting into default template arguments, keep CurContext unchanged. Or, do not set Sema's CurContext to the template declaration's when su

r253431 - [NFC] Change the evaluation context of a non-type default template argument from Unevaluated to ConstantEvaluated.

2015-11-17 Thread Faisal Vali via cfe-commits
Author: faisalv Date: Tue Nov 17 22:29:22 2015 New Revision: 253431 URL: http://llvm.org/viewvc/llvm-project?rev=253431&view=rev Log: [NFC] Change the evaluation context of a non-type default template argument from Unevaluated to ConstantEvaluated. This patch emits a more appropriate (but stil

r253590 - Change the expression evaluation context from Unevaluated to ConstantEvaluated while substituting into non-type template argument defaults.

2015-11-19 Thread Faisal Vali via cfe-commits
Author: faisalv Date: Thu Nov 19 13:20:17 2015 New Revision: 253590 URL: http://llvm.org/viewvc/llvm-project?rev=253590&view=rev Log: Change the expression evaluation context from Unevaluated to ConstantEvaluated while substituting into non-type template argument defaults. Also address a typo fr

[PATCH] D14905: [constexpr-lambda] Support parsing of constexpr specifier (and its inference) on lambda expressions

2015-11-21 Thread Faisal Vali via cfe-commits
faisalv created this revision. faisalv added reviewers: rsmith, doug.gregor, hubert.reinterpretcast, aaron.ballman, nwilson. faisalv added a subscriber: cfe-commits. This patch supports parsing of the constexpr specifier on lambdas - and its inference from the lambda call operator's body. i.e.

[PATCH] D15005: Fix PR8170: Clang does not check constructor declaration that uses a template-id

2015-11-25 Thread Faisal Vali via cfe-commits
faisalv created this revision. faisalv added a reviewer: rsmith. faisalv added a subscriber: cfe-commits. Clang currently does no real checking of the template argument list when a template-id is used to declare a constructor: template struct X { X(); // Clang erroneously accepts this. }; Bot

r254889 - Fix PR20334: invalid assertion while diagnosing list initialization failure

2015-12-06 Thread Faisal Vali via cfe-commits
Author: faisalv Date: Sun Dec 6 20:37:44 2015 New Revision: 254889 URL: http://llvm.org/viewvc/llvm-project?rev=254889&view=rev Log: Fix PR20334: invalid assertion while diagnosing list initialization failure https://llvm.org/bugs/show_bug.cgi?id=20334 Unfortunately, clang currently checks for

Re: [PATCH] D15005: Fix PR8170: Clang does not check constructor declaration that uses a template-id

2015-12-07 Thread Faisal Vali via cfe-commits
faisalv added a comment. *ping* My main question is, does it make sense to suppress diagnostics when checking the template-id, and then rewording it as I do. If it does make sense to suppress and then report a new diagnostic - is my method of suppression a reasonable one (as opposed to SFINAE

Re: [PATCH] D15005: Fix PR8170: Clang does not check constructor declaration that uses a template-id

2015-12-07 Thread Faisal Vali via cfe-commits
faisalv added inline comments. Comment at: lib/Sema/SemaTemplate.cpp:528 @@ +527,3 @@ +[&StringifiedTemplateArgs, this](const TemplateArgument &TA) { +if (const bool IsFirst = !StringifiedTemplateArgs.size()) + StringifiedTemplateArgs = "<"; --

r255221 - Fix PR24694 (CWG1591): Deducing array bound and element type from initializer list

2015-12-09 Thread Faisal Vali via cfe-commits
Author: faisalv Date: Wed Dec 9 23:36:39 2015 New Revision: 255221 URL: http://llvm.org/viewvc/llvm-project?rev=255221&view=rev Log: Fix PR24694 (CWG1591): Deducing array bound and element type from initializer list https://llvm.org/bugs/show_bug.cgi?id=24694 http://wg21.link/cwg1591 Teach Dedu

r255244 - [NFC] Improve a comment from my previous commit (r255221)

2015-12-10 Thread Faisal Vali via cfe-commits
Author: faisalv Date: Thu Dec 10 06:29:11 2015 New Revision: 255244 URL: http://llvm.org/viewvc/llvm-project?rev=255244&view=rev Log: [NFC] Improve a comment from my previous commit (r255221) Modified: cfe/trunk/lib/Sema/SemaTemplateDeduction.cpp Modified: cfe/trunk/lib/Sema/SemaTemplateDedu

r255323 - Add some more tests for initializer lists related to CWG1591

2015-12-10 Thread Faisal Vali via cfe-commits
Author: faisalv Date: Thu Dec 10 19:04:30 2015 New Revision: 255323 URL: http://llvm.org/viewvc/llvm-project?rev=255323&view=rev Log: Add some more tests for initializer lists related to CWG1591 Modified: cfe/trunk/test/CXX/drs/dr15xx.cpp Modified: cfe/trunk/test/CXX/drs/dr15xx.cpp URL: htt

Re: [PATCH] D13357: [Concepts] Diagnose when 'concept' is specified on a specialization

2015-12-22 Thread Faisal Vali via cfe-commits
faisalv added a subscriber: Nate. Comment at: include/clang/AST/DeclTemplate.h:836 @@ -835,2 +835,3 @@ + bool IsConcept : 1; protected: rsmith wrote: > This might make more sense on `TemplateDecl`, since we also want this flag > for `VarTemplateDecl`s. In any

Re: [PATCH] D15005: Fix PR8170: Clang does not check constructor declaration that uses a template-id

2015-12-23 Thread Faisal Vali via cfe-commits
faisalv added a comment. *ping* http://reviews.llvm.org/D15005 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

<    1   2