Skip to content
  1. Jul 23, 2011
  2. Jul 22, 2011
    • John McCall's avatar
      In Objective-C, pull arbitrary attributes from overridden · d2930c21
      John McCall authored
      methods, including indirectly overridden methods like those
      declared in protocols and categories.  There are mismatches
      that we would like to diagnose but aren't yet, but this   
      is fine for now.
      
      I looked at approaches that avoided doing this lookup 
      unless we needed it, but the infer-related-result-type
      checks were doing it anyway, so I left it with the same
      fast-path check for no previous declartions of that 
      selector.
      
      llvm-svn: 135743
      d2930c21
  3. Jul 21, 2011
  4. Jul 19, 2011
  5. Jul 16, 2011
  6. Jul 15, 2011
  7. Jul 07, 2011
  8. Jul 06, 2011
  9. Jul 02, 2011
  10. Jun 27, 2011
  11. 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
  12. Jun 20, 2011
  13. Jun 17, 2011
  14. Jun 16, 2011
  15. 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
    • Jordy Rose's avatar
      [analyzer] When performing a binary operation on symbolic operands, we convert... · b891bd8a
      Jordy Rose authored
      [analyzer] When performing a binary operation on symbolic operands, we convert the symbol values to a common type. But in a relational operation, the result is an 'int' or 'bool', which may not be the appropriate type to convert the operands to. In these cases, use the left-hand operand's type as the conversion type.
      
      There's no associated test for this because fully-constrained symbolic values are evaluated ahead of time in normal expressions. This can only come up in checker-constructed expressions (like the ones in an upcoming patch to CStringChecker).
      
      llvm-svn: 133041
      b891bd8a
  16. Jun 14, 2011
  17. Jun 10, 2011
    • Jordy Rose's avatar
      [analyzer] PR8962 again. Ban ParenExprs (and friends) from block-level... · 1734737d
      Jordy Rose authored
      [analyzer] PR8962 again. Ban ParenExprs (and friends) from block-level expressions (by calling IgnoreParens before adding expressions to blocks). Undo 132769 (LiveVariables' local IgnoreParens), since it's no longer necessary.
      
      Also, have Environment stop looking through NoOp casts; it didn't match the behavior of LiveVariables. And once that's gone, the whole cast block of that switch is unnecessary.
      
      llvm-svn: 132840
      1734737d
  18. Jun 09, 2011
  19. Jun 04, 2011
Loading