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 FunctionDecl - since not every kind of FunctionDecl can > be a concept ... My first instinct would have been to add an enum to > TemplateKind, and then forward isConcept() to check if we are a template and > if so, through it, if concept is specified? > > But I suppose that adds more complexity, and you trade space for speed - For > my own edification, could I ask you or Richard to comment on the cons of that > approach - and why the current approach is preferred? (i.e. simplicity over > complexity or space over time etc.) Sorry for the slow reply. Yeah, I thought it was a little more straightforward having isConcept as a member function of FunctionDecl (and the bit). It also seemed that we'd be okay in terms of size since 17 bits are already being used here and adding one more wouldn't go over a byte boundary. Maybe Richard has other thoughts though?
http://reviews.llvm.org/D13357 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits