[cfe-dev] Hello everybody and first question
Douglas Gregor
dgregor at apple.com
Thu Dec 3 18:25:38 PST 2009
On Dec 3, 2009, at 12:56 PM, Nicola Gigante wrote:
> Hello everybody.
>
> I'm new to the list, I've subscribed because I'm looking at the clang source code for fun and learning.
Welcome!
> First of all, congratulations, it's a great work!
>
> In my opinion, the best thing to do to learn how clang internals work is to do something concrete, so I've read the TODO file and I saw there are a few jobs that seems simple enough. For example, I read:
>
> More ideas for code modification hints:
> - If no member of a given name is found in a class/struct, search through the names of entities that do exist in the class and suggest the closest candidate. e.g., if I write "DS.setTypeSpecType", it would suggest "DS.SetTypeSpecType" (edit distance = 1).
> ... others...
> - Change "foo.bar" to "foo->bar" when "foo" is a pointer.
>
> First of all, is the TODO file up-to-date?
Mostly, yes.
> Then.. Which part of the source code should I look to fix these two points?
Both of them would get implemented in the function Sema::LookupMemberExpr, which is in lib/Sema/SemaExpr.cpp.
The second one is probably easier, because it will be a localized change, mostly likely around line 2600 (where we have the "if (IsArrow)" check.
> Another thing. In the case I could end up with a working patch, how does the clang contribution policy work? Do I have to send the patches to this list, or to someone in particular?
We prefer that patches be sent to the cfe-commits mailing list, unless you think that the patch does something fundamentally new or different from what's already in Clang: in that case, we like to discuss ideas here on cfe-dev first.
- Doug
More information about the cfe-dev
mailing list