https://github.com/siya100 created https://github.com/llvm/llvm-project/pull/123628
None >From 5b7ca21bae6c600bc74ece35103656c06dd4b30e Mon Sep 17 00:00:00 2001 From: siya100 <85541510+siya...@users.noreply.github.com> Date: Sun, 19 Jan 2025 16:43:50 +0530 Subject: [PATCH 01/10] Create cpio.yaml --- libc/utils/docgen/cpio.yaml | 1 + 1 file changed, 1 insertion(+) create mode 100644 libc/utils/docgen/cpio.yaml diff --git a/libc/utils/docgen/cpio.yaml b/libc/utils/docgen/cpio.yaml new file mode 100644 index 00000000000000..8b137891791fe9 --- /dev/null +++ b/libc/utils/docgen/cpio.yaml @@ -0,0 +1 @@ + >From 86ceab58e32143cc60e8f7507fbb58f1f24610d2 Mon Sep 17 00:00:00 2001 From: siya100 <85541510+siya...@users.noreply.github.com> Date: Sun, 19 Jan 2025 16:47:51 +0530 Subject: [PATCH 02/10] Update index.rst --- libc/docs/headers/index.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/libc/docs/headers/index.rst b/libc/docs/headers/index.rst index 5dbdcbc80529d7..79851ddf575b26 100644 --- a/libc/docs/headers/index.rst +++ b/libc/docs/headers/index.rst @@ -8,6 +8,7 @@ Implementation Status arpa/inet assert complex + cpio ctype errno fenv >From 56cef63c553b525f314f01169ab27b562e01c150 Mon Sep 17 00:00:00 2001 From: siya100 <85541510+siya...@users.noreply.github.com> Date: Sun, 19 Jan 2025 16:51:02 +0530 Subject: [PATCH 03/10] Update CMakeLists.txt --- libc/docs/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/libc/docs/CMakeLists.txt b/libc/docs/CMakeLists.txt index e77e979ab1e83f..cf13197ccc78b9 100644 --- a/libc/docs/CMakeLists.txt +++ b/libc/docs/CMakeLists.txt @@ -38,6 +38,7 @@ if (SPHINX_FOUND) arpa/inet assert ctype + cpio errno fenv float >From 9e6cf2f1c320bfdbc82f070fbe39b2619f0cd63f Mon Sep 17 00:00:00 2001 From: siya100 <85541510+siya...@users.noreply.github.com> Date: Sun, 19 Jan 2025 23:53:40 +0530 Subject: [PATCH 04/10] Update CMakeLists.txt added cpio --- libc/docs/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libc/docs/CMakeLists.txt b/libc/docs/CMakeLists.txt index cf13197ccc78b9..072d603155b4ec 100644 --- a/libc/docs/CMakeLists.txt +++ b/libc/docs/CMakeLists.txt @@ -37,8 +37,8 @@ if (SPHINX_FOUND) aio arpa/inet assert - ctype cpio + ctype errno fenv float >From 8713c9d61951168d81b6a93238569602f731ceeb Mon Sep 17 00:00:00 2001 From: siya100 <85541510+siya...@users.noreply.github.com> Date: Sun, 19 Jan 2025 23:57:30 +0530 Subject: [PATCH 05/10] add cpio.yaml --- libc/{utils => utils }/docgen/cpio.yaml | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename libc/{utils => utils }/docgen/cpio.yaml (100%) diff --git a/libc/utils/docgen/cpio.yaml b/libc/utils /docgen/cpio.yaml similarity index 100% rename from libc/utils/docgen/cpio.yaml rename to libc/utils /docgen/cpio.yaml >From d27eebfd06e1cde6880aab3a7e38529858f79e32 Mon Sep 17 00:00:00 2001 From: siya100 <85541510+siya...@users.noreply.github.com> Date: Mon, 20 Jan 2025 18:58:46 +0530 Subject: [PATCH 06/10] Update LibASTMatchersTutorial.rst --- clang/docs/LibASTMatchersTutorial.rst | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/clang/docs/LibASTMatchersTutorial.rst b/clang/docs/LibASTMatchersTutorial.rst index d2883688ebfacc..eb57d546f0fc5b 100644 --- a/clang/docs/LibASTMatchersTutorial.rst +++ b/clang/docs/LibASTMatchersTutorial.rst @@ -12,6 +12,19 @@ abstract syntax tree (AST). To this end, the reader is encouraged to skim the :doc:`Introduction to the Clang AST <IntroductionToTheClangAST>` +================================== +Prerequisites +================================== +- `cmake` (version 3.16 or later) +- `ninja-build` +- `g++` or another C++ compiler supporting C++17 +- `libgtest-dev` for Google Test +--Install missing packages on Ubuntu: +.. code-block:: bash + + sudo apt install cmake ninja-build g++ libgtest-dev +- cmake -G Ninja ../llvm-project/llvm -DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra" -DCMAKE_BUILD_TYPE=Release -DLLVM_BUILD_TESTS=ON - DCMAKE_USE_OPENSSL=OFF + Step 0: Obtaining Clang ======================= >From f7017c1e4d02498fc7392d0713ec89f0af03cea1 Mon Sep 17 00:00:00 2001 From: siya100 <85541510+siya...@users.noreply.github.com> Date: Mon, 20 Jan 2025 19:08:12 +0530 Subject: [PATCH 07/10] Update LibTooling.rst --- clang/docs/LibTooling.rst | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/clang/docs/LibTooling.rst b/clang/docs/LibTooling.rst index 87d84321ab2830..e0230ca4a452b7 100644 --- a/clang/docs/LibTooling.rst +++ b/clang/docs/LibTooling.rst @@ -29,13 +29,18 @@ looked for. Let me give you an example: .. code-block:: c++ - #include "clang/Tooling/Tooling.h" +#include <gtest/gtest.h> +#include "clang/Tooling/Tooling.h" TEST(runToolOnCode, CanSyntaxCheckCode) { // runToolOnCode returns whether the action was correctly run over the // given code. - EXPECT_TRUE(runToolOnCode(std::make_unique<clang::SyntaxOnlyAction>(), "class X {};")); + EXPECT_TRUE(clang::tooling::runToolOnCode(std::make_unique<clang::SyntaxOnlyAction>(), "class X {};")); } +int main(int argc, char **argv) { + ::testing::InitGoogleTest(&argc, argv); + return RUN_ALL_TESTS(); + } Writing a standalone tool ------------------------- >From 5ba2d681be7f17a09451769d1f02ccbf12a9d43f Mon Sep 17 00:00:00 2001 From: siya100 <85541510+siya...@users.noreply.github.com> Date: Mon, 20 Jan 2025 19:12:48 +0530 Subject: [PATCH 08/10] Update LibASTMatchersTutorial.rst --- clang/docs/LibASTMatchersTutorial.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/clang/docs/LibASTMatchersTutorial.rst b/clang/docs/LibASTMatchersTutorial.rst index eb57d546f0fc5b..1cb79710a5a8f7 100644 --- a/clang/docs/LibASTMatchersTutorial.rst +++ b/clang/docs/LibASTMatchersTutorial.rst @@ -17,6 +17,8 @@ Prerequisites ================================== - `cmake` (version 3.16 or later) - `ninja-build` +-> run all cmake and ninja commands from build directory + - `g++` or another C++ compiler supporting C++17 - `libgtest-dev` for Google Test --Install missing packages on Ubuntu: @@ -43,6 +45,8 @@ Next you need to obtain the CMake build system and Ninja build tool. .. code-block:: console cd ~/clang-llvm + mkdir build + cd build git clone https://github.com/martine/ninja.git cd ninja git checkout release >From 8c5d4424b019910402b05af6a71f18fc0e1ae827 Mon Sep 17 00:00:00 2001 From: siya100 <85541510+siya...@users.noreply.github.com> Date: Mon, 20 Jan 2025 20:34:24 +0530 Subject: [PATCH 09/10] Update LibASTMatchersTutorial.rst >From 01563d21338d764c542a8e862fd780670b176df4 Mon Sep 17 00:00:00 2001 From: siya100 <85541510+siya...@users.noreply.github.com> Date: Mon, 20 Jan 2025 20:39:03 +0530 Subject: [PATCH 10/10] Update LibTooling.rst _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits