Commit Graph

662 Commits

Author SHA1 Message Date
Chris Lattner 4114219ac6 rewriter tests are darwin specific, don't run them on other platforms.
llvm-svn: 48168
2008-03-10 19:32:31 +00:00
Chris Lattner 3e4683262e implement simple support for arbitrary token lookahead. Change the
objc @try parser to use it, fixing a FIXME.  Update the 
objc-try-catch-1.m file to pass now that we get more reasonable 
errors.

llvm-svn: 48129
2008-03-10 06:06:04 +00:00
Nate Begeman be6bb8efac Add new test
llvm-svn: 48018
2008-03-07 20:04:49 +00:00
Ted Kremenek 7bdd630334 Patch by Nuno Lopes:
Added more comments for code processing attribute "format".
  Added more checks for corner cases, test cases, and warnings.

llvm-svn: 48011
2008-03-07 18:43:49 +00:00
Chris Lattner 54ee63886e remove two obsolete tests, not sure why my previous commit didn't commit the removal.
llvm-svn: 47986
2008-03-06 05:47:17 +00:00
Chris Lattner 855d024a83 Remove the first layer of support for "portability" warnings. This is
theoretically useful, but not useful in practice.  It adds a bunch of 
complexity, and not much value.  It's best to nuke it.  One big advantage
is that it means the target interfaces will soon lose their SLoc arguments
and target queries can never emit diagnostics anymore (yay).  Removing this
also simplifies some of the core preprocessor which should make it slightly
faster.

Ted, I didn't simplify TripleProcessor, which can now have at most one
triple, and can probably just be removed.  Please poke at it when you have
time.

llvm-svn: 47930
2008-03-05 01:18:20 +00:00
Chris Lattner 0fdc379475 The operand to the visibility attribute is required to be a quoted string, not a bare identifier.
llvm-svn: 47893
2008-03-04 18:08:48 +00:00
Chris Lattner 8e48dfe9a1 move deprecated -> attributes.c
llvm-svn: 47856
2008-03-03 21:17:42 +00:00
Gabor Greif e2e5c3f394 The attribute nothrow maps to llvm attribute nounwind. Fix testcase.
llvm-svn: 47841
2008-03-03 14:53:09 +00:00
Gabor Greif 76ac5cf9d3 Chris added this testcase with r47837. The mail only shows one todo-warning but I see 3. Strangeness. Correcting lines 16 and 24.
llvm-svn: 47840
2008-03-03 14:30:39 +00:00
Chris Lattner 65079bd9be fix codegen support for functions that are nothrow and noreturn.
llvm-svn: 47838
2008-03-03 03:45:26 +00:00
Chris Lattner 8496639787 Add a bunch of attributes, patch by Nuno Lopes.
llvm-svn: 47837
2008-03-03 03:28:21 +00:00
Steve Naroff b96e4ab649 Fix http://llvm.org/bugs/show_bug.cgi?id=2103.
llvm-svn: 47775
2008-02-29 23:30:25 +00:00
Steve Naroff 83777fef1a Fix http://llvm.org/bugs/show_bug.cgi?id=2106.
llvm-svn: 47768
2008-02-29 21:48:07 +00:00
Chris Lattner f4c1aa67bd testcase for attr deprecated, by Nuno Lopes.
llvm-svn: 47757
2008-02-29 18:11:31 +00:00
Lauro Ramos Venancio 01a72ff5d3 Implement codegen for the following static var init.
void g() {
  static char a[10];
  static char *b = a;
}

Now we can compile wget!

llvm-svn: 47627
2008-02-26 21:41:45 +00:00
Lauro Ramos Venancio 8af648ac55 Fix a bug in ConvertAsmString function.
llvm-svn: 47618
2008-02-26 19:19:58 +00:00
Lauro Ramos Venancio c9fbd7301a Convert x86 target specific inline asm constraints to LLVM.
llvm-svn: 47609
2008-02-26 18:33:46 +00:00
Lauro Ramos Venancio 8983891531 Fix PR2086.
llvm-svn: 47551
2008-02-25 19:03:15 +00:00
Chris Lattner 5329e7e5ed Fix PR2090, a typo in digraph processing.
llvm-svn: 47540
2008-02-24 19:05:57 +00:00
Nate Begeman b16d53ea31 add a test case
llvm-svn: 47455
2008-02-21 19:44:16 +00:00
Eli Friedman c62dd9d345 Some const initializer tests for stuff I just committed.
llvm-svn: 47442
2008-02-21 18:07:36 +00:00
Chris Lattner 3b418d8446 implement codegen support for sizeof(void), fixing PR2080.
llvm-svn: 47429
2008-02-21 05:45:29 +00:00
Chris Lattner a2417c9d8b add some semantic checks for address spaces.
llvm-svn: 47423
2008-02-21 01:42:41 +00:00
Lauro Ramos Venancio e2162c6549 Simplify aggregate initilizer implementation. Use the CodeGenModule::EmitConstantExpr method when
possible.
Fix mediabench/mpeg2/mpeg2dec test.

llvm-svn: 47336
2008-02-19 19:27:31 +00:00
Chris Lattner d2a02fe840 fix the second half of PR2041: __restrict is ok in c90 mode, even if
restrict isn't.

llvm-svn: 47316
2008-02-19 06:46:10 +00:00
Lauro Ramos Venancio c58fc4052e A global without initializer must be emitted as weak.
Fix Olden/bh test.

llvm-svn: 47292
2008-02-19 00:04:15 +00:00
Lauro Ramos Venancio dec89733a7 Implement multi-dimension array initalizer.
Fix McCat/08-main test.

llvm-svn: 47286
2008-02-18 22:44:02 +00:00
Steve Naroff f631ae2cf8 Tweak fix for http://llvm.org/bugs/show_bug.cgi?id=2000 to work across typedefs.
llvm-svn: 47269
2008-02-18 15:14:59 +00:00
Chris Lattner b080ed504e Fix PR2042. One remaining issue: we don't currently diagnose
int foobar(int);
 int foobar() {}

which requires ifdef'ing out a testcase in predefined-function.c.

llvm-svn: 47236
2008-02-17 19:31:09 +00:00
Eli Friedman f7e92acaba Implemnt isVariablyModifiedType correctly.
llvm-svn: 47233
2008-02-17 00:59:11 +00:00
Chris Lattner df53e20f2d implement codegen support for aggregates casted to void.
llvm-svn: 47226
2008-02-16 23:55:16 +00:00
Lauro Ramos Venancio bada8d4b5b Implement extern block var.
llvm-svn: 47223
2008-02-16 22:30:38 +00:00
Anders Carlsson f13b1efa75 Add more tests
llvm-svn: 47217
2008-02-16 19:51:36 +00:00
Chris Lattner 27055194b7 Fix CheckEndOfDirective to diagnose lines that contain macros that expand to
zero tokens.  This fixes PR2045, thanks to Neil for finding another 
incredibly subtle corner case :)

llvm-svn: 47203
2008-02-16 01:20:36 +00:00
Anders Carlsson 3ea23a45d9 Make sizeof and __alignof work correctly with packed structs.
llvm-svn: 47202
2008-02-16 01:20:23 +00:00
Chris Lattner 287c734075 Fix PR2041: restrict is not a keyword in c90.
llvm-svn: 47160
2008-02-15 18:02:59 +00:00
Eli Friedman 78e47634b2 Get rid of outdated code that masks type errors. Fixes PR2036.
llvm-svn: 47154
2008-02-15 06:56:02 +00:00
Eli Friedman e9d0954c06 Nevermind, these tests work... I messed up my testing.
llvm-svn: 47153
2008-02-15 06:29:53 +00:00
Eli Friedman a01cfa75eb Partial fix for struct compatibility; there's still something messy
going on with mixing scopes, though.

llvm-svn: 47152
2008-02-15 06:03:44 +00:00
Steve Naroff f631997cb5 A much better fix for http://llvm.org/bugs/show_bug.cgi?id=1987.
llvm-svn: 47103
2008-02-14 02:58:32 +00:00
Eli Friedman 2be9af9556 Fix a minor bug in isNullPointerConstant triggered by the linux
tgmath.h.

Note that there is another issue with tgmath.h, so mandel.c still 
doesn't work.

llvm-svn: 47069
2008-02-13 17:29:58 +00:00
Eli Friedman a7bf7ed476 Make typechecking for enum+int compatibility stricter.
llvm-svn: 47005
2008-02-12 08:46:17 +00:00
Eli Friedman 16f909670e Fix type compatibility between constant and variable arrays.
llvm-svn: 47003
2008-02-12 08:23:06 +00:00
Steve Naroff ab468cb14b Allow the parser to detect invalid DeclSpec's. This fixes http://llvm.org/bugs/show_bug.cgi?id=1987.
This commit only "guards" the call to ParseDeclarationSpecifiers() in ParseDeclarationOrFunctionDefinition(). 

We could consider guarding all calls, however this is a bit radical (since it effectively stops parsing the declaration once we have a bad declspec). Will discuss with Chris tomorrow.

llvm-svn: 46984
2008-02-12 04:08:59 +00:00
Anders Carlsson 6a8350b4f1 Get rid of bogus warnings when the second argument in va_start is either an implicit cast expr or a paren expr.
llvm-svn: 46950
2008-02-11 04:20:54 +00:00
Steve Naroff e78e2af754 Tweak test...
llvm-svn: 46946
2008-02-11 02:16:41 +00:00
Steve Naroff 326389b8ce Fix http://llvm.org/bugs/show_bug.cgi?id=1988.
Sema::CheckInitializerListTypes() needs to ignore invalid structures.

llvm-svn: 46942
2008-02-11 00:06:17 +00:00
Chris Lattner 36fc8790b7 Fix PR1992 by computing the right type for string literals, which
is an array type not a pointer type.  This requires updating some
diags that change and updating the code generator to handle the
proper form of strings.

llvm-svn: 46941
2008-02-11 00:02:17 +00:00
Eli Friedman de4496bb9e Basic codegen test for conditional with void*.
llvm-svn: 46940
2008-02-10 23:18:23 +00:00