[cfe-dev] [PATCH]: C++ decl classes for the AST
Argiris Kirtzidis
akyrtzi at gmail.com
Sat May 24 03:00:46 PDT 2008
Argiris Kirtzidis wrote:
> I'd also suggest to *not* use a CXXRecord. The only difference from a
> Record is that CXXRecord can be used as a DeclContext, and it adds
> this kind of complexity:
>
> -create CXXRecord
> -parse the struct definition
> -determine that Record is sufficient
> -create new Record with new Fields
> -Replace CXXRecord with new Record in scope
I wasn't clear enough here; I didn't mean that there shouldn't be a
check for simple structs and treating them differently, it's just that
there is a minor complexity in Parser/Sema about starting with a
CXXRecord but changing it to a Record later, but, as I mentioned later,
the merging of Records is way more problematic.
There is going to be a parsing of struct definitions like this (in C++):
-parse the struct definition and create CXXFields
-if the struct/class contains only public CXXFields, replace them with
Fields.
-Argiris
More information about the cfe-dev
mailing list