Hello everybody and first question

Hello everybody.

I'm new to the list, I've subscribed because I'm looking at the clang source code for fun and learning.

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? Then.. Which part of the source code should I look to fix these two points?

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?

Thank you very much,

Nicola

G'Day and welcome Nicola,

Its always great to see a new face!

I'll attempt to try to answer some of your questions promptly here.
You may send patches to this list for both discussion and development
of that patch as well as general discussions of clang.
'Final' draft patches that are 'commit-ready' tend to end up on cfe-commits@.

I'm not sure, myself, if the TODO list is up to date, I hope it is.
Please do post your patch here in any case, it may well interest
others or inspire a new approach or discussion. Also, note that there
is a few simple bugs that could be fixed in the bug tracker if your
'job hunting' so to speak, so that's a good place to look also.

Here is a formal doc that explains dev policy stuff;
LLVM Developer Policy — LLVM 18.0.0git documentation

Hope this helps,
Cheers,
Edward.

Thank you :slight_smile: Another question: My long-term goal is to work on C++ support. To do this, I think I'll need some reference about the exact language syntax, but I don't know how and where to get the C++ standard reference. I suppose that because they're ISO/ANSI standards, the official papers are not free, are they?

Thank you,

Nicola

http://www.open-std.org/jtc1/sc22/wg21/

In there you can find a working paper I bet... maybe something like:

  http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2009/n3000.pdf

Mike Stump 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

Thank you everybody for the replies :slight_smile:

Nicola