Skip to content
  1. Nov 14, 2009
  2. Nov 13, 2009
  3. Nov 11, 2009
  4. Nov 05, 2009
  5. Oct 18, 2009
  6. Oct 16, 2009
  7. Sep 22, 2009
    • Douglas Gregor's avatar
      Replace the -code-completion-dump option with · ea9b03e6
      Douglas Gregor authored
        -code-completion-at=filename:line:column
      
      which performs code completion at the specified location by truncating
      the file at that position and enabling code completion. This approach
      makes it possible to run multiple tests from a single test file, and
      gives a more natural command-line interface.
      
      llvm-svn: 82571
      ea9b03e6
  8. Sep 17, 2009
    • Douglas Gregor's avatar
      Initial implementation of a code-completion interface in Clang. In · 2436e711
      Douglas Gregor authored
      essence, code completion is triggered by a magic "code completion"
      token produced by the lexer [*], which the parser recognizes at
      certain points in the grammar. The parser then calls into the Action
      object with the appropriate CodeCompletionXXX action.
      
      Sema implements the CodeCompletionXXX callbacks by performing minimal
      translation, then forwarding them to a CodeCompletionConsumer
      subclass, which uses the results of semantic analysis to provide
      code-completion results. At present, only a single, "printing" code
      completion consumer is available, for regression testing and
      debugging. However, the design is meant to permit other
      code-completion consumers.
      
      This initial commit contains two code-completion actions: one for
      member access, e.g., "x." or "p->", and one for
      nested-name-specifiers, e.g., "std::". More code-completion actions
      will follow, along with improved gathering of code-completion results
      for the various contexts.
      
      [*] In the current -code-completion-dump testing/debugging mode, the
      file is truncated at the completion point and EOF is translated into
      "code completion".
      
      llvm-svn: 82166
      2436e711
  9. Sep 09, 2009
  10. Aug 23, 2009
  11. Jul 02, 2009
    • Douglas Gregor's avatar
      Add support for retrieving the Doxygen comment associated with a given · c6d5edd2
      Douglas Gregor authored
      declaration in the AST. 
      
      The new ASTContext::getCommentForDecl function searches for a comment
      that is attached to the given declaration, and returns that comment, 
      which may be composed of several comment blocks.
      
      Comments are always available in an AST. However, to avoid harming
      performance, we don't actually parse the comments. Rather, we keep the
      source ranges of all of the comments within a large, sorted vector,
      then lazily extract comments via a binary search in that vector only
      when needed (which never occurs in a "normal" compile).
      
      Comments are written to a precompiled header/AST file as a blob of
      source ranges. That blob is only lazily loaded when one requests a
      comment for a declaration (this never occurs in a "normal" compile). 
      
      The indexer testbed now supports comment extraction. When the
      -point-at location points to a declaration with a Doxygen-style
      comment, the indexer testbed prints the associated comment
      block(s). See test/Index/comments.c for an example.
      
      Some notes:
        - We don't actually attempt to parse the comment blocks themselves,
        beyond identifying them as Doxygen comment blocks to associate them
        with a declaration.
        - We won't find comment blocks that aren't adjacent to the
        declaration, because we start our search based on the location of
        the declaration.
        - We don't go through the necessary hops to find, for example,
        whether some redeclaration of a declaration has comments when our
        current declaration does not. Similarly, we don't attempt to
        associate a \param Foo marker in a function body comment with the
        parameter named Foo (although that is certainly possible).
        - Verification of my "no performance impact" claims is still "to be
        done".
      
      llvm-svn: 74704
      c6d5edd2
  12. Jun 16, 2009
  13. Apr 28, 2009
  14. Apr 19, 2009
  15. Apr 18, 2009
  16. Apr 15, 2009
    • Chris Lattner's avatar
      Change Lexer::MeasureTokenLength to take a LangOptions reference. · 184e65d3
      Chris Lattner authored
      This allows it to accurately measure tokens, so that we get:
      
      t.cpp:8:13: error: unknown type name 'X'
      static foo::X  P;
             ~~~~~^
      
      instead of the woefully inferior:
      
      t.cpp:8:13: error: unknown type name 'X'
      static foo::X  P;
             ~~~~ ^
      
      Most of this is just plumbing to push the reference around.
      
      llvm-svn: 69099
      184e65d3
  17. Apr 13, 2009
  18. Apr 11, 2009
    • Douglas Gregor's avatar
      Compare the predefines buffer in the PCH file with the predefines · 92863e47
      Douglas Gregor authored
      buffer generated for the current translation unit. If they are
      different, complain and then ignore the PCH file. This effectively
      checks for all compilation options that somehow would affect
      preprocessor state (-D, -U, -include, the dreaded -imacros, etc.).
      
      When we do accept the PCH file, throw away the contents of the
      predefines buffer rather than parsing them, since all of the results
      of that parsing are already stored in the PCH file. This eliminates
      the ugliness with the redefinition of __builtin_va_list, among other
      things.
      
      llvm-svn: 68838
      92863e47
    • Chris Lattner's avatar
      do a dance with predefines, and finally enable reading of macros from · d959d753
      Chris Lattner authored
      PCH.  This works now, except for limitations not being able to do things
      with identifiers.  The basic example in the testcase works though.
      
      llvm-svn: 68832
      d959d753
  19. Apr 10, 2009
  20. Apr 08, 2009
    • Daniel Dunbar's avatar
      More fixes to builtin preprocessor defines. · 17ddaa67
      Daniel Dunbar authored
       - Add -static-define option driver can use when __STATIC__ should be
         defined (instead of __DYNAMIC__).
      
       - Don't set __OPTIMIZE_SIZE__ on Os, __OPTIMIZE_SIZE__ is tied to Oz.
      
       - Set __NO_INLINE__ following GCC 4.2.
      
       - Set __GNU_GNU_INLINE__ or __GNU_STDC_INLINE__ following GCC 4.2.
      
       - Set __EXCEPTIONS for Objective-C NonFragile ABI.
      
       - Set __STRICT_ANSI__ for standard conforming modes.
      
       - I added a clang style test case in utils for this, but its not
         particularly portable and I don't think it belongs in the test
         suite.
      
      llvm-svn: 68621
      17ddaa67
    • Daniel Dunbar's avatar
      Set __PIC__ (more) correctly. · ab7b2f56
      Daniel Dunbar authored
       - Add -pic-level clang-cc option to specify the value for the define,
         updated driver to pass this.
      
       - Added __pic__
      
       - Added OBJC_ZEROCOST_EXCEPTIONS define while I was here (to match gcc).
      
      llvm-svn: 68584
      ab7b2f56
  21. Apr 07, 2009
  22. Apr 06, 2009
  23. Mar 27, 2009
  24. Mar 26, 2009
  25. Mar 24, 2009
  26. Mar 20, 2009
  27. Mar 15, 2009
  28. Mar 13, 2009
  29. Mar 09, 2009
  30. Mar 07, 2009
  31. Mar 02, 2009
  32. Feb 27, 2009
  33. Feb 20, 2009
Loading