Skip to content
Snippets Groups Projects
  1. Sep 27, 2017
    • Sean Callanan's avatar
      Add support for remembering origins to ExternalASTMerger · 87d985ae
      Sean Callanan authored
      ExternalASTMerger has hitherto relied on being able to look up 
      any Decl through its named DeclContext chain. This works for 
      many cases, but causes problems for function-local structs, 
      which cannot be looked up in their containing FunctionDecl. An
      example case is
      
      void f() {
        { struct S { int a; }; }
        { struct S { bool b; }; }
      }
      
      It is not possible to lookup either of the two Ses individually 
      (or even to provide enough information to disambiguate) after 
      parsing is over; and there is typically no need to, since they 
      are invisible to the outside world.
      
      However, ExternalASTMerger needs to be able to complete either 
      S on demand. This led to an XFAIL on test/Import/local-struct, 
      which this patch removes. The way the patch works is:
      
      It defines a new data structure, ExternalASTMerger::OriginMap,
      which clients are expected to maintain (default-constructing 
      if the origin does not have an ExternalASTMerger servicing it)
      As DeclContexts are imported, if they cannot be looked up by 
      name they are placed in the OriginMap. This allows 
      ExternalASTMerger to complete them later if necessary.
      As DeclContexts are imported from an origin that already has 
      its own OriginMap, the origins are forwarded – but only for 
      those DeclContexts that are actually used. This keeps the 
      amount of stored data minimal.
      
      The patch also applies several improvements from review:
      
      - Thoroughly documents the interface to ExternalASTMerger;
      - Adds optional logging to help track what's going on; and
      - Cleans up a bunch of braces and dangling elses.
      
      Differential Revision: https://reviews.llvm.org/D38208
      
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@314336 91177308-0d34-0410-b5e6-96231b3b80d8
      87d985ae
  2. Sep 22, 2017
  3. Sep 20, 2017
  4. Sep 14, 2017
  5. Sep 13, 2017
  6. Sep 12, 2017
  7. Sep 11, 2017
    • 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
  8. Sep 08, 2017
  9. Sep 05, 2017
  10. Aug 29, 2017
  11. Aug 24, 2017
  12. Aug 23, 2017
  13. Aug 22, 2017
  14. Aug 21, 2017
  15. Aug 20, 2017
  16. Aug 19, 2017
Loading