| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
checking trivial comparisons. Fixes PR8795.
llvm-svn: 122322
|
|
|
|
|
|
|
|
|
|
|
|
| |
Diagnostic pragmas are broken because we don't keep track of the diagnostic state changes and we only check the current/latest state.
Problems manifest if a diagnostic is emitted for a source line that has different diagnostic state than the current state; this can affect
a lot of places, like C++ inline methods, template instantiations, the lexer, etc.
Fix the issue by having the Diagnostic object keep track of the source location of the pragmas so that it is able to know what is the diagnostic state at any given source location.
Fixes rdar://8365684.
llvm-svn: 121873
|
|
|
|
|
|
|
|
| |
Most Neon shift intrinsics do not have variants for polynomial types, but
vsri_n and vsli_n do support them, and we need to properly range-check the
shift immediates for them.
llvm-svn: 121509
|
|
|
|
|
|
|
|
| |
zextOrTrunc(), and APSInt methods extend(), extOrTrunc() and new method
trunc(), to be const and to return a new value instead of modifying the
object in place.
llvm-svn: 121121
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
not actually frequently used, because ImpCastExprToType only creates a node
if the types differ. So explicitly create an ICE in the lvalue-to-rvalue
conversion code in DefaultFunctionArrayLvalueConversion() as well as several
other new places, and consistently deal with the consequences throughout the
compiler.
In addition, introduce a new cast kind for loading an ObjCProperty l-value,
and make sure we emit those nodes whenever an ObjCProperty l-value appears
that's not on the LHS of an assignment operator.
This breaks a couple of rewriter tests, which I've x-failed until future
development occurs on the rewriter.
Ted Kremenek kindly contributed the analyzer workarounds in this patch.
llvm-svn: 120890
|
|
|
|
|
|
|
|
|
|
|
|
| |
label addresses or references to temporaries, e.g:
const int& g2() {
int s1;
int &s2 = s1; // expected-note {{binding reference variable 's2' here}}
return s2; // expected-warning {{reference to stack memory associated with local variable 's1' returned}}
}
llvm-svn: 120483
|
|
|
|
|
|
| |
hit when self-host.
llvm-svn: 120351
|
|
|
|
|
|
| |
The issue was brought to our attention by Matthieu Monrocq.
llvm-svn: 120331
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
store it on the expression node. Also store an "object kind",
which distinguishes ordinary "addressed" l-values (like
variable references and pointer dereferences) and bitfield,
@property, and vector-component l-values.
Currently we're not using these for much, but I aim to switch
pretty much everything calculating l-valueness over to them.
For now they shouldn't necessarily be trusted.
llvm-svn: 119685
|
|
|
|
|
|
|
|
| |
no longer depends on Preprocessor, so we can move it out of Sema into
a nice new StringLiteral::getLocationOfByte method that can be used by
any AST client.
llvm-svn: 119481
|
|
|
|
|
|
| |
possible to create one without a preprocessor.
llvm-svn: 119476
|
|
|
|
| |
llvm-svn: 119471
|
|
|
|
| |
llvm-svn: 119470
|
|
|
|
|
|
| |
pushing the dependency on the preprocessor out a bit.
llvm-svn: 119468
|
|
|
|
|
|
|
|
|
|
|
|
| |
producing warnings.
This feels really fragile, and I've not audited all other argument index-based
warnings. I suspect we'll grow this bug on another warning eventually. It might
be nice to adjust the argument indices when building up the attribute AST node,
as we already have to remember about the 'this' argument within that code to
produce correct errors.
llvm-svn: 119340
|
|
|
|
| |
llvm-svn: 119331
|
|
|
|
| |
llvm-svn: 119138
|
|
|
|
|
|
|
| |
uncoerced value. Also, whitelist bool bitfields, which aren't
really a truncation.
llvm-svn: 118778
|
|
|
|
|
|
| |
rdar://problem/8652606
llvm-svn: 118773
|
|
|
|
|
|
|
|
|
|
|
| |
of the enumerators rather than the actual expressible range. This is
great when dealing with opaque *values* of that type, but when computing
the range of the type for purposes of converting *into* it, it produces
warnings in cases we don't care about (e.g. enum_t x = 500;). Divide
the logic into these two cases and use the more conservative range for
targets.
llvm-svn: 118735
|
|
|
|
|
|
|
|
|
| |
NEON vector types need to be mangled in a special way to comply with ARM's ABI,
similar to some of the AltiVec-specific vector types. This patch is mostly
just renaming a bunch of "AltiVecSpecific" things, since they will no longer
be specific to AltiVec. Besides that, it just adds the new "NeonVector" enum.
llvm-svn: 118724
|
|
|
|
|
|
|
| |
a positive value into a signed bitfield of the exact width of
the value.
llvm-svn: 118657
|
|
|
|
|
|
|
|
| |
bitfield assignment.
Implements rdar://problem/7809123
llvm-svn: 118647
|
|
|
|
|
|
|
|
|
|
|
| |
own subcategory, -Wconstant-conversion, which is on by default.
Tweak the constant folder to give better results in the invalid
case of a negative shift amount.
Implements rdar://problem/6792488
llvm-svn: 118636
|
|
|
|
| |
llvm-svn: 117942
|
|
|
|
|
|
|
| |
variable, handle conditional operators involving a
throw-expression. Fixes GCC DejaGNU's g++.dg/template/cond4.C.
llvm-svn: 117027
|
|
|
|
|
|
|
|
|
|
| |
it was really a 'char'
or a 'short'. This fixes that and allows the hints to suggest 'h' modifiers for small ints.
Patch by Justin Bogner!
llvm-svn: 116996
|
|
|
|
| |
llvm-svn: 116317
|
|
|
|
|
|
| |
to white-list conversions required by system headers. rdar://problem/8232669
llvm-svn: 116029
|
|
|
|
|
|
|
|
| |
'default:' was intended to break out of the while loop).
Fixes rdar://8518859&8520617.
llvm-svn: 115985
|
|
|
|
|
|
| |
of an enum value.
llvm-svn: 115725
|
|
|
|
| |
llvm-svn: 115382
|
|
|
|
| |
llvm-svn: 115381
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For example, on:
#include <emmintrin.h>
int foo(int N) {
__m128i white2;
white2 = _mm_slli_si128(white2, N);
return 0;
}
we used to get:
fatal error: error in backend: Cannot yet select: intrinsic %llvm.x86.sse2.psll.dq
now we get:
/Users/sabre/t.c:4:11: error: argument to '__builtin_ia32_pslldqi128' must be a
constant integer
white2 = _mm_slli_si128(white2, N);
^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /Users/sabre/t.c:1:
/Volumes/Projects/cvs/llvm/Debug+Asserts/lib/clang/2.9/include/emmintrin.h:781:13: note: instantiated from:
((__m128i)__builtin_ia32_pslldqi128((__m128i)(VEC), (IMM)*8))
^ ~~~~~~~
1 error generated.
llvm-svn: 115374
|
|
|
|
|
|
|
|
|
| |
warning if the zero value was an
enum or was expanded from a macro.
Fixes: <rdar://problem/8414119>
llvm-svn: 114695
|
|
|
|
| |
llvm-svn: 114209
|
|
|
|
|
|
| |
(one for 'scanf' and one for 'printf'). Fixes <rdar://problem/8409437>.
llvm-svn: 113472
|
|
|
|
|
|
|
|
| |
-Wformat-nonliteral, as
the function processing the format string can decided whether or not to accept a null format string (e.g., asl_log). Fixes <rdar://problem/8269537>.
llvm-svn: 113469
|
|
|
|
|
|
|
|
| |
the expression
and trying again.
llvm-svn: 113468
|
|
|
|
|
|
| |
instead of asserting in IRGen. Fixes radar 8390459.
llvm-svn: 113253
|
|
|
|
|
|
| |
themselves are references. (Fixes PR 7999; fix by Chandler Carruth).
llvm-svn: 112792
|
|
|
|
|
|
|
| |
Clients of Sema don't need to know (for example) the list of diagnostics we
support.
llvm-svn: 112093
|
|
|
|
|
|
| |
to the new constants.
llvm-svn: 112047
|
|
|
|
| |
llvm-svn: 112044
|
|
|
|
| |
llvm-svn: 112038
|
|
|
|
| |
llvm-svn: 112032
|
|
|
|
|
|
| |
compatible argument). Fixes PR 7981.
llvm-svn: 111978
|
|
|
|
|
|
|
| |
M-x query-replace-regexp
\(Sema::\|Action::\|Parser::\|\)Owning\(Expr\|Stmt\)Result -> \2Result
llvm-svn: 111903
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Now all classes derived from Attr are generated from TableGen.
Additionally, Attr* is no longer its own linked list; SmallVectors or
Attr* are used. The accompanying LLVM commit contains the updates to
TableGen necessary for this.
Some other notes about newly-generated attribute classes:
- The constructor arguments are a SourceLocation and a Context&,
followed by the attributes arguments in the order that they were
defined in Attr.td
- Every argument in Attr.td has an appropriate accessor named getFoo,
and there are sometimes a few extra ones (such as to get the length
of a variadic argument).
Additionally, specific_attr_iterator has been introduced, which will
iterate over an AttrVec, but only over attributes of a certain type. It
can be accessed through either Decl::specific_attr_begin/end or
the global functions of the same name.
llvm-svn: 111455
|
|
|
|
|
|
| |
and remove getStrData(). Patch by Peter Davies (with some tweaks).
llvm-svn: 111229
|