- Aug 26, 2007
-
-
Chris Lattner authored
llvm-svn: 41426
-
Chris Lattner authored
llvm-svn: 41425
-
Chris Lattner authored
llvm-svn: 41424
-
Chris Lattner authored
llvm-svn: 41423
-
Neil Booth authored
llvm-svn: 41422
-
Chris Lattner authored
llvm-svn: 41421
-
Chris Lattner authored
llvm-svn: 41420
-
Chris Lattner authored
llvm-svn: 41419
-
Chris Lattner authored
llvm-svn: 41418
-
Chris Lattner authored
llvm-svn: 41417
-
Chris Lattner authored
specifier of functions. llvm-svn: 41416
-
Chris Lattner authored
llvm-svn: 41415
-
Chris Lattner authored
llvm-svn: 41414
-
Chris Lattner authored
represent imaginary literals: float _Complex A; void foo() { A = 1.0iF; } generates: (BinaryOperator 0x2305ec0 '_Complex float' '=' (DeclRefExpr 0x2305e60 '_Complex float' Decl='A' 0x2305cf0) (ImaginaryLiteral 0x2305f40 '_Complex float' (FloatingLiteral 0x2305ea0 'float' 1.000000)))) llvm-svn: 41413
-
Chris Lattner authored
llvm-svn: 41412
-
Chris Lattner authored
2) Add support for lexing imaginary constants (a GCC extension): t.c:5:10: warning: imaginary constants are an extension A = 1.0iF; ^ 3) Make the 'invalid suffix' diagnostic pointer more accurate: t.c:6:10: error: invalid suffix 'qF' on floating constant A = 1.0qF; ^ instead of: t.c:6:10: error: invalid suffix 'qF' on floating constant A = 1.0qF; ^ llvm-svn: 41411
-
Chris Lattner authored
to merge duplicate code. llvm-svn: 41410
-
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
-
- 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
-
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
-
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
-
- 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
-