- Jul 18, 2007
-
-
Chris Lattner authored
llvm-svn: 40005
-
Chris Lattner authored
llvm-svn: 40003
-
Chris Lattner authored
llvm-svn: 39996
-
Chris Lattner authored
llvm-svn: 39994
-
Chris Lattner authored
llvm-svn: 39989
-
- Jul 17, 2007
-
-
Chris Lattner authored
just always use strtod. This is temporary code anyway. llvm-svn: 39972
-
Gabor Greif authored
llvm-svn: 39970
-
Bill Wendling authored
llvm-svn: 39960
-
Chris Lattner authored
llvm-svn: 39958
-
Bill Wendling authored
llvm-svn: 39956
-
Bill Wendling authored
Change dyn_cast for reference types to be more like pointers and not need the canonical type. Also fix so that we're not expecting a return value from a void function llvm-svn: 39954
-
Bill Wendling authored
According to the spec (C++ 5p6[expr]), we need to adjust "T&" to "T" before further analysis. We do this via the "implicit cast" thingy. llvm-svn: 39953
-
Steve Naroff authored
Convert UsualArithmeticConversions to return "void". Now that we synthesize ImplicitCastExpr's, there is no compelling need to return the converted type. If both expression type's are arithmetic, then both types will always be the same. If they aren't (for pointer/int types, say), then the types will be different. The client is responsible for distinguishing... llvm-svn: 39947
-
Steve Naroff authored
Implement semantic analysis for the cast operator. llvm-svn: 39943
-
Steve Naroff authored
Remove the 2 QualType references to method UsualArithmeticConversions. Last week, I added these to quickly fix a regression. Avoiding them entirely is a much cleaner solution. Clients of UsualArithmeticConversions should simply call getType() on the expression to get the converted type. In practice, only a small number of routines care about this. llvm-svn: 39934
-
Chris Lattner authored
isPointerType and isVectorType to only look through a single level of typedef when one is present. For this invalid code: typedef float float4 __attribute__((vector_size(16))); typedef int int4 __attribute__((vector_size(16))); typedef int4* int4p; void test(float4 a, int4p result, int i) { result[i] = a; } we now get: t.c:5:15: error: incompatible types assigning 'float4' to 'int4' result[i] = a; ~~~~~~~~~ ^ ~ instead of: t.c:5:15: error: incompatible types assigning 'float4' to 'int __attribute__((vector_size(16)))' result[i] = a; ~~~~~~~~~ ^ ~ The rest of the type predicates should be upgraded to do the same thing. llvm-svn: 39932
-
- Jul 16, 2007
-
-
Steve Naroff authored
Change DefaultFunctionArrayConversions and UsualUnaryConversions to return void. The caller needs to query the expression for the type. Since both these functions guarantee the expression contains a valid type, removed old/vacuous asserts (from code calling both of these routines). llvm-svn: 39930
-
Chris Lattner authored
SemaExpr.cpp:561: warning: dereferencing type-punned pointer will break strict-aliasing rules Patch by Benoit Boissinot! llvm-svn: 39928
-
Chris Lattner authored
llvm-svn: 39927
-
Chris Lattner authored
llvm-svn: 39925
-
Bill Wendling authored
llvm-svn: 39907
-
Chris Lattner authored
accurate diagnostics. For test/Lexer/comments.c we now emit: int x = 000000080; /* expected-error {{invalid digit}} */ ^ constants.c:7:4: error: invalid digit '8' in octal constant 00080; /* expected-error {{invalid digit}} */ ^ The last line is due to an escaped newline. The full line looks like: int y = 0000\ 00080; /* expected-error {{invalid digit}} */ Previously, we emitted: constants.c:4:9: error: invalid digit '8' in octal constant int x = 000000080; /* expected-error {{invalid digit}} */ ^ constants.c:6:9: error: invalid digit '8' in octal constant int y = 0000\ ^ which isn't too bad, but the new way is better for the user, regardless of whether there is an escaped newline or not. All the other lexer-related diagnostics should switch over to using AdvanceToTokenCharacter where appropriate. Help wanted :). This implements test/Lexer/constants.c. llvm-svn: 39906
-
Chris Lattner authored
specifying the start of a token and a logical (phase 3) character number, returns a sloc representing the input character corresponding to it. llvm-svn: 39905
-
Chris Lattner authored
llvm-svn: 39904
-
Chris Lattner authored
llvm-svn: 39903
-
Chris Lattner authored
codegen to compile: int test(int *A, int *B) { return A-B; } into: _test: movl 4(%esp), %eax subl 8(%esp), %eax sarl $2, %eax ret instead of: _test: movl 4(%esp), %eax subl 8(%esp), %eax movl %eax, %ecx sarl $31, %ecx shrl $30, %ecx addl %ecx, %eax sarl $2, %eax ret llvm-svn: 39902
-
Chris Lattner authored
llvm-svn: 39901
-
Chris Lattner authored
llvm-svn: 39900
-
Chris Lattner authored
llvm-svn: 39899
-
Chris Lattner authored
llvm-svn: 39898
-
Chris Lattner authored
llvm-svn: 39897
-
Chris Lattner authored
information in the common case. On this invalid code: typedef float float4 __attribute__((vector_size(16))); typedef int int4 __attribute__((vector_size(16))); void test(float4 a, int4 *result, int i) { result[i] = a; } we now generate: t.c:5:15: error: incompatible types assigning 'float4' to 'int4' instead of: t.c:5:15: error: incompatible types assigning 'float4' to 'int __attribute__((vector_size(16)))' This implements test/Sema/typedef-retain.c llvm-svn: 39892
-
Chris Lattner authored
ParseArraySubscriptExpr. Notably, the new code doesn't have to think about canonical types at all. llvm-svn: 39891
-
Chris Lattner authored
the actual vectortype or pointertype when they return success. llvm-svn: 39890
-
Chris Lattner authored
llvm-svn: 39889
-
Chris Lattner authored
the result type of the expr node. Implement isIntegerConstantExpr for ImplicitCastExpr nodes the same was as for CastExpr nodes. Implement proper sign/zero extension as well as truncation and noop conversion in the i-c-e evaluator. This allows us to correctly handle i-c-e's like these: char array[1024/(sizeof (long))]; int x['\xBb' == (char) 187 ? 1: -1]; this implements test/Sema/i-c-e2.c llvm-svn: 39888
-
Chris Lattner authored
not all builtin types have size and alignment equal to pointers :) llvm-svn: 39887
-
Chris Lattner authored
llvm-svn: 39886
-
Chris Lattner authored
llvm-svn: 39884
-
- Jul 15, 2007
-
-
Chris Lattner authored
llvm-svn: 39868
-