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
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
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
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
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
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
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
missing middle expression, and fix a codegen bug where
we didn't correctly promote the condition to the right
result type. This fixes PR1824.
llvm-svn: 44322
Moved utility functions IgnoreParen and friends to be static inline functions
defined in SemaUtil.h.
Added SemaUtil.h to Xcode project.
llvm-svn: 44312