Lines Matching +full:release +full:- +full:doxygen
5 This document is intended to show how to build a useful source-to-source
23 .. code-block:: console
25 mkdir ~/clang-llvm && cd ~/clang-llvm
26 git clone https://github.com/llvm/llvm-project.git
30 .. code-block:: console
32 cd ~/clang-llvm
35 git checkout release
36 ./configure.py --bootstrap
39 cd ~/clang-llvm
49 .. code-block:: console
51 cd ~/clang-llvm
53 …cmake -G Ninja ../llvm-project/llvm -DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra" -DCMAKE_BUILD…
56 ninja clang-test # Test Clang only.
65 .. code-block:: console
67 cd ~/clang-llvm/build
68 ccmake ../llvm-project/llvm
83 already exists as ``clang-check``, it's important to understand what's
88 live in the ``clang-tools-extra`` repository.
90 .. code-block:: console
92 cd ~/clang-llvm/llvm-project
93 mkdir clang-tools-extra/loop-convert
94 echo 'add_subdirectory(loop-convert)' >> clang-tools-extra/CMakeLists.txt
95 vim clang-tools-extra/loop-convert/CMakeLists.txt
103 add_clang_executable(loop-convert
106 target_link_libraries(loop-convert
118 ``clang-tools-extra/loop-convert/LoopConvert.cpp``. A detailed explanation of
122 .. code-block:: c++
134 // Apply a custom category to all command-line options so that they are the
136 static llvm::cl::OptionCategory MyToolCategory("my-tool options");
139 // command-line options related to the compilation database and input files.
162 .. code-block:: console
164 cd ~/clang-llvm/build
168 ``~/clang-llvm/build/bin``, on any source file. Try it!
170 .. code-block:: console
173 bin/loop-convert test.cpp --
177 them from a compilation database - there just aren't any options needed
187 `ASTMatchers.h <../doxygen/ASTMatchers_8h_source.html>`_ if you're
195 .. code-block:: c++
216 .. code-block:: c++
227 .. code-block:: c++
234 .. code-block:: c++
241 .. code-block:: c++
256 .. code-block:: c++
269 .. code-block:: c++
285 FS->dump();
291 .. code-block:: c++
315 .. code-block:: console
317 cd ~/clang-llvm/build/
318 ninja loop-convert
319 vim ~/test-files/simple-loops.cc
320 bin/loop-convert ~/test-files/simple-loops.cc
331 for translation to range-based syntax? Range based loops over arrays of
334 - start at index ``0``
335 - iterate consecutively
336 - end at index ``N-1``
342 require a pre- or post-increment of the same variable declared in the
350 In any case, we can start building this sub-matcher. We can require that
353 .. code-block:: c++
363 .. code-block:: c++
372 .. code-block:: c++
381 .. code-block:: c++
395 only one problem - we don't know which array we're iterating over
400 .. code-block:: c++
404 It makes sense to ensure that the left-hand side is a reference to a
405 variable, and that the right-hand side has integer type.
407 .. code-block:: c++
415 ``test-files/simple.cpp``, zero of them have a matching condition. A
417 previous iteration of loop-convert, shows us the answer:
437 applied to the first operand (i.e. the LHS) of the less-than operator,
438 an L-value to R-value conversion applied to the expression referencing
444 .. code-block:: c++
453 extracting the identifier strings into variables, we have array-step-2
478 .. code-block:: c++
484 .. code-block:: c++
502 .. code-block:: c++
508 if (!FS || !Context->getSourceManager().isWrittenInMainFile(FS->getForLoc()))
516 llvm::outs() << "Potential array-based loop discovered.\n";
524 .. code-block:: c++
528 First->getCanonicalDecl() == Second->getCanonicalDecl();
534 .. code-block:: c++
546 .. code-block:: c++
553 First->Profile(FirstID, *Context, true);
554 Second->Profile(SecondID, *Context, true);
565 test-files/simple.cpp, try to figure out which ones will be considered