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

2016-02-07 Thread Nathan Wilson via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL260074: [Concepts] Implement a portion of Concepts TS[dcl.spec.concept]p1 by (authored by nwilson). Changed prior to commit: http://reviews.llvm.org/D13357?vs=46863=47160#toc Repository: rL LLVM

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

2016-02-04 Thread Richard Smith via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. LGTM http://reviews.llvm.org/D13357 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

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

2016-02-03 Thread Hubert Tong via cfe-commits
hubert.reinterpretcast added a comment. Minor comments; otherwise, LGTM. Comment at: lib/Sema/SemaDecl.cpp:6007 @@ +6006,3 @@ + // applied only to the definition of a [...] variable template, declared + // in namespace scope. [...] A concept definition refers to [...]

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

2016-02-03 Thread Nathan Wilson via cfe-commits
nwilson updated this revision to Diff 46854. nwilson added a comment. - This update removes the parameter in `TemplateDecl::setConcept` since there isn't a need to mark a concept false. http://reviews.llvm.org/D13357 Files: include/clang/AST/DeclTemplate.h

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

2016-02-03 Thread Nathan Wilson via cfe-commits
nwilson updated this revision to Diff 46863. nwilson added a comment. - Address Hubert's comments about the quoted section of the TS. http://reviews.llvm.org/D13357 Files: include/clang/AST/DeclTemplate.h include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaDecl.cpp

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

2016-02-01 Thread Nathan Wilson via cfe-commits
nwilson updated this revision to Diff 46588. nwilson added a comment. - Fix a couple of comments to reflect the Patch. - Clang-format the changes in this Patch. http://reviews.llvm.org/D13357 Files: include/clang/AST/DeclTemplate.h include/clang/Basic/DiagnosticSemaKinds.td

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

2016-02-01 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: include/clang/AST/DeclTemplate.h:374 @@ +373,3 @@ + bool isConcept() const { return TemplatedDecl.getInt(); } + void setConcept(bool IC) { TemplatedDecl.setInt(true); } + I would prefer to not have a setter at all, but

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

2016-02-01 Thread Nathan Wilson via cfe-commits
nwilson marked 5 inline comments as done. nwilson added a comment. Marking some comments Done which were fixed in previous updates. http://reviews.llvm.org/D13357 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

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

2016-02-01 Thread Nathan Wilson via cfe-commits
nwilson added inline comments. Comment at: include/clang/AST/DeclTemplate.h:374 @@ +373,3 @@ + bool isConcept() const { return TemplatedDecl.getInt(); } + void setConcept(bool IC) { TemplatedDecl.setInt(true); } + rsmith wrote: > I would prefer to not have a

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

2016-01-26 Thread Nathan Wilson via cfe-commits
nwilson added a comment. Ping. @rsmith - would you also mind clarifying the comment regarding `setConcept(bool IC)` at to whether it should exist at all or simply not have any params? http://reviews.llvm.org/D13357 ___ cfe-commits mailing list

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

2016-01-13 Thread Hubert Tong via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: include/clang/AST/DeclTemplate.h:375 @@ +374,3 @@ + bool isConcept() const { return TemplatedDecl.getInt(); } + void setConcept(bool IC) { TemplatedDecl.setInt(true); } + nwilson wrote: >

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

2016-01-13 Thread Nathan Wilson via cfe-commits
nwilson added inline comments. Comment at: include/clang/AST/DeclTemplate.h:375 @@ +374,3 @@ + bool isConcept() const { return TemplatedDecl.getInt(); } + void setConcept(bool IC) { TemplatedDecl.setInt(true); } + hubert.reinterpretcast wrote: > The parameter

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

2016-01-13 Thread Nathan Wilson via cfe-commits
nwilson added inline comments. Comment at: include/clang/AST/DeclTemplate.h:377 @@ -376,3 +376,3 @@ NamedDecl *TemplatedDecl; TemplateParameterList* TemplateParams; I can't seem to follow the link properly, but I'm assuming it's supposed to be where

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

2016-01-07 Thread Nathan Wilson via cfe-commits
nwilson added a comment. Ping. Now that the holidays are over-ish, as Aaron said in one of his Patches. http://reviews.llvm.org/D13357 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

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

2015-12-27 Thread Nathan Wilson via cfe-commits
nwilson added inline comments. 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] D13357: [Concepts] Diagnose when 'concept' is specified on a specialization

2015-12-27 Thread Nathan Wilson via cfe-commits
nwilson updated this revision to Diff 43670. nwilson added a comment. - Store the IsConcept boolean flag in TemplateDecl by making TemplatedDecl an IntPointerPair, and move the associated member functions into TemplateDecl. - Remove unnecessary quoted comment. - Remove an extra space where the

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

2015-12-22 Thread Nathan Wilson via cfe-commits
nwilson updated this revision to Diff 43469. nwilson added a comment. Updating to r256247 http://reviews.llvm.org/D13357 Files: include/clang/AST/DeclTemplate.h include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaDecl.cpp lib/Sema/SemaTemplate.cpp

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

2015-12-22 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: include/clang/AST/DeclTemplate.h:836 @@ -835,2 +835,3 @@ + bool IsConcept : 1; protected: This might make more sense on `TemplateDecl`, since we also want this flag for `VarTemplateDecl`s. In any case, please use

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

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

2015-11-30 Thread Nathan Wilson via cfe-commits
nwilson added inline comments. Comment at: lib/Sema/SemaDecl.cpp:7659 @@ +7658,3 @@ +Diag(D.getDeclSpec().getConceptSpecLoc(), + diag::err_concept_specified_specialization) << 1; + } rsmith wrote: > hubert.reinterpretcast wrote: > >

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

2015-11-30 Thread Nathan Wilson via cfe-commits
nwilson updated this revision to Diff 41441. nwilson added a comment. Updating to r254337 http://reviews.llvm.org/D13357 Files: include/clang/AST/Decl.h include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaDecl.cpp lib/Sema/SemaTemplate.cpp

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

2015-11-18 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: lib/Sema/SemaDecl.cpp:7659 @@ +7658,3 @@ +Diag(D.getDeclSpec().getConceptSpecLoc(), + diag::err_concept_specified_specialization) << 1; + } hubert.reinterpretcast wrote: > nwilson wrote: > >

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

2015-11-18 Thread Hubert Tong via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: lib/Sema/SemaDecl.cpp:7659 @@ +7658,3 @@ +Diag(D.getDeclSpec().getConceptSpecLoc(), + diag::err_concept_specified_specialization) << 1; + } nwilson wrote: > hubert.reinterpretcast

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

2015-11-18 Thread Nathan Wilson via cfe-commits
nwilson added inline comments. Comment at: include/clang/Basic/DiagnosticSemaKinds.td:2003 @@ +2002,3 @@ +def err_concept_specified_specialization : Error< + "%'concept' cannot be applied on an " + "%select{explicit instantiation|explicit specialization|partial

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

2015-11-13 Thread Aaron Ballman via cfe-commits
aaron.ballman added a comment. Aside from one question, LGTM. ~Aaron Comment at: include/clang/Basic/DiagnosticSemaKinds.td:2003 @@ +2002,3 @@ +def err_concept_specified_specialization : Error< + "%'concept' cannot be applied on an " + "%select{explicit

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

2015-11-12 Thread Nathan Wilson via cfe-commits
nwilson updated this revision to Diff 40105. nwilson added a comment. - Remove marking a variable concept invalid when specialized since we'll only look at the primary template downstream. This removal let's us use the same recovery path as before when 'concept' is specified on a non-template.

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

2015-11-02 Thread Nathan Wilson via cfe-commits
nwilson updated this revision to Diff 39030. nwilson added a comment. Updating to r251898 http://reviews.llvm.org/D13357 Files: include/clang/AST/Decl.h include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaDecl.cpp lib/Sema/SemaTemplate.cpp

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

2015-11-02 Thread Nathan Wilson via cfe-commits
nwilson added inline comments. Comment at: lib/Sema/SemaDecl.cpp:5909 @@ +5908,3 @@ + diag::err_concept_specified_specialization) + << (IsPartialSpecialization ? 2 : 1); +NewVD->setInvalidDecl(true); Hmm, I'd lean toward leaving it as

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

2015-10-22 Thread Nathan Wilson via cfe-commits
nwilson added inline comments. Comment at: include/clang/AST/Decl.h:1577 @@ -1576,2 +1576,3 @@ bool IsConstexpr : 1; + bool IsConcept : 1; faisalv wrote: > My inclination would have been to add this bit to FunctionTemplateDecl, > instead of to every

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

2015-10-15 Thread Faisal Vali via cfe-commits
faisalv added inline comments. Comment at: include/clang/AST/Decl.h:1577 @@ -1576,2 +1576,3 @@ bool IsConstexpr : 1; + bool IsConcept : 1; My inclination would have been to add this bit to FunctionTemplateDecl, instead of to every FunctionDecl - since not

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

2015-10-15 Thread Nathan Wilson via cfe-commits
nwilson updated this revision to Diff 37529. nwilson added a comment. Addressing Richard's other comment regarding the FunctionDecl being declared a concept check. Also, remove setting the FunctionDecl being Invalid in the Specialization check since the downstream parts of Clang should look at

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

2015-10-12 Thread Nathan Wilson via cfe-commits
nwilson marked 2 inline comments as done. Comment at: lib/Sema/SemaDecl.cpp:7886 @@ -7863,1 +7885,3 @@ + + if (NewFD->isInvalidDecl() && !NewFD->isConcept()) { HasExplicitTemplateArgs = false; Maybe there could be a problem further down if we think