Skip to content
  1. Dec 03, 2008
  2. Nov 24, 2008
    • Chris Lattner's avatar
      Rename Selector::getName() to Selector::getAsString(), and add · e4b95698
      Chris Lattner authored
      a new NamedDecl::getAsString() method.
      
      Change uses of Selector::getName() to just pass in a Selector 
      where possible (e.g. to diagnostics) instead of going through
      an std::string.
      
      This also adds new formatters for objcinstance and objcclass
      as described in the dox.
      
      llvm-svn: 59933
      e4b95698
  3. Nov 23, 2008
  4. Nov 22, 2008
  5. Nov 20, 2008
  6. Nov 19, 2008
  7. Nov 18, 2008
    • Chris Lattner's avatar
      start converting Sema over to using its canonical Diag method. · 377d1f8e
      Chris Lattner authored
      llvm-svn: 59561
      377d1f8e
    • Chris Lattner's avatar
    • Chris Lattner's avatar
      This reworks some of the Diagnostic interfaces a bit to change how diagnostics · 8488c829
      Chris Lattner authored
      are formed.  In particular, a diagnostic with all its strings and ranges is now
      packaged up and sent to DiagnosticClients as a DiagnosticInfo instead of as a 
      ton of random stuff.  This has the benefit of simplifying the interface, making
      it more extensible, and allowing us to do more checking for things like access
      past the end of the various arrays passed in.
      
      In addition to introducing DiagnosticInfo, this also substantially changes how 
      Diagnostic::Report works.  Instead of being passed in all of the info required
      to issue a diagnostic, Report now takes only the required info (a location and 
      ID) and returns a fresh DiagnosticInfo *by value*.  The caller is then free to
      stuff strings and ranges into the DiagnosticInfo with the << operator.  When
      the dtor runs on the DiagnosticInfo object (which should happen at the end of
      the statement), the diagnostic is actually emitted with all of the accumulated
      information.  This is a somewhat tricky dance, but it means that the 
      accumulated DiagnosticInfo is allowed to keep pointers to other expression 
      temporaries without those pointers getting invalidated.
      
      This is just the minimal change to get this stuff working, but this will allow
      us to eliminate the zillions of variant "Diag" methods scattered throughout
      (e.g.) sema.  For example, instead of calling:
      
        Diag(BuiltinLoc, diag::err_overload_no_match, typeNames,
             SourceRange(BuiltinLoc, RParenLoc));
      
      We will soon be able to just do:
      
        Diag(BuiltinLoc, diag::err_overload_no_match)
            << typeNames << SourceRange(BuiltinLoc, RParenLoc));
      
      This scales better to support arbitrary types being passed in (not just 
      strings) in a type-safe way.  Go operator overloading?!
      
      llvm-svn: 59502
      8488c829
    • Chris Lattner's avatar
      Change the diagnostics interface to take an array of pointers to · 16ba9139
      Chris Lattner authored
      strings instead of array of strings.  This reduces string copying
      in some not-very-important cases, but paves the way for future 
      improvements.
      
      llvm-svn: 59494
      16ba9139
  8. Nov 17, 2008
  9. Nov 12, 2008
    • Douglas Gregor's avatar
      Implement support for operator overloading using candidate operator · a11693bc
      Douglas Gregor authored
      functions for built-in operators, e.g., the builtin
      
        bool operator==(int const*, int const*)
      
      can be used for the expression "x1 == x2" given:
      
        struct X {
          operator int const*();
        } x1, x2;
      
      The scheme for handling these built-in operators is relatively simple:
      for each candidate required by the standard, create a special kind of
      candidate function for the built-in. If overload resolution picks the
      built-in operator, we perform the appropriate conversions on the
      arguments and then let the normal built-in operator take care of it. 
      
      There may be some optimization opportunity left: if we can reduce the
      number of built-in operator overloads we generate, overload resolution
      for these cases will go faster. However, one must be careful when
      doing this: GCC generates too few operator overloads in our little
      test program, and fails to compile it because none of the overloads it
      generates match.
      
      Note that we only support operator overload for non-member binary
      operators at the moment. The other operators will follow.
      
      As part of this change, ImplicitCastExpr can now be an lvalue.
      
      llvm-svn: 59148
      a11693bc
  10. Nov 11, 2008
  11. Nov 08, 2008
  12. Nov 04, 2008
  13. Oct 24, 2008
  14. Oct 14, 2008
    • Daniel Dunbar's avatar
      Add Sema implementation of #pragma pack stack. · 5460374c
      Daniel Dunbar authored
       - Follows the MSVC (original) implementation, including support of
         pack(show) (useful for testing).
       - Implements support for named pack records which gcc seems to
         ignore (or implements incorrectly).
       - Not currently wired to anything, only functionality change is the
         type checking of the pragma.
      
      llvm-svn: 57476
      5460374c
  15. Oct 02, 2008
  16. Sep 09, 2008
  17. Sep 05, 2008
    • Ted Kremenek's avatar
      Remove "NextDecl" from RecordDecl. This change touches many files that where... · 47923c7e
      Ted Kremenek authored
      Remove "NextDecl" from RecordDecl.  This change touches many files that where RecordDecl or CXXRecordDecl was constructed, always with an argument of 'NULL' for the previous declaration.
      
      The motivation behind this change is that chaining the RecordDecls is simply unnecessary.  Once we create multiple RecordDecls for the same struct/union/class, clients that care about all the declarations of the same struct can build a back map by seeing which Decls refer to the same RecordType.
      
      llvm-svn: 55821
      47923c7e
  18. Sep 04, 2008
  19. Sep 03, 2008
    • Steve Naroff's avatar
      Add semantic analysis for "blocks". · c540d669
      Steve Naroff authored
      Highlights...
      
      - 4 new AST nodes, BlockExpr, BlockStmtExpr, BlockExprExpr, BlockDeclRefExpr.
      - Sema::ActOnBlockStart(), ActOnBlockError(), ActOnBlockStmtExpr(), ActOnBlockExprExpr(), ActOnBlockReturnStmt().
      
      Next steps...
      
      - hack Sema::ActOnIdentifierExpr() to deal with block decl refs.
      - add attribute handler for byref decls.
      - add test cases.
      
      llvm-svn: 55710
      c540d669
  20. Aug 24, 2008
  21. Aug 23, 2008
  22. Aug 15, 2008
    • Daniel Dunbar's avatar
      Change Parser & Sema to use interned "super" for comparions. · 12c9ddce
      Daniel Dunbar authored
       - Added as private members for each because it is not clear where to
         put the common definition. Perhaps the IdentifierInfos all of these
         "pseudo-keywords" should be collected into one place (this would
         KnownFunctionIDs and Objective-C property IDs, for example).
      
      Remove Token::isNamedIdentifier.
       - There isn't a good reason to use strcmp when we have interned
         strings, and there isn't a good reason to encourage clients to do
         so.
      
      llvm-svn: 54794
      12c9ddce
  23. 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 · 6e8aa537
      Daniel Dunbar authored
       - Drop {Decl.h,DeclObjC.h,IdentifierTable.h} from Expr.h
       - Moved Sema::getCurMethodDecl() out of line (dependent on
         ObjCMethodDecl via dyn_cast).
      
      llvm-svn: 54629
      6e8aa537
Loading