Fix <rdar://problem/6265257> warnings for ambiguous message send swamp other warnings.
Reworked Sema::MatchTwoMethodDeclarations() to optionally match based on method size and alignment (the default in GCC). Changed Sema::LookupInstanceMethodInGlobalPool() to use this feature.
Added -Wno-struct-selector-match to driver, however didn't hook it up yet. Added a FIXME that says this.
llvm-svn: 57898
GRExprEngine::VisitCast() so that other parts of the analyzer can be ignorant.
When we cast "array of type T" to "pointer to T", we get the loc::MemRegionVal
corresponding to the array variable. This is sufficient for BasicStore, but not
for RegionStore. RegionStore should get the element region for the first array
element in the cast. So next comes to the revamping of transfer functions for
different store model.
llvm-svn: 57897
crash.m:8:12: error: type name requires a specifier or qualifier
@property (readonlyx, getter=isAwesome) int _awesome;
^
crash.m:8:29: error: expected ';' at end of declaration list
@property (readonlyx, getter=isAwesome) int _awesome;
^
crash.m:8:39: error: expected identifier or '('
@property (readonlyx, getter=isAwesome) int _awesome;
^
we now get:
crash.m:8:12: error: unknown property attribute 'readonlyx'
@property (readonlyx, getter=isAwesome) int _awesome;
^
Also, we can eliminate isObjCPropertyAttribute now.
llvm-svn: 57811
ParseObjCPropertyAttribute. Before, on this code (where
a comma was forgotten):
@property (readonly getter=isAwesome) int _awesome;
we emitted:
crash.m:9:11: error: expected ')'
@property (readonly getter=isAwesome) int _awesome;
^
crash.m:9:37: error: type name requires a specifier or qualifier
@property (readonly getter=isAwesome) int _awesome;
^
crash.m:9:37: error: expected identifier or '('
crash.m:9:37: error: expected ';' at end of declaration list
crash.m:9:1: error: @property requires fields to be named
@property (readonly getter=isAwesome) int _awesome;
^
now we emit:
crash.m:9:21: error: expected ')'
@property (readonly getter=isAwesome) int _awesome;
^
crash.m:9:11: error: to match this '('
@property (readonly getter=isAwesome) int _awesome;
^
llvm-svn: 57809
Check for @end in ParseObjCInterfaceDeclList instead of in each caller
Handle @required and @optional with the same code
Add some fixmes about some apparently objc2 code that is being accepted
in objc1.
llvm-svn: 57803
where it would reject @required in non-protocols, but then go
ahead and tag methods with required anyway. Instead, if we see
this in something other than a protocol, just ignore the request.
Also, improve error recovery a bit when we see something bogus
inside an interface.
llvm-svn: 57798
of whether a '(' was a grouping paren or the start of a function declarator.
This is PR2796.
Now we eat the attribute before deciding whether the paren is grouping or
not, then apply it to the resultant decl or to the first argument as needed.
One somewhat surprising aspect of this is that attributes interact with
implicit int in cases like this:
void a(x, y) // k&r style function
void b(__attribute__(()) x, y); // function with two implicit int arguments
void c(x, __attribute__(()) y); // error, can't have attr in identifier list.
Fun stuff.
llvm-svn: 57790
- Support noreturn on function-typed variables.
- Extend isFunctionOrMethod to return true for K&R functions and
provide hasFunctionProto to check if a decl has information about
its arguments. This code needs some serious cleaning, but works.
- Add/improve test cases for noreturn and unused.
llvm-svn: 57778