summaryrefslogtreecommitdiff
path: root/test/Preprocessor/macro_expand_empty.c
Commit message (Collapse)AuthorAge
* If preprocessing results in a token with leading whitespace that was expandedRichard Smith2014-02-24
| | | | | | | | from a macro in column 0, ensure that we print whitespace before it in the -E output. Patch by Harald van Dijk! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@202070 91177308-0d34-0410-b5e6-96231b3b80d8
* If the first token in a macro that appears at the start of a line expands toRichard Smith2014-02-24
| | | | | | | | nothing, be sure to inform the *next* token expanded from the macro that it is now at the start of a line. Patch by Harald van Dijk! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@202068 91177308-0d34-0410-b5e6-96231b3b80d8
* Make Preprocessor::Lex non-recursive.Eli Friedman2013-09-19
Before this patch, Lex() would recurse whenever the current lexer changed (e.g. upon entry into a macro). This patch turns the recursion into a loop: the various lex routines now don't return a token when the current lexer changes, and at the top level Preprocessor::Lex() now loops until it finds a token. Normally, the recursion wouldn't end up being very deep, but the recursion depth can explode in edge cases like a bunch of consecutive macros which expand to nothing (like in the testcase test/Preprocessor/macro_expand_empty.c in this patch). <rdar://problem/14569770> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190980 91177308-0d34-0410-b5e6-96231b3b80d8