- Jun 20, 2011
-
-
Fariborz Jahanian authored
(or follow up) extern declaration with weak_import as an actual definition. make clang follows this behavior. // rdar://9538608 llvm-gcc treats an extern declaration with weak_import llvm-svn: 133450
-
Douglas Gregor authored
llvm-svn: 133438
-
Douglas Gregor authored
llvm-svn: 133437
-
Jay Foad authored
Change PHINodes to store simple pointers to their incoming basic blocks, instead of full-blown Uses. Note that this loses an optimization in SplitCriticalEdge(), because we can no longer walk the use list of a BasicBlock to find phi nodes. See the comment I removed starting "However, the foreach loop is slow for blocks with lots of predecessors". Extend replaceAllUsesWith() on a BasicBlock to also update any phi nodes in the block's successors. This mimics what would have happened when PHINodes were proper Users of their incoming blocks. (Note that this only works if OldBB->replaceAllUsesWith(NewBB) is called when OldBB still has a terminator instruction, so it still has some successors.) llvm-svn: 133435
-
Chandler Carruth authored
types printed in various diagnostics. We could omit checking for the types, but that can mask errors where the wrong type is streamed into the diagnostic. There was at least one of these caught by this test already. llvm-svn: 133429
-
Chandler Carruth authored
pointers I found while working on the NULL arithmetic warning. We here always assuming the LHS was the pointer, instead of using the selected pointer expression. llvm-svn: 133428
-
Chandler Carruth authored
llvm-svn: 133426
-
Chandler Carruth authored
effectively that this abstraction simply doesn't exist. That is highlighted by the fact that by using it we were papering over a more serious error in this warning: the fact that we warned for *invalid* constructs involving member pointers and block pointers. I've fixed the obvious issues with the warning here, but this is confirming an original suspicion that this warning's implementation is flawed. I'm looking into how we can implement this more reasonably. WIP on that front. llvm-svn: 133425
-
Francois Pichet authored
llvm-svn: 133418
-
Francois Pichet authored
llvm-svn: 133417
-
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
-