Commit Graph

6156 Commits

Author SHA1 Message Date
Bill Wendling 6811c0b5f3 Bug #:
Submitted by: Bill Wendling
Reviewed by:

C++ references testcase.

llvm-svn: 39497
2007-05-27 10:16:12 +00:00
Chris Lattner 99ca091b9c Warn when performing 'usual' conversions that require a sign change. This
implements test/Preprocessor/expr_usual_conversions.c, which produces this
output:

expr_usual_conversions.c:5:10: warning: left side of operator converted from negative value to unsigned: -42 to 18446744073709551574
#if (-42 + 0U) / -2
         ^
expr_usual_conversions.c:5:16: warning: right side of operator converted from negative value to unsigned: -2 to 18446744073709551614
#if (-42 + 0U) / -2
               ^

llvm-svn: 39406
2007-04-11 04:14:45 +00:00
Chris Lattner 9e2fcccc33 Fix run line
llvm-svn: 39401
2007-04-10 07:06:36 +00:00
Chris Lattner a7fa1b247c 'true' in a CPP expression evaluates to 1 when in C++ mode. This implements
test/Preprocessor/cxx_true.cpp

llvm-svn: 39399
2007-04-10 06:16:30 +00:00
Chris Lattner 6acf759735 new testcase
llvm-svn: 39396
2007-04-10 05:25:39 +00:00
Bill Wendling 82487e1ac3 Testcase for bool types.
llvm-svn: 39339
2007-02-13 01:52:09 +00:00
Chris Lattner a4792c1e64 new testcase that crashed clang
llvm-svn: 39315
2007-01-27 06:23:34 +00:00
Chris Lattner 41175f40a3 random testcase
llvm-svn: 39301
2007-01-25 07:42:11 +00:00
Chris Lattner 8eaca54d76 new testcase
llvm-svn: 39287
2007-01-23 20:16:22 +00:00
Chris Lattner 3e30f7c70f add a testcase for c++ casting operators, by Bill
llvm-svn: 39285
2007-01-23 06:12:15 +00:00
Chris Lattner 23f2e9e687 new testcase
llvm-svn: 39271
2007-01-23 01:32:33 +00:00
Chris Lattner ac71608b17 new testcase
llvm-svn: 39251
2007-01-21 06:56:08 +00:00
Chris Lattner 1b65aaef2b improve this test to also check -fno-operator-keywords.
llvm-svn: 39246
2006-12-04 18:00:36 +00:00
Chris Lattner c81f079d7e move void argument checking from the parser to the semantic analysis stage.
This allows us to handle typedefs of void correctly.  This implements
clang/test/Sema/void_arg.c

llvm-svn: 39236
2006-12-03 02:43:54 +00:00
Chris Lattner 784b168c92 new testcase
llvm-svn: 39233
2006-12-02 07:59:33 +00:00
Chris Lattner c5b966f893 check minutia of the standard.
llvm-svn: 39215
2006-11-21 17:31:32 +00:00
Chris Lattner 5b9f4891d7 Add support for C++ operator keywords. Patch by Bill Wendling.
llvm-svn: 39214
2006-11-21 17:23:33 +00:00
Chris Lattner 058b4b6b41 run .cpp files as tests
llvm-svn: 39213
2006-11-21 17:22:28 +00:00
Chris Lattner 017865fb62 adjust test
llvm-svn: 39201
2006-11-21 04:06:06 +00:00
Chris Lattner eda517e456 new testcase
llvm-svn: 39195
2006-11-20 07:03:41 +00:00
Chris Lattner 33ad2cacc9 Make Scope keep track of the kind of scope it is. Properly scope loop and
switch statements.  Make break/continue check that they are inside of an
appropriate control-flow construct.  This implements Parser/bad-control.c.

llvm-svn: 39136
2006-11-05 23:47:55 +00:00
Chris Lattner ce999c490a new testcase
llvm-svn: 39068
2006-10-27 05:43:33 +00:00
Chris Lattner a32cda40b5 make this harder
llvm-svn: 39054
2006-10-25 06:21:19 +00:00
Chris Lattner 1178cbd941 new testcase
llvm-svn: 39053
2006-10-25 06:18:35 +00:00
Chris Lattner 19f4440f5b new testcase
llvm-svn: 39040
2006-10-25 03:14:54 +00:00
Chris Lattner 2bda2df3dc new testcase
llvm-svn: 39020
2006-10-20 05:08:12 +00:00
Chris Lattner 43ec2ce473 new testcase
llvm-svn: 39000
2006-10-17 03:00:45 +00:00
Chris Lattner dee9b26fb8 new testcase
llvm-svn: 38996
2006-10-17 02:53:13 +00:00
Chris Lattner 02846975da new testcase
llvm-svn: 38982
2006-10-14 19:53:37 +00:00
Chris Lattner 3e8b4d2854 new testcase for #define_target.
llvm-svn: 38981
2006-10-14 19:09:13 +00:00
Chris Lattner aecc057c64 new testcase
llvm-svn: 38976
2006-10-14 07:54:12 +00:00
Chris Lattner 8f46a38503 new testcase
llvm-svn: 38953
2006-10-06 02:59:40 +00:00
Chris Lattner 3ca67ba67f new testcase
llvm-svn: 38927
2006-08-15 05:11:49 +00:00
Chris Lattner 7bddb3fc61 add bare struct tag decls.
llvm-svn: 38899
2006-08-13 19:59:13 +00:00
Chris Lattner 5b6032ab3c new offsetof testcase
llvm-svn: 38892
2006-08-12 19:15:40 +00:00
Chris Lattner 3b51ddf438 new testcase
llvm-svn: 38889
2006-08-12 18:40:31 +00:00
Chris Lattner 2c5c421203 add test4
llvm-svn: 38886
2006-08-12 18:11:24 +00:00
Chris Lattner e66218bf49 Split the expression tests out of statements.c into expressions.c
llvm-svn: 38882
2006-08-12 17:19:28 +00:00
Chris Lattner 89d53752f5 Fix parsing of assignment expressions and handling of right-associative
things.

llvm-svn: 38881
2006-08-12 17:18:19 +00:00
Chris Lattner eb17652f5f Check that ?: parses its RHS as 'expression'.
llvm-svn: 38878
2006-08-12 17:04:23 +00:00
Chris Lattner 3401781548 Add another testcase
llvm-svn: 38870
2006-08-11 02:12:35 +00:00
Chris Lattner eddbcb2b12 Add sizeof/cast/compound_expr tests.
llvm-svn: 38867
2006-08-11 01:38:08 +00:00
Chris Lattner 2f9980ef14 Implement Parser/statements.c:test5: parsing decls that start with identifiers
in blocks.

llvm-svn: 38854
2006-08-10 18:39:24 +00:00
Chris Lattner 6dfd97806e Add support for simple labels.
llvm-svn: 38853
2006-08-10 18:31:37 +00:00
Chris Lattner f8afb62ef9 Add support for parsing declarations in blocks. This implements
Parser/statements.c:test4

llvm-svn: 38852
2006-08-10 18:26:31 +00:00
Chris Lattner 97353f2327 add test3
llvm-svn: 38850
2006-08-10 05:59:30 +00:00
Chris Lattner 53361ac130 Refactor init-declarator-list parsing code to allow for-statements to have
initializers in them.

llvm-svn: 38847
2006-08-10 05:19:57 +00:00
Chris Lattner 905caf37a0 add test2
llvm-svn: 38845
2006-08-10 04:59:23 +00:00
Chris Lattner 4dfe4b9da1 new testcase
llvm-svn: 38843
2006-08-09 05:47:56 +00:00
Chris Lattner 944bde95ef new testcase
llvm-svn: 38832
2006-08-06 21:55:13 +00:00
Chris Lattner cc211add25 Make this testcase pass the right arg.
llvm-svn: 38829
2006-08-06 18:31:20 +00:00
Chris Lattner c697e028c6 Run tests in a specific order
llvm-svn: 38826
2006-08-06 18:29:35 +00:00
Chris Lattner df89dd42d7 new testcase
llvm-svn: 38825
2006-08-06 18:22:00 +00:00
Chris Lattner b10969b9b2 new testcase
llvm-svn: 38799
2006-07-30 07:33:49 +00:00
Chris Lattner 022b62e941 new testcase
llvm-svn: 38798
2006-07-30 07:20:09 +00:00
Chris Lattner 8d31b5d1aa new testcase
llvm-svn: 38794
2006-07-29 07:32:40 +00:00
Chris Lattner 2641bd549c new testcase
llvm-svn: 38792
2006-07-29 07:19:41 +00:00
Chris Lattner 5b123fde96 new testcase
llvm-svn: 38790
2006-07-29 07:08:39 +00:00
Chris Lattner b631d7ce6c new testcase
llvm-svn: 38789
2006-07-29 06:59:47 +00:00
Chris Lattner 232daf6834 testcase from the c99 standard
llvm-svn: 38788
2006-07-29 06:48:55 +00:00
Chris Lattner 15d6b28f09 new testcase
llvm-svn: 38786
2006-07-29 06:44:19 +00:00
Chris Lattner f35d327a99 Testcases for comment saving modes, -C and -CC.
llvm-svn: 38785
2006-07-29 06:41:10 +00:00
Chris Lattner d480b9c0ed new testcase for the GNU comma swallow extension.
llvm-svn: 38779
2006-07-29 04:39:12 +00:00
Chris Lattner 63081842a7 new testcase for placemarker handling.
llvm-svn: 38777
2006-07-29 04:09:49 +00:00
Chris Lattner 2bc48570b7 new testcase for __VA_ARGS__
llvm-svn: 38775
2006-07-29 04:03:59 +00:00
Chris Lattner f30dcbe07e new testcase
llvm-svn: 38768
2006-07-29 01:24:46 +00:00
Chris Lattner 3961e60991 Tweak expected results do to paste avoidance.
llvm-svn: 38766
2006-07-28 06:55:35 +00:00
Chris Lattner 341c9a1615 new testcase for paste avoidance
llvm-svn: 38765
2006-07-28 06:54:07 +00:00
Chris Lattner b1d2594456 Add test for pasting empty formals
llvm-svn: 38763
2006-07-28 05:13:36 +00:00
Chris Lattner fdc0abe619 new testcase
llvm-svn: 38759
2006-07-27 06:17:55 +00:00
Chris Lattner 032e6170af new testcase
llvm-svn: 38750
2006-07-20 06:06:55 +00:00
Chris Lattner 0f1f50517b Simplify identifier lookup in raw mode, implementing Preprocessor/macro_fn_lparen_scan2.c.
llvm-svn: 38744
2006-07-20 04:16:23 +00:00
Chris Lattner 9100cff701 new testcase
llvm-svn: 38743
2006-07-19 08:13:21 +00:00
Chris Lattner ae637cd2a9 new testcase from c99 rationale
llvm-svn: 38742
2006-07-19 08:04:22 +00:00
Chris Lattner e11dd370ec new testcase
llvm-svn: 38741
2006-07-19 08:01:28 +00:00
Chris Lattner 85c0e4d780 new testcase
llvm-svn: 38739
2006-07-19 06:40:07 +00:00
Chris Lattner b563379d78 Make this testcase more interesting, actually add a RUN line.
llvm-svn: 38738
2006-07-19 06:34:41 +00:00
Chris Lattner a7e2e74cef Avoid testing / ## * in the lexer. This will cause an unhelpful error message
to be emitted from the lexer.  This fixes macro_paste_c_block_comment.c

llvm-svn: 38737
2006-07-19 06:32:35 +00:00
Chris Lattner 30a2fa14ae Move LexingRawMode handling of file EOF out of the preprocessor into the
lexer.  This makes more logical sense and also unbreaks the case when the
lexer hasn't been pushed onto the PP include stack.  This is the case when
pasting identifiers.  This patch implements macro_paste_bcpl_comment.c.

llvm-svn: 38736
2006-07-19 06:31:49 +00:00
Chris Lattner ab30c0360d Make this testcase more interesting, actually add run lines :)
llvm-svn: 38735
2006-07-19 05:48:15 +00:00
Chris Lattner e8dcfef324 Fix test/Preprocessor/macro_paste_spacing.c
llvm-svn: 38734
2006-07-19 05:45:55 +00:00
Chris Lattner 01ecf835c2 Implement basic token pasting (## operator). This implements
test/Preprocessor/macro_paste_simple.c and macro_paste_bad.c.  There are
several known bugs still.

llvm-svn: 38733
2006-07-19 05:42:48 +00:00
Chris Lattner 1e17abb2fd new testcase
llvm-svn: 38723
2006-07-16 18:15:05 +00:00
Chris Lattner 1b9f17bc6e new testcase
llvm-svn: 38719
2006-07-15 21:06:48 +00:00
Chris Lattner 6ae37dfba3 new testcase
llvm-svn: 38714
2006-07-15 06:53:24 +00:00
Chris Lattner f69f835398 new testcase
llvm-svn: 38704
2006-07-11 05:53:01 +00:00
Chris Lattner b63d9de243 new tests
llvm-svn: 38698
2006-07-11 05:03:43 +00:00
Chris Lattner 53ede2a826 new testcase
llvm-svn: 38693
2006-07-11 04:00:23 +00:00
Chris Lattner 08e0035668 ignore cruft
llvm-svn: 38656
2006-07-04 19:03:05 +00:00
Chris Lattner 1c9c0d0749 new testcase
llvm-svn: 38641
2006-07-03 06:28:30 +00:00
Chris Lattner 45197e935c new testcase
llvm-svn: 38633
2006-07-03 05:25:52 +00:00
Chris Lattner d94adee36d new testcase
llvm-svn: 38626
2006-07-03 01:26:39 +00:00
Chris Lattner e55e11ad04 new testcase
llvm-svn: 38618
2006-07-02 22:59:48 +00:00
Chris Lattner 20fc36c416 new testcase
llvm-svn: 38613
2006-07-02 22:27:09 +00:00
Chris Lattner a7e7e2b92d new testcase
llvm-svn: 38611
2006-07-02 21:50:31 +00:00
Chris Lattner d6178a6870 new testcase
llvm-svn: 38608
2006-07-02 21:23:03 +00:00
Chris Lattner 0acd4fee90 new testcase
llvm-svn: 38605
2006-07-02 20:31:44 +00:00
Chris Lattner f378f9a08f Fix the predicate to be more strict
llvm-svn: 38593
2006-06-29 16:43:46 +00:00
Chris Lattner 677e3a202c new testcase
llvm-svn: 38592
2006-06-29 16:25:13 +00:00
Chris Lattner 64f7bd0e6e New testcase
llvm-svn: 38576
2006-06-26 01:26:26 +00:00
Chris Lattner 0a401cca91 new testcase
llvm-svn: 38575
2006-06-26 01:25:11 +00:00
Chris Lattner 36f0003d16 New testcases
llvm-svn: 38572
2006-06-25 05:40:49 +00:00
Chris Lattner 6d45fe842e utility file
llvm-svn: 38546
2006-06-18 07:18:04 +00:00
Chris Lattner 4322e2201b new testcase
llvm-svn: 38545
2006-06-18 07:16:30 +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