1. Nov 19, 2008
  2. Nov 18, 2008
    • Nick Lewycky's avatar
      Add a utility function that detects whether a loop is guaranteed to be finite. · 1c451ae4
      Nick Lewycky authored
      Use it to safely handle less-than-or-equals-to exit conditions in loops. These
      also occur when the loop exit branch is exit on true because SCEV inverses the
      icmp predicate.
      
      Use it again to handle non-zero strides, but only with an unsigned comparison
      in the exit condition.
      
      llvm-svn: 59528
      1c451ae4
    • Douglas Gregor's avatar
      As threatened previously: consolidate name lookup and the creation of · 4ea8043d
      Douglas Gregor authored
      DeclRefExprs and BlockDeclRefExprs into a single function
      Sema::ActOnDeclarationNameExpr, eliminating a bunch of duplicate
      lookup-name-and-check-the-result code.
      
      Note that we still have the three parser entry points for identifiers,
      operator-function-ids, and conversion-function-ids, since the parser
      doesn't (and shouldn't) know about DeclarationNames. This is a Good
      Thing (TM), and there will be more entrypoints coming (e.g., for C++
      pseudo-destructor expressions).
      
      llvm-svn: 59527
      4ea8043d
    • Douglas Gregor's avatar
      Extend DeclarationName to support C++ overloaded operators, e.g., · 163c5850
      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.
      
      llvm-svn: 59526
      163c5850