[PATCH] D13357: [Concepts] Diagnose when 'concept' is specified on a specialization
Nathan Wilson via cfe-commits
cfe-commits at lists.llvm.org
Mon Feb 1 19:12:54 PST 2016
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 setter at all, but if it's awkward to pass this flag into the constructor, then a setter is fine (and I don't mind whether or not it takes a parameter). We should definitely not take a parameter and ignore it though.
Ah, gotcha. Yeah, it seemed somewhat awkward to me to pass the flag all the way through. As a note it would be VarTemplateDecl -> RedeclarableTemplateDecl -> TemplateDecl. Also, RedeclarableTemplateDecl also currently currently takes 7 parameters.
If you feel strongly, I can move it to the constructor. Otherwise, I'll take the parameter out of the setter as both you and Hubert have pointed out the property will not need to set to false.
http://reviews.llvm.org/D13357
More information about the cfe-commits
mailing list