Skip to content
Snippets Groups Projects
  1. Mar 30, 2009
  2. Mar 26, 2009
  3. Mar 09, 2009
  4. Feb 27, 2009
  5. Feb 25, 2009
    • Douglas Gregor's avatar
      Implement parsing of nested-name-specifiers that involve template-ids, e.g., · 39a8de10
      Douglas Gregor authored
        std::vector<int>::allocator_type
      
      When we parse a template-id that names a type, it will become either a
      template-id annotation (which is a parsed representation of a
      template-id that has not yet been through semantic analysis) or a
      typename annotation (where semantic analysis has resolved the
      template-id to an actual type), depending on the context. We only
      produce a type in contexts where we know that we only need type
      information, e.g., in a type specifier. Otherwise, we create a
      template-id annotation that can later be "upgraded" by transforming it
      into a typename annotation when the parser needs a type. This occurs,
      for example, when we've parsed "std::vector<int>" above and then see
      the '::' after it. However, it means that when writing something like
      this:
      
        template<> class Outer::Inner<int> { ... };
      
      We have two tokens to represent Outer::Inner<int>: one token for the
      nested name specifier Outer::, and one template-id annotation token
      for Inner<int>, which will be passed to semantic analysis to define
      the class template specialization.
      
      Most of the churn in the template tests in this patch come from an
      improvement in our error recovery from ill-formed template-ids.
      
      
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65467 91177308-0d34-0410-b5e6-96231b3b80d8
      39a8de10
  6. Feb 18, 2009
  7. Feb 17, 2009
  8. Feb 13, 2009
  9. Feb 09, 2009
  10. Feb 05, 2009
  11. Feb 04, 2009
    • Douglas Gregor's avatar
      Some name-lookup-related fixes, from Piotr Rak! · 47b9a1ca
      Douglas Gregor authored
      - Changes Lookup*Name functions to return NamedDecls, instead of
      Decls. Unfortunately my recent statement that it will simplify lot of
      code, was not quite right, but it simplifies some...
      - Makes MergeLookupResult SmallPtrSet instead of vector, following
      Douglas suggestions.
      - Adds %qN format for printing qualified names to Diagnostic.
      - Avoids searching for using-directives in Scopes, which are not
      DeclScope, during unqualified name lookup.
      
      
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63739 91177308-0d34-0410-b5e6-96231b3b80d8
      47b9a1ca
  12. Jan 28, 2009
  13. Jan 20, 2009
    • Douglas Gregor's avatar
      Remove ScopedDecl, collapsing all of its functionality into Decl, so · 4afa39de
      Douglas Gregor authored
      that every declaration lives inside a DeclContext.
      
      Moved several things that don't have names but were ScopedDecls (and,
      therefore, NamedDecls) to inherit from Decl rather than NamedDecl,
      including ObjCImplementationDecl and LinkageSpecDecl. Now, we don't
      store empty DeclarationNames for these things, nor do we try to insert
      them into DeclContext's lookup structure.
      
      The serialization tests are temporarily disabled. We'll re-enable them
      once we've sorted out the remaining ownership/serialiazation issues
      between DeclContexts and TranslationUnion, DeclGroups, etc.
      
      
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62562 91177308-0d34-0410-b5e6-96231b3b80d8
      4afa39de
  14. Jan 16, 2009
  15. Jan 06, 2009
  16. Jan 05, 2009
    • Douglas Gregor's avatar
      Introduce support for "transparent" DeclContexts, which are · 074149e1
      Douglas Gregor authored
      DeclContexts whose members are visible from enclosing DeclContexts up
      to (and including) the innermost enclosing non-transparent
      DeclContexts. Transparent DeclContexts unify the mechanism to be used
      for various language features, including C enumerations, anonymous
      unions, C++0x inline namespaces, and C++ linkage
      specifications. Please refer to the documentation in the Clang
      internals manual for more information.
      
      Only enumerations and linkage specifications currently use transparent
      DeclContexts.
      
      Still to do: use transparent DeclContexts to implement anonymous
      unions and GCC's anonymous structs extension, and, later, the C++0x
      features. We also need to tighten up the DeclContext/ScopedDecl link
      to ensure that every ScopedDecl is in a single DeclContext, which
      will ensure that we can then enforce ownership and reduce the memory
      footprint of DeclContext.
      
      
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61735 91177308-0d34-0410-b5e6-96231b3b80d8
      074149e1
  17. Dec 12, 2008
  18. Nov 24, 2008
  19. Nov 23, 2008
  20. Nov 22, 2008
  21. Nov 18, 2008
    • Douglas Gregor's avatar
      Extend DeclarationName to support C++ overloaded operators, e.g., · e94ca9e4
      Douglas Gregor authored
      operator+, directly, using the same mechanism as all other special
      names.
      
      Removed the "special" identifiers for the overloaded operators from
      the identifier table and IdentifierInfo data structure. IdentifierInfo
      is back to representing only real identifiers.
      
      Added a new Action, ActOnOperatorFunctionIdExpr, that builds an
      expression from an parsed operator-function-id (e.g., "operator
      +"). ActOnIdentifierExpr used to do this job, but
      operator-function-ids are no longer represented by IdentifierInfo's.
      
      Extended Declarator to store overloaded operator names. 
      Sema::GetNameForDeclarator now knows how to turn the operator
      name into a DeclarationName for the overloaded operator. 
      
      Except for (perhaps) consolidating the functionality of
      ActOnIdentifier, ActOnOperatorFunctionIdExpr, and
      ActOnConversionFunctionExpr into a common routine that builds an
      appropriate DeclRefExpr by looking up a DeclarationName, all of the
      work on normalizing declaration names should be complete with this
      commit.
      
      
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59526 91177308-0d34-0410-b5e6-96231b3b80d8
      e94ca9e4
  22. Nov 17, 2008
    • Douglas Gregor's avatar
      Updated IdentifierResolver to deal with DeclarationNames. The names of · 2def4839
      Douglas Gregor authored
      C++ constructors, destructors, and conversion functions now have a
      FETokenInfo field that IdentifierResolver can access, so that these
      special names are handled just like ordinary identifiers. A few other
      Sema routines now use DeclarationNames instead of IdentifierInfo*'s.
      
      To validate this design, this code also implements parsing and
      semantic analysis for id-expressions that name conversion functions,
      e.g.,
      
        return operator bool();
      
      The new parser action ActOnConversionFunctionExpr takes the result of
      parsing "operator type-id" and turning it into an expression, using
      the IdentifierResolver with the DeclarationName of the conversion
      function. ActOnDeclarator pushes those conversion function names into
      scope so that the IdentifierResolver can find them, of course.
      
      
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59462 91177308-0d34-0410-b5e6-96231b3b80d8
      2def4839
    • Douglas Gregor's avatar
      Introduction the DeclarationName class, as a single, general method of · 2e1cd426
      Douglas Gregor authored
      representing the names of declarations in the C family of
      languages. DeclarationName is used in NamedDecl to store the name of
      the declaration (naturally), and ObjCMethodDecl is now a NamedDecl.
      
      
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59441 91177308-0d34-0410-b5e6-96231b3b80d8
      2e1cd426
Loading