[PATCH] D26882: Refactor how FunctionDecl handles constexpr:

2016-12-28 Thread Nathan Wilson via Phabricator via cfe-commits
nwilson added a comment. Small Ping. @rsmith - did you have anymore thoughts about this patch? https://reviews.llvm.org/D26882 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D26882: Refactor how FunctionDecl handles constexpr:

2016-12-20 Thread Nathan Wilson via Phabricator via cfe-commits
nwilson updated this revision to Diff 82194. nwilson added a comment. - Remove the call to `setImplicitlyInline()` within `setImplicitlyConstexpr()` and call `setImplicitlyInline()` directly for function concepts. https://reviews.llvm.org/D26882 Files: include/clang/AST/Decl.h lib/Sema/Sem

[PATCH] D26882: Refactor how FunctionDecl handles constexpr:

2016-12-20 Thread Nathan Wilson via Phabricator via cfe-commits
nwilson added a comment. Ping https://reviews.llvm.org/D26882 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D26882: Refactor how FunctionDecl handles constexpr:

2016-12-09 Thread Nathan Wilson via Phabricator via cfe-commits
nwilson added a comment. https://reviews.llvm.org/D26882 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D26882: Refactor how FunctionDecl handles constexpr:

2016-12-09 Thread Nathan Wilson via Phabricator via cfe-commits
nwilson updated this revision to Diff 80845. nwilson added a comment. - Initialize IsConstexprSpecified - Remove unnecessary parenthetical in comment - Fix non-portable test https://reviews.llvm.org/D26882 Files: include/clang/AST/Decl.h lib/Sema/SemaDecl.cpp lib/Sema/SemaDeclCXX.cpp li

[PATCH] D26882: Refactor how FunctionDecl handles constexpr:

2016-11-22 Thread Nathan Wilson via cfe-commits
nwilson added inline comments. Comment at: include/clang/AST/Decl.h:1915 +IsConstexprSpecified = IC; +IsConstexpr = IC; + } hubert.reinterpretcast wrote: > How is the `inline` property transmitted here? Why does the > `setImplicitlyConstexpr` function n

Re: [PATCH] D18221: [Concepts] Implement subsection [dcl.spec.concept]p7 of the Concepts TS

2016-04-08 Thread Nathan Wilson via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL265868: [Concepts] Implement subsection [dcl.spec.concept]p7 of the Concepts TS (authored by nwilson). Changed prior to commit: http://reviews.llvm.org/D18221?vs=53103&id=53110#toc Repository: rL LLV

r265868 - [Concepts] Implement subsection [dcl.spec.concept]p7 of the Concepts TS

2016-04-08 Thread Nathan Wilson via cfe-commits
Author: nwilson Date: Fri Apr 8 21:55:27 2016 New Revision: 265868 URL: http://llvm.org/viewvc/llvm-project?rev=265868&view=rev Log: [Concepts] Implement subsection [dcl.spec.concept]p7 of the Concepts TS Summary: A program shall not declare an explicit instantiation (14.8.2), an explicit speci

Re: [PATCH] D18221: [Concepts] Implement subsection [dcl.spec.concept]p7 of the Concepts TS

2016-04-08 Thread Nathan Wilson via cfe-commits
nwilson updated this revision to Diff 53103. nwilson added a comment. - Address Aaron's comments by putting comments next to the magic numbers http://reviews.llvm.org/D18221 Files: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaDecl.cpp lib/Sema/SemaTemplate.cpp test/CXX/concep

[PATCH] D18221: [Concepts] Implement subsection [dcl.spec.concept]p7 of the Concepts TS

2016-03-19 Thread Nathan Wilson via cfe-commits
nwilson created this revision. nwilson added reviewers: rsmith, hubert.reinterpretcast, faisalv, aaron.ballman. nwilson added a subscriber: cfe-commits. A program shall not declare an explicit instantiation (14.8.2), an explicit specialization (14.8.3), or a partial specialization of a concept de

Re: [PATCH] D18221: [Concepts] Implement subsection [dcl.spec.concept]p7 of the Concepts TS

2016-03-19 Thread Nathan Wilson via cfe-commits
nwilson added inline comments. Comment at: lib/Sema/SemaDecl.cpp:7837 @@ -7819,1 +7836,3 @@ +NewFD->setInvalidDecl(true); +return NewFD; } Please let me know if there are thoughts about better error recovery here. I did this because we don'

r260155 - [Concepts] Remove the IsConcept bit and associated member functions from VarDecl

2016-02-08 Thread Nathan Wilson via cfe-commits
Author: nwilson Date: Mon Feb 8 16:02:50 2016 New Revision: 260155 URL: http://llvm.org/viewvc/llvm-project?rev=260155&view=rev Log: [Concepts] Remove the IsConcept bit and associated member functions from VarDecl because the information is now stored in TemplateDecl. Modified: cfe/trunk/inc

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

r260074 - [Concepts] Implement a portion of Concepts TS[dcl.spec.concept]p1 by

2016-02-07 Thread Nathan Wilson via cfe-commits
Author: nwilson Date: Sun Feb 7 23:34:00 2016 New Revision: 260074 URL: http://llvm.org/viewvc/llvm-project?rev=260074&view=rev Log: [Concepts] Implement a portion of Concepts TS[dcl.spec.concept]p1 by diagnosing when 'concept' is specified on a function or template specialization. Since a conce

Re: r259862 - [CMake] Improve the clang order-file generation workflow

2016-02-04 Thread Nathan Wilson via cfe-commits
I'm using gold and it seems like it's been fixed for me. On Thu, Feb 4, 2016 at 10:33 PM, Richard Smith via cfe-commits < cfe-commits@lists.llvm.org> wrote: > This build might be using gold, I don't recall how that machine is > configured. I won't be able to test the fix until tomorrow, hopefully

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 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 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] D16163: [Concepts] Diagnose when return type of a function concept or declaration type of a variable concept is not bool.

2016-01-28 Thread Nathan Wilson via cfe-commits
This revision was automatically updated to reflect the committed changes. nwilson marked an inline comment as done. Closed by commit rL259159: [Concepts] Implement a portion of Concepts TS[dcl.spec.concept]p5 and p6: (authored by nwilson). Changed prior to commit: http://reviews.llvm.org/D16163

r259159 - [Concepts] Implement a portion of Concepts TS[dcl.spec.concept]p5 and p6:

2016-01-28 Thread Nathan Wilson via cfe-commits
Author: nwilson Date: Thu Jan 28 22:43:59 2016 New Revision: 259159 URL: http://llvm.org/viewvc/llvm-project?rev=259159&view=rev Log: [Concepts] Implement a portion of Concepts TS[dcl.spec.concept]p5 and p6: Diagnose if the return type of a function concept or declaration type of a variable concep

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] D16163: [Concepts] Diagnose when return type of a function concept or declaration type of a variable concept is not bool.

2016-01-20 Thread Nathan Wilson via cfe-commits
nwilson marked an inline comment as done. Comment at: test/CXX/concepts-ts/dcl.dcl/dcl.spec/dcl.spec.concept/p5.cpp:22 @@ +21,3 @@ +template +concept float fcrtf() { return 5.5; } // expected-error {{declared return type of function concept must be 'bool'}} + The

Re: [PATCH] D16163: [Concepts] Diagnose when return type of a function concept or declaration type of a variable concept is not bool.

2016-01-20 Thread Nathan Wilson via cfe-commits
nwilson updated this revision to Diff 45453. nwilson added a comment. - Take qualifiers into account. - Check `VarDecl` is valid when checking declaration type to account for `constexpr` being specified. Is there any opinion on a better way to handle this? I *could* check for both diagnostics in

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] D15421: [Feature] Add a builtin for indexing into parameter packs

2016-01-13 Thread Nathan Wilson via cfe-commits
o me. I do feel like a name for something else will be shoehorned in later as well though. Louis - what do you think? > > >> On Wed, Jan 13, 2016 at 3:16 PM, Nathan Wilson via cfe-commits < >> cfe-commits@lists.llvm.org> 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 is

Re: [PATCH] D16163: [Concepts] Diagnose when return type of a function concept or declaration type of a variable concept is not bool.

2016-01-13 Thread Nathan Wilson via cfe-commits
nwilson added a comment. Please let me know if the subject or summary of this Patch is ambiguous. http://reviews.llvm.org/D16163 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D16163: [Concepts] Diagnose when return type of a function concept or declaration type of a variable concept is not bool.

2016-01-13 Thread Nathan Wilson via cfe-commits
nwilson created this revision. nwilson added reviewers: rsmith, faisalv, hubert.reinterpretcast, aaron.ballman. nwilson added a subscriber: cfe-commits. Adding checks and diagnostics which fall under Concepts TS[dcl.spec.concept]p5: function concepts are required to have 'bool' return type. Addin

Re: [PATCH] D15421: [Feature] Add a builtin for indexing into parameter packs

2016-01-13 Thread Nathan Wilson via cfe-commits
On Wed, Jan 13, 2016 at 4:52 PM, Richard Smith wrote: > On Wed, Jan 13, 2016 at 2:31 PM, Nathan Wilson > wrote: > >> nwilson added a comment. >> >> In http://reviews.llvm.org/D15421#326144, @rsmith wrote: >> >> > Bikeshedding on the name a bit... how

Re: [PATCH] D15421: [Feature] Add a builtin for indexing into parameter packs

2016-01-13 Thread Nathan Wilson via cfe-commits
nwilson added a comment. In http://reviews.llvm.org/D15421#326144, @rsmith wrote: > Bikeshedding on the name a bit... how about `__type_pack_element`? Hmm, I kind of felt like having `nth` in there implied we're indexing into something... What about `__nth_pack_element`? http://reviews.llvm.

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 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] D15421: [Feature] Add a builtin for indexing into parameter packs

2015-12-10 Thread Nathan Wilson via cfe-commits
Hi Louis, It would probably be useful to get the lines of context as well by doing a full diff as describer here: http://llvm.org/docs/Phabricator.html#id3 For example, git diff -U99 On Thu, Dec 10, 2015 at 11:32 AM, Louis Dionne via cfe-commits < cfe-commits@lists.llvm.org> wrote: > ldi

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 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-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: r252827 - Add diagnostics which fall under [dcl.spec.concept]p5

2015-11-11 Thread Nathan Wilson via cfe-commits
On Wed, Nov 11, 2015 at 6:59 PM, Richard Smith wrote: > On Wed, Nov 11, 2015 at 3:53 PM, Nathan Wilson via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > >> Author: nwilson >> Date: Wed Nov 11 17:53:35 2015 >> New Revision: 252827 >> >> URL: h

r252855 - [Sema] Remove unnecessary parens in check using logical or; NFC.

2015-11-11 Thread Nathan Wilson via cfe-commits
Author: nwilson Date: Wed Nov 11 22:25:03 2015 New Revision: 252855 URL: http://llvm.org/viewvc/llvm-project?rev=252855&view=rev Log: [Sema] Remove unnecessary parens in check using logical or; NFC. Modified: cfe/trunk/lib/Sema/SemaDecl.cpp Modified: cfe/trunk/lib/Sema/SemaDecl.cpp URL: htt

Re: [PATCH] D14352: Add diagnostics which fall under [dcl.spec.concept]p5

2015-11-11 Thread Nathan Wilson via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL252827: Add diagnostics which fall under [dcl.spec.concept]p5 (authored by nwilson). Changed prior to commit: http://reviews.llvm.org/D14352?vs=39386&id=39986#toc Repository: rL LLVM http://reviews.

r252827 - Add diagnostics which fall under [dcl.spec.concept]p5

2015-11-11 Thread Nathan Wilson via cfe-commits
Author: nwilson Date: Wed Nov 11 17:53:35 2015 New Revision: 252827 URL: http://llvm.org/viewvc/llvm-project?rev=252827&view=rev Log: Add diagnostics which fall under [dcl.spec.concept]p5 Summary: Diagnose when a function concept declaration has parameter(s) Reviewers: rsmith, faisalv, aaron.bal

Re: [PATCH] D14352: Add diagnostics which fall under [dcl.spec.concept]p5

2015-11-05 Thread Nathan Wilson via cfe-commits
nwilson updated this revision to Diff 39386. nwilson added a comment. - replace hyphen and apostrophe with equivalent ASCII characters http://reviews.llvm.org/D14352 Files: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaDecl.cpp test/CXX/concepts-ts/dcl.dcl/dcl.spec/dcl.spec.conc

Re: [PATCH] D14352: Add diagnostics which fall under [dcl.spec.concept]p5

2015-11-04 Thread Nathan Wilson via cfe-commits
nwilson updated this revision to Diff 39314. nwilson added a comment. - Cover variadic arguments in check for no params. - Add tests to cover variadic arguments. http://reviews.llvm.org/D14352 Files: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaDecl.cpp test/CXX/concepts-ts/dcl

[PATCH] D14352: Add diagnostics which fall under [dcl.spec.concept]p5

2015-11-04 Thread Nathan Wilson via cfe-commits
nwilson created this revision. nwilson added reviewers: rsmith, faisalv, hubert.reinterpretcast, aaron.ballman. nwilson added a subscriber: cfe-commits. Diagnose when a function concept declaration has parameter(s) http://reviews.llvm.org/D14352 Files: include/clang/Basic/DiagnosticSemaKinds.t

Re: [PATCH] D14316: [Concepts] Add diagnostics which fall under [dcl.spec.concept]p1

2015-11-04 Thread Nathan Wilson via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL252061: [Concepts] Add diagnostics which fall under [dcl.spec.concept]p1 (authored by nwilson). Changed prior to commit: http://reviews.llvm.org/D14316?vs=39151&id=39215#toc Repository: rL LLVM http

r252061 - [Concepts] Add diagnostics which fall under [dcl.spec.concept]p1

2015-11-04 Thread Nathan Wilson via cfe-commits
Author: nwilson Date: Wed Nov 4 12:18:35 2015 New Revision: 252061 URL: http://llvm.org/viewvc/llvm-project?rev=252061&view=rev Log: [Concepts] Add diagnostics which fall under [dcl.spec.concept]p1 Summary: Diagnose when the 'concept' specifier is used on a typedef or function parameter. Revie

[PATCH] D14316: [Concepts] Add diagnostics which fall under [dcl.spec.concept]p1

2015-11-03 Thread Nathan Wilson via cfe-commits
nwilson created this revision. nwilson added reviewers: rsmith, hubert.reinterpretcast, aaron.ballman, faisalv. nwilson added a subscriber: cfe-commits. Diagnose when the 'concept' specifier is used on a typedef or function parameter. http://reviews.llvm.org/D14316 Files: lib/Sema/SemaDecl.cp

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

Re: [PATCH] D13357: [Concepts] Add diagnostic; specializations of variable and function concepts

2015-10-12 Thread Nathan Wilson via cfe-commits
nwilson updated this revision to Diff 37099. nwilson added a comment. Moving tests to the correct file. Modifying the diagnostic id and message so it's more applicable to the checks in this Patch. Update the quoted sections of the standard as well. Use ternary operator for Partial Specialization

r249934 - [Concepts] Fixing Concepts TS directory structure; NFC

2015-10-09 Thread Nathan Wilson via cfe-commits
Author: nwilson Date: Fri Oct 9 21:17:39 2015 New Revision: 249934 URL: http://llvm.org/viewvc/llvm-project?rev=249934&view=rev Log: [Concepts] Fixing Concepts TS directory structure; NFC Added: cfe/trunk/test/CXX/concepts-ts/dcl.dcl/dcl.spec/dcl.spec.concept/ - copied from r249932, c

[PATCH] D13357: [Concepts] Add diagnostic; specializations of variable and function concepts

2015-10-01 Thread Nathan Wilson via cfe-commits
nwilson created this revision. nwilson added reviewers: rsmith, hubert.reinterpretcast, aaron.ballman, faisalv, fraggamuffin. nwilson added a subscriber: cfe-commits. http://reviews.llvm.org/D13357 Files: include/clang/AST/Decl.h include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaDecl

r247966 - [Concepts] Moving tests to match the corresponding section of the TS

2015-09-17 Thread Nathan Wilson via cfe-commits
Author: nwilson Date: Thu Sep 17 21:50:53 2015 New Revision: 247966 URL: http://llvm.org/viewvc/llvm-project?rev=247966&view=rev Log: [Concepts] Moving tests to match the corresponding section of the TS Added: cfe/trunk/test/CXX/concepts-ts/dcl.dcl/dcl.spec/dcl.concept/p1.cpp - copied u

r247194 - [Concepts] Add diagnostic; invalid specifier on function or variable concept declaration

2015-09-09 Thread Nathan Wilson via cfe-commits
Author: nwilson Date: Wed Sep 9 16:48:31 2015 New Revision: 247194 URL: http://llvm.org/viewvc/llvm-project?rev=247194&view=rev Log: [Concepts] Add diagnostic; invalid specifier on function or variable concept declaration Summary: Diagnose variable and function concept declarations when an inva

Re: [PATCH] D12435: [Concepts] Add diagnostic; invalid specifier on function or variable concept declaration

2015-09-04 Thread Nathan Wilson via cfe-commits
nwilson added a comment. Ping http://reviews.llvm.org/D12435 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D12435: [Concepts] Add diagnostic; invalid specifier on function or variable concept declaration

2015-08-31 Thread Nathan Wilson via cfe-commits
nwilson updated this revision to Diff 33587. nwilson added a comment. Change the wording of diagnostic message and quote the invalid specifier. Add 'friend' as an invalid specifier and diagnose function concepts when 'friend' is specified. Reorder the list of invalid specifiers and corresponding

Re: [PATCH] D12435: [Concepts] Add diagnostic; invalid specifier on function or variable concept declaration

2015-08-28 Thread Nathan Wilson via cfe-commits
nwilson added inline comments. Comment at: include/clang/Basic/DiagnosticSemaKinds.td:1982 @@ -1981,1 +1981,3 @@ "function concept cannot have exception specification">; +def err_concept_decl_invalid_sepcifiers : Error< + "%select{variable|function}0 concept cannot be declared

[PATCH] D12435: [Concepts] Add diagnostic; invalid specifier on function or variable concept declaration

2015-08-28 Thread Nathan Wilson via cfe-commits
nwilson created this revision. nwilson added reviewers: rsmith, hubert.reinterpretcast, aaron.ballman, faisalv, fraggamuffin. nwilson added a subscriber: cfe-commits. Diagnose variable and function concept declarations when an invalid specifier appears http://reviews.llvm.org/D12435 Files: i

Re: [PATCH] D11789: Modify DeclaratorChuck::getFunction to be passed an Exception Specification SourceRange

2015-08-25 Thread Nathan Wilson via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL246005: Modify DeclaratorChuck::getFunction to be passed an Exception Specification… (authored by nwilson). Changed prior to commit: http://reviews.llvm.org/D11789?vs=33093&id=33177#toc Repository: r

r246005 - Modify DeclaratorChuck::getFunction to be passed an Exception Specification SourceRange

2015-08-25 Thread Nathan Wilson via cfe-commits
Author: nwilson Date: Tue Aug 25 23:19:36 2015 New Revision: 246005 URL: http://llvm.org/viewvc/llvm-project?rev=246005&view=rev Log: Modify DeclaratorChuck::getFunction to be passed an Exception Specification SourceRange Summary: - Store the exception specification range's begin and end SourceL

Re: [PATCH] D11789: Modify DeclaratorChuck::getFunction to be passed an Exception Specification SourceRange

2015-08-25 Thread Nathan Wilson via cfe-commits
nwilson updated this revision to Diff 33093. http://reviews.llvm.org/D11789 Files: include/clang/Basic/DiagnosticSemaKinds.td include/clang/Sema/DeclSpec.h lib/Parse/ParseDecl.cpp lib/Parse/ParseExpr.cpp lib/Parse/ParseExprCXX.cpp lib/Sema/DeclSpec.cpp lib/Sema/SemaDecl.cpp lib/Se

Re: [PATCH] D11789: Modify DeclaratorChuck::getFunction to be passed an Exception Specification SourceRange

2015-08-25 Thread Nathan Wilson via cfe-commits
nwilson added a comment. Ping http://reviews.llvm.org/D11789 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D11789: Modify DeclaratorChuck::getFunction to be passed an Exception Specification SourceRange

2015-08-15 Thread Nathan Wilson via cfe-commits
nwilson updated this revision to Diff 32228. nwilson added a comment. Patch addressing comments; fix comment/documentation wording, scoping of diagnostic and setting invalid declaration, and fix test. I also modified the location of the diagnostic indicating an exception specification is not al

r245123 - [CONCEPTS] Add diagnostic; invalid tag when concept specified

2015-08-14 Thread Nathan Wilson via cfe-commits
Author: nwilson Date: Fri Aug 14 18:19:32 2015 New Revision: 245123 URL: http://llvm.org/viewvc/llvm-project?rev=245123&view=rev Log: [CONCEPTS] Add diagnostic; invalid tag when concept specified Summary: Adding check to emit diagnostic for invalid tag when concept is specified and associated te

Re: [PATCH] D11916: [CONCEPTS] Add diagnostic; invalid tag when concept specified

2015-08-14 Thread Nathan Wilson via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL245123: [CONCEPTS] Add diagnostic; invalid tag when concept specified (authored by nwilson). Changed prior to commit: http://reviews.llvm.org/D11916?vs=31957&id=32200#toc Repository: rL LLVM http://

Re: [PATCH] D11789: Modify DeclaratorChuck::getFunction to be passed an Exception Specification SourceRange

2015-08-14 Thread Nathan Wilson via cfe-commits
nwilson added a comment. Ping http://reviews.llvm.org/D11789 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D11916: [CONCEPTS] Add diagnostic; invalid tag when concept specified

2015-08-12 Thread Nathan Wilson via cfe-commits
nwilson updated this revision to Diff 31957. nwilson added a comment. Addressing comments which were discussed on the mailing list - Apply the same text when diagnosing a free standing declaration as suggested by Aaron. Replace diagnostic identifier err_concept_decl_non_template with err_concep

Re: [PATCH] D11928: Small fixup

2015-08-11 Thread Nathan Wilson via cfe-commits
nwilson added a subscriber: nwilson. nwilson added a comment. Hi Piotr, Would you mind renaming the title of the Patch since the title will be committed as such? Thanks! http://reviews.llvm.org/D11928 ___ cfe-commits mailing list cfe-commits@lists

Re: [PATCH] D11916: [CONCEPTS] Add diagnostic; invalid tag when concept specified

2015-08-11 Thread Nathan Wilson via cfe-commits
On Tue, Aug 11, 2015 at 5:46 PM, Richard Smith wrote: > On Tue, Aug 11, 2015 at 3:35 PM, Nathan Wilson > wrote: > >> >> >> On Tue, Aug 11, 2015 at 4:54 PM, Richard Smith >> wrote: >> >>> On Tue, Aug 11, 2015 at 2:46 PM, Nathan Wilson

Re: [PATCH] D11916: [CONCEPTS] Add diagnostic; invalid tag when concept specified

2015-08-11 Thread Nathan Wilson via cfe-commits
On Tue, Aug 11, 2015 at 4:54 PM, Richard Smith wrote: > On Tue, Aug 11, 2015 at 2:46 PM, Nathan Wilson > wrote: > >> Okay, I'll make the change. >> >> Hmm, do you guys have any suggestions as far as renaming >> err_concept_decl_non_template? >>

Re: [PATCH] D11916: [CONCEPTS] Add diagnostic; invalid tag when concept specified

2015-08-11 Thread Nathan Wilson via cfe-commits
> -- HT > > On Tue, Aug 11, 2015 at 4:01 PM, Aaron Ballman > wrote: > >> On Tue, Aug 11, 2015 at 3:36 PM, Nathan Wilson >> wrote: >> > >> > >> > On Tue, Aug 11, 2015 at 8:54 AM, Aaron Ballman > > >> > wrote: >>

Re: [PATCH] D11916: [CONCEPTS] Add diagnostic; invalid tag when concept specified

2015-08-11 Thread Nathan Wilson via cfe-commits
On Tue, Aug 11, 2015 at 8:54 AM, Aaron Ballman wrote: > On Mon, Aug 10, 2015 at 3:00 PM, Nathan Wilson > wrote: > > nwilson created this revision. > > nwilson added reviewers: rsmith, hubert.reinterpretcast, fraggamuffin, > faisalv, aaron.ballman. > > nwilson adde

Re: [PATCH] D11859: Generating vptr assume loads

2015-08-10 Thread Nathan Wilson via cfe-commits
nwilson added inline comments. Comment at: lib/CodeGen/CGClass.cpp:2155 @@ +2154,3 @@ +if (CGM.getCXXABI().canInitializeVPtr(Vptr.VTableClass, Vptr.Base.getBase(), + Vptr.NearestVBase)) + InitializeVTablePointer(Vptr);

Re: [PATCH] D11859: Generating vptr assume loads

2015-08-10 Thread Nathan Wilson via cfe-commits
nwilson added a subscriber: nwilson. Comment at: lib/CodeGen/CGClass.cpp:1862 @@ +1861,3 @@ +if (CGM.getCXXABI().canInitializeVPtr(vptr.VTableClass, vptr.Base.getBase(), + vptr.NearestVBase)) + EmitVTableAssumptionLoad(vptr, This);

[PATCH] D11916: [CONCEPTS] Add diagnostic; invalid tag when concept specified

2015-08-10 Thread Nathan Wilson via cfe-commits
nwilson created this revision. nwilson added reviewers: rsmith, hubert.reinterpretcast, fraggamuffin, faisalv, aaron.ballman. nwilson added a subscriber: cfe-commits. Adding check to emit diagnostic for invalid tag when concept is specified and associated tests. http://reviews.llvm.org/D11916

Re: [PATCH] D11789: Modify DeclaratorChuck::getFunction to be passed an Exception Specification SourceRange

2015-08-06 Thread Nathan Wilson via cfe-commits
nwilson added inline comments. Comment at: include/clang/Sema/DeclSpec.h:1262 @@ -1260,1 +1261,3 @@ +/// \brief The end location of the exception specifier, if any. +unsigned ExceptionSpecLocEnd; Please let me know if there is still an issue with the wor

Re: [PATCH] D11789: Modify DeclaratorChuck::getFunction to be passed an Exception Specification SourceRange

2015-08-06 Thread Nathan Wilson via cfe-commits
nwilson added inline comments. Comment at: lib/Sema/SemaDecl.cpp:7454-7456 @@ +7453,5 @@ + PDiag(diag::err_function_concept_exception_spec); + if (Range.isValid()) { +PD << FixItHint::CreateRemoval(Range); + } + Diag(NewFD->getLo

Re: [PATCH] D11789: Modify DeclaratorChuck::getFunction to be passed an Exception Specification SourceRange

2015-08-06 Thread Nathan Wilson via cfe-commits
nwilson updated this revision to Diff 31488. nwilson added a comment. Updated Patch based on comments; fix diagnostic spacing and phrasing, add getExceptionSpecRange, check FunctionTypeInfo exists, use PartialDiagnostic, add static_assert test for function concept being treated as noexcept(true)

Re: [PATCH] D11789: Modify DeclaratorChuck::getFunction to be passed an Exception Specification SourceRange

2015-08-05 Thread Nathan Wilson
nwilson added a comment. I'll make the fixes based on the comments, but had question about the FunctionTypeInfo in the meantime. Comment at: lib/Sema/SemaDecl.cpp:7447-7450 @@ -7446,1 +7446,6 @@ + if (const FunctionProtoType *FPT = R->getAs()) { +if (FPT->hasExce

[PATCH] D11789: Modify DeclaratorChuck::getFunction to be passed an Exception Specification SourceRange

2015-08-05 Thread Nathan Wilson
nwilson created this revision. nwilson added reviewers: rsmith, hubert.reinterpretcast, fraggamuffin, faisalv, aaron.ballman. nwilson added a subscriber: cfe-commits. - Store the exception specification range's begin and end SourceLocation in DeclaratorChuck::FunctionTypeInfo. These SourceLocati