summaryrefslogtreecommitdiffstats
path: root/clang/test/Preprocessor/traditional-cpp.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix CHECK directives that weren't checking.Hans Wennborg2015-08-311-2/+2
| | | | llvm-svn: 246492
* Fix "//" comments with -traditional-cpp in C++.Eli Friedman2013-08-281-2/+4
| | | | | | | | | Apparently, gcc's -traditional-cpp behaves slightly differently in C++ mode; specifically, it discards "//" comments. Match gcc's behavior. <rdar://problem/14808126> llvm-svn: 189515
* Don't give # and ## special treatment when in -traditional-cpp mode. Patch byRichard Smith2013-07-091-0/+17
| | | | | | Austin Seipp! llvm-svn: 185896
* Preprocessor: don't keep comments under -traditional-cpp.Jordan Rose2013-03-051-0/+6
| | | | | | | | | | | This patch is designed for minimal intrusion into normal preprocessing and compilation; under -E -traditional-cpp, the lexer will still generate tok::comment nodes since it is preserving all whitespace, but the output printer will then throw it away. <rdar://problem/13338680> llvm-svn: 176534
* Preprocessor: don't consider // to be a line comment in -E -std=c89 mode.Jordan Rose2013-03-051-0/+4
| | | | | | | | | | | | | | | | | | | It's beneficial when compiling to treat // as the start of a line comment even in -std=c89 mode, since it's not valid C code (with a few rare exceptions) and is usually intended as such. We emit a pedantic warning and then continue on as if line comments were enabled. This has been our behavior for quite some time. However, people use the preprocessor for things besides C source files. In today's prompting example, the input contains (unquoted) URLs, which contain // but should still be preserved. This change instructs the lexer to treat // as a plain token if Clang is in C90 mode and generating preprocessed output rather than actually compiling. <rdar://problem/13338743> llvm-svn: 176526
* Preproceessor: fix #if skipping under -traditional-cpp.Jordan Rose2013-02-221-0/+16
| | | | | | | | | | | | When parsing directives within skipped #if blocks, we don't want to retain any whitespace. Previously we were just skipping comments, but it's not possible to skip comments and retain other whitespace. This change matches the usual behavior for parsing directives (i.e. the behavior outside of skipped #if blocks). <rdar://problem/13267695> llvm-svn: 175840
* Preprocessor: preserve whitespace in -traditional-cpp mode.Jordan Rose2013-02-211-2/+54
| | | | | | | | | Note that unlike GNU cpp we currently do not preserve whitespace in macros (even in -traditional-cpp mode). <rdar://problem/12897179> llvm-svn: 175778
* Lexer: Add extremely limited support for -traditional-cpp, ignoring BCPLDaniel Dunbar2011-03-181-0/+12
comments. llvm-svn: 127910
OpenPOWER on IntegriCloud