- Aug 26, 2007
-
-
Chris Lattner authored
char *C; C != ((void*)0); Should not warn about incompatible pointer types. Also, make sure to insert an implicit conversion even if the operand is null. llvm-svn: 41408
-
Dale Johannesen authored
over uses in DAGCombiner. Fix interfaces to work with APFloats. llvm-svn: 41407
-
- Aug 25, 2007
-
-
Chris Lattner authored
llvm-svn: 41406
-
Chris Lattner authored
llvm-svn: 41405
-
Steve Naroff authored
Surpress the UsualUnaryConversions for compound assignment operators. This change eliminates the possibility that the left hand expression is an ImplicitCastExpr. As a result, I removed the check for ImplicitCastExpr in Expr::isLvalue(). This results in the following AST's... [dylan:~/llvm/tools/clang] admin% cat fix.c short x; void test4(char c) { x += c; x = x + c; } [dylan:~/llvm/tools/clang] admin% ../../Debug/bin/clang fix.c -parse-ast-dump Read top-level variable decl: 'x' void test4(char c) (CompoundStmt 0x2605d30 (CompoundAssignOperator 0x2605c40 'short' '+=' (DeclRefExpr 0x2605c00 'short' Decl='x' 0x2605a80) (DeclRefExpr 0x2605c20 'char' Decl='c' 0x2605bc0)) (BinaryOperator 0x2605d10 'short' '=' (DeclRefExpr 0x2605c60 'short' Decl='x' 0x2605a80) (ImplicitCastExpr 0x2605d00 'short' (BinaryOperator 0x2605ce0 'int' '+' (ImplicitCastExpr 0x2605cc0 'int' (DeclRefExpr 0x2605c80 'short' Decl='x' 0x2605a80)) (ImplicitCastExpr 0x2605cd0 'int' (DeclRefExpr 0x2605ca0 'char' Decl='c' 0x2605bc0)))))) llvm-svn: 41404
-
Chris Lattner authored
llvm-svn: 41403
-
Steve Naroff authored
This fixes the following bug... t.c:1:31: error: expression is not assignable short x; void foo(char c) { x += c; } This case, among others are now captured in implicit-casts.c. llvm-svn: 41402
-
Steve Naroff authored
This fixes the following: ******************** TEST 'Parser/cxx-bool.cpp' FAILED! ******************** Command: clang -fsyntax-only Parser/cxx-bool.cpp Output: SemaExpr.cpp:731: failed assertion `!t.isNull() && "DefaultFunctionArrayConversion - missing type"' Output/cxx-bool.cpp.out.script: line 1: 22697 Abort trap clang -fsyntax-only Parser/cxx-bool.cpp llvm-svn: 41401
-
Chris Lattner authored
ignore 'namespace foo {}' llvm-svn: 41400
-
Chris Lattner authored
llvm-svn: 41399
-
Chris Lattner authored
llvm-svn: 41398
-
Chris Lattner authored
llvm-svn: 41397
-
Chris Lattner authored
llvm-svn: 41396
-
Chris Lattner authored
llvm-svn: 41395
-
Devang Patel authored
Move exit condition and exit branch from exiting block into loop header and dominator info. This avoid execution of dead iteration. Loop is already filter in the beginning such that this change is safe. llvm-svn: 41394
-
Chris Lattner authored
they show up in dumps etc. llvm-svn: 41393
-
Chris Lattner authored
llvm-svn: 41392
-
Chris Lattner authored
llvm-svn: 41391
-
Chris Lattner authored
llvm-svn: 41390
-
Devang Patel authored
llvm-svn: 41389
-
Chris Lattner authored
know how to handle them. This fixes test/CodeGen/Generic/asm-large-immediate.ll llvm-svn: 41388
-
Devang Patel authored
While calculating upper loop bound for first loop and lower loop bound for second loop, take care of edge cases. llvm-svn: 41387
-
Chris Lattner authored
llvm-svn: 41386
-
Bill Wendling authored
.set Lset0,___gxx_personality_v0-. .long Lset0 on some targets. Make it so! llvm-svn: 41385
-
Chris Lattner authored
changing the interface to allow for future changes. llvm-svn: 41384
-
Dale Johannesen authored
llvm-svn: 41383
-
Neil Booth authored
llvm-svn: 41382
-
Neil Booth authored
llvm-svn: 41381
-
Tanya Lattner authored
llvm-svn: 41380
-
Steve Naroff authored
This modest change insures ImplicitCastExpr's get generated for all "assignments", while includes init decls, assignment exprs, call exprs, and return statements. Here are a few examples with the correct AST's... [dylan:~/llvm/tools/clang] admin% cat impcomp.c _Complex double X; void test2(int c) { X = 5; } void foo() { int i; double d = i; double _Complex a = 5; test2(a); a = 5; d = i; } [dylan:~/llvm/tools/clang] admin% ../../Debug/bin/clang impcomp.c -parse-ast-dump Read top-level variable decl: 'X' void test2(int c) (CompoundStmt 0x2605ce0 (BinaryOperator 0x2605cc0 '_Complex double' '=' (DeclRefExpr 0x2605c70 '_Complex double' Decl='X' 0x2605af0) (ImplicitCastExpr 0x2605cb0 '_Complex double' (IntegerLiteral 0x2605c90 'int' 5)))) void foo() (CompoundStmt 0x2606030 (DeclStmt 0x2605bd0 0x2605d90 "int i") (DeclStmt 0x2605e20 0x2605de0 "double d = (ImplicitCastExpr 0x2605e10 'double' (DeclRefExpr 0x2605dc0 'int' Decl='i' 0x2605d90))") (DeclStmt 0x2605e90 0x2605e50 "_Complex double a = (ImplicitCastExpr 0x2605e80 '_Complex double' (IntegerLiteral 0x2605e30 'int' 5))") (CallExpr 0x2605f20 'void' (ImplicitCastExpr 0x2605f00 'void (*)(int)' (DeclRefExpr 0x2605ea0 'void (int)' Decl='test2' 0x2605c00)) (ImplicitCastExpr 0x2605f10 'int' (DeclRefExpr 0x2605ec0 '_Complex double' Decl='a' 0x2605e50))) (BinaryOperator 0x2605fa0 '_Complex double' '=' (DeclRefExpr 0x2605f50 '_Complex double' Decl='a' 0x2605e50) (ImplicitCastExpr 0x2605f90 '_Complex double' (IntegerLiteral 0x2605f70 'int' 5))) (BinaryOperator 0x2606010 'double' '=' (DeclRefExpr 0x2605fc0 'double' Decl='d' 0x2605de0) (ImplicitCastExpr 0x2606000 'double' (DeclRefExpr 0x2605fe0 'int' Decl='i' 0x2605d90)))) llvm-svn: 41379
-
Dale Johannesen authored
This means backing out the preceding change to Constants.cpp, alas. llvm-svn: 41378
-
- Aug 24, 2007
-
-
Chris Lattner authored
llvm-svn: 41377
-
Chris Lattner authored
llvm-svn: 41376
-
Chris Lattner authored
llvm-svn: 41375
-
Ted Kremenek authored
concrete subclasses of Stmt are now required to implement child_begin/child_end. llvm-svn: 41374
-
Chris Lattner authored
operators in all their glory :) llvm-svn: 41373
-
Dale Johannesen authored
llvm-svn: 41372
-
Chris Lattner authored
This eliminates a conditional on that path, and ensures ICmpInst/FCmpInst both have an out-of-line virtual method to home the class. llvm-svn: 41371
-
Ted Kremenek authored
llvm-svn: 41370
-
Ted Kremenek authored
llvm-svn: 41369
-