Skip to content
Snippets Groups Projects
  1. Jan 06, 2017
  2. Jan 05, 2017
  3. Jan 03, 2017
  4. Dec 29, 2016
  5. Dec 25, 2016
  6. Dec 22, 2016
    • Sean Callanan's avatar
      Testbed and skeleton of a new expression parser · 7488de2e
      Sean Callanan authored
      Recommitted after formal approval.
      
      LLVM's JIT is now the foundation of dynamic-compilation features for many languages. Clang also has low-level support for dynamic compilation (ASTImporter and ExternalASTSource, notably). How the compiler is set up for dynamic parsing is generally left up to individual clients, for example LLDB's C/C++/Objective-C expression parser and the ROOT project.
      
      Although this arrangement offers external clients the flexibility to implement dynamic features as they see fit, the lack of an in-tree client means that subtle bugs can be introduced that cause regressions in the external clients but aren't caught by tests (or users) until much later. LLDB for example regularly encounters complicated ODR violation scenarios where it is not immediately clear who is at fault.
      
      Other external clients (notably, Cling) rely on similar functionality, and another goal is to break this functionality up into composable parts so that any client can be built easily on top of Clang without requiring extensive additional code.
      
      I propose that the parts required to build a simple expression parser be added to Clang. Initially, I aim to have the following features:
      
      A piece that looks up external declarations from a variety of sources (e.g., from previous dynamic compilations, from modules, or from DWARF) and uses clear conflict resolution rules to reconcile differences, with easily understood errors. This functionality will be supported by in-tree tests.
      A piece that works hand in hand with the LLVM JIT to resolve the locations of external declarations so that e.g. variables can be redeclared and (for high-performance applications like DTrace) external variables can be accessed directly from the registers where they reside.
      This commit adds a tester that parses a sequence of source files and then uses them as source data for an expression. External references are resolved using an ExternalASTSource that responds to name queries using an ASTImporter. This is the setup that LLDB uses, and the motivating reason for MinimalImport in ASTImporter. When complete, this tester will implement the first of the above goals.
      
      Differential Revision: https://reviews.llvm.org/D27180
      
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@290367 91177308-0d34-0410-b5e6-96231b3b80d8
      7488de2e
  7. Dec 20, 2016
  8. Dec 19, 2016
  9. Dec 17, 2016
  10. Dec 16, 2016
  11. Dec 14, 2016
  12. Dec 12, 2016
    • Daniel Jasper's avatar
      clang-format: Separate out a language kind for ObjC. · f57fa8e1
      Daniel Jasper authored
      While C(++) and ObjC are generally formatted the same way and can be
      mixed, people might want to choose different styles based on the
      language. This patch recognizes .m and .mm files as ObjC and also
      implements a very crude detection of whether or not a .h file contains
      ObjC code. This can be improved over time.
      
      Also move most of the ObjC tests into their own test file to keep file
      size maintainable.
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289428 91177308-0d34-0410-b5e6-96231b3b80d8
      f57fa8e1
    • Richard Smith's avatar
      Add two new AST nodes to represent initialization of an array in terms of · 0601f898
      Richard Smith authored
      initialization of each array element:
      
       * ArrayInitLoopExpr is a prvalue of array type with two subexpressions:
         a common expression (an OpaqueValueExpr) that represents the up-front
         computation of the source of the initialization, and a subexpression
         representing a per-element initializer
       * ArrayInitIndexExpr is a prvalue of type size_t representing the current
         position in the loop
      
      This will be used to replace the creation of explicit index variables in lambda
      capture of arrays and copy/move construction of classes with array elements,
      and also C++17 structured bindings of arrays by value (which inexplicably allow
      copying an array by value, unlike all of C++'s other array declarations).
      
      No uses of these nodes are introduced by this change, however.
      
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289413 91177308-0d34-0410-b5e6-96231b3b80d8
      0601f898
  13. Dec 10, 2016
  14. Dec 09, 2016
  15. Dec 06, 2016
  16. Dec 04, 2016
  17. Dec 02, 2016
  18. Dec 01, 2016
  19. Nov 29, 2016
  20. Nov 19, 2016
  21. Nov 18, 2016
  22. Nov 17, 2016
  23. Nov 15, 2016
Loading