- May 30, 2007
-
-
Steve Naroff authored
Submitted by: Reviewed by: - ParseForStatement(): Put back a test/assignment. My removal of ParseExprStmt() was a bit over zealous:-(thanks to Chris for pointing it out) - Add assert to VisitDeclStmt(). - Removed an out-of-date FIXME - Added some curlies for a couple multi-line calls to Diag(). llvm-svn: 39528
-
Bill Wendling authored
Comment format changes. llvm-svn: 39527
-
Steve Naroff authored
Submitted by: Reviewed by: - Many tweaks to various diagnostics. - Fixed some location/range issues. - Bug fix to Sema::ParseDeclStmt() - error return code is "true", not 0. llvm-svn: 39526
-
Bill Wendling authored
- Conjugate "diagnostic" correctly for 1 diagnostic. llvm-svn: 39525
-
Chris Lattner authored
void test1() { foo: goto foo; goto foo; goto foo; } void test() { goto l; l: ; } into: define void @test1() { entry: br label %foo foo: ; preds = %0, %foo, %entry br label %foo ; No predecessors! br label %foo ; No predecessors! } define void @test() { entry: br label %l l: ; preds = %entry } llvm-svn: 39524
-
Steve Naroff authored
Submitted by: Reviewed by: Unified the diagnostics for function calls. Since we have range support, there is no need for including the argument number. Instead, I've made the diags more expressive by including more type info. Also improved the indentation of many calls to Diag (which can be 2-3 lines now). llvm-svn: 39523
-
Chris Lattner authored
llvm-svn: 39522
-
Chris Lattner authored
llvm-svn: 39521
-
Chris Lattner authored
llvm-svn: 39520
-
Chris Lattner authored
cases. llvm-svn: 39519
-
Steve Naroff authored
Submitted by: Reviewed by: Implement some FIXME's that stand in the way of fully typechecking "for" statements. This involved: - Adding a DeclStmt AST node (with statement visitor). The DeclStmt printer is preliminary. - Added a ParseDeclStmt action, called from Parser::ParseForStatement() and Parser::ParseStatementOrDeclaration(). DID NOT add to Parser::ParseIdentifierStatement()...probably could have, however didn't really understand the context of this rule (will speak with Chris). - Removed ParseExprStmt (and it's clients)...it was vestigial. llvm-svn: 39518
-
- May 29, 2007
-
-
Steve Naroff authored
Submitted by: Reviewed by: - Finished Sema::ParseReturnStmt(). Still need to tweak ranges. - Tweaked location for function arguments (they now point at the expression directly, no parens or commas). - Added InvalidOperands helper...was sick of looking at the same 3 lines in ~9 Check functions. - Added a few diags and moved a group of statement diags to the proper comment/category. llvm-svn: 39517
-
Chris Lattner authored
extern int pintFunc(int *, int *); int test() { pintFunc(0, 3); } We now print: t3.c:4:13: warning: passing argument 2 makes pointer from integer without a cast pintFunc(0, ~~~~~~~~ ^ instead of: t3.c:4:13: warning: passing argument 2 makes pointer from integer without a cast pintFunc(0, ~~~~~~~~ llvm-svn: 39516
-
Steve Naroff authored
Submitted by: Reviewed by: Implement type checking for ParseDoStmt, ParseWhileStmt, ParseIfStmt, and ParseForStmt. ParseForStmt still under construction (contains a FIXME). llvm-svn: 39515
-
- May 28, 2007
-
-
Steve Naroff authored
Submitted by: Reviewed by: Add range support to Sema::CheckConditionalOperands(). llvm-svn: 39514
-
Steve Naroff authored
Submitted by: Reviewed by: Refine Sema::ParseCallExpr() diags (range support, add types). Before: func-assign.c:27:11: warning: passing argument 1 from incompatible pointer type pintFunc(&FOO); ^ func-assign.c:28:12: error: incompatible type for argument 1 floatFunc(&FOO); ^ func-assign.c:29:12: error: too many arguments to function floatFunc(1,2,3); ^ After: func-assign.c:27:11: warning: passing incompatible pointer 'struct foo *' to function expecting 'int *' pintFunc(&FOO); ~~~~~~~~^~~~~ func-assign.c:28:12: error: passing incompatible type 'struct foo *' to function expecting 'float' floatFunc(&FOO); ~~~~~~~~~^~~~~ func-assign.c:29:12: error: too many arguments to function floatFunc(1,2,3); ~~~~~~~~~^ ~ llvm-svn: 39513
-
Steve Naroff authored
Submitted by: Reviewed by: - Implement FIXME in Sema::CheckIndirectionOperand(). - Added "const" to FunctionDecl::getResultType(). llvm-svn: 39512
-
Chris Lattner authored
llvm-svn: 39511
-
Chris Lattner authored
llvm-svn: 39510
-
Chris Lattner authored
the label identifier. Handle fwd references etc. This allows us to detect uses of undefined labels and label redefinitions, such as: t.c:2:12: error: redefinition of label 'abc' abc: ; abc: ^ t.c:2:3: error: previous definition is here abc: ; abc: ^ t.c:12:12: error: use of undeclared label 'hijl' goto hijl; ^ llvm-svn: 39509
-
Chris Lattner authored
void foo() { if (0) break; abc: def: hij: break; into: void foo() { if ((0)') ; abc: def: hij: ; instead of dropping the if and labels (due to break not being in a loop). llvm-svn: 39508
-
Chris Lattner authored
llvm-svn: 39507
-
Chris Lattner authored
llvm-svn: 39506
-
Chris Lattner authored
llvm-svn: 39505
-
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
-