| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
Bug and test case provided by Carl Lewis.
llvm-svn: 45078
|
|
|
|
|
|
|
|
|
|
| |
ObjcProtocolDecl, and ObjcCategoryDecl. These methods are replaced by the respective iterators on each class.
- Add getInstanceMethodForSelector to ObjcInterfaceDecl, ObjcProtocolDecl, and ObjcCatgoryDecl. This hook will do a "shallow" lookup. This is a convenience method that reducing some of the iterator usage.
- Various changes to convert all clients to the above API's...
llvm-svn: 45046
|
|
|
|
| |
llvm-svn: 45014
|
|
|
|
|
|
| |
FunctionDecl for each method, remove the unconditional initialization to 0 and corresponding comment.
llvm-svn: 45008
|
|
|
|
|
|
| |
has to be a modifiable lvalue.
llvm-svn: 44993
|
|
|
|
| |
llvm-svn: 44964
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Moved all clients of Diagnostics to use FullSourceLoc instead of SourceLocation.
Added many utility methods to FullSourceLoc to provide shorthand for:
FullLoc.getManager().someMethod(FullLoc.getLocation());
instead we have:
FullLoc.someMethod();
Modified TextDiagnostics (and related classes) to use this short-hand.
llvm-svn: 44957
|
|
|
|
| |
llvm-svn: 44945
|
|
|
|
| |
llvm-svn: 44941
|
|
|
|
| |
llvm-svn: 44938
|
|
|
|
| |
llvm-svn: 44925
|
|
|
|
|
|
|
|
|
|
|
|
| |
int test(int x, long long y) {
return x << y;
}
we now realize the type of the shift is int, not long long.
This fixes a fixme from june.
llvm-svn: 44912
|
|
|
|
|
|
|
|
| |
this is passed to sema and ignored there, so the second part of the
string will not make it into the AST. Passing to Fariborz to finish
Sema + AST construction.
llvm-svn: 44898
|
|
|
|
|
|
| |
return a loc.
llvm-svn: 44890
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
SourceManager is passed by reference, allowing the SourceManager to be
associated with a specific translation unit, and not the entire execution
of the driver.
Modified all users of Diagnostics to comply with this new interface.
Integrated SourceManager as a member variable of TargetInfo. TargetInfo will
eventually be associated with a single translation unit (just like
SourceManager).
Made the SourceManager reference in ASTContext private. Provided accessor
getSourceManager() for clients to use instead. Modified clients to comply with
new interface.
llvm-svn: 44878
|
|
|
|
| |
llvm-svn: 44872
|
|
|
|
| |
llvm-svn: 44843
|
|
|
|
|
|
| |
with GCC).
llvm-svn: 44840
|
|
|
|
|
|
|
|
|
|
|
|
| |
char".
At this point, I am fairly certain the front-end is correct. Unfortunately, the back-end is still unhappy.
That said, I've commented out the two lines in globalinit.c that are causing problems.
Chris, please have a look...thanks!
llvm-svn: 44823
|
|
|
|
|
|
| |
Adapted from a patch by Anders Carlsson.
llvm-svn: 44816
|
|
|
|
|
|
| |
C99 6.5.6.
llvm-svn: 44746
|
|
|
|
|
|
| |
type.
llvm-svn: 44685
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
type is a record (until we implement the FIXME). This removes a bogus error for the following code...
snarofflocal% cat bug.m
#import <Foundation/NSGeometry.h>
#define NUMHELICOPTERRECTS 5
static NSRect helicopterRects[NUMHELICOPTERRECTS] = {
{{27, 0}, {18, 11}}, // Bottom
{{0, 8}, {4, 11}}, // Tail
{{0, 16}, {50, 1}},
{{22, 5}, {18, 12}}, // Body
{{0, 10}, {42, 3}}
};
llvm-svn: 44684
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
class interface isn't in scope!
As the comment in the code indicates, I'm not fond of this. Nevertheless, gcc compat is a goal.
Here is the case I'm talking about...
#import <Foundation/Foundation.h>
@interface AnyClass : NSObject
- (NSRect)rect;
@end
@class Helicopter;
static void func(Helicopter *obj) {
NSRect r = [obj rect];
}
...before this patch, we would warn/error. With this patch, everything "just works".
llvm-svn: 44682
|
|
|
|
|
|
| |
the front-end.
llvm-svn: 44673
|
|
|
|
|
|
| |
"@class Protocol;"
llvm-svn: 44670
|
|
|
|
| |
llvm-svn: 44666
|
|
|
|
|
|
| |
to rewriter (my previous patch).
llvm-svn: 44665
|
|
|
|
|
|
| |
crash because of this.
llvm-svn: 44648
|
|
|
|
| |
llvm-svn: 44617
|
|
|
|
| |
llvm-svn: 44605
|
|
|
|
|
|
| |
every excess element. Maybe later we can add back the limit and make it smarter.
llvm-svn: 44603
|
|
|
|
|
|
| |
Also updated a FIXME in Sema::CheckInitializer()...
llvm-svn: 44602
|
|
|
|
| |
llvm-svn: 44576
|
|
|
|
|
|
| |
there are excess initializers, instead of one per initializer.
llvm-svn: 44525
|
|
|
|
| |
llvm-svn: 44516
|
|
|
|
| |
llvm-svn: 44496
|
|
|
|
| |
llvm-svn: 44463
|
|
|
|
|
|
| |
omitted. Handle this in a few more places.
llvm-svn: 44462
|
|
|
|
| |
llvm-svn: 44449
|
|
|
|
|
|
|
| |
After a discussion with Ted, we both came to the conclusion that adding a "HandleTopLevelDeclaration" hook to ASConsumer is far more elegant. The default implementation of HandleTopLevelDeclaration will be responsible for iterating over the ScopedDecl (which has a chain of the decls:-).
TODO: Once Ted adds HandleTopLevelDeclaration, make sure TagDecls are chainged appropriately...
llvm-svn: 44445
|
|
|
|
|
|
| |
type of the decl based on it.
llvm-svn: 44440
|
|
|
|
|
|
|
|
|
|
| |
floating-point literals that are represented exactly by the APFloat in
FloatingLiteral. For such literals, we do not emit a warning since such checks are
often performed in real code to see if a variable has changed from its original
value. This heuristic clearly can lead to false negatives, but the hope is it will
significantly reduce false positives to help make the compiler flag more useful.
llvm-svn: 44424
|
|
|
|
|
|
|
|
| |
the APFloat representing the parsed literal can represent the literal value
exactly. This is useful when performing various semantic checks on the code,
and issuing appropriate warnings to users.
llvm-svn: 44423
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The following code...
typedef struct cssm_data {} CSSM_DATA, *CSSM_DATA_PTR;
struct Y { int A; };
struct X { int A; } D;
struct X E, F;
...now produces the following output...
> ../../Debug/bin/clang xx.c -ast-print
Read top-level tag decl: 'cssm_data'
typedef struct cssm_data CSSM_DATA;
typedef struct cssm_data *CSSM_DATA_PTR;
Read top-level tag decl: 'Y'
Read top-level tag decl: 'X'
Read top-level variable decl: 'D'
Read top-level variable decl: 'E'
Read top-level variable decl: 'F'
...which is much more accurate than the previous -ast-print output...
typedef struct cssm_data CSSM_DATA;
typedef struct cssm_data CSSM_DATA;
Read top-level variable decl: 'D'
Read top-level variable decl: 'E'
Read top-level variable decl: 'E'
llvm-svn: 44421
|
|
|
|
|
|
|
|
| |
void.
Bug pointed out by Michael Zolda, thanks!
llvm-svn: 44408
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
diagnostic without a location. This produces:
simpleTest.c:2:18: error: initializer element is not constant
int *myPointer = &(myArray[2]);
^~~~~~~~~~~~~
instead of:
error: initializer element is not constant
llvm-svn: 44375
|
|
|
|
|
|
|
|
| |
Sema::CheckSingleInitializer/ActOnCallExpr/CheckMessageArgumentTypes/ActOnReturnStmt to Sema::CheckSingleAssignmentConstraints. This makes sure all null pointer assignments are considered compatible.
Thanks to Seo Sanghyeon for the bug, follow-through, and patch!
llvm-svn: 44366
|
|
|
|
| |
llvm-svn: 44358
|
|
|
|
| |
llvm-svn: 44356
|