[cfe-commits] r123959 - in /cfe/trunk: include/clang/AST/Attr.h include/clang/Basic/Attr.td include/clang/Basic/AttrKinds.h lib/Sema/SemaDecl.cpp lib/Serialization/ASTReaderDecl.cpp lib/Serialization/ASTWriter.cpp

Peter Collingbourne peter at pcc.me.uk
Wed Jan 26 08:48:23 PST 2011


On Wed, Jan 26, 2011 at 10:41:47AM +0100, Enea Zaffanella wrote:
> Il 21/01/2011 03:08, Peter Collingbourne ha scritto:
> > Author: pcc
> > Date: Thu Jan 20 20:08:36 2011
> > New Revision: 123959
> > 
> > URL: http://llvm.org/viewvc/llvm-project?rev=123959&view=rev
> > Log:
> > Generalise support for non-inheritable attributes
> [...]
> > The patch introduces a new Attr subclass, InheritableAttr, from
> > which all inheritable attributes derive.  Non-inheritable attributes
> > simply derive from Attr.
> [...]
> > -  bool isInherited() const { return Inherited; }
> 
> Why removing this query method from the base class Attr?
> 
> May I suggest to make it virtual (with a default implementation
> returning false) and then override it in InheritableAttr?

It seems best for efficiency reasons to move isInherited to Attr
while leaving setInherited in InheritableAttr.  I'll do it.

Thanks,
-- 
Peter



More information about the cfe-commits mailing list