| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
| |
special diagnostic for ARC ownership-qualified types. We wouldn't want
to expose Objective-C programmers to the term "POD", would we? Fixes
<rdar://problem/9772982>.
llvm-svn: 136558
|
|
|
|
|
|
|
| |
the callee note diagnostic was not emitted in the case where
there were too few arguments.
llvm-svn: 136437
|
|
|
|
| |
llvm-svn: 136379
|
|
|
|
| |
llvm-svn: 136210
|
|
|
|
| |
llvm-svn: 136113
|
|
|
|
|
|
|
|
|
| |
and to work with pointer arithmetic in addition to array indexing.
The new pointer arithmetic porition of the array bounds checking can be
turned on by -Warray-bounds-pointer-arithmetic (and is off by default).
llvm-svn: 136046
|
|
|
|
| |
llvm-svn: 136044
|
|
|
|
|
|
|
|
| |
LLVM.h imports
them into the clang namespace.
llvm-svn: 135852
|
|
|
|
|
|
| |
Test cases provided by Anton Lokhmot.
llvm-svn: 135322
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
instantiations. Upon instantiation of template, value-dependent parameters are replaced by equivalent literals, so code like:
template<unsigned int A, unsigned int B> struct S {
int foo() {
int x = A && B;
}
}
will not warn on A && B on every instantiation. This will still warn on other cases inside templates, which will be caught on checking the template definition.
llvm-svn: 135222
|
|
|
|
|
|
|
|
|
|
| |
__unknown_anytype, and rewrite such message sends correctly.
I had to bite the bullet and actually add a debugger support mode for this
one, which is a bit unfortunate, but there really isn't anything else
I could imagine doing; this is clearly just debugger-specific behavior.
llvm-svn: 135051
|
|
|
|
|
|
|
| |
implicit ivar accesses to go through the 'self' variable
rather than the real 'self' for the method. // rdar://9730771
llvm-svn: 134992
|
|
|
|
|
|
| |
Found by valgrind.
llvm-svn: 134983
|
|
|
|
|
|
|
| |
It would be cool if we could do overload resolution to suggest
the right function, but at least this fixes the crashing.
llvm-svn: 134976
|
|
|
|
|
|
| |
behavior. PR10201.
llvm-svn: 134926
|
|
|
|
|
|
|
|
| |
require destruction and there is possibility of that without
construction. Thanks Johnm for review and suggestions offline.
// rdar://9535237.
llvm-svn: 134906
|
|
|
|
|
|
| |
object to a __weak object type. // rdar://9732636
llvm-svn: 134706
|
|
|
|
|
|
|
| |
object to a __weak object/type. // rdar://9732636.
One item is yet todo.
llvm-svn: 134655
|
|
|
|
|
|
|
| |
object to a __weak object/type. // rdar://9732636.
This is objc side of things. objc++ side tbd.
llvm-svn: 134624
|
|
|
|
|
|
|
|
|
|
|
|
| |
ownership, if the
cast type has no ownership specified, implicitly "transfer" the ownership of the cast'ed type
to the cast type:
id x;
(NSString**)&x; // Casting as (__strong NSString**).
llvm-svn: 134275
|
|
|
|
|
|
|
|
|
| |
newly introduced Sema::BuildVectorLiteral.
-Make Sema::ActOnCastExpr handle a vector initializer both when the cast'ed expression
is a ParenListExpr and when it is a ParenExpr.
-Ultimately make Sema::ActOnParenOrParenListExpr independent of what the cast type was.
llvm-svn: 134274
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
vector<int>
to
std::vector<int>
Patch by Kaelyn Uhrain, with minor tweaks + PCH support from me. Fixes
PR5776/<rdar://problem/8652971>.
Thanks Kaelyn!
llvm-svn: 134007
|
|
|
|
|
|
| |
a pointer to void.
llvm-svn: 133912
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
arithmetic into a couple of common routines. Use these to make the
messages more consistent in the various contexts, especially in terms of
consistently diagnosing binary operators with invalid types on both the
left- and right-hand side. Also, improve the grammar and wording of the
messages some, handling both two pointers and two (different) types.
The wording of function pointer arithmetic diagnostics still strikes me
as poorly phrased, and I worry this makes them slightly more awkward if
more consistent. I'm hoping to fix that with a follow-on patch and test
case that will also make them more helpful when a typedef or template
type parameter makes the type completely opaque.
Suggestions on better wording are very welcome, thanks to Richard Smith
for some initial help on that front.
llvm-svn: 133906
|
|
|
|
|
|
| |
objects. // rdar://9495837
llvm-svn: 133806
|
|
|
|
|
|
|
|
| |
'ownership', not 'lifetime'.
rdar://9477613.
llvm-svn: 133779
|
|
|
|
|
|
|
|
| |
expression into the LHS of a compound assignment. Fixes compound assignment of various "compatible" vector types, including NEON-vector and gcc-vector types.
<rdar://problem/9640356>
llvm-svn: 133737
|
|
|
|
|
|
|
|
|
| |
and into a new file, SemaExprMember.cpp, bringing SemaExpr.cpp just
under 10,000 lines of code (ugh). No functionality change, although I
intend to do some refactoring of this code to address PR8368 at some
point in the "near" future.
llvm-svn: 133674
|
|
|
|
|
|
|
| |
Sema::CreateUnaryExprOrTypeTraitExpr() rather than recursing in some
cases. Fixes <rdar://problem/9659191>.
llvm-svn: 133663
|
|
|
|
|
|
|
| |
Removes dead code found in the process.
Adds a test to verify that ParenListExprs do not have NULL types.
llvm-svn: 133637
|
|
|
|
|
|
|
| |
issues between a bitwise operator and a comparison operator. Fixes
<rdar://problem/9637759>.
llvm-svn: 133630
|
|
|
|
|
|
|
| |
operators. There is a consistent design of having the "silence the
warning" option first.
llvm-svn: 133570
|
|
|
|
|
|
|
|
| |
of: a + b ? x : y. In our testing of this flag we've yet to hit a single
case where the existing precedence was correct, so we should suggest
grouping the ?: first.
llvm-svn: 133526
|
|
|
|
|
|
| |
use the deprecated forms of llvm::StringMap::GetOrCreateValue().
llvm-svn: 133515
|
|
|
|
|
|
| |
Patch by Henry Mason with tweaks by me.
llvm-svn: 133453
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
-O0 compile-time regressions from r133196.
rdar://9629775 .
llvm-svn: 133290
|
|
|
|
| |
llvm-svn: 133264
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
C++, which means:
- binding the temporary as needed in Sema, so that we generate the
appropriate call to the destructor, and
- emitting the compound literal into the appropriate location for
the aggregate, rather than trying to emit it as a temporary and
memcpy() it.
Fixes PR10138 / <rdar://problem/9615901>.
llvm-svn: 133235
|
|
|
|
|
|
| |
through an ellipsis. Fixes <rdar://problem/9623945>.
llvm-svn: 133219
|
|
|
|
|
|
|
|
| |
The warning will fire on cases such as:
int x = 1 + NULL;
llvm-svn: 133196
|
|
|
|
|
|
| |
constants. Fixes PR10145.
llvm-svn: 133179
|
|
|
|
|
|
| |
null at any time. // rdar://9612030
llvm-svn: 133168
|
|
|
|
|
|
|
|
|
|
| |
be more consistent in how parenthesized ranges which hit macros are
handled. Also makes the code significantly shorter, and the diagnostics
when macros are present a bit more useful.
Pair programmed w/ Matthew.
llvm-svn: 133122
|
|
|
|
| |
llvm-svn: 133120
|
|
|
|
|
|
|
|
|
|
| |
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
|