Skip to content
  1. Jan 09, 2009
  2. 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
    • Steve Naroff's avatar
      This is a large/messy diff that unifies the ObjC AST's with DeclContext. · 35c62ae6
      Steve Naroff authored
      - ObjCContainerDecl's (ObjCInterfaceDecl/ObjCCategoryDecl/ObjCProtocolDecl), ObjCCategoryImpl, & ObjCImplementation are all DeclContexts.
      - ObjCMethodDecl is now a ScopedDecl (so it can play nicely with DeclContext).
      - ObjCContainerDecl now does iteration/lookup using DeclContext infrastructure (no more linear search:-)
      - Removed ASTContext argument to DeclContext::lookup(). It wasn't being used and complicated it's use from an ObjC AST perspective.
      - Added Sema::ProcessPropertyDecl() and removed Sema::diagnosePropertySetterGetterMismatch().
      - Simplified Sema::ActOnAtEnd() considerably. Still more work to do.
      - Fixed an incorrect casting assumption in Sema::getCurFunctionOrMethodDecl(), now that ObjCMethodDecl is a ScopedDecl.
      - Removed addPropertyMethods from ObjCInterfaceDecl/ObjCCategoryDecl/ObjCProtocolDecl.
      
      This passes all the tests on my machine. Since many of the changes are central to the way ObjC finds it's methods, I expect some fallout (and there are still a handful of FIXME's). Nevertheless, this should be a step in the right direction.
      
      llvm-svn: 61929
      35c62ae6
    • Fariborz Jahanian's avatar
      Objc's compatibility-alias semantics and code · 17290c36
      Fariborz Jahanian authored
      gen issue fix.
      
      llvm-svn: 61901
      17290c36
  3. Jan 07, 2009
  4. Jan 06, 2009
  5. Jan 05, 2009
    • Daniel Dunbar's avatar
      Remainder is only valid on integer vector operands. · 0d2bfec5
      Daniel Dunbar authored
      Improve ext vector test case.
      
      llvm-svn: 61766
      0d2bfec5
    • Daniel Dunbar's avatar
      Use CheckVectorOperands when % is applied to a vector type. · 060d5e24
      Daniel Dunbar authored
      llvm-svn: 61763
      060d5e24
    • Sebastian Redl's avatar
      PODness and Type Traits · baad4e76
      Sebastian Redl authored
      Make C++ classes track the POD property (C++ [class]p4)
      Track the existence of a copy assignment operator.
      Implicitly declare the copy assignment operator if none is provided.
      Implement most of the parsing job for the G++ type traits extension.
      Fully implement the low-hanging fruit of the type traits:
      __is_pod: Whether a type is a POD.
      __is_class: Whether a type is a (non-union) class.
      __is_union: Whether a type is a union.
      __is_enum: Whether a type is an enum.
      __is_polymorphic: Whether a type is polymorphic (C++ [class.virtual]p1).
      
      llvm-svn: 61746
      baad4e76
    • Douglas Gregor's avatar
      Introduce support for "transparent" DeclContexts, which are · 07665a69
      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.
      
      llvm-svn: 61735
      07665a69
  6. Dec 31, 2008
  7. Dec 30, 2008
  8. Dec 29, 2008
  9. Dec 28, 2008
  10. Dec 26, 2008
  11. Dec 24, 2008
    • Douglas Gregor's avatar
      Keep track of template arguments when we parse them. Right now, we don't... · b9bd8a99
      Douglas Gregor authored
      Keep track of template arguments when we parse them. Right now, we don't actually do anything with the template arguments, but they'll be used to create template declarations
      
      llvm-svn: 61413
      b9bd8a99
    • Douglas Gregor's avatar
      Correct the order in which we cope with end-of-class-definition · 58354036
      Douglas Gregor authored
      semantics and improve our handling of default arguments. Specifically,
      we follow this order:
      
        - As soon as the see the '}' in the class definition, the class is
        complete and we add any implicit declarations (default constructor,
        copy constructor, etc.) to the class.
        - If there are any default function arguments, parse them
        - If there were any inline member function definitions, parse them
      
      As part of this change, we now keep track of the the fact that we've
      seen unparsed default function arguments within the AST. See the new
      ParmVarDecl::hasUnparsedDefaultArg member. This allows us to properly
      cope with calls inside default function arguments to other functions
      where we're making use of the default arguments.
      
      Made some C++ error messages regarding failed initializations more
      specific. 
      
      llvm-svn: 61406
      58354036
  12. Dec 23, 2008
Loading