[cfe-commits] r158288 - in /cfe/trunk: include/clang/AST/ include/clang/Basic/ include/clang/Sema/ lib/AST/ lib/CodeGen/ lib/Parse/ lib/Rewrite/ lib/Sema/ lib/Serialization/ test/PCH/ test/SemaTemplate/

Enea Zaffanella zaffanella at cs.unipr.it
Mon Jul 2 01:20:49 PDT 2012


Hello Richard.

The commit below has removed a couple of FieldDecl public methods
(setBitWidth and removeBitWidth) that are used in one of our 
applications. I understand that you removed them because they are unused 
in the clang sources, thereby looking useless, so the questions are:

1) OK to reintroduce them? (we need to modify some AST nodes in place 
and one of the changes has to do with bitfield size expressions)

2) is there any convention for flagging this kind of "unused" methods as 
"used", so as to avoid future removals?

Cheers,
Enea.


On 06/10/2012 05:12 AM, Richard Smith wrote:
> Author: rsmith
> Date: Sat Jun  9 22:12:00 2012
> New Revision: 158288
>
> URL: http://llvm.org/viewvc/llvm-project?rev=158288&view=rev
> Log:
> PR13064: Store whether an in-class initializer uses direct or copy
> initialization, and use that information to produce the right kind of
> initialization during template instantiation.

[...]

> -  void setBitWidth(Expr *BW) {
> -    assert(!InitializerOrBitWidth.getPointer() &&
> -           "bit width or initializer already set");
> -    InitializerOrBitWidth.setPointer(BW);
> -    InitializerOrBitWidth.setInt(1);
> -  }
> -  /// removeBitWidth - Remove the bitfield width from this member.
> -  void removeBitWidth() {
> -    assert(isBitField() && "no bit width to remove");
> -    InitializerOrBitWidth.setPointer(0);



More information about the cfe-commits mailing list