-
Notifications
You must be signed in to change notification settings - Fork 12.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Are the tutorials up-to-date? (Clang version is 20.0.0git) #114711
Comments
There are some in-tree users of Tooling.h in clang-tools-extra you can use as reference (which are known to build because they're part of normal builds). I agree it probably doesn't make sense to bootstrap clang in the directions in LibASTMatchersTutorial.rst . You could, anyway, but the gap between a random system compiler and a newly built clang is much smaller than it used to be. It's very easy for the tutorial files to fall out of date, especially when the tutorial doesn't correspond to some in-tree code. The files in question are clang/docs/LibASTMatchersTutorial.rst and clang/docs/LibTooling.rst in the LLVM tree; patches to clarify would be welcome. |
Hi! This issue may be a good introductory issue for people new to working on LLVM. If you would like to work on this issue, your first steps are:
If you have any further questions about this issue, don't hesitate to ask via a comment in the thread below. |
@llvm/issue-subscribers-good-first-issue Author: None (bobhairgrove)
Nothing written here seems to work for me: https://clang.llvm.org/docs/LibASTMatchersTutorial.html
In my previous post, I describe my frustrating experience building LLVM and Clang from latest sources. After having finally successfully built and installed everything after following a different tutorial found on the LLVM homepage, I went back to the LibASTMatcher tutorial to see if I could continue with the steps starting after the I didn't have Then I went to this tutorial and tried to compile the very first example (using
Output:
I know that Why do the tutorial writers assume that certain tools are already installed without even mentioning the dependencies? Since all of these tutorials are located on the official LLVM and Clang websites, one would assume that they would be better organized and tested... |
Hi, |
hey @bobhairgrove can you assign this issue to me |
Woops, sorry for the noise! Didn't realize this was assigned so recently. |
can you assign again |
You are, I undid it/reassigned immediately. |
ok thank you i'll update you soon about my progress |
No worries! Sorry about the noise, I'm working through cleaning up 'assigned but no progress in a while' and this somehow got into my query despite being assigned recently. |
should the configuraton of llvm and clang should also be changed |
Nothing written here seems to work for me: https://clang.llvm.org/docs/LibASTMatchersTutorial.html
In my previous post, I describe my frustrating experience building LLVM and Clang from latest sources. After having finally successfully built and installed everything after following a different tutorial found on the LLVM homepage, I went back to the LibASTMatcher tutorial to see if I could continue with the steps starting after the
ninja install
command (which should besudo ninja install
).I didn't have
ccmake
installed (had to runsudo apt install cmake-curses-gui
), so I did that. But I could not figure out where I needed to run this from since the tutorial installed everything immediately under$HOME
and assumes that whoever is trying to use this tutorial would do the same. However, it seems that the step mentioned is to useclang
to (re)compile LLVM using Clang, which isn't really necessary.Then I went to this tutorial and tried to compile the very first example (using
TEST()
andEXPECT_TRUE()
. It doesn't compile, unfortunately, but nothing written there gives me a hint about what is going on. Compiling withg++
should work, but here is the output:Output:
I know that
TEST
andEXPECT_TRUE
are macros defined by Google test framework, but assume that they are somehow pulled in by theTooling.h
header. But perhaps not?Why do the tutorial writers assume that certain tools are already installed without even mentioning the dependencies? Since all of these tutorials are located on the official LLVM and Clang websites, one would assume that they would be better organized and tested...
The text was updated successfully, but these errors were encountered: