- Jun 20, 2011
-
-
Chris Lattner authored
ConvertType on InitListExprs as they are being converted. This is needed for a forthcoming patch, and improves the IR generated anyway (see additional type names in testcases). This patch also converts a bunch of std::vector's in CGObjCMac to use C arrays. There are a ton more that should be converted as well. llvm-svn: 133413
-
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
-
Chandler Carruth authored
This makes 'isPointerLikeType' a little less confusing, and pulls the decay check into a separate interface that is much more clear and concrete. Also, just implement these as logical wrappers around other predicates. Having a switch based implementation isn't likely to be necessary. We can try to optimize them later if they show up on a profile. llvm-svn: 133405
-
- Jun 19, 2011
-
-
John McCall authored
llvm-svn: 133387
-
John McCall authored
llvm-svn: 133386
-
John McCall authored
llvm-svn: 133385
-
Chandler Carruth authored
false positives, including those in the GCC test suite, and don't warn about them. Let me know if this causes fallout, we can turn it back off if needed. llvm-svn: 133384
-
Chandler Carruth authored
Trieu, and fix them by checking for array and function types as well as pointer types. I've added a predicate method on Type to bundle together the logic we're using here: isPointerLikeType(). I'd welcome better names for this predicate, this is the best I came up with. It's implemented as a switch to be a touch lighter weight than all the chained isa<...> casts that would result otherwise. llvm-svn: 133383
-
Francois Pichet authored
Fixes PR10154. Found by parsing MFC 2010 code with clang. llvm-svn: 133380
-
Francois Pichet authored
llvm-svn: 133372
-
Chris Lattner authored
llvm-svn: 133365
-
- Jun 18, 2011
-
-
Benjamin Kramer authored
llvm-svn: 133346
-
Benjamin Kramer authored
llvm-svn: 133345
-
Chandler Carruth authored
edge has been broken. llvm-svn: 133343
-
NAKAMURA Takumi authored
llvm-svn: 133342
-
John McCall authored
where mismatched semantics can cause undefined behavior. llvm-svn: 133341
-
John McCall authored
specifying that retain/release/autorelease/retainCount are forbidden, plus a section talking about the behavior of dealloc. llvm-svn: 133340
-
Chandler Carruth authored
deducing template parameter types. Recently Clang began enforcing the more strict checking that the argument type and the deduced function parameter type (after substitution) match, but that only consideres qualification conversions. One problem with this patch is that we check noreturn conversions and qualification conversions independently. If a valid conversion would require *both*, perhaps interleaved with each other, it will be rejected. If this actually occurs (I'm not yet sure it does) and is in fact a problem (I'm not yet sure it is), there is a FIXME to implement more intelligent conversion checking. However, this step at least allows Clang to resume accepting valid code we're seeing in the wild. llvm-svn: 133327
-
Argyrios Kyrtzidis authored
[arcmt] Fix the ARC migrator. -arcmt-modify requires running before the initialization of SourceManager because it is going to modify the input file. llvm-svn: 133323
-
Argyrios Kyrtzidis authored
llvm-svn: 133322
-
Argyrios Kyrtzidis authored
llvm-svn: 133315
-
-
Douglas Gregor authored
silently dropped ownership qualifiers that were being applied to ownership-qualified, substituted type that was *not* a substituted template type parameter. We now provide a diagnostic in such cases, and recover by dropping the added qualifiers. Document this behavior in the ARC specification. llvm-svn: 133309
-
Douglas Gregor authored
qualifiers, so that an __unsafe_unretained-qualified type T in ARC code will have the same mangling as T in non-ARC code, improving ABI interoperability. This works now because we infer or require a lifetime qualifier everywhere one can appear in an external interface. Another part of <rdar://problem/9595486>. llvm-svn: 133306
-
Douglas Gregor authored
llvm-svn: 133304
-
Douglas Gregor authored
ownership-unqualified retainable object type as __strong. This allows us to write, e.g., std::vector<id> and we'll infer that the vector's element types have __strong ownership semantics, which is far nicer than requiring: std::vector<__strong id> Note that we allow one to override the ownership qualifier of a substituted template type parameter, e.g., given template<typename T> struct X { typedef __weak T type; }; X<id> is treated the same as X<__strong id>. At instantiation type, the __weak in "__weak T" overrides the (inferred or specified) __strong on the template argument type, so that we can still provide metaprogramming transformations. This is part of <rdar://problem/9595486>. llvm-svn: 133303
-
- Jun 17, 2011
-
-
John McCall authored
llvm-svn: 133300
-
John McCall authored
__bridge_retain as a synonym for __bridge_retained. llvm-svn: 133295
-
Eli Friedman authored
Add a minor hack to avoid using isNullPointerConstant on a hot path. Fixes -O0 compile-time regressions from r133196. rdar://9629775 . llvm-svn: 133290
-
Richard Trieu authored
Put the new warning from revision 133196 on NULL arithmetic behind the flag -Wnull-arthimetic and set to DefaultIgnore. A few edge cases need to be worked out before this can be set to default. llvm-svn: 133287
-
-
Douglas Gregor authored
llvm-svn: 133263
-
Eric Christopher authored
llvm-svn: 133262
-
Douglas Gregor authored
separate aggregate temporary and then memcpy it over to the destination. This fixes a regression I introduced with r133235, where the compound literal on the RHS of an assignment makes use of the structure on the LHS of the assignment. I'm deeply suspicious of AggExprEmitter::VisitBinAssign()'s optimization where it emits the RHS of an aggregate assignment directly into the LHS lvalue without checking whether there is any aliasing between the LHS/RHS. However, I'm not in a position to revisit this now. Big thanks to Eli for finding the regression! llvm-svn: 133261
-
Douglas Gregor authored
llvm-svn: 133257
-
John McCall authored
static initializer check, as required by the Itanium ABI. llvm-svn: 133250
-
John McCall authored
llvm-svn: 133246
-
John McCall authored
they should still be officially __strong for the purposes of errors, block capture, etc. Make a new bit on variables, isARCPseudoStrong(), and set this for 'self' and these enumeration-loop variables. Change the code that was looking for the old patterns to look for this bit, and change IR generation to find this bit and treat the resulting variable as __unsafe_unretained for the purposes of init/destroy in the two places it can come up. llvm-svn: 133243
-