| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
calling into the jump checker when a function or method is known to contain
no VLAs or @try blocks.
llvm-svn: 69509
|
|
|
|
|
|
| |
already too large.
llvm-svn: 69505
|
|
|
|
| |
llvm-svn: 69500
|
|
|
|
|
|
| |
address taken labels are in function scope
llvm-svn: 69499
|
|
|
|
| |
llvm-svn: 69498
|
|
|
|
| |
llvm-svn: 69497
|
|
|
|
|
|
| |
VLA's and statement expressions.
llvm-svn: 69491
|
|
|
|
| |
llvm-svn: 69487
|
|
|
|
|
|
|
| |
the scope checker to not think @catches are nested in each other, eliminating
some bogus notes.
llvm-svn: 69486
|
|
|
|
| |
llvm-svn: 69480
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
within it.
llvm-svn: 69431
|
|
|
|
|
|
|
| |
add some comments, change type from void* -> Stmt*, use
smallvector instead of vector.
llvm-svn: 69430
|
|
|
|
| |
llvm-svn: 69429
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
a dummy *function* type when it is recovering and knows it needs
a function. rdar://6802350 - clang crash on invalid input
llvm-svn: 69374
|
|
|
|
|
|
| |
Add a few commented lines to the test case that point out things that don't work yet.
llvm-svn: 69354
|
|
|
|
| |
llvm-svn: 69345
|
|
|
|
|
|
|
| |
expressions that can be of static duration to be returned.
Radar 6786551
llvm-svn: 69331
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
will now make an implicit CXXTemporaryObjectExpr. So
struct S {
S();
};
void f() {
S s;
}
's' here will implicitly be declared as.
S s = S();
llvm-svn: 69326
|
|
|
|
|
|
|
|
|
|
|
| |
conversion constructors.
Remove an atrocious amount of trailing whitespace in the overloaded operator mangler. Sorry, couldn't help myself.
Change the DeclType parameter of Sema::CheckReferenceInit to be passed by value instead of reference. It wasn't changed anywhere.
Let the parser handle C++'s irregular grammar around assignment-expression and conditional-expression.
And finally, the reason for all this stuff: implement C++ semantics for the conditional operator. The implementation is complete except for determining lvalueness.
llvm-svn: 69299
|
|
|
|
|
|
| |
Douglas, can you check that this is doing the right thing?
llvm-svn: 69298
|
|
|
|
|
|
| |
that it's a valid init. Instead, just set it as the VarDecl's initializer.
llvm-svn: 69292
|
|
|
|
|
|
| |
default2.cpp to fail.
llvm-svn: 69267
|
|
|
|
|
|
| |
is about to become private.
llvm-svn: 69262
|
|
|
|
| |
llvm-svn: 69245
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
for example:
struct X {
X(int, int);
};
X x(10, 10);
we model that as
X x = X(10, 10);
inserting a temporary object expr.
llvm-svn: 69227
|
|
|
|
|
|
| |
- Also, fixed one to actually be one (instead of zero). :)
llvm-svn: 69226
|
|
|
|
|
|
| |
Teach Sema::SemaBuiltinVAStart() about blocks.
llvm-svn: 69201
|
|
|
|
|
|
|
|
| |
gen. issue for property in continuation class declared readwrite
but which did not generate the declaration for the setter. Fix also
removed a FIXME and resulted in code cleanup.
llvm-svn: 69200
|
|
|
|
|
|
| |
feedback from Eli).
llvm-svn: 69184
|
|
|
|
| |
llvm-svn: 69178
|
|
|
|
|
|
| |
not correct for __private_extern__.
llvm-svn: 69167
|
|
|
|
|
|
|
|
|
|
|
|
| |
jump diagnostic.
caused by: <rdar://problem/6252084> [sema] jumps into Obj-C exception blocks should be disallowed.
Sema::RecursiveCalcLabelScopes() and Sema::RecursiveCalcJumpScopes() need to pop the ScopeStack within the statement iteration loop (was outside the loop).
Eli, please review (thanks).
llvm-svn: 69165
|
|
|
|
|
|
| |
anonymous structs or unions. Fixes PR3778.
llvm-svn: 69153
|
|
|
|
|
|
| |
to using designator indices. No functionality change.
llvm-svn: 69147
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Strip off extra parens when looking for casts.
- Change the location info to point at the cast (instead of the
assignment).
For example, on
int *b;
#define a ((void*) b)
void f0() {
a = 10;
}
we now emit:
/tmp/t.c:4:3: error: assignment to cast is illegal, lvalue casts are not supported
a = 10;
^ ~
/tmp/t.c:2:12: note: instantiated from:
#define a ((void*) b)
~^~~~~~~~~~
instead of:
/tmp/t.c:4:5: error: expression is not assignable
a = 10;
~ ^
llvm-svn: 69114
|
|
|
|
|
|
|
| |
either unimplemented setter/getter or no
implementation directive.
llvm-svn: 69098
|
|
|
|
|
|
|
|
| |
be disallowed.
This builds on Eli's work from http://llvm.org/viewvc/llvm-project?view=rev&revision=65678.
llvm-svn: 69073
|
|
|
|
|
|
| |
no_inline on objc methods.
llvm-svn: 69051
|
|
|
|
| |
llvm-svn: 69044
|