Граф коммитов

27 Коммитов

Автор SHA1 Сообщение Дата
Chris Lattner bc3e984221 rdar://6060752 - don't warn about trigraphs in bcpl-style comments
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60942 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-12 07:34:39 +00:00
Chris Lattner c21f1a73b9 split into two tests.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59770 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-21 01:04:13 +00:00
Argyrios Kyrtzidis eb83ecde1a 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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58913 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-08 16:45:02 +00:00
Daniel Dunbar 5313ebce37 Test case for previous commit (Workaround gcc bug causing crash on our
preprocessed outputs)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55826 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-05 03:23:51 +00:00
Ted Kremenek ea644d8440 Following gcc's behavior, only enable trigraphs if '-trigraphs' or '-ansi' is
specified, or -std is set to a conforming mode.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55738 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-03 21:22:16 +00:00
Eli Friedman 6f7adbdcd0 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.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55622 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-02 05:29:22 +00:00
Chris Lattner 806c3b9478 update this testcase.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54037 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-25 18:42:46 +00:00
Daniel Dunbar 4f97e019ba Add test case for hex floating point constants in < C99 mode
- For: rdar://6096838


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54036 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-25 18:41:57 +00:00
Chris Lattner b081a350b5 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.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53070 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-03 03:47:30 +00:00
Chris Lattner 413d355e38 Fix a bug reported by Kelly Wilson, where we incorrectly
rejected FP immediates like 08.123


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52890 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-30 06:44:49 +00:00
Argyrios Kyrtzidis c577a0e9bf Multiple tests in a single test file must be linked with '&&'.
Otherwise, failing tests other than the last one will not be reported.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52231 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-12 12:40:02 +00:00
Eli Friedman 8891184b23 Fix the run line for this test.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52169 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-10 05:18:06 +00:00
Eli Friedman e3eac778a7 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.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52168 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-10 05:14:31 +00:00
Nuno Lopes 0049db6ce1 fix PR2357 (#ifs didnt invalidate the multiple-inclusion optimization state)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51843 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-01 18:31:24 +00:00
Chris Lattner 146ccd44ec Fix PR2090, a typo in digraph processing.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47540 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-24 19:05:57 +00:00
Chris Lattner e66b65c3a3 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.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46791 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-06 01:42:25 +00:00
Chris Lattner 2243449253 Add support for #pragma mark, which shouldn't warn about bogus tokens.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45212 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-19 19:38:36 +00:00
Christopher Lamb fbd91735c8 Doh! Check in this long overdue test fix.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44450 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-30 06:35:48 +00:00
Christopher Lamb 016765e345 Support floating point literals of the form "1e-16f" which specify an exponent but no decimal point.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44431 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-29 06:06:27 +00:00
Bill Wendling f5f20bdf91 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.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44326 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-26 08:26:20 +00:00
Chris Lattner 921e9ff030 Fix a bug handling hex floats in c90 mode, pointed out by Neil.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44120 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-14 16:14:50 +00:00
Chris Lattner 3b427b3ba5 rename -parse-ast-print to -ast-print
rename -parse-ast-dump to -ast-dump
remove -parse-ast, which is redundant with -fsyntax-only



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42852 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-11 00:18:28 +00:00
Ted Kremenek 9f3d942e99 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.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42365 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-26 20:14:22 +00:00
Chris Lattner 8146b6851e Fix a lexer bug where we incorrectly rejected
int i = /*/ */ 1;

Thanks to Neil for pointing this out.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40379 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-21 23:43:37 +00:00
Chris Lattner 136f93a2b6 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.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@39906 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-16 06:55:01 +00:00
Chris Lattner d4b80f1a0e Add support for C++'0x keywords, patch by Doug Gregor
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@39897 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-16 04:18:29 +00:00
Reid Spencer 5f016e2cb5 Stage two of getting CFE top correct.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@39734 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-11 17:01:13 +00:00