Skip to content
  1. Feb 08, 2009
  2. Feb 04, 2009
    • Douglas Gregor's avatar
      Some name-lookup-related fixes, from Piotr Rak! · 2ada0489
      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.
      
      llvm-svn: 63739
      2ada0489
  3. Jan 31, 2009
  4. Jan 29, 2009
  5. Jan 27, 2009
  6. Jan 14, 2009
  7. Dec 26, 2008
  8. Dec 23, 2008
  9. Dec 21, 2008
  10. Dec 17, 2008
  11. Dec 11, 2008
    • Douglas Gregor's avatar
      Unifies the name-lookup mechanisms used in various parts of the AST · 91f84216
      Douglas Gregor authored
      and separates lexical name lookup from qualified name lookup. In
      particular:
        * Make DeclContext the central data structure for storing and
          looking up declarations within existing declarations, e.g., members
          of structs/unions/classes, enumerators in C++0x enums, members of
          C++ namespaces, and (later) members of Objective-C
          interfaces/implementations. DeclContext uses a lazily-constructed
          data structure optimized for fast lookup (array for small contexts,
          hash table for larger contexts). 
      
        * Implement C++ qualified name lookup in terms of lookup into
          DeclContext.
      
        * Implement C++ unqualified name lookup in terms of
          qualified+unqualified name lookup (since unqualified lookup is not
          purely lexical in C++!)
      
        * Limit the use of the chains of declarations stored in
          IdentifierInfo to those names declared lexically.
      
        * Eliminate CXXFieldDecl, collapsing its behavior into
          FieldDecl. (FieldDecl is now a ScopedDecl).
      
        * Make RecordDecl into a DeclContext and eliminates its
          Members/NumMembers fields (since one can just iterate through the
          DeclContext to get the fields).
      
      llvm-svn: 60878
      91f84216
  12. Dec 04, 2008
  13. Nov 24, 2008
  14. Nov 23, 2008
    • Chris Lattner's avatar
      Convert IdentifierInfo's to be printed the same as DeclarationNames · e3d20d95
      Chris Lattner authored
      with implicit quotes around them.  This has a bunch of follow-on 
      effects and requires tweaking to a whole lot of code.  This causes
      a regression in two tests (xfailed) by causing it to emit things like:
      
        Line 10: duplicate interface declaration for category 'MyClass1' ('Category1')
      
      instead of:
      
        Line 10: duplicate interface declaration for category 'MyClass1(Category1)'
      
      I will fix this in a follow-up commit.
      
      As part of this, I had to start switching stuff to use ->getDeclName() instead
      of Decl::getName() for consistency.  This is good, but I was planning to do this
      as an independent patch.  There will be several follow-on patches
      to clean up some of the mess, but this patch is already too big.
      
      llvm-svn: 59917
      e3d20d95
  15. Nov 20, 2008
  16. Nov 19, 2008
  17. Nov 18, 2008
  18. Oct 28, 2008
  19. Oct 19, 2008
    • Daniel Dunbar's avatar
      Improve attribute parsing & tests. · 70e3ebaf
      Daniel Dunbar authored
       - Support noreturn on function-typed variables.
      
       - Extend isFunctionOrMethod to return true for K&R functions and
         provide hasFunctionProto to check if a decl has information about
         its arguments. This code needs some serious cleaning, but works.
      
       - Add/improve test cases for noreturn and unused.
      
      llvm-svn: 57778
      70e3ebaf
  20. Oct 16, 2008
    • Daniel Dunbar's avatar
      Implement #pragma pack use in structure packing. The general approach · 4290d46b
      Daniel Dunbar authored
      is to encode the state of the #pragma pack stack as an attribute when
      the structure is declared. 
      
       - Extend PackedAttr to take an alignment (in bits), and reuse for
         both __attribute__((packed)) (which takes no argument, instead
         packing tightly (to "minimize the memory required") and for #pragma
         pack (which allows specification of the maximum alignment in
         bytes). __attribute__((packed)) is just encoded as Alignment=1.
      
         This conflates two related but different mechanisms, but it didn't
         seem worth another attribute.
      
       - I have attempted to follow the MSVC semantics as opposed to the gcc
         ones, since if I understand correctly #pragma pack originated with
         MSVC. The semantics are generally equivalent except when the stack
         is altered during the definition of a structure; its not clear if
         anyone does this in practice. See testcase if curious.
      
      llvm-svn: 57623
      4290d46b
  21. Oct 06, 2008
  22. Oct 05, 2008
  23. Sep 26, 2008
  24. Sep 18, 2008
  25. Sep 02, 2008
  26. Sep 01, 2008
    • Ted Kremenek's avatar
      Tidy up sema processing of attribute "nonull": · c4f6d90b
      Ted Kremenek authored
      - warn about nonnull being applied to functions with no pointer arguments
      - continue processing argument list in the attribute when we encounter a non-pointer parameter being marked as nonnull
      - when no argument list is specified, only mark pointers as nonnull.  This fixes PR 2732 and radar 6188814.
      
      llvm-svn: 55610
      c4f6d90b
  27. Aug 24, 2008
  28. Aug 23, 2008
  29. Aug 11, 2008
    • Daniel Dunbar's avatar
      More #include cleaning · 56fdb6ae
      Daniel Dunbar authored
       - Kill unnecessary #includes in .cpp files. This is an automatic
         sweep so some things removed are actually used, but happen to be
         included by a previous header. I tried to get rid of the obvious
         examples and this was the easiest way to trim the #includes in one
         fell swoop.
       - We now return to regularly scheduled development.
      
      llvm-svn: 54632
      56fdb6ae
    • Daniel Dunbar's avatar
      More #include cleaning · c74b5cc2
      Daniel Dunbar authored
       - Drop Diagnostic.h from DeclSpec.h, move utility Diag methods into
         implementation .cpp
      
      llvm-svn: 54626
      c74b5cc2
    • Daniel Dunbar's avatar
      Minor #include cleaning · 34fb6727
      Daniel Dunbar authored
       - Drop TokenKinds.h from Action.h
       - Move DeclSpec.h from Sema.h into individual Sema .cpp files
      
      llvm-svn: 54625
      34fb6727
  30. Aug 07, 2008
  31. Aug 01, 2008
  32. Jul 27, 2008
Loading