Commit Graph

36 Commits

Author SHA1 Message Date
Chris Lattner 5882771102 Fix PR2477 - clang misparses "//*" in C89 mode
llvm-svn: 62368
2009-01-16 22:39:25 +00:00
Chris Lattner e141a9e225 rdar://6060752 - don't warn about trigraphs in bcpl-style comments
llvm-svn: 60942
2008-12-12 07:34:39 +00:00
Chris Lattner 1759ea400e split into two tests.
llvm-svn: 59770
2008-11-21 01:04:13 +00:00
Argyrios Kyrtzidis 32a0379575 Implement support for C++ nested-name-specifiers ('foo::bar::x') in the Parser side.
No Sema functionality change, just the signatures of the Action/Sema methods.

llvm-svn: 58913
2008-11-08 16:45:02 +00:00
Daniel Dunbar 0335024c4a Test case for previous commit (Workaround gcc bug causing crash on our
preprocessed outputs)

llvm-svn: 55826
2008-09-05 03:23:51 +00:00
Ted Kremenek b44763456c Following gcc's behavior, only enable trigraphs if '-trigraphs' or '-ansi' is
specified, or -std is set to a conforming mode.

llvm-svn: 55738
2008-09-03 21:22:16 +00:00
Eli Friedman ee29c9c2fc Fix for PR2750; don't check for an 'e' in the trash after the token.
Note that this isn't really a complete fix; I think there are other 
potential overrun situations.  I don't really know what the best 
systematic fix is, though.

llvm-svn: 55622
2008-09-02 05:29:22 +00:00
Chris Lattner 31614aeb0a update this testcase.
llvm-svn: 54037
2008-07-25 18:42:46 +00:00
Daniel Dunbar c481f72857 Add test case for hex floating point constants in < C99 mode
- For: rdar://6096838

llvm-svn: 54036
2008-07-25 18:41:57 +00:00
Chris Lattner 1cb0e61e98 Fix PR2252: don't warn on negating an unsigned value ever, and don't emit
'integer constant is so large that it is unsigned' warning for hex literals.

llvm-svn: 53070
2008-07-03 03:47:30 +00:00
Chris Lattner d68c04f162 Fix a bug reported by Kelly Wilson, where we incorrectly
rejected FP immediates like 08.123

llvm-svn: 52890
2008-06-30 06:44:49 +00:00
Argyrios Kyrtzidis 351763e156 Multiple tests in a single test file must be linked with '&&'.
Otherwise, failing tests other than the last one will not be reported.

llvm-svn: 52231
2008-06-12 12:40:02 +00:00
Eli Friedman 940a7c0cf8 Fix the run line for this test.
llvm-svn: 52169
2008-06-10 05:18:06 +00:00
Eli Friedman 4f64def9ee Make this test C instead of C++; making it C++ causes a failure on Linux
because clang can't parse stdio.h in C++ mode yet.

llvm-svn: 52168
2008-06-10 05:14:31 +00:00
Nuno Lopes 363212b3fa fix PR2357 (#ifs didnt invalidate the multiple-inclusion optimization state)
llvm-svn: 51843
2008-06-01 18:31:24 +00:00
Chris Lattner 5329e7e5ed Fix PR2090, a typo in digraph processing.
llvm-svn: 47540
2008-02-24 19:05:57 +00:00
Chris Lattner b5eda6253b pull .ll and .bc writing out of the ASTConsumer destructors into some top
level code in clang.  This is a cleanup, but does implement "-o" for 
-emit-llvm.  One effect of this is that "clang foo.c -emit-llvm" will now
emit into foo.ll instead of stdout.  Use "clang foo.c -emit-llvm -o -" or 
"clang < foo.c -emit-llvm" to get the old behavior.

llvm-svn: 46791
2008-02-06 01:42:25 +00:00
Chris Lattner c238331377 Add support for #pragma mark, which shouldn't warn about bogus tokens.
llvm-svn: 45212
2007-12-19 19:38:36 +00:00
Christopher Lamb 0112f62bb9 Doh! Check in this long overdue test fix.
llvm-svn: 44450
2007-11-30 06:35:48 +00:00
Christopher Lamb 42e69f219d Support floating point literals of the form "1e-16f" which specify an exponent but no decimal point.
llvm-svn: 44431
2007-11-29 06:06:27 +00:00
Bill Wendling 8da1db4f34 The checking for the delimiters of expected error/warning messages was
looking only for { and } instead of {{ and }}. Changed it to check for
this explicitly.

llvm-svn: 44326
2007-11-26 08:26:20 +00:00
Chris Lattner e6c7a858b0 Fix a bug handling hex floats in c90 mode, pointed out by Neil.
llvm-svn: 44120
2007-11-14 16:14:50 +00:00
Chris Lattner 5e4c75f4ef rename -parse-ast-print to -ast-print
rename -parse-ast-dump to -ast-dump
remove -parse-ast, which is redundant with -fsyntax-only

llvm-svn: 42852
2007-10-11 00:18:28 +00:00
Ted Kremenek 0883fd5817 Removed option "-parse-ast-check" from clang driver. This is now implemented
using "-parse-ast -verify".

Updated all test cases (using a sed script) that invoked -parse-ast-check to
now use -parse-ast -verify.

Fixed a bug where using "-verify" instead of "-parse-ast-check" would not
correctly create the DiagClient needed to accumulate diagnostics.

llvm-svn: 42365
2007-09-26 20:14:22 +00:00
Chris Lattner c850ad6ee1 Fix a lexer bug where we incorrectly rejected
int i = /*/ */ 1;

Thanks to Neil for pointing this out.

llvm-svn: 40379
2007-07-21 23:43:37 +00:00
Chris Lattner bb1b44f004 Make octal constant lexing use AdvanceToTokenCharacter to give more
accurate diagnostics.  For test/Lexer/comments.c we now emit:

int x = 000000080;  /* expected-error {{invalid digit}} */
               ^
constants.c:7:4: error: invalid digit '8' in octal constant
00080;             /* expected-error {{invalid digit}} */
   ^


The last line is due to an escaped newline.  The full line looks like:

int y = 0000\
00080;             /* expected-error {{invalid digit}} */


Previously, we emitted:
constants.c:4:9: error: invalid digit '8' in octal constant
int x = 000000080;  /* expected-error {{invalid digit}} */
        ^
constants.c:6:9: error: invalid digit '8' in octal constant
int y = 0000\
        ^

which isn't too bad, but the new way is better for the user,
regardless of whether there is an escaped newline or not.

All the other lexer-related diagnostics should switch over 
to using AdvanceToTokenCharacter where appropriate.  Help
wanted :).

This implements test/Lexer/constants.c.

llvm-svn: 39906
2007-07-16 06:55:01 +00:00
Chris Lattner 539007a78a Add support for C++'0x keywords, patch by Doug Gregor
llvm-svn: 39897
2007-07-16 04:18:29 +00:00
Chris Lattner bdf3f73eeb fix this test to work with the checker.
llvm-svn: 39708
2007-06-28 05:49:50 +00:00
Bill Wendling 764b90ad4e Submitted by: Bill Wendling
- Revert use of -parse-ast-check.

llvm-svn: 39695
2007-06-27 18:13:04 +00:00
Bill Wendling fdddfc115e Submitted by: Bill Wendling
Reviewed by: Chris Lattner

- Reverted some checks because they're checking the preprocessor output.

llvm-svn: 39687
2007-06-27 07:26:41 +00:00
Bill Wendling ff1d2c81ba Submitted by: Bill Wendling
- Convert to using the -parse-ast-check method to check warnings and
  errors.

llvm-svn: 39680
2007-06-27 04:07:44 +00:00
Chris Lattner dee9b26fb8 new testcase
llvm-svn: 38996
2006-10-17 02:53:13 +00:00
Chris Lattner 032e6170af new testcase
llvm-svn: 38750
2006-07-20 06:06:55 +00:00
Chris Lattner f69f835398 new testcase
llvm-svn: 38704
2006-07-11 05:53:01 +00:00
Chris Lattner 1500881bd9 new testcase
llvm-svn: 38544
2006-06-18 07:00:07 +00:00
Chris Lattner 31eef321bf Initial checkin of testsuite
llvm-svn: 38538
2006-06-18 05:42:02 +00:00