Skip to content
  1. Jan 15, 2009
  2. Jan 14, 2009
    • Douglas Gregor's avatar
      Refactor name lookup. · 34074326
      Douglas Gregor authored
      This change refactors and cleans up our handling of name lookup with
      LookupDecl. There are several aspects to this refactoring:
      
        - The criteria for name lookup is now encapsulated into the class
        LookupCriteria, which replaces the hideous set of boolean values
        that LookupDecl currently has.
      
        - The results of name lookup are returned in a new class
        LookupResult, which can lazily build OverloadedFunctionDecls for
        overloaded function sets (and, eventually, eliminate the need to
        allocate member for OverloadedFunctionDecls) and contains a
        placeholder for handling ambiguous name lookup (for C++).
      
        - The primary entry points for name lookup are now LookupName (for
          unqualified name lookup) and LookupQualifiedName (for qualified
          name lookup). There is also a convenience function
          LookupParsedName that handles qualified/unqualified name lookup
          when given a scope specifier. Together, these routines are meant
          to gradually replace the kludgy LookupDecl, but this won't happen
          until after we have base class lookup (which forces us to cope
          with ambiguities).
      
        - Documented the heck out of name lookup. Experimenting a little
          with using Doxygen's member groups to make some sense of the Sema
          class. Feedback welcome!
      
        - Fixes some lingering issues with name lookup for
        nested-name-specifiers, which now goes through
        LookupName/LookupQualifiedName. 
      
      llvm-svn: 62245
      34074326
    • Douglas Gregor's avatar
      Introduce support for C++0x explicit conversion operators (N2437) · 5fb53972
      Douglas Gregor authored
      Small cleanup in the handling of user-defined conversions. 
      
      Also, implement an optimization when constructing a call. We avoid
      recomputing implicit conversion sequences and instead use those
      conversion sequences that we computed as part of overload resolution.
      
      llvm-svn: 62231
      5fb53972
    • Ted Kremenek's avatar
      FunctionDecl::setParams() now uses the allocator associated with ASTContext to... · 4ba36fcc
      Ted Kremenek authored
      FunctionDecl::setParams() now uses the allocator associated with ASTContext to allocate the array of ParmVarDecl*'s.
      
      llvm-svn: 62203
      4ba36fcc
    • Fariborz Jahanian's avatar
      Implemenent objective-c's NSObject attribute as a way of ddeclaraing c-type · 255c0958
      Fariborz Jahanian authored
      objects as an objective-c object.
      
      llvm-svn: 62197
      255c0958
    • Ted Kremenek's avatar
      PTH: · e9814186
      Ted Kremenek authored
      - Use canonical FileID when using getSpelling() caching.  This
        addresses some cache misses we were seeing with -fsyntax-only on
        Cocoa.h
      - Added Preprocessor::getPhysicalCharacterAt() utility method for
        clients to grab the first character at a specified sourcelocation.
        This uses the PTH spelling cache.
      - Modified Sema::ActOnNumericConstant() to use
        Preprocessor::getPhysicalCharacterAt() instead of
        SourceManager::getCharacterData() (to get PTH hits).
      
      These changes cause -fsyntax-only to not page in any sources from
      Cocoa.h.  We see a speedup of 27%.
      
      llvm-svn: 62193
      e9814186
    • Douglas Gregor's avatar
      Permitting typedefs without a name is a Microsoft/GNU extension · 2b136fe2
      Douglas Gregor authored
      llvm-svn: 62192
      2b136fe2
  3. Jan 13, 2009
  4. Jan 12, 2009
  5. Jan 11, 2009
  6. Jan 10, 2009
  7. Jan 09, 2009
  8. Jan 08, 2009
    • Douglas Gregor's avatar
      Revert my previous, failed attempt to pretty-print anonymous struct/union... · e4b414c7
      Douglas Gregor authored
      Revert my previous, failed attempt to pretty-print anonymous struct/union accesses well. Added a FIXME so we know to revisit this later
      
      llvm-svn: 61951
      e4b414c7
    • Douglas Gregor's avatar
    • Douglas Gregor's avatar
      Unify the code for defining tags in C and C++, so that we always · 82ac25e4
      Douglas Gregor authored
      introduce a Scope for the body of a tag. This reduces the number of
      semantic differences between C and C++ structs and unions, and will
      help with other features (e.g., anonymous unions) in C. Some important
      points:
      
        - Fields are now in the "member" namespace (IDNS_Member), to keep
          them separate from tags and ordinary names in C. See the new test
          in Sema/member-reference.c for an example of why this matters. In
          C++, ordinary and member name lookup will find members in both the
          ordinary and member namespace, so the difference between
          IDNS_Member and IDNS_Ordinary is erased by Sema::LookupDecl (but
          only in C++!). 
        - We always introduce a Scope and push a DeclContext when we're
          defining a tag, in both C and C++. Previously, we had different
          actions and different Scope/CurContext behavior for enums, C
          structs/unions, and C++ structs/unions/classes. Now, it's one pair
          of actions. (Yay!)
      
      There's still some fuzziness in the handling of struct/union/enum
      definitions within other struct/union/enum definitions in C. We'll
      need to do some more cleanup to eliminate some reliance on CurContext
      before we can solve this issue for real. What we want is for something
      like this:
      
        struct X {
          struct T { int x; } t;
        };
      
      to introduce T into translation unit scope (placing it at the
      appropriate point in the IdentifierResolver chain, too), but it should
      still have struct X as its lexical declaration
      context. PushOnScopeChains isn't smart enough to do that yet, though,
      so there's a FIXME test in nested-redef.c
      
      llvm-svn: 61940
      82ac25e4
    • Steve Naroff's avatar
      Move FIXME to a better location. · 6c879a14
      Steve Naroff authored
      llvm-svn: 61937
      6c879a14
    • Steve Naroff's avatar
      Removed ObjCContainerDecl::getPropertyMethods()...doesn't belong in the AST. · e538c5f3
      Steve Naroff authored
      Moved logic to Sema::ProcessPropertyDecl().
      
      llvm-svn: 61936
      e538c5f3
Loading