Guidance in contributing to the project

Hello ma’am,
Thanks for the reference. I am trying to setup the project on my local computer.

Thanks & Regards
Priyanshi Agarwal

On Sat, 11 Mar, 2023, 8:05 pm suman meena via LLVM Discussion Forums, <notifications@llvm.discoursemail.com> wrote:

suman
March 11

hii priyanshi look at the tutorial link shivam has provided you will surely get an idea
https://llvm.org/docs/MyFirstTypoFix.html


Visit Topic or reply to this email to respond.

To unsubscribe from these emails, click here.

Like I said on Discord, this sounds like a system header somewhere is defining PTHREAD_H (to nothing).

Migrated to Ubuntu and everything works fine.

Have you installed it as your main os or running it on a vm?

I have used WSL2(You can google it).I wanted to use windows but vs required a lot of data bundles to download dependencies so I opted to install WSL2.
Were you able to run any artifacts (clang, tests) etc?

hey, I am trying to solve this issue Print name of uninitialized subobject (instead of type) · Issue #58601 · llvm/llvm-project · GitHub, where I searched the string “subobject of type ‘int’ is not initialized” using the git grep command and changed it to desired one. However, it still shows me the same note after compiling the given example can someone give me a direction?

Which files did you change? That’s not the exact string to search for, it’s a template in the source code. I’m going to guess you just went and edited the tests that check for that exact message?

oh, thanks jrtc if possible could you please give me an idea of how to get to the source code then?

clang/include and clang/lib have the source code, clang/test has the tests. Search the former for the diagnostic in question (suitably generalised since the diagnostic is templated and won’t just say int) to find the template, alter the text, find any references to the template and update them to pass any additional template parameters (like the name of the member).

thank you so much jrtc27 for the help I found the relevant code but now the problem is the code is contained in a .td file which I am finding difficult to understand if you can suggest me some good resources to understand TableGen code that will be huge help to me. I searched for the same on google but doesn’t find something relevant.

Understanding TableGen is a big question, because it’s used for many different things. Understanding how TableGen is used for diagnostics is relatively straightforward, however. There might be documentation, but here’s what you’ll need to know even if there isn’t.

Let’s look at the diagnostic definition that I found, hopefully the same one you found:

def note_constexpr_uninitialized : Note<
  "%select{|sub}0object of type %1 is not initialized">;

The name after the “def” becomes a symbolic constant for this diagnostic. If you grep the clang source for that name, you’ll find where the diagnostic is generated. There might be only one place, there might be several.

Next, observe the %1 in the string. This is a placeholder for a parameter passed to the diagnostic engine, in this case the name of the type. The 1 means it is parameter number 1, where the numbers start at 0, so in this case it will be the second parameter.

Finally, observe the %select{|sub}0 part. This is a fancier kind of placeholder, but note that it still starts with % and ends with a digit (in this case, 0). That means the substitution is controlled by parameter 0 passed to the diagnostic. The select operator expects an integer, which it uses to select one of the alternatives inside the braces, which are separated by |. If you pass 0 as parameter 0, it will substitute the 0th alternative, which is the empty string; if you pass 1, it will substitute the 1th alternative, “sub”.

The diagnostics engine is set up to use stream-like operators, so in this case the code to generate the diagnostic will first call some kind of Diag method passing diag::note_constexpr_uninitialized followed by stream operators for the parameters. This will probably look something like

foo.Diag(...) << isSubobject << typeName;

not exactly like that–I haven’t actually looked up the code–but it will have that general form.

To fix the diagnostic, you’ll need to (a) change the text of the message in the .td file, (b) modify each of the places the diagnostic is used to pass the correct name.

hey, thank you so much pogo59 I got your point and now trying to pass the element name to the diagnostic function instead of the element type and will let u know once done.

My system keeps crashing whenever I got to this command line “ninja check-clang” of building llvm project on my linux machine ninja check-clang.

I am running 16gb RAM acer nitro gaming system.

Is there any advice or solution to that?

I have been able to build the project. Thank you.

hey pogo59 i git grep “note_constexpr_uninitialized” and found two functions " DiagnoseUninitializedSubobject" in Interp.cpp file and “CheckEvaluationResult” in ExprConstant.cpp file and changed the parameters passing to the former one but struggling with later one in later one the function is taking type of a Base (object) as a argument i checked the code of class but have no clue how to get name of Base could you pls give me a hint .

I am not familiar with the insides of clang (I mostly understand the diagnostics because of doing work on the driver). @AaronBallman is probably the best person to answer this question.

I’m not certain I understand which Base object you’re talking about – showing some code might help.

APValue::LValueBase Base = LVal.getLValueBase(); this is the base object i am taking about

Hello,I have submitted for a review at ⚙ D146370 [Clang][OpenMP]Solved the the always truth condition in Arm64 but have not received a review. I am requesting any mentor to review it so that I can make it as a contribution.

I am getting this error while setting up vs code as a editor for arc. I have installed the phabricator extension too. I have installed arc and php.