Skip to content
Snippets Groups Projects
  1. Sep 11, 2017
    • Vedant Kumar's avatar
      [ubsan-minimal] Document the new runtime · 519beb3e
      Vedant Kumar authored
      Differential Revision: https://reviews.llvm.org/D37647
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@312957 91177308-0d34-0410-b5e6-96231b3b80d8
      519beb3e
    • Vedant Kumar's avatar
      [Lexer] Report more precise skipped regions (PR34166) · c9445f04
      Vedant Kumar authored
      This patch teaches the preprocessor to report more precise source ranges for
      code that is skipped due to conditional directives.
      
      The new behavior includes the '#' from the opening directive and the full text
      of the line containing the closing directive in the skipped area. This matches
      up clang's behavior (we don't IRGen the code between the closing "endif" and
      the end of a line).
      
      This also affects the code coverage implementation. See llvm.org/PR34166 (this
      also happens to be rdar://problem/23224058).
      
      The old behavior (report the end of the skipped range as the end
      location of the 'endif' token) is preserved for indexing clients.
      
      Differential Revision: https://reviews.llvm.org/D36642
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@312947 91177308-0d34-0410-b5e6-96231b3b80d8
      c9445f04
    • Miklos Vajna's avatar
      clang-rename: let -force handle multiple renames · 440d6c02
      Miklos Vajna authored
      Summary:
      The use case is that renaming multiple symbols in a large enough codebase is
      much faster if all of these can be done with a single invocation, but
      there will be multiple translation units where one or more symbols are
      not found.
      
      Old behavior was to exit with an error (default) or exit without
      reporting an error (-force). New behavior is that -force results in a
      best-effort rename: rename symbols which are found and just ignore the
      rest.
      
      The existing help for -force sort of already implies this behavior.
      
      Reviewers: cfe-commits, klimek, arphaman
      
      Reviewed By: klimek
      
      Differential Revision: https://reviews.llvm.org/D37634
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@312942 91177308-0d34-0410-b5e6-96231b3b80d8
      440d6c02
    • Saleem Abdulrasool's avatar
      Driver: default to `-fno-use-cxatexit` on Windows · 13258ab9
      Saleem Abdulrasool authored
      This primarily impacts the Windows MSVC and Windows itanium
      environments.  Windows MSVC does not use `__cxa_atexit` and Itanium
      follows suit.  Simplify the logic for the default value calculation and
      blanket the Windows environments to default to off for use of
      `__cxa_atexit`.
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@312941 91177308-0d34-0410-b5e6-96231b3b80d8
      13258ab9
    • Martin Probst's avatar
      clang-format: [JS] wrap and indent `goog.setTestOnly` calls. · aae8a30c
      Martin Probst authored
      Summary:
      While `goog.setTestOnly` usually appears in the imports section of a file, it is
      not actually an import, and also usually doesn't take long parameters (nor
      namespaces as a parameter, it's a description/message that should be wrapped).
      
      This fixes a regression where a `goog.setTestOnly` call nested in a function was
      not wrapped.
      
      Reviewers: djasper
      
      Subscribers: klimek
      
      Differential Revision: https://reviews.llvm.org/D37685
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@312918 91177308-0d34-0410-b5e6-96231b3b80d8
      aae8a30c
    • Cameron Desrochers's avatar
      [PCH] Allow VFS to be used for tests that generate PCH files · e218fafc
      Cameron Desrochers authored
      When using a virtual file-system (VFS) and a preamble file (PCH) is generated,
      it is generated on-disk in the real file-system instead of in the VFS (which
      makes sense, since the VFS is read-only). However, when subsequently reading
      the generated PCH, the frontend passes through the VFS it has been given --
      resulting in an error and a failed parse (since the VFS doesn't contain the
      PCH; the real filesystem does).
      
      This patch fixes that by detecting when a VFS is being used for a parse that
      needs to work with a PCH file, and creating an overlay VFS that includes the
      PCH file from the real file-system.
      
      This allows tests to be written which make use of both PCH files and a VFS.
      
      Differential Revision: https://reviews.llvm.org/D37474
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@312917 91177308-0d34-0410-b5e6-96231b3b80d8
      e218fafc
    • Johannes Altmanninger's avatar
      [AST] Make RecursiveASTVisitor visit TemplateDecls in source order · f592eb27
      Johannes Altmanninger authored
      Summary:
      This causes template arguments to be traversed before the templated
      declaration, which is useful for clients that expect the nodes in
      the same order as they are in the source code. Additionally, there
      seems to be no good reason not to do so.
      
      This was moved here from LexicallyOrderedRecursiveASTVisitor. The tests
      still reside in LexicallyOrderedRecursiveASTVisitorTest.cpp under
      VisitTemplateDecls.
      
      Reviewers: arphaman, rsmith, klimek
      
      Subscribers: cfe-commits, klimek
      
      Differential Revision: https://reviews.llvm.org/D37662
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@312911 91177308-0d34-0410-b5e6-96231b3b80d8
      f592eb27
    • Krasimir Georgiev's avatar
      [clang-format] Fixed one-line if statement · 889a43bf
      Krasimir Georgiev authored
      Summary:
      **Short overview:**
      
      Fixed bug: https://bugs.llvm.org/show_bug.cgi?id=34001
      Clang-format bug resulting in a strange behavior of control statements short blocks. Different flags combinations do not guarantee expected result. Turned on option AllowShortBlocksOnASingleLine does not work as intended.
      
      **Description of the problem:**
      
      Cpp source file UnwrappedLineFormatter does not handle AllowShortBlocksOnASingleLine flag as it should. Putting a single-line control statement without any braces, clang-format works as expected (depending on AllowShortIfStatementOnASingleLine or AllowShortLoopsOnASingleLine value). Putting a single-line control statement in braces, we can observe strange and incorrect behavior.
      Our short block is intercepted by tryFitMultipleLinesInOne function. The function returns a number of lines to be merged. Unfortunately, our control statement block is not covered properly. There are several if-return statements, but none of them handles our block. A block is identified by the line first token and by left and right braces. A function block works as expected, there is such an if-return statement doing proper job. A control statement block, from the other hand, falls into strange conditional construct, which depends on BraceWrapping.AfterFunction flag (with condition that the line’s last token is left brace, what is possible in our case) or goes even further. That should definitely not happen.
      
      **Description of the patch:**
      
      By adding three different if statements, we guarantee that our short control statement block, however it looks like (different brace wrapping flags may be turned on), is handled properly and does not fall into wrong conditional construct. Depending on appropriate options we return either 0 (when something disturbs our merging attempt) or let another function (tryMergeSimpleBlock) take the responsibility of returned result (number of merged lines). Nevertheless, one more correction is required in mentioned tryMergeSimpleBlock function. The function, previously, returned either 0 or 2. The problem was that this did not handle the case when our block had the left brace in a separate line, not the header one. After change, after adding condition, we return the result compatible with block’s structure. In case of left brace in the header’s line we do everything as before the patch. In case of left brace in a separate line we do the job similar to the one we do in case of a “non-header left brace” function short block. To be precise, we try to merge the block ignoring the header line. Then, if success, we increment our returned result.
      
      **After fix:**
      
      **CONFIG:**
      ```
      AllowShortBlocksOnASingleLine: true
      AllowShortIfStatementsOnASingleLine: true
      BreakBeforeBraces: Custom
      BraceWrapping: {
      AfterClass: true, AfterControlStatement: true, AfterEnum: true, AfterFunction: true, AfterNamespace: false, AfterStruct: true, AfterUnion: true, BeforeCatch: true, BeforeElse: true
      }
      ```
      **BEFORE:**
      ```
      if (statement) doSomething();
      if (statement) { doSomething(); }
      if (statement) {
          doSomething();
      }
      if (statement)
      {
          doSomething();
      }
      if (statement)
          doSomething();
      if (statement) {
          doSomething1();
          doSomething2();
      }
      ```
      **AFTER:**
      ```
      if (statement) doSomething();
      if (statement) { doSomething(); }
      if (statement) { doSomething(); }
      if (statement) { doSomething(); }
      if (statement) doSomething();
      if (statement)
      {
        doSomething1();
        doSomething2();
      }
      ```
      
      Contributed by @PriMee!
      
      Reviewers: krasimir, djasper
      
      Reviewed By: krasimir
      
      Subscribers: cfe-commits, klimek
      
      Differential Revision: https://reviews.llvm.org/D37140
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@312904 91177308-0d34-0410-b5e6-96231b3b80d8
      889a43bf
    • Daniel Jasper's avatar
      Revert r312830: "Reinstall the patch "Use EmitPointerWithAlignment to get... · 9b80cb1f
      Daniel Jasper authored
      Revert r312830: "Reinstall the patch "Use EmitPointerWithAlignment to get alignment information of the pointer used in atomic expr"."
      
      This triggers llvm.org/PR31620 in several of our internal builds. I'll
      forward reproduction instructions to the original author.
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@312897 91177308-0d34-0410-b5e6-96231b3b80d8
      9b80cb1f
  2. Sep 10, 2017
  3. Sep 09, 2017
  4. Sep 08, 2017
  5. Sep 07, 2017
Loading