| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
PR3656.
llvm-svn: 65461
|
| |
|
|
|
|
|
|
|
|
| |
only from a function definition (that does not have a prototype) are
only used to determine the compatible with other declarations of that
same function. In particular, when referencing the function we pretend
as if it does not have a prototype. Implement this behavior, which
fixes PR3626.
llvm-svn: 65460
|
| |
|
|
|
|
|
| |
Sema::CheckAssignmentConstraints; not really visible, but the right
thing to do.
llvm-svn: 65428
|
| |
|
|
| |
llvm-svn: 65401
|
| |
|
|
|
|
| |
string size as an argument.
llvm-svn: 65400
|
| |
|
|
| |
llvm-svn: 65399
|
| |
|
|
| |
llvm-svn: 65398
|
| |
|
|
| |
llvm-svn: 65397
|
| |
|
|
| |
llvm-svn: 65396
|
| |
|
|
| |
llvm-svn: 65395
|
| |
|
|
|
|
| |
to SemaInit.cpp, no functionality change.
llvm-svn: 65394
|
| |
|
|
|
|
|
| |
The big difference here is that (like string literal) @encode has
array type, not pointer type.
llvm-svn: 65391
|
| |
|
|
| |
llvm-svn: 65389
|
| |
|
|
|
|
|
| |
lookup to skip over names without linkage. This finishes
<rdar://problem/6127293>.
llvm-svn: 65386
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
external declarations to also support external variable
declarations. Unified the code for these two cases into two new
subroutines.
Note that we fail to diagnose cases like the one Neil pointed
out, where a visible non-external declaration hides an external
declaration by the same name. That will require some reshuffling of
name lookup.
llvm-svn: 65385
|
| |
|
|
|
|
|
|
|
|
| |
that declaration to global scope so that it can be found from other
scopes. This allows us to diagnose redeclaration errors for external
declarations across scopes. We also warn when name lookup finds such
an out-of-scope declaration. This is part of <rdar://problem/6127293>;
we'll also need to do the same thing for variables.
llvm-svn: 65373
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- When we are declaring a function in local scope, we can merge with
a visible declaration from an outer scope if that declaration
refers to an entity with linkage. This behavior now works in C++
and properly ignores entities without linkage.
- Diagnose the use of "static" on a function declaration in local
scope.
- Diagnose the declaration of a static function after a non-static
declaration of the same function.
- Propagate the storage specifier to a function declaration from a
prior declaration (PR3425)
- Don't name-mangle "main"
llvm-svn: 65360
|
| |
|
|
|
|
|
|
| |
assertion when the ivars and method list was reset into the existing
interface. To fix this, mark decls as invalid when they are redefined,
and don't insert ivars/methods into invalid decls.
llvm-svn: 65340
|
| |
|
|
|
|
| |
- Generate error for protocol qualifiers on non-ObjC types.
llvm-svn: 65333
|
| |
|
|
|
|
| |
Remove support for "Class<P>". Will be making this an error.
llvm-svn: 65332
|
| |
|
|
|
|
|
| |
I don't think casting super makes any sense (since it won't effect method lookup).
Will discuss with other offline and decide what to do.
llvm-svn: 65317
|
| |
|
|
|
|
| |
messages to 'Class'. Also improve "super" handling.
llvm-svn: 65300
|
| |
|
|
| |
llvm-svn: 65293
|
| |
|
|
|
|
|
|
|
|
| |
<rdar://problem/6497631> Message lookup is sometimes different than gcc's).
- Implement instance/class overloading in ObjCContainerDecl (removing a FIXME). This involved hacking NamedDecl::declarationReplaces(), which took awhile to figure out (didn't realize replace was the default).
- Changed Sema::ActOnInstanceMessage() to remove redundant warnings when dealing with protocols. For now, I've omitted the "protocol" term in the diagnostic. It simplifies the code flow and wan't always 100% accurate (e.g. "Foo<Prot>" looks in the class interface, not just the protocol).
- Changed several test cases to jive with the above changes.
llvm-svn: 65292
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
helper isConstantInitializer) to check whether an initializer is
constant. This passes tests, but it's possible that it'll cause
regressions with real-world code.
Future work:
1. The diagnostics obtained this way are lower quality at the moment;
some work both here and in Evaluate is needed for accurate diagnostics.
2. We probably need some extra code when we're in -pedantic mode so we
can strictly enforce the rules in C99 6.6p7.
3. Dead code cleanup (this should wait until after 2, because we might
want to re-use some of the code).
llvm-svn: 65265
|
| |
|
|
| |
llvm-svn: 65257
|
| |
|
|
|
|
| |
Fixes PR3641.
llvm-svn: 65256
|
| |
|
|
|
|
| |
This is necessary 'plumbing' to fix <rdar://problem/6497631> Message lookup is sometimes different than gcc's.
llvm-svn: 65248
|
| |
|
|
|
|
|
|
| |
Found while researching <rdar://problem/6497631> Message lookup is sometimes different than gcc's.
Will never be seen in user code. Needed to pass dejagnu testsuite.
llvm-svn: 65244
|
| |
|
|
| |
llvm-svn: 65241
|
| |
|
|
|
|
| |
variable (objc2 gc specific).
llvm-svn: 65240
|
| |
|
|
|
|
|
|
|
|
| |
Move two key ObjC typechecks from Sema::CheckPointerTypesForAssignment() to ASTContext::mergeTypes().
This allows us to take advantage of the recursion in ASTContext::mergeTypes(), removing some bogus warnings.
This test case I've added includes an example where we still warn (and GCC doesn't). Need to talk with folks and decide what to do. At this point, the major bogosities should be fixed.
llvm-svn: 65231
|
| |
|
|
|
|
| |
pointer types.
llvm-svn: 65210
|
| |
|
|
| |
llvm-svn: 65208
|
| |
|
|
| |
llvm-svn: 65198
|
| |
|
|
| |
llvm-svn: 65170
|
| |
|
|
| |
llvm-svn: 65169
|
| |
|
|
|
|
|
|
| |
ObjCList,
but don't start using it yet. Renamed some methods to be more consistent.
llvm-svn: 65168
|
| |
|
|
|
|
| |
it from being leaked, among other things.
llvm-svn: 65150
|
| |
|
|
|
|
| |
isn't an ICE. This makes us compatible with GCC.
llvm-svn: 65140
|
| |
|
|
|
|
| |
interfaces more consistently.
llvm-svn: 65138
|
| |
|
|
| |
llvm-svn: 65128
|
| |
|
|
|
|
|
|
| |
This prevents emitting diagnostics which are almost certainly useless.
(Note that the test is checking that we emit only one diagnostic.)
llvm-svn: 65101
|
| |
|
|
|
|
| |
use Blocks for our callbacks ;-)
llvm-svn: 65083
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
information about types. We often print diagnostics where we say
"foo_t" is bad, but the user doesn't know how foo_t is declared
(because it is a typedef). Fix this by expanding sugar when present
in a diagnostic (and not one of a few special cases, like vectors).
Before:
t.m:5:2: error: invalid operands to binary expression ('typeof(P)' and 'typeof(F)')
MAX(P, F);
^~~~~~~~~
t.m:1:78: note: instantiated from:
#define MAX(A,B) ({ __typeof__(A) __a = (A); __typeof__(B) __b = (B); __a < __b ? __b : __a; })
^
After:
t.m:5:2: error: invalid operands to binary expression ('typeof(P)' (aka 'struct mystruct') and 'typeof(F)' (aka 'float'))
MAX(P, F);
^~~~~~~~~
t.m:1:78: note: instantiated from:
#define MAX(A,B) ({ __typeof__(A) __a = (A); __typeof__(B) __b = (B); __a < __b ? __b : __a; })
^
llvm-svn: 65081
|
| |
|
|
| |
llvm-svn: 65076
|
| |
|
|
|
|
|
| |
appear to be constant. I'll probably redo this and throw it all away
later once we have codegen for BlockDeclRefExprs.
llvm-svn: 65070
|
| |
|
|
|
|
| |
- <rdar://problem/6094103> sema fails to promote type arguments to __builtin_isgreater (and friends)
llvm-svn: 65059
|
| |
|
|
| |
llvm-svn: 65055
|
| |
|
|
|
|
| |
negative value.
llvm-svn: 65023
|