| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
| |
llvm-svn: 137780
|
| |
|
|
| |
llvm-svn: 137620
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
non-pointers is not very helpful. This patch will update the wording to be more helpful to users.
Old warning:
warning: use of NULL in arithmetic operation [-Wnull-arithmetic]
return 10 <= NULL;
^ ~~~~
New warning:
warning: comparison between NULL and non-pointer ('int' and NULL) [-Wnull-arithmetic]
return 10 <= NULL;
~~ ^ ~~~~
llvm-svn: 137377
|
| |
|
|
|
|
|
|
|
| |
ASTContext with accessors/mutators. The only functional change is that
the AST writer won't bother writing the id/Class/SEL redefinition type
if it hasn't been explicitly set; previously, it ended up being
written as a synonym for the built-in id/Class/SEL.
llvm-svn: 137349
|
| |
|
|
|
|
| |
duplication.
llvm-svn: 137259
|
| |
|
|
|
|
|
|
| |
in time when this assert was valid, but it's not valid now.
Also teach this code to correctly introduce function-to-pointer
decay.
llvm-svn: 137201
|
| |
|
|
|
|
| |
are explicit template args.
llvm-svn: 137054
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
case situations with the unary operators & and *. Also extend the array bounds
checking to work with pointer arithmetic; the pointer arithemtic checking can
be turned on using -Warray-bounds-pointer-arithmetic.
The changes to where CheckArrayAccess gets called is based on some trial &
error and a bunch of digging through source code and gdb backtraces in order
to have the check performed under as many situations as possible (such as for
variable initializers, arguments to function calls, and within conditional in
addition to the simpler cases of the operands to binary and unary operator)
while not being called--and triggering warnings--more than once for a given
ArraySubscriptExpr.
llvm-svn: 136997
|
| |
|
|
|
|
| |
functions when performing function overload resolution.
llvm-svn: 136948
|
| |
|
|
|
|
|
|
|
| |
when performing typo correction involving any overloaded template functions.
The added test cases, while currently demontrating sub-optimal behavior, will
not trigger any messages without the 1-line change to SemaExpr.cpp.
llvm-svn: 136943
|
| |
|
|
|
|
|
|
| |
Change TypoCorrection to store a set of NamedDecls instead of a single
NamedDecl. Also add initial support for performing function overload
resolution to Sema::DiagnoseEmptyLookup.
llvm-svn: 136807
|
| |
|
|
|
|
| |
No functional change.
llvm-svn: 136678
|
| |
|
|
|
|
|
| |
appropriate sentinel at the end of the argument list. Also, put the
sentinel warnings under -Wsentinel. Fixes <rdar://problem/8764236>.
llvm-svn: 136566
|
| |
|
|
|
|
|
|
| |
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
|