Index: .gitignore =================================================================== --- .gitignore +++ .gitignore @@ -1,9 +1,6 @@ #==============================================================================# # This file specifies intentionally untracked files that git should ignore. # See: http://www.kernel.org/pub/software/scm/git/docs/gitignore.html -# -# This file is intentionally different from the output of `git svn show-ignore`, -# as most of those are useless. #==============================================================================# #==============================================================================# Index: docs/ClangPlugins.rst =================================================================== --- docs/ClangPlugins.rst +++ docs/ClangPlugins.rst @@ -69,7 +69,7 @@ Let's look at an example plugin that prints top-level function names. This example is checked into the clang repository; please take a look at the `latest version of PrintFunctionNames.cpp -`_. +`_. Running the plugin ================== @@ -110,7 +110,7 @@ -plugin -Xclang print-fns Also see the print-function-name plugin example's -`README `_ +`README `_ Using the clang command line Index: docs/ClangTools.rst =================================================================== --- docs/ClangTools.rst +++ docs/ClangTools.rst @@ -9,22 +9,9 @@ refactoring, etc. Only a couple of the most basic and fundamental tools are kept in the -primary Clang Subversion project. The rest of the tools are kept in a -side-project so that developers who don't want or need to build them -don't. If you want to get access to the extra Clang Tools repository, -simply check it out into the tools tree of your Clang checkout and -follow the usual process for building and working with a combined -LLVM/Clang checkout: - -- With Subversion: - - - ``cd llvm/tools/clang/tools`` - - ``svn co https://llvm.org/svn/llvm-project/clang-tools-extra/trunk extra`` - -- Or with Git: - - - ``cd llvm/tools/clang/tools`` - - ``git clone https://llvm.org/git/clang-tools-extra.git extra`` +primary Clang tree. The rest of the tools are kept in a separate +directory tree, ``clang-tools-extra +``_. This document describes a high-level overview of the organization of Clang Tools within the project as well as giving an introduction to some Index: docs/ControlFlowIntegrityDesign.rst =================================================================== --- docs/ControlFlowIntegrityDesign.rst +++ docs/ControlFlowIntegrityDesign.rst @@ -196,7 +196,7 @@ Vectors" above). The `GlobalLayoutBuilder`_ class is responsible for laying out the globals efficiently to minimize the sizes of the underlying bitsets. -.. _GlobalLayoutBuilder: https://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Transforms/IPO/LowerTypeTests.h?view=markup +.. _GlobalLayoutBuilder: https://github.com/llvm/llvm-project/blob/master/llvm/include/llvm/Transforms/IPO/LowerTypeTests.h Alignment ~~~~~~~~~ @@ -300,7 +300,7 @@ In comparison, the old scheme does not require the splitting but it is more efficient when the combined virtual tables have been split. The `GlobalSplit`_ pass is responsible for splitting combined virtual tables into individual ones. -.. _GlobalSplit: https://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/GlobalSplit.cpp?view=markup +.. _GlobalSplit: https://github.com/llvm/llvm-project/blob/master/llvm/lib/Transforms/IPO/GlobalSplit.cpp Order virtual tables by a pre-order traversal of the class hierarchy ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Index: docs/InternalsManual.rst =================================================================== --- docs/InternalsManual.rst +++ docs/InternalsManual.rst @@ -1686,7 +1686,7 @@ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ The first step to adding a new attribute to Clang is to add its definition to `include/clang/Basic/Attr.td -`_. +`_. This tablegen definition must derive from the ``Attr`` (tablegen, not semantic) type, or one of its derivatives. Most attributes will derive from the ``InheritableAttr`` type, which specifies that the attribute can be inherited by @@ -1748,10 +1748,10 @@ either ``diag::warn_attribute_wrong_decl_type`` or ``diag::err_attribute_wrong_decl_type``, and the parameter enumeration is found in `include/clang/Sema/ParsedAttr.h -`_ +`_ If a previously unused Decl node is added to the ``SubjectList``, the logic used to automatically determine the diagnostic parameter in `utils/TableGen/ClangAttrEmitter.cpp -`_ +`_ may need to be updated. By default, all subjects in the SubjectList must either be a Decl node defined @@ -1773,7 +1773,7 @@ Documentation is table generated on the public web server by a server-side process that runs daily. Generally, the documentation for an attribute is a stand-alone definition in `include/clang/Basic/AttrDocs.td -`_ +`_ that is named after the attribute being documented. If the attribute is not for public consumption, or is an implicitly-created @@ -1824,7 +1824,7 @@ optional. The associated C++ type of the argument is determined by the argument definition type. If the existing argument types are insufficient, new types can be created, but it requires modifying `utils/TableGen/ClangAttrEmitter.cpp -`_ +`_ to properly support the type. Other Properties @@ -1836,7 +1836,7 @@ If the parsed form of the attribute is more complex, or differs from the semantic form, the ``HasCustomParsing`` bit can be set to ``1`` for the class, and the parsing code in `Parser::ParseGNUAttributeArgs() -`_ +`_ can be updated for the special case. Note that this only applies to arguments with a GNU spelling -- attributes with a __declspec spelling currently ignore this flag and are handled by ``Parser::ParseMicrosoftDeclSpec``. @@ -1899,7 +1899,7 @@ Boilerplate ^^^^^^^^^^^ All semantic processing of declaration attributes happens in `lib/Sema/SemaDeclAttr.cpp -`_, +`_, and generally starts in the ``ProcessDeclAttribute()`` function. If the attribute is a "simple" attribute -- meaning that it requires no custom semantic processing aside from what is automatically provided, add a call to @@ -1915,11 +1915,11 @@ If the attribute adds additional warnings, define a ``DiagGroup`` in `include/clang/Basic/DiagnosticGroups.td -`_ +`_ named after the attribute's ``Spelling`` with "_"s replaced by "-"s. If there is only a single diagnostic, it is permissible to use ``InGroup>`` directly in `DiagnosticSemaKinds.td -`_ +`_ All semantic diagnostics generated for your attribute, including automatically- generated ones (such as subjects and argument counts), should have a Index: docs/LibASTMatchersTutorial.rst =================================================================== --- docs/LibASTMatchersTutorial.rst +++ docs/LibASTMatchersTutorial.rst @@ -16,23 +16,16 @@ ======================= As Clang is part of the LLVM project, you'll need to download LLVM's -source code first. Both Clang and LLVM are maintained as Subversion -repositories, but we'll be accessing them through the git mirror. For -further information, see the `getting started -guide `_. +source code first. Both Clang and LLVM are in the same git repository, +under different directories. For further information, see the `getting +started guide `_. .. code-block:: console - mkdir ~/clang-llvm && cd ~/clang-llvm - git clone https://llvm.org/git/llvm.git - cd llvm/tools - git clone https://llvm.org/git/clang.git - cd clang/tools - git clone https://llvm.org/git/clang-tools-extra.git extra - -Next you need to obtain the CMake build system and Ninja build tool. You -may already have CMake installed, but current binary versions of CMake -aren't built with Ninja support. + cd ~/clang-llvm + git clone https://github.com/llvm/llvm-project.git + +Next you need to obtain the CMake build system and Ninja build tool. .. code-block:: console @@ -57,7 +50,7 @@ cd ~/clang-llvm mkdir build && cd build - cmake -G Ninja ../llvm -DLLVM_BUILD_TESTS=ON # Enable tests; default is off. + cmake -G Ninja ../llvm -DLLVM_ENABLE_PROJECTS=clang -DLLVM_BUILD_TESTS=ON # Enable tests; default is off. ninja ninja check # Test LLVM only. ninja clang-test # Test Clang only. @@ -65,9 +58,7 @@ And we're live. -All of the tests should pass, though there is a (very) small chance that -you can catch LLVM and Clang out of sync. Running ``'git svn rebase'`` -in both the llvm and clang directories should fix any problems. +All of the tests should pass. Finally, we want to set Clang as its own compiler. Index: docs/LibTooling.rst =================================================================== --- docs/LibTooling.rst +++ docs/LibTooling.rst @@ -196,6 +196,6 @@ Linking ^^^^^^^ -For a list of libraries to link, look at one of the tools' Makefiles (for -example `clang-check/Makefile -`_). +For a list of libraries to link, look at one of the tools' CMake files (for +example `clang-check/CMakeList.txt +`_). Index: docs/Toolchain.rst =================================================================== --- docs/Toolchain.rst +++ docs/Toolchain.rst @@ -229,14 +229,8 @@ libunwind (LLVM) ^^^^^^^^^^^^^^^^ -LLVM's unwinder library can be obtained from subversion: - -.. code-block:: console - - llvm-src$ svn co https://llvm.org/svn/llvm-project/libunwind/trunk projects/libunwind - -When checked out into projects/libunwind within an LLVM checkout, -it should be automatically picked up by the LLVM build system. +LLVM's unwinder library is part of the llvm-project git repository. To +build it, pass ``-DLLVM_ENABLE_PROJECTS=libunwind`` to the cmake invocation. If using libc++abi, you may need to configure it to use libunwind rather than libgcc_s by passing ``-DLIBCXXABI_USE_LLVM_UNWINDER=YES`` Index: lib/CodeGen/CGOpenMPRuntime.cpp =================================================================== --- lib/CodeGen/CGOpenMPRuntime.cpp +++ lib/CodeGen/CGOpenMPRuntime.cpp @@ -431,7 +431,7 @@ /// Values for bit flags used in the ident_t to describe the fields. /// All enumeric elements are named and described in accordance with the code -/// from http://llvm.org/svn/llvm-project/openmp/trunk/runtime/src/kmp.h +/// from https://github.com/llvm/llvm-project/blob/master/openmp/runtime/src/kmp.h enum OpenMPLocationFlags : unsigned { /// Use trampoline for internal microtask. OMP_IDENT_IMD = 0x01, @@ -460,7 +460,7 @@ /// Describes ident structure that describes a source location. /// All descriptions are taken from -/// http://llvm.org/svn/llvm-project/openmp/trunk/runtime/src/kmp.h +/// https://github.com/llvm/llvm-project/blob/master/openmp/runtime/src/kmp.h /// Original structure: /// typedef struct ident { /// kmp_int32 reserved_1; /**< might be used in Fortran; @@ -1477,7 +1477,7 @@ // Initialize default location for psource field of ident_t structure of // all ident_t objects. Format is ";file;function;line;column;;". // Taken from - // http://llvm.org/svn/llvm-project/openmp/trunk/runtime/src/kmp_str.c + // https://github.com/llvm/llvm-project/blob/master/openmp/runtime/src/kmp_str.cpp DefaultOpenMPPSource = CGM.GetAddrOfConstantCString(";unknown;unknown;0;0;;").getPointer(); DefaultOpenMPPSource = @@ -4965,7 +4965,7 @@ // kmp_int32 flags, size_t sizeof_kmp_task_t, size_t sizeof_shareds, // kmp_routine_entry_t *task_entry); // Task flags. Format is taken from - // http://llvm.org/svn/llvm-project/openmp/trunk/runtime/src/kmp.h, + // https://github.com/llvm/llvm-project/blob/master/openmp/runtime/src/kmp.h, // description of kmp_tasking_flags struct. enum { TiedFlag = 0x1, @@ -9888,4 +9888,3 @@ const VarDecl *TargetParam) const { llvm_unreachable("Not supported in SIMD-only mode"); } - Index: www/analyzer/checker_dev_manual.html =================================================================== --- www/analyzer/checker_dev_manual.html +++ www/analyzer/checker_dev_manual.html @@ -789,11 +789,11 @@
  • Xu, Zhongxing & Kremenek, Ted & Zhang, Jian. (2010). A Memory Model for Static Analysis of C Programs.
  • -
  • +
  • The Clang Static Analyzer README
  • -
  • +
  • Documentation for how the Store works
  • -
  • +
  • Documentation about inlining
  • The "Building a Checker in 24 hours" presentation given at the November 2012 LLVM Developer's Index: www/get_started.html =================================================================== --- www/get_started.html +++ www/get_started.html @@ -30,8 +30,6 @@

    On Unix-like Systems

    -

    Note: as an experimental setup, you can use a single checkout with all the projects, and an easy CMake invocation, see the LLVM Doc "For developers to work with a git monorepo"

    -

    If you would like to check out and build Clang, the current procedure is as follows:

    @@ -49,48 +47,18 @@ http://www.cmake.org/download
  • -
  • Check out LLVM: +
  • Check out the LLVM project:
    • Change directory to where you want the llvm directory placed.
    • -
    • svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm
    • -
    -
  • -
  • Check out Clang: -
      -
    • cd llvm/tools
    • -
    • svn co http://llvm.org/svn/llvm-project/cfe/trunk clang
    • -
    • cd ../..
    • -
    -
  • -
  • Check out extra Clang tools: (optional) -
      -
    • cd llvm/tools/clang/tools
    • -
    • svn co http://llvm.org/svn/llvm-project/clang-tools-extra/trunk - extra
    • -
    • cd ../../../..
    • -
    -
  • -
  • Check out Compiler-RT (optional): -
      -
    • cd llvm/projects
    • -
    • svn co http://llvm.org/svn/llvm-project/compiler-rt/trunk - compiler-rt
    • -
    • cd ../..
    • -
    -
  • -
  • Check out libcxx: (only required to build and run Compiler-RT tests on OS X, optional otherwise) -
      -
    • cd llvm/projects
    • -
    • svn co http://llvm.org/svn/llvm-project/libcxx/trunk - libcxx
    • -
    • cd ../..
    • +
    • git clone https://github.com/llvm/llvm-project.git
  • Build LLVM and Clang:

    Debugging using Visual Studio

    -

    The files - - utils/LLVMVisualizers/llvm.natvis and - - utils/ClangVisualizers/clang.natvis provide debugger visualizers +

    The files + + llvm/utils/LLVMVisualizers/llvm.natvis and + + clang/utils/ClangVisualizers/clang.natvis provide debugger visualizers that make debugging of more complex data types much easier.

    -

    For Visual Studio 2013 only, put the files into - %USERPROFILE%\Documents\Visual Studio 2013\Visualizers or +

    For Visual Studio 2013 only, put the files into + %USERPROFILE%\Documents\Visual Studio 2013\Visualizers or create a symbolic link so they update automatically.

    For later versions of Visual Studio, no installation is required. Note also that later versions of Visual Studio also display better visualizations.

    Index: www/menu.html.incl =================================================================== --- www/menu.html.incl +++ www/menu.html.incl @@ -43,9 +43,8 @@