Skip to content
  1. Jul 29, 2011
  2. Jul 25, 2011
  3. Jul 23, 2011
  4. Jul 19, 2011
  5. Jul 16, 2011
  6. Jul 15, 2011
  7. Jul 02, 2011
  8. Jun 21, 2011
    • Douglas Gregor's avatar
      Introduce a new AST node describing reference binding to temporaries. · fe31481f
      Douglas Gregor authored
      MaterializeTemporaryExpr captures a reference binding to a temporary
      value, making explicit that the temporary value (a prvalue) needs to
      be materialized into memory so that its address can be used. The
      intended AST invariant here is that a reference will always bind to a
      glvalue, and MaterializeTemporaryExpr will be used to convert prvalues
      into glvalues for that binding to happen. For example, given
      
        const int& r = 1.0;
      
      The initializer of "r" will be a MaterializeTemporaryExpr whose
      subexpression is an implicit conversion from the double literal "1.0"
      to an integer value. 
      
      IR generation benefits most from this new node, since it was
      previously guessing (badly) when to materialize temporaries for the
      purposes of reference binding. There are likely more refactoring and
      cleanups we could perform there, but the introduction of
      MaterializeTemporaryExpr fixes PR9565, a case where IR generation
      would effectively bind a const reference directly to a bitfield in a
      struct. Addresses <rdar://problem/9552231>.
      
      llvm-svn: 133521
      fe31481f
  9. Jun 20, 2011
  10. Jun 16, 2011
  11. Jun 15, 2011
    • Jordy Rose's avatar
      [analyzer] Revise CStringChecker's modelling of strcpy() and strcat(): · 634c12d2
      Jordy Rose authored
      - (bounded copies) Be more conservative about how much is being copied.
      - (str(n)cat) If we can't compute the exact final length of an append operation, we can still lower-bound it.
      - (stpcpy) Fix the conjured return value at the end to actually be returned.
      
      This requires these supporting changes:
      - C string metadata symbols are still live even when buried in a SymExpr.
      - "Hypothetical" C string lengths, to represent a value that /will/ be passed to setCStringLength() if all goes well. (The idea is to allow for temporary constrainable symbols that may end up becoming permanent.)
      - The 'checkAdditionOverflow' helper makes sure that the two strings being appended in a strcat don't overflow size_t. This should never *actually* happen; the real effect is to keep the final string length from "wrapping around" in the constraint manager.
      
      This doesn't actually test the "bounded" operations (strncpy and strncat) because they can leave strings unterminated. Next on the list!
      
      llvm-svn: 133046
      634c12d2
    • Jordy Rose's avatar
      [analyzer] If a C string length is UnknownVal, clear any existing length... · 0e9fb28e
      Jordy Rose authored
      [analyzer] If a C string length is UnknownVal, clear any existing length binding. No tests yet because the only thing that sets string length is strcpy(), and that needs some work anyway.
      
      llvm-svn: 133044
      0e9fb28e
  12. Jun 14, 2011
  13. Jun 04, 2011
  14. May 06, 2011
    • Alexis Hunt's avatar
      Modify some deleted function methods to better reflect reality: · 4a8ea109
      Alexis Hunt authored
       - New isDefined() function checks for deletedness
       - isThisDeclarationADefinition checks for deletedness
       - New doesThisDeclarationHaveABody() does what
         isThisDeclarationADefinition() used to do
       - The IsDeleted bit is not propagated across redeclarations
       - isDeleted() now checks the canoncial declaration
       - New isDeletedAsWritten() does what it says on the tin.
       - isUserProvided() now correct (thanks Richard!)
      
      This fixes the bug that we weren't catching
      
      void foo() = delete;
      void foo() {}
      
      as being a redefinition.
      
      llvm-svn: 131013
      4a8ea109
  15. May 03, 2011
  16. May 02, 2011
  17. Apr 30, 2011
  18. Apr 28, 2011
  19. Apr 27, 2011
  20. Apr 26, 2011
Loading