aboutsummaryrefslogtreecommitdiff
path: root/test/Preprocessor
AgeCommit message (Collapse)Author
2008-12-01Add test case for __ASSEMBLER__ definition.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60363 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-21testcase for PR3096Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59794 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-18remove this testcase, it fails with -verify stillTorok Edwin
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59539 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-18fix test. it now crashes, but thats another problem..Nuno Lopes
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59537 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-18add testcase for PR3093Torok Edwin
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59534 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-27Skip random pathname characters better. I had a 5 in mine.Mike Stump
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58291 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-12Add a new -dump-raw-tokens option, which allows us to see raw tokens. Chris Lattner
Rename -dumptokens to -dump-tokens. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57405 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-04switch to using -verifyChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57068 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-26testcase for my previous patch.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56670 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-02- Implement __block.Steve Naroff
- 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-08-22make test fails if llvm is checked out to llvm-svn of if there is a dash ↵Nico Weber
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-07-19fix testNuno Lopes
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53802 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-19Patch by Kovarththanan Rajaratnam:Ted Kremenek
"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-06-12Multiple tests in a single test file must be linked with '&&'.Argyrios Kyrtzidis
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-05-08The awesome GNU "comma elision extension" works with both the standardChris Lattner
__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-05Fix a few more bugs in preprocessor expressions w.r.t. ?:. Now I Chris Lattner
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-05fix a bug handling right associative operators that Neil noticed, hopefullyChris Lattner
the final part of PR2279 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50635 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-04Fix the rest of PR2279:Chris Lattner
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-04Fix PR2279 part C: shifts don't perform the UACs, thanks to Neil Chris Lattner
for pointing this out. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50624 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-04fix a nasty bug that Neil identifier in pp-expr parsing (this is PR2279 part D).Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50617 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-13Fix PR2220, making diagnostics for unexpected tokens in pp expressions Chris Lattner
more nice. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49619 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-22fix this test.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48668 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-21Only invoke the preprocessor; it's the only thing being tested. Also, checkSam Bishop
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-21Use the -E option when invoking clang. Only the preprocessor isSam Bishop
required to perform this test. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48636 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-06remove two obsolete tests, not sure why my previous commit didn't commit the ↵Chris Lattner
removal. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47986 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-25Fix PR2086.Lauro Ramos Venancio
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47551 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-16Fix CheckEndOfDirective to diagnose lines that contain macros that expand to Chris Lattner
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-07Implement support for the extremely atrocious MS /##/ extension, Chris Lattner
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-01-29Fix a bug where we would incorrectly emit a "cannot paste" error Chris Lattner
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-23add support for -Wundef.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46274 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-22Fix PR1936, a crash on malformed #if. Thanks to Neil forChris Lattner
noticing this! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46256 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-15avoid pasting L + "foo" into L"foo".Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46000 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-07Fix a nasty corner case that Neil noticed in PR1900, where we would Chris Lattner
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
2007-12-12add run lineChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44917 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-12add runline, make this test real.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44916 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-09The flags on tokens indicate whether they are the start of a *physical* line, Chris Lattner
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-11-23Fix PR1820, an incredibly subtle macro expansion bug that Neil discovered.Chris Lattner
Neil, please review this fix. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44285 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-15fix a bug Steve noticed, where a #import of the main file itself would fail.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44178 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-24If we see an invalid #ifdef directive, enter a conditional compilation regionChris Lattner
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-07-23implement a missing feature in the #include handler, whereChris Lattner
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-19Fix a stringizing bug that Neil noticed. We should preprocess this:Chris Lattner
#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-19Correctly respect C99 5.1.1.2p4 when searching for the first '(' ofChris Lattner
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-11Stage two of getting CFE top correct.Reid Spencer
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@39734 91177308-0d34-0410-b5e6-96231b3b80d8