- May 28, 2007
-
-
Chris Lattner authored
llvm-svn: 39504
-
Chris Lattner authored
llvm-svn: 39503
-
Chris Lattner authored
llvm-svn: 39502
-
Steve Naroff authored
Submitted by: Reviewed by: - Added type checking to Sema::ParseReturnStmt (still under construction). - Improved Expr::isLvalue() and Expr::isModifiableLvalue() to return more info. Used the info in Sema::CheckAssignmentOperands() to produce more descriptive diagnostics. Added FIXME to other clients of isLvalue()/etc. - Added a SourceLocation slot to MemberExpr...changed the implementation of getSourceRange(). - Added getResultType() helper to FunctionDecl. - Changed many Diag calls to use the SourceRange support (now that it's a big hit...we better milk it:-). llvm-svn: 39501
-
Bill Wendling authored
Submitted by: Bill Wendling Reviewed by: - Can do just a 'cast<>()' because we're checking that it's Tagged. llvm-svn: 39500
-
Bill Wendling authored
Submitted by: Bill Wendling Reviewed by: Steve Naroff - Steve suggested avoiding the dyn_cast by using the "Tagged" type class and having the "default" just return false. llvm-svn: 39499
-
Bill Wendling authored
Submitted by: Bill Wendling Reviewed by: Chris Lattner - Rework the isDerivedType method so that if a language doesn't support references, it won't have to pay the price for them. This inlines the checks for derived types and turns it into a switch statement instead. llvm-svn: 39498
-
- May 27, 2007
-
-
Bill Wendling authored
Submitted by: Bill Wendling Reviewed by: C++ references testcase. llvm-svn: 39497
-
Bill Wendling authored
Submitted by: Bill Wendling Reviewed by: Chris Lattner - Initial support for C++ references. Adding to the AST and Parser. Skeletal support added in the semantic analysis portion. Full semantic analysis is to be done soon. llvm-svn: 39496
-
- May 24, 2007
-
-
Chris Lattner authored
library to be built for the driver to link. llvm-svn: 39495
-
Chris Lattner authored
llvm-svn: 39494
-
Chris Lattner authored
constants. llvm-svn: 39493
-
Chris Lattner authored
llvm-svn: 39492
-
Chris Lattner authored
llvm-svn: 39491
-
Chris Lattner authored
llvm-svn: 39490
-
Chris Lattner authored
llvm-svn: 39489
-
Chris Lattner authored
llvm-svn: 39488
-
Chris Lattner authored
llvm-svn: 39487
-
Chris Lattner authored
llvm-svn: 39486
-
- May 23, 2007
-
-
Steve Naroff authored
Submitted by: Reviewed by: Added "global" statistics gathering for Decls/Stmts/Exprs. Very useful for working with a single file. When we start compiling multiple files, will need to enhance this to collect stats on a per-module basis. llvm-svn: 39485
-
Bill Wendling authored
Submitted by: Bill Wendling Reviewed by: Chris Lattner - Removed unneeded <iostream> header. llvm-svn: 39484
-
Bill Wendling authored
Submitted by: Bill Wendling Reviewed by: Chris Lattner - Changed "std::cerr" to "OS" stream to be consistent with the other outputs in the method. llvm-svn: 39483
-
Bill Wendling authored
Submitted by: Bill Wendling Reviewed by: Chris Lattner - Comment fix. llvm-svn: 39482
-
- May 22, 2007
-
-
Steve Naroff authored
Submitted by: Reviewed by: One bug compiling "Carbon.h" on Leopard, one diagnostic tweak. - CheckIndirectionOperand wasn't operating on the canonical type (so it was complaining about typedef names). - The diagnostic was less than great. Here's what is was: [dylan:~/llvm/tools/clang] admin% ../../Debug/bin/clang t.c t.c:4:3: error: invalid argument type to unary expression 'int' *p; ^~ And here's what I changed it to... snaroff:clang naroff$ ../../Debug/bin/clang bug.c bug.c:5:3: error: indirection requires a pointer ('int' operand invalid) *p; ^~ llvm-svn: 39481
-
Steve Naroff authored
Submitted by: Reviewed by: Add Makefile llvm-svn: 39480
-
- May 21, 2007
-
-
Chris Lattner authored
llvm-svn: 39479
-
Chris Lattner authored
llvm-svn: 39478
-
Chris Lattner authored
llvm-svn: 39477
-
Chris Lattner authored
llvm-svn: 39476
-
Chris Lattner authored
integer constants, whoa! :) llvm-svn: 39475
-
Chris Lattner authored
where the parser emitted bogus diagnostics. Before, when compiling: struct A { int X; } someA; int func(int, struct A); int test1(void *P, int C) { return func(((C*40) + *P) / 42+P, someA); } we emitted: bug3.c:7:25: error: invalid operands to binary expression ('int' and 'void') return func(((C*40) + *P) / 42+P, someA); ~~~~~~ ^ ~~ bug3.c:7:31: error: expected ')' return func(((C*40) + *P) / 42+P, someA); ^ bug3.c:7:16: error: to match this '(' return func(((C*40) + *P) / 42+P, someA); ^ now we only emit the first. llvm-svn: 39474
-
Chris Lattner authored
and correctly in terms of C99 6.4.4.1p5. llvm-svn: 39473
-
Chris Lattner authored
llvm-svn: 39472
-
Chris Lattner authored
llvm-svn: 39471
-
Chris Lattner authored
llvm-svn: 39470
-
Chris Lattner authored
llvm-svn: 39469
-
Chris Lattner authored
void foo() { abc: def: hij: case 1: case 1: goto abc baz: goto def } instead of: void foo() { abc: def: hij: case 1: case 1: goto abc baz: goto def } llvm-svn: 39468
-
Chris Lattner authored
llvm-svn: 39467
-
- May 20, 2007
-
-
Steve Naroff authored
Submitted by: Reviewed by: Bozo bug in last checkin. Needed to move the check for null pointers up (and out of the pointer/pointer clause). llvm-svn: 39466
-
Chris Lattner authored
#define friendlystruct fs struct A { int X; }; void test2(struct A friendlystruct, int C) { return friendlystruct + (C *40); } were getting diagnosed like this: t.c:7:27: error: invalid operands to binary expression ('struct A' and 'int') return friendlystruct + (C *40); ~~ ^ ~~~~~~~~~~~ The problem is that getCharacterData returns a pointer to the macro expansion, not to the macro instantiation. Instead, use getLogicalLoc to get a pointer to the instatiation location, so we relex the macro id. We now get: t.c:7:27: error: invalid operands to binary expression ('struct A' and 'int') return friendlystruct + (C *40); ~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~ oooh ahh. :) llvm-svn: 39465
-