| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
| |
llvm-svn: 150009
|
| |
|
|
| |
llvm-svn: 149998
|
| |
|
|
|
|
|
| |
(I was going to fix the TODO about DenseMap too, but
that would break self-host right now. See PR11922.)
llvm-svn: 149799
|
| |
|
|
|
|
|
|
| |
include.
Fix all the transitive include users.
llvm-svn: 149783
|
| |
|
|
|
|
| |
a builtin.
llvm-svn: 149657
|
| |
|
|
|
|
| |
doesn't suppress quite as many cases. Based off a testcase in the gcc testsuite.
llvm-svn: 149572
|
| |
|
|
|
|
|
|
|
|
|
| |
argument in strncat.
The warning is ignored by default since it needs more qualification.
TODO: The warning message and the note are messy when
strncat is a builtin due to the macro expansion.
llvm-svn: 149524
|
| |
|
|
|
|
| |
it doesn't feel like general solution.
llvm-svn: 149404
|
| |
|
|
| |
llvm-svn: 149394
|
| |
|
|
|
|
| |
<rdar://problem/10759934>. Apparently this is a common idiom in Linux (among other places).
llvm-svn: 149359
|
| |
|
|
| |
llvm-svn: 149358
|
| |
|
|
|
|
| |
As discussed at http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20120130/052200.html
llvm-svn: 149325
|
| |
|
|
|
|
|
|
|
| |
expansion.
This is to prevent diagnostic when using NSLocalizedString or CFCopyLocalizedString
macros which are usually used in place of NS and CF strings literals.
llvm-svn: 149268
|
| |
|
|
|
|
|
| |
- Remove the printf0 special handling as we treat it as printf anyway.
- Perform basic checks (non-literal, empty) for all formats and not only printf/scanf.
llvm-svn: 149236
|
| |
|
|
| |
llvm-svn: 149127
|
| |
|
|
|
|
|
|
| |
it might be reasonable in some cases, but it clearly doesn't make sense in some cases, like the included testcase.
<rdar://problem/10238797>, part 2.
llvm-svn: 149095
|
| |
|
|
|
|
| |
make the printed warning a bit more accurate. The new behavior matches gcc's -Wconversion. <rdar://problem/10238797>.
llvm-svn: 149089
|
| |
|
|
| |
llvm-svn: 148948
|
| |
|
|
| |
llvm-svn: 148890
|
| |
|
|
|
|
| |
appropriate.
llvm-svn: 148673
|
| |
|
|
|
|
|
|
| |
rely on property's type for its life-time to avoid
bogus warning with -Warc-unsafe-retained-assign.
// rdar://10694932
llvm-svn: 148355
|
| |
|
|
|
|
|
| |
PR 10274: format function attribute with the NSString archetype yields no compiler warnings
PR 10275: format function attribute isn't checked in Objective-C methods
llvm-svn: 148324
|
| |
|
|
|
|
| |
appropriate or when GCC requires it)
llvm-svn: 148292
|
| |
|
|
|
|
|
|
|
|
| |
for FunctionDecl::getMemoryFunctionKind().
This is a follow up on the Chris's review for r148142: We don't want to
pollute FunctionDecl with an extra enum. (To make this work, added
memcmp and family to the library builtins.)
llvm-svn: 148267
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Add atomic-to/from-nonatomic cast types
- Emit atomic operations for arithmetic on atomic types
- Emit non-atomic stores for initialisation of atomic types, but atomic stores and loads for every other store / load
- Add a __atomic_init() intrinsic which does a non-atomic store to an _Atomic() type. This is needed for the corresponding C11 stdatomic.h function.
- Enables the relevant __has_feature() checks. The feature isn't 100% complete yet, but it's done enough that we want people testing it.
Still to do:
- Make the arithmetic operations on atomic types (e.g. Atomic(int) foo = 1; foo++;) use the correct LLVM intrinsic if one exists, not a loop with a cmpxchg.
- Add a signal fence builtin
- Properly set the fenv state in atomic operations on floating point values
- Correctly handle things like _Atomic(_Complex double) which are too large for an atomic cmpxchg on some platforms (this requires working out what 'correctly' means in this context)
- Fix the many remaining corner cases
llvm-svn: 148242
|
| |
|
|
|
|
|
| |
memcmp, strncmp,..) out of Sema and into FunctionDecl so that the logic
could be reused in the analyzer.
llvm-svn: 148142
|
| |
|
|
|
|
| |
ownership of property sent to 'super'. // rdar://10640891
llvm-svn: 147868
|
| |
|
|
|
|
|
| |
Along the way, move a helper function from SemaChecking.cpp to a more
accessible home in SourceManager.
llvm-svn: 147692
|
| |
|
|
|
|
|
|
|
|
| |
address-of-label expressions. Add support to Evaluate and CGExprConstant for generating/handling them. Remove the special-case for such differences in Expr::isConstantInitializer.
With that done, remove a bunch of buggy code from CGExprConstant for handling scalar expressions which is no longer necessary.
Fixes PR11705.
llvm-svn: 147561
|
| |
|
|
|
|
| |
clients. No functionality change.
llvm-svn: 147318
|
| |
|
|
|
|
|
| |
might not be an rvalue when checking array accesses. Instead, pass through a
flag indicating the array index is negated.
llvm-svn: 146753
|
| |
|
|
|
|
|
|
|
| |
extension.
This fixes gcc.dg/format/c90-scanf-3.c and ext-4.c (test for excess
errors).
llvm-svn: 146649
|
| |
|
|
|
|
| |
in the case of a shifted bitfield. PR11572.
llvm-svn: 146634
|
| |
|
|
|
|
| |
MultiSource/Benchmarks/MiBench/security-rijndael; this gets most of it back.
llvm-svn: 146562
|
| |
|
|
|
|
| |
The motivation here is a "clever" implementation of strncmp(), which peels the first few comparisons via chained conditional expressions which ensure that the input arrays are known at compile time to be sufficiently large.
llvm-svn: 146430
|
| |
|
|
|
|
| |
and offer fixits when there is a mismatch.
llvm-svn: 146326
|
| |
|
|
|
|
| |
fixing the function-to-bool conversion warning.
llvm-svn: 146280
|
| |
|
|
|
|
| |
in addition to underlying type.
llvm-svn: 146254
|
| |
|
|
|
|
|
|
|
|
|
|
| |
in addition to underlying type.
For example, the warning for printf("%zu", 42.0);
changes from "conversion specifies type 'unsigned long'" to "conversion
specifies type 'size_t' (aka 'unsigned long')"
(This is a second attempt after r145697, which got reverted.)
llvm-svn: 146032
|
| |
|
|
|
|
|
|
|
|
| |
in the following code:
void test4(bool (&x)(void)) {
while (x);
}
llvm-svn: 145918
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
methods) to bool. E.g.
void foo() {}
if (f) { ... // <- Warns here.
}
Only applies to non-weak functions, and does not apply if the function address
is taken explicitly with the addr-of operator.
llvm-svn: 145849
|
| |
|
|
|
|
| |
lib/Analysis to lib/Sema which is cyclical.
llvm-svn: 145724
|
| |
|
|
|
|
|
|
| |
For example, the warning for printf("%zu", 42.0);
changes from "conversion specifies type 'unsigned long'" to "conversion
specifies type 'size_t' (aka 'unsigned long')"
llvm-svn: 145697
|
| |
|
|
|
|
|
|
| |
retain-cycle checking in -Warc-retain-cycles. This commonly
is hit by users using NSOperationQueue. Fixes <rdar://problem/10465721>.
llvm-svn: 145548
|
| |
|
|
|
|
| |
a 1-length character array.
llvm-svn: 145445
|
| |
|
|
| |
llvm-svn: 145421
|
| |
|
|
|
|
|
|
|
| |
consider the _<width> variants as well, which we'll see if we're
performing the type checking in a template instantiation where the
call expression itself was originally not type-dependent. Fixes
PR11411.
llvm-svn: 145248
|
| |
|
|
|
|
|
|
|
|
|
| |
The code for checking Neon builtin pointer argument types was assuming that
there would only be one pointer argument. But, for vld2-4 builtins, the first
argument is a special sret pointer where the result will be stored. So,
instead of scanning all the arguments to find a pointer, have TableGen figure
out the index of the pointer argument that needs checking. That's better than
scanning all the arguments regardless. <rdar://problem/10448804>
llvm-svn: 144834
|
| |
|
|
|
|
|
| |
literal types, as well as derived-to-base casts for lvalues and
derived-to-virtual-base casts.
llvm-svn: 144265
|
| |
|
|
|
|
|
| |
but it is sometimes useful to track blocks. Do so. Also
optimize the storage of these expressions.
llvm-svn: 144263
|