summaryrefslogtreecommitdiffstats
path: root/clang/test/Lexer/preamble.c
Commit message (Collapse)AuthorAgeFilesLines
* Allow for unfinished #if blocks in preamblesErik Verbruggen2017-05-301-6/+5
| | | | | | | | | | | | | | | | | | | Previously, a preamble only included #if blocks (and friends like ifdef) if there was a corresponding #endif before any declaration or definition. The problem is that any header file that uses include guards will not have a preamble generated, which can make code-completion very slow. To prevent errors about unbalanced preprocessor conditionals in the preamble, and unbalanced preprocessor conditionals after a preamble containing unfinished conditionals, the conditional stack is stored in the pch file. This fixes PR26045. Differential Revision: http://reviews.llvm.org/D15994 llvm-svn: 304207
* Make Lexer::ComputePreamble accept a LangOptions parameter, otherwise it may beArgyrios Kyrtzidis2011-08-251-2/+2
| | | | | | out-of-sync how a file is compiled. Patch by Matthias Kleine! llvm-svn: 138580
* r116509 fixed the Win32 XFAIL.Francois Pichet2010-10-141-1/+0
| | | | | | | | | The failing was due to this: 1. preamble.c contains CR+LF new lines 2. write() is called with a buffer containing the original (CR+LF) to output the result on the console. 3. In text mode(the default), write() convert LF to CR+LF even if LF is preceded by CR, hence we have CR+CR+LF which filecheck interprets as 2 lines. llvm-svn: 116513
* tests: Make FileCheck version check that preamble isn't longer than we expected.Daniel Dunbar2010-07-221-3/+2
| | | | llvm-svn: 109077
* tests: XFAIL this test on win32, someone else can hunt this one down.Daniel Dunbar2010-07-211-0/+1
| | | | llvm-svn: 109044
* tests: Use FileCheck instead of external input; I think this test was failing onDaniel Dunbar2010-07-211-2/+14
| | | | | | Win32 because of line ending differences. llvm-svn: 109029
* Introduce a new lexer function to compute the "preamble" of a file,Douglas Gregor2010-07-201-0/+25
which is the part of the file that contains all of the initial comments, includes, and preprocessor directives that occur before any of the actual code. Added a new -print-preamble cc1 action that is only used for testing. llvm-svn: 108913
OpenPOWER on IntegriCloud