- Aug 02, 2007
-
-
Reid Spencer authored
llvm-svn: 40732
-
Chris Lattner authored
llvm-svn: 40719
-
Chris Lattner authored
llvm-svn: 40717
-
Steve Naroff authored
Tweak to Expr::isIntegerConstantExpr...make sure the result is appropriately size for TypesCompatibleExpr's. llvm-svn: 40716
-
Chris Lattner authored
This is important in insane cases like the one dannyb sent me recently: #define F0(a) void a(){} #define F1(a) F0(a##0) F0(a##1) F0(a##2) F0(a##3) F0(a##4) F0(a##5) F0(a##6) F0(a##7) #define F2(a) F1(a##0) F1(a##1) F1(a##2) F1(a##3) F1(a##4) F1(a##5) F1(a##6) F1(a##7) #define F3(a) F2(a##0) F2(a##1) F2(a##2) F2(a##3) F2(a##4) F2(a##5) F2(a##6) F2(a##7) #define F4(a) F3(a##0) F3(a##1) F3(a##2) F3(a##3) F3(a##4) F3(a##5) F3(a##6) F3(a##7) #define F5(a) F4(a##0) F4(a##1) F4(a##2) F4(a##3) F4(a##4) F4(a##5) F4(a##6) F4(a##7) #define F6(a) F5(a##0) F5(a##1) F5(a##2) F5(a##3) F5(a##4) F5(a##5) F5(a##6) F5(a##7) F6(f) cpp is great. :) llvm-svn: 40715
-
Steve Naroff authored
Tidy up Parser::ParseTypeofSpecifier()...implement FIXME and minor restructure. llvm-svn: 40713
-
Steve Naroff authored
Add a couple const modifiers. llvm-svn: 40708
-
Steve Naroff authored
Hack Expr::isConstantExpr() to allow for __builtin_types_compatible_p. llvm-svn: 40705
-
Steve Naroff authored
- Finish hooking up support for __builtin_types_compatible_p(). - Fix type printing code for recently added TypeOfExpr/TypeOfType. llvm-svn: 40700
-
Steve Naroff authored
Add AST/Sema support for __builtin_types_compatible_p (a GNU extension). Todo...still need to call the action from the parser... llvm-svn: 40693
-
- Aug 01, 2007
-
-
Steve Naroff authored
Add comments to getTypeOfExpr/getTypeOfType. Also add instances of TypeOfExpr/TypeOfType to the Types vector (so we can keep track of them). llvm-svn: 40677
-
Steve Naroff authored
Two typeof() related changes... - Changed the name of ASTContext::getTypeOfType(Expr*)->getTypeOfExpr(). - Remove FIXME for TypeOfExpr::getAsStringInternal(). This will work fine for printing the AST. It isn't ideal for error diagnostics (since it's more natural to display the expressions type). One "random" (or at least delayed:-) change... - Changed all "ext_typecheck_*" diagnostics from EXTENSION->WARNING. Reason: Since -pedantic is now off (by default), these diagnostics were never being emitted (which is bad). With this change, clang will emit the warning all the time. The only downside (wrt GCC compatibility) is -pedantic-errors will not turn this diagnostics into errors (a "feature" of making tagging them with EXTENSION). When/if this becomes an issue, we can revisit. llvm-svn: 40676
-
Chris Lattner authored
llvm-svn: 40665
-
Chris Lattner authored
llvm-svn: 40659
-
Steve Naroff authored
Tighten up Parser::ParseTypeofSpecifier(). Add some more tests to typeof.c. Also added a couple of missing "expect" attributes that caused the test to fail. llvm-svn: 40656
-
- Jul 31, 2007
-
-
Chris Lattner authored
llvm-svn: 40653
-
Chris Lattner authored
canonical types. llvm-svn: 40652
-
Chris Lattner authored
llvm-svn: 40651
-
Chris Lattner authored
there is now an isXXXType and a getAsXXXType llvm-svn: 40646
-
Chris Lattner authored
llvm-svn: 40645
-
Chris Lattner authored
llvm-svn: 40644
-
Chris Lattner authored
llvm-svn: 40643
-
Chris Lattner authored
llvm-svn: 40640
-
Chris Lattner authored
existing one to getAsPointerType() llvm-svn: 40639
-
Chris Lattner authored
llvm-svn: 40637
-
Steve Naroff authored
Add parsing and AST support for GNU "typeof". Many small changes to lot's of files. Still some FIXME's, however the basic support is in place. llvm-svn: 40631
-
Chris Lattner authored
type. llvm-svn: 40620
-
Chris Lattner authored
of the more subtle and interesting classes. llvm-svn: 40615
-
Chris Lattner authored
llvm-svn: 40614
-
- Jul 30, 2007
-
-
Chris Lattner authored
void func() { typedef int foo; foo *Y; **Y; // error } we now get: indirection requires pointer operand ('foo' invalid) instead of: indirection requires pointer operand ('int' invalid) llvm-svn: 40597
-
Steve Naroff authored
llvm-svn: 40585
-
Steve Naroff authored
llvm-svn: 40584
-
- Jul 29, 2007
-
-
Steve Naroff authored
Implement pretty diagnostics when doing on-the-fly vector sizing (for vector component access). For example, before this commit, the following diagnostics would be emitted... ocu.c:49:12: error: incompatible types assigning 'float __attribute__((ocu_vector_type(3)))' to 'float4' vec4_2 = vec4.rgb; // shorten ~~~~~~ ^ ~~~~~~~~ ocu.c:51:7: error: incompatible types assigning 'float __attribute__((ocu_vector_type(2)))' to 'float' f = vec2.xx; // shorten ~ ^ ~~~~~~~ Now, the diagnostics look as you would expect... ocu.c:49:12: error: incompatible types assigning 'float3' to 'float4' vec4_2 = vec4.rgb; // shorten ~~~~~~ ^ ~~~~~~~~ ocu.c:51:7: error: incompatible types assigning 'float2' to 'float' f = vec2.xx; // shorten ~ ^ ~~~~~~~ llvm-svn: 40579
-
Steve Naroff authored
Added a new expression, OCUVectorComponent. llvm-svn: 40577
-
- Jul 28, 2007
-
-
Steve Naroff authored
Next step, AST support... llvm-svn: 40568
-
- Jul 26, 2007
-
-
Steve Naroff authored
Add Type::isOCUVectorType(). Convert isFunctionType(), isStructureType(), and isUnionType() to the new API. llvm-svn: 40541
-
Steve Naroff authored
#include <stdio.h> int main(void) { int test = 0; printf("Type is %s\n", (test >= 1 ? "short" : "char")); return (0); } It comes up with a diagnostic that's misleading upon first read. t.c:7:36: error: incompatible operand types ('char *' and 'char *') printf("Type is %s\n", (test >= 1 ? "short" : "char")); ^ ~~~~~~~ ~~~~~~ 1 diagnostic generated. llvm-svn: 40526
-
Chris Lattner authored
llvm-svn: 40512
-
Chris Lattner authored
llvm-svn: 40511
-
Steve Naroff authored
llvm-svn: 40509
-