| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
reasonably well except for the problem that @catches are nested within
each other in the AST, giving the ugly diagnostics in L8.
llvm-svn: 69477
|
| |
|
|
|
|
|
|
|
| |
statements don't end up in the LabelMap so we don't have a quick way
to filter them. We could add state to Sema (a "has vla" and "has
jump" bit) to try to filter this out, but that would be sort of gross
and I'm not convinced it is the best way. Thoughts welcome.
llvm-svn: 69476
|
| |
|
|
| |
llvm-svn: 69471
|
| |
|
|
|
|
| |
"Type Info" parameter. The type info parameter knows how to iterate over its arguments.
llvm-svn: 69469
|
| |
|
|
|
|
| |
This fixes a crash on invalid (test10). rdar://6805469
llvm-svn: 69465
|
| |
|
|
|
|
|
|
| |
call ActOnBlockError so that CurBlock gets popped. This
fixes a crash on test/block-syntax-error.c when this new
assertion is enabled.
llvm-svn: 69464
|
| |
|
|
|
|
|
| |
so that clients can't poke the function-local one when they really
want the current block label. No functionality change.
llvm-svn: 69463
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
specific bad case instead of on the switch. Putting it on the
switch means you don't know what case is the problem. For
example:
scope-check.c:54:3: error: illegal switch case into protected scope
case 2:
^
scope-check.c:53:9: note: jump bypasses initialization of variable length array
int a[x];
^
llvm-svn: 69462
|
| |
|
|
| |
llvm-svn: 69461
|
| |
|
|
|
|
|
| |
to create a well formed AST instead of a dangling pointer. This resolves
several fixme's.
llvm-svn: 69459
|
| |
|
|
|
|
|
|
| |
int8_t and games it with strange *_defined macros. Emulate its weirdness
for better compatibility with linux etc. Problem pointed out by anders
johnson.
llvm-svn: 69458
|
| |
|
|
|
|
|
| |
as decimal, even if it starts with 0. Also, since things like 0x1 are
completely illegal, don't even bother using numericliteralparser for them.
llvm-svn: 69454
|
| |
|
|
| |
llvm-svn: 69449
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
produce better diagnostics, and be more correct in ObjC cases (fixing
rdar://6803963).
An example is that we now diagnose:
int test1(int x) {
goto L;
int a[x];
int b[x];
L:
return sizeof a;
}
with:
scope-check.c:15:3: error: illegal goto into protected scope
goto L;
^
scope-check.c:17:7: note: scope created by variable length array
int b[x];
^
scope-check.c:16:7: note: scope created by variable length array
int a[x];
^
instead of just saying "invalid jump". An ObjC example is:
void test1() {
goto L;
@try {
L: ;
} @finally {
}
}
t.m:6:3: error: illegal goto into protected scope
goto L;
^
t.m:7:3: note: scope created by @try block
@try {
^
There are a whole ton of fixme's for stuff to do, but I believe that this
is a monotonic improvement over what we had.
llvm-svn: 69437
|
| |
|
|
|
|
| |
- <rdar://problem/6803995>
llvm-svn: 69435
|
| |
|
|
|
|
| |
into the wrong section (they shared the same lookup table).
llvm-svn: 69433
|
| |
|
|
|
|
| |
within it.
llvm-svn: 69431
|
| |
|
|
|
|
|
| |
add some comments, change type from void* -> Stmt*, use
smallvector instead of vector.
llvm-svn: 69430
|
| |
|
|
| |
llvm-svn: 69429
|
| |
|
|
| |
llvm-svn: 69428
|
| |
|
|
| |
llvm-svn: 69423
|
| |
|
|
| |
llvm-svn: 69422
|
| |
|
|
|
|
|
|
| |
AST context's __builtin_va_list type will be set when the PCH file is
loaded. This fixes the crash when CodeGen'ing a va_arg expression
pulled in from a PCH file.
llvm-svn: 69421
|
| |
|
|
| |
llvm-svn: 69415
|
| |
|
|
| |
llvm-svn: 69413
|
| |
|
|
|
|
|
|
|
| |
Highlights: PP::isNextPPTokenLParen() no longer eats the (
when present. We now simplify slightly the logic parsing
macro arguments. We now handle PR3937 and other related cases
correctly.
llvm-svn: 69411
|
| |
|
|
| |
llvm-svn: 69410
|
| |
|
|
|
|
|
|
|
|
| |
"Hello, World!", this takes us from deserializing 6469
statements/expressions down to deserializing 1
statement/expression. It only translated into a 1% improvement on the
Carbon-prefixed 403.gcc, but (a) it's the right thing to do, and (b)
we expect this to matter more once we lazily deserialize identifiers.
llvm-svn: 69407
|
| |
|
|
|
|
|
|
| |
lazy PCH deserialization. Propagate that argument wherever it needs to
be. No functionality change, except that I've tightened up a few PCH
tests in preparation.
llvm-svn: 69406
|
| |
|
|
|
|
| |
on the code.
llvm-svn: 69404
|
| |
|
|
| |
llvm-svn: 69403
|
| |
|
|
| |
llvm-svn: 69401
|
| |
|
|
|
|
|
| |
from a PCH file. It turns out that "Hello, World!" is bringing in 19%
of all of the statements in Carbon.h, so we need to be lazy.
llvm-svn: 69393
|
| |
|
|
|
|
| |
rdar://6800430
llvm-svn: 69392
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
1. We had logic in sema to decide whether or not to emit the error
based on manually checking whether in a system header file.
2. we were allowing redefinitions of typedefs in class scope in C++
if in header file.
3. there was no way to force typedef redefinitions to be accepted
by the C compiler, which annoys me when stripping linemarkers out
of .i files.
The fix is to split the C++ class typedef redefinition path from the
C path, and change the C path to be a warning that normally maps to
error. This causes it to properly be ignored in system headers,
etc. and gives us a way to control it. Passing
-Wtypedef-redefinition now turns the error into a warning.
One behavior change is that we now diagnose cases where you redefine
a typedef in your .c file that was defined in a header file. This
seems like reasonable behavior, and the diagnostic now indicates that
it can be controlled with -Wtypedef-redefinition.
llvm-svn: 69391
|
| |
|
|
|
|
|
|
|
| |
1) Accidentally used delete [] on an array of statements that was allocated with ASTContext's allocator
2) Deserialization of names with multiple declarations (e.g., a struct and a function) used the wrong mangling constant, causing it to view declaration IDs as Decl*s.
403.gcc builds and links properly.
llvm-svn: 69390
|
| |
|
|
| |
llvm-svn: 69389
|
| |
|
|
|
|
| |
no-dead-strip set on them).
llvm-svn: 69388
|
| |
|
|
| |
llvm-svn: 69387
|
| |
|
|
|
|
|
| |
This completes support for all of C (+ extensions). We can (again)
build a PCH file for Carbon.h.
llvm-svn: 69385
|
| |
|
|
| |
llvm-svn: 69379
|
| |
|
|
|
|
| |
a BlockDeclRefExpr
llvm-svn: 69376
|
| |
|
|
|
|
|
| |
a dummy *function* type when it is recovering and knows it needs
a function. rdar://6802350 - clang crash on invalid input
llvm-svn: 69374
|
| |
|
|
| |
llvm-svn: 69373
|
| |
|
|
| |
llvm-svn: 69370
|
| |
|
|
| |
llvm-svn: 69369
|
| |
|
|
| |
llvm-svn: 69364
|
| |
|
|
| |
llvm-svn: 69362
|
| |
|
|
|
|
|
| |
the functional change here is changing ConvertType -> ConvertTypeForMem
so that we handle i1 fields properly as memory.
llvm-svn: 69361
|
| |
|
|
| |
llvm-svn: 69360
|