- Jul 19, 2011
-
-
Jordy Rose authored
llvm-svn: 135518
-
Jordy Rose authored
pthread and XNU locks. Patch by Rui Paulo! llvm-svn: 135515
-
- Jul 16, 2011
-
-
Ted Kremenek authored
[analyzer] Place checking for Core Foundation "Create" rule into a proper API. No functionality change. llvm-svn: 135349
-
Jordy Rose authored
Add tests for CFRefReport's path notes, and fix a few typos and non-standard terminology ('+0 retain counts') caught by the tests. llvm-svn: 135310
-
- Jul 15, 2011
-
-
Jordy Rose authored
llvm-svn: 135294
-
Jordy Rose authored
Clean up UnixAPIChecker, including switching its array of BugTypes to llvm::OwningPtr<BugType> vars (the new convention). No functionality change. llvm-svn: 135255
-
Jordy Rose authored
Clean up MacOSXAPIChecker, including switching its array of BugTypes to a single llvm::OwningPtr<BugType> (the new convention). No functionality change. llvm-svn: 135250
-
John McCall authored
to represent a fully-substituted non-type template parameter. This should improve source fidelity, as well as being generically useful for diagnostics and such. llvm-svn: 135243
-
- Jul 07, 2011
-
-
John McCall authored
where we have an immediate need of a retained value. As an exception, don't do this when the call is made as the immediate operand of a __bridge retain. This is more in the way of a workaround than an actual guarantee, so it's acceptable to be brittle here. rdar://problem/9504800 llvm-svn: 134605
-
- Jul 06, 2011
-
-
Douglas Gregor authored
obey the objc_method_family attribute when provided. Fixes <rdar://problem/9726279>. llvm-svn: 134493
-
- Jul 02, 2011
-
-
Eric Christopher authored
Fixes rdar://9714064 llvm-svn: 134292
-
- Jun 27, 2011
-
-
Jordy Rose authored
[analyzer] Use UnknownVal when default-initializing arrays whose element types we don't model, to distinguish them from uninitialized arrays (PR10163). llvm-svn: 133937
-
- Jun 21, 2011
-
-
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
-
- Jun 20, 2011
-
-
Jordy Rose authored
llvm-svn: 133472
-
Jordy Rose authored
llvm-svn: 133410
-
Jordy Rose authored
[analyzer] Re-enable checking for strncpy, along with a new validation of the size argument. strncat is not yet up-to-date, but I'm leaving it enabled for now (there shouldn't be any false positives, at least...) llvm-svn: 133408
-
Jordy Rose authored
[analyzer] Eliminate "byte string function" from CStringChecker's diagnostics, and make it easier to provide custom messages for overflow checking, in preparation for re-enabling strncpy checking. llvm-svn: 133406
-
- Jun 17, 2011
-
-
John McCall authored
llvm-svn: 133246
-
- Jun 16, 2011
-
-
Jordy Rose authored
[analyzer] Clean up modeling of strcmp, including cases where a string literal has an embedded null character, and where both arguments are the same buffer. Also use nested ifs rather than early returns; in this case early returns will lose any assumptions we've made earlier in the function. llvm-svn: 133154
-
Jordy Rose authored
I will not commit without building first. I will not commit without building first. I will not commit without building first... llvm-svn: 133150
-
Jordy Rose authored
[analyzer] Cleanup: mainly 80-char violations and preferring SValBuilder::getComparisonType() to just referencing IntTy. llvm-svn: 133149
-
John McCall authored
Language-design credit goes to a lot of people, but I particularly want to single out Blaine Garst and Patrick Beard for their contributions. Compiler implementation credit goes to Argyrios, Doug, Fariborz, and myself, in no particular order. llvm-svn: 133103
-
- Jun 15, 2011
-
-
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
-
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
-
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
-
- Jun 14, 2011
-
-
Jordy Rose authored
[analyzer] CStringChecker checks functions in the C standard library, not C++. Its external name is now unix.experimental.CString. llvm-svn: 132958
-
Jordy Rose authored
llvm-svn: 132956
-
Jordy Rose authored
[analyzer] Fix modeling of strnlen to be more conservative. Move tests we can't properly model (yet?) to string-fail.c. llvm-svn: 132955
-
- Jun 10, 2011
-
-
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
-
- Jun 09, 2011
-
-
Jordy Rose authored
llvm-svn: 132762
-
- Jun 04, 2011
-
-
Jordy Rose authored
llvm-svn: 132618
-
Jordy Rose authored
[analyzer] Don't crash when copying an unknown number of bytes with memcpy(). Also handle all memcpy-family return values in evalCopyCommon(), rather than having some outside and some inside. llvm-svn: 132617
-
Jordy Rose authored
llvm-svn: 132614
-
Tanya Lattner authored
__builtin_astype(): Used to reinterpreted as another data type of the same size using for both scalar and vector data types. Added test case. llvm-svn: 132612
-
Jordy Rose authored
llvm-svn: 132608
-
Jordy Rose authored
llvm-svn: 132607
-
Jordy Rose authored
llvm-svn: 132605
-
- May 26, 2011
-
-
Ted Kremenek authored
llvm-svn: 132130
-
Ted Kremenek authored
static analyzer: when conservatively evaluating functions, don't invalidate the values of globals when the called function is strlen. llvm-svn: 132100
-
- May 25, 2011
-
-
Ted Kremenek authored
llvm-svn: 132049
-