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&id=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 http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co

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 lib/Sema/SemaTemp

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 include/clang/Basic/DiagnosticSem

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 set

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 i

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 http://lists.llvm.org/cgi-bin/

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 lib/Sema/SemaD

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 cfe

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 Richa

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: > hubert.reinterpr

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 is

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:373 @@ -372,1 +372,3 @@ + /// Whether this is a (C++ Concepts TS) function concept. + bool isConcept() const { return TemplatedDecl.getInt(); } This code is not limited

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 http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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 di

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 ca

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] 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 some

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 test/CXX/concepts-ts/dcl.dcl/dcl.

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

2015-12-16 Thread Nathan Wilson via cfe-commits
nwilson updated this revision to Diff 43072. nwilson added a comment. - Move IsConcept bit and associated member functions from FunctionDecl to FunctionTemplateDecl. - Set the IsConcept flag using getDescribedFunctionTemplate. http://reviews.llvm.org/D13357 Files: include/clang/AST/DeclTempl

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 test/CXX/concepts-ts/dcl.dcl/dcl.spec/dcl

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: > > nwilso

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: > > hubert

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 w

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 specialization}0

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 instantiation|explicit

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

2015-11-13 Thread Hubert Tong via cfe-commits
hubert.reinterpretcast added a comment. Comment added inline. Otherwise, LGTM. Comment at: lib/Sema/SemaDecl.cpp:7659 @@ +7658,3 @@ +Diag(D.getDeclSpec().getConceptSpecLoc(), + diag::err_concept_specified_specialization) << 1; + } I don'

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 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-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 test/CXX/concepts-ts/dcl.dcl/dcl.spec/dcl

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

2015-10-28 Thread Hubert Tong via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: include/clang/AST/Decl.h:1577 @@ -1576,2 +1576,3 @@ bool IsConstexpr : 1; + bool IsConcept : 1; nwilson wrote: > faisalv wrote: > > My inclination would have been to add this bit to FunctionTemplateDe

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 Functio

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 e

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 t

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 t