[cfe-dev] Flexible array fields in C++ classes.

Ivan Sorokin sorokin at rain.ifmo.ru
Tue Feb 2 13:48:11 PST 2010


Enea Zaffanella wrote:
> The impression is that the if-guard condition
>     Record->isStruct()
> is an overkill and could be replaced by the weaker form
>     (Record->isStruct() || Record->isClass())
As I know in C++ the only difference between struct and class is that by 
default in struct members (and bases) are public and in class -- private.

Has it a sense to look through every place where isStruct() exists and 
decide whether isClass() should also be there?

I did this, but as I saw there is no such use of both of isStruct() and 
isClass(). isStruct() and isClass() seems to be used in different 
places. So I am a bit confused. Maybe some one else who has more 
knowledge about internals of clang looks at this?

Sorry, if this message is useless.

More information about the cfe-dev mailing list