- Aug 24, 2007
-
-
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
-
Ted Kremenek authored
llvm-svn: 41368
-
Ted Kremenek authored
llvm-svn: 41366
-
Devang Patel authored
Fix regression that I caused yesterday night while adding logic to select appropriate split condition branch. llvm-svn: 41365
-
Steve Naroff authored
Surpress ImplicitCastExprs for compound assignment expressions. For compound assignments, it is o.k. for the LHS and RHS to have different types. Converting the type can cause errors like the one Chris noticed (below). This change required a fair number of diffs (since there is a lot of shared code between single and compound assignments). This makes the API's look a bit uglier, however I couldn't think of a better way to do it (without duplicating code). Fix the following (incorrect) error: int A; long long B; void foo() { A /= B; } $ clang ~/scalar.c -emit-llvm /Users/sabre/scalar.c:6:5: error: expression is not assignable A /= B; ~ ^ Now it works properly... [dylan:~/llvm/tools/clang] admin% cat compound.c int A; long long B; void foo() { A /= B; } [dylan:~/llvm/tools/clang] admin% ../../Debug/bin/clang compound.c -parse-ast-dump Read top-level variable decl: 'A' Read top-level variable decl: 'B' void foo() (CompoundStmt 0x2605c40 (BinaryOperator 0x2605c20 'int' '/=' ComputeTy='long long' (DeclRefExpr 0x2605be0 'int' Decl='A' 0x2605a80) (DeclRefExpr 0x2605c00 'long long' Decl='B' 0x2605ab0))) llvm-svn: 41364
-
Ted Kremenek authored
subclass of Stmt will implement child_begin() and child_end(), which will be used to iterate over all the children (subexpressions/substatements) of a Stmt object. This will provide for easy traversal over the AST, which is useful for a variety of purposes. None of the interfaces to subclasses of Stmt will be changed (other than adding the child_begin and child_end methods). The only caveat is that the implementation of subclasses of Stmt will require colocating all substatements (subexpressions) in an array. This is because we define child_iterator as Stmt**. All accessor methods to subexpressions will need to be altered to reflect this new implementation. This patch includes the typedefs for child_iterator, as well the implementation for child_begin/child_end for the primary expressions and some postfix expressions. llvm-svn: 41363
-
Steve Naroff authored
Make sure we get extension diagnostics for GCC's complex extensions. Now we emit the following when -pedantic-errors is enabled... [dylan:~/llvm/tools/clang] admin% ../../Debug/bin/clang complex.c -pedantic-errors complex.c:4:3: error: ISO C does not support '++'/'--' on complex integer types ++x; ^ ~ complex.c:9:7: error: ISO C does not support '~' for complex conjugation X = ~Y; ^ complex.c:10:7: error: ISO C does not support '~' for complex conjugation x = ~y; ^ llvm-svn: 41362
-
Chris Lattner authored
llvm-svn: 41361
-
Chris Lattner authored
llvm-svn: 41360
-
Chris Lattner authored
llvm-svn: 41359
-
Devang Patel authored
condition predicate is GT or GE then execute false branch first. llvm-svn: 41358
-
Devang Patel authored
llvm-svn: 41357
-
Devang Patel authored
llvm-svn: 41356
-
Chris Lattner authored
This patch temporarily breaks compound assignment operators, but greatly simplifies many things. llvm-svn: 41355
-
Devang Patel authored
llvm-svn: 41354
-
Dale Johannesen authored
llvm-svn: 41353
-
Chris Lattner authored
llvm-svn: 41352
-
Chris Lattner authored
llvm-svn: 41350
-
Chris Lattner authored
llvm-svn: 41349
-
Dale Johannesen authored
Interface to rest of the compiler unchanged, as yet. llvm-svn: 41348
-
Chris Lattner authored
llvm-svn: 41347
-
Chris Lattner authored
llvm-svn: 41346
-
Chris Lattner authored
llvm-svn: 41345
-
Chris Lattner authored
llvm-svn: 41344
-
Chris Lattner authored
fixes an assertion on: void f (int z) { switch (z) { case ~0ULL: case -1: return; } } testcase from Neil. llvm-svn: 41343
-
Steve Naroff authored
Support '~' for complex conjugation. This is a GCC extension. This following now compiles without error... _Complex unsigned X, Y; _Complex double x, y; void test2(int c) { X = ~Y; x = ~y; } llvm-svn: 41341
-
- Aug 23, 2007
-
-
Chris Lattner authored
llvm-svn: 41340
-
Chris Lattner authored
"case sizeof x:" instead of: "case sizeofx:" llvm-svn: 41339
-
Chris Lattner authored
sizeof(x) doesn't require x to be an i-c-e for sizeof to be an i-c-e. Thanks to Neil for pointing this out. llvm-svn: 41338
-
Ted Kremenek authored
from the class declaration. This enables a nice view of what visitor methods have been implemented. llvm-svn: 41337
-
Chris Lattner authored
llvm-svn: 41336
-
Steve Naroff authored
Now, the following test case succeeds... _Complex double x, y; void test2(int c) { ++x; } llvm-svn: 41335
-
Ted Kremenek authored
llvm-svn: 41334
-
Steve Naroff authored
- Cleanup "hack" comment and fix typos. - Use getLang().ObjC2 when appropriate. llvm-svn: 41333
-
Ted Kremenek authored
llvm-svn: 41332
-