Daniel Dunbar
5bea06ad9e
Add test case for __ASSEMBLER__ definition.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60363 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-01 19:23:47 +00:00
Chris Lattner
46fb6dc98f
testcase for PR3096
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59794 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-21 06:19:48 +00:00
Torok Edwin
e4d3788153
remove this testcase, it fails with -verify still
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59539 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-18 18:48:14 +00:00
Nuno Lopes
8dccec4495
fix test. it now crashes, but thats another problem..
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59537 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-18 17:57:01 +00:00
Torok Edwin
0301c74568
add testcase for PR3093
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59534 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-18 17:31:32 +00:00
Mike Stump
1a19c29965
Skip random pathname characters better. I had a 5 in mine.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58291 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-27 22:49:55 +00:00
Chris Lattner
c106c106c6
Add a new -dump-raw-tokens option, which allows us to see raw tokens.
...
Rename -dumptokens to -dump-tokens.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57405 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-12 05:03:36 +00:00
Chris Lattner
7499cb59f0
switch to using -verify
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57068 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-04 19:43:25 +00:00
Chris Lattner
22e6dd79ec
testcase for my previous patch.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56670 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-26 18:07:51 +00:00
Steve Naroff
b4eaf9cf5f
- Implement __block.
...
- Replace FIXME in Preprocessor::HandleIdentifier() with a check that avoids diagnosing extension tokens that originate from macro definitions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55639 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-02 18:50:17 +00:00
Nico Weber
dfb99a968b
make test fails if llvm is checked out to llvm-svn of if there is a dash somewhere else in the path. fix that.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55175 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-22 09:33:51 +00:00
Nuno Lopes
9039a69ab9
fix test
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53802 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-19 22:11:43 +00:00
Ted Kremenek
24af60f528
Patch by Kovarththanan Rajaratnam:
...
"When dumping the tokens (-dumptokens output type), the column numbers are not
correctly shown. This patch fixes that issue."
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53797 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-19 19:10:40 +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
Chris Lattner
63bc035870
The awesome GNU "comma elision extension" works with both the standard
...
__VA_ARGS__ syntax as well as with the amazingly awesome GNU "named
variadic macro" extension. Allow it with the GNU syntax as well.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50843 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-08 05:10:33 +00:00
Chris Lattner
98ed49f370
Fix a few more bugs in preprocessor expressions w.r.t. ?:. Now I
...
think it is really right. :) This fixes PR2284.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50665 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-05 20:07:41 +00:00
Chris Lattner
9e66ba6d1c
fix a bug handling right associative operators that Neil noticed, hopefully
...
the final part of PR2279
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50635 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-05 04:10:51 +00:00
Chris Lattner
9189156429
Fix the rest of PR2279:
...
a) correct rejection of ',' in pp expressions.
b) the precedence of ',' was wrong w.r.t. ?:.
Thanks again to Neil for finding these and providing testcases.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50625 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-04 18:36:18 +00:00
Chris Lattner
d5214b22cc
Fix PR2279 part C: shifts don't perform the UACs, thanks to Neil
...
for pointing this out.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50624 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-04 18:25:32 +00:00
Chris Lattner
3b6911527a
fix a nasty bug that Neil identifier in pp-expr parsing (this is PR2279 part D).
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50617 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-04 07:15:21 +00:00
Chris Lattner
d98d975ccd
Fix PR2220, making diagnostics for unexpected tokens in pp expressions
...
more nice.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49619 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-13 20:38:43 +00:00
Chris Lattner
21fbe0d9ea
fix this test.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48668 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-22 00:07:50 +00:00
Sam Bishop
49d8dc55bf
Only invoke the preprocessor; it's the only thing being tested. Also, check
...
the output to make sure that the macros and comments are being treated as such.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48638 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-21 08:05:55 +00:00
Sam Bishop
d8b28d78d6
Use the -E option when invoking clang. Only the preprocessor is
...
required to perform this test.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48636 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-21 07:02:04 +00:00
Chris Lattner
2a625bcfa2
remove two obsolete tests, not sure why my previous commit didn't commit the removal.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47986 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-06 05:47:17 +00:00
Lauro Ramos Venancio
0184cc719f
Fix PR2086.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47551 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-25 19:03:15 +00:00
Chris Lattner
e9ba32357c
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 :)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47203 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-16 01:20:36 +00:00
Chris Lattner
3f1cc838f9
Implement support for the extremely atrocious MS /##/ extension,
...
which pastes together a comment. This is only enabled with
-fms-extensions of course.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46845 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-07 06:03:59 +00:00
Chris Lattner
71a3a8d506
Fix a bug where we would incorrectly emit a "cannot paste" error
...
message when handling the GNU ", ## __VA_ARGS__" extension. While
I'm at it, flag uses of this as extensions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46503 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-29 07:54:23 +00:00
Chris Lattner
116a4b148e
add support for -Wundef.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46274 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-23 17:19:46 +00:00
Chris Lattner
c21d9e4766
Fix PR1936, a crash on malformed #if. Thanks to Neil for
...
noticing this!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46256 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-22 19:34:51 +00:00
Chris Lattner
b1a17ae9d3
avoid pasting L + "foo" into L"foo".
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46000 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-15 05:22:14 +00:00
Chris Lattner
4d73046173
Fix a nasty corner case that Neil noticed in PR1900, where we would
...
incorrectly apply the multiple include optimization to files with
guards like:
#if !defined(x) MACRO
where MACRO could expand to different things in different contexts.
Thanks Neil!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45716 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-07 19:50:27 +00:00
Chris Lattner
4c88d3a71f
add run line
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44917 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-12 06:20:40 +00:00
Chris Lattner
5113613c5b
add runline, make this test real.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44916 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-12 06:20:18 +00:00
Chris Lattner
5f1803210b
The flags on tokens indicate whether they are the start of a *physical* line,
...
not the start of a logical line. Be careful about this distinction, which
affects when newlines are printed and when paste-avoidance happens, etc.
This fixes PR1848, thanks to Neil for noticing this!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44743 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-09 21:11:08 +00:00
Chris Lattner
0c3eb29e79
Fix PR1820, an incredibly subtle macro expansion bug that Neil discovered.
...
Neil, please review this fix.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44285 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-23 06:50:21 +00:00
Chris Lattner
b283298f03
fix a bug Steve noticed, where a #import of the main file itself would fail.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44178 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-15 19:07:47 +00:00
Chris Lattner
f37bb25120
If we see an invalid #ifdef directive, enter a conditional compilation region
...
so that we don't emit an error on the #endif. Suggestion by Neil.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42258 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-24 05:14:57 +00:00
Chris Lattner
706ab50019
implement a missing feature in the #include handler, where
...
it did not handle <xyz> headers coming from macro expansions.
This requires special treatment, as the include name is lexed
as multiple tokens, which require reassembly before processing.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40418 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-23 04:56:47 +00:00
Chris Lattner
2b64fdc499
Fix a stringizing bug that Neil noticed. We should preprocess this:
...
#define t(x) #x
t(a
c)
to "a c", not "ac".
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40060 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-19 16:11:58 +00:00
Chris Lattner
0ea793e5e3
Correctly respect C99 5.1.1.2p4 when searching for the first '(' of
...
a function-like macro invocation. Patch contributed by Neil Booth.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40026 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-19 00:07:36 +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