summaryrefslogtreecommitdiffstats
path: root/clang/test/Lexer/pragma-operators.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Add -fuse-line-directive flag to control usage of #line with -EReid Kleckner2015-02-261-1/+1
| | | | | | | | | | | | | | | | | | Currently -fms-extensions controls this behavior, which doesn't make much sense. It means we can't identify what is and isn't a system header when compiling our own preprocessed output, because #line doesn't represent this information. If someone is feeding Clang's preprocessed output to another compiler, they can use this flag. Fixes PR20553. Reviewers: rsmith Differential Revision: http://reviews.llvm.org/D5217 llvm-svn: 230587
* Lex and ignore Microsoft's #pragma warning(...)Reid Kleckner2013-09-131-0/+22
| | | | | | | | | | | | | | | | | Summary: This fixes PR17145 and avoids unknown pragma warnings. This change does not attempt to map MSVC warning numbers to clang warning flags. Perhaps in the future we will implement a mapping for some common subset of Microsoft warnings, but for now we don't. Reviewers: rsmith CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1652 llvm-svn: 190726
* Keep the parentheses in #pragma message (partial revert of r179771).Andy Gibbs2013-04-191-1/+1
| | | | llvm-svn: 179862
* Dropped the parentheses for #pragma message and its kin in the -E output ↵Andy Gibbs2013-04-181-1/+1
| | | | | | | | generator. This was a suggestion by Jordan Rose since the documented format for these pragmas is without the parentheses. At the same time, I've increased test coverage too for the preprocessed output. llvm-svn: 179771
* Handle _Pragma on a u8, u, or U string literal per the C11 specification. AlsoRichard Smith2013-03-091-1/+19
| | | | | | | | handle raw string literals here. C++11 doesn't yet specify how they will behave, but discussion on core suggests that we should just strip off everything but the r-char-sequence. llvm-svn: 176779
* [-E] Emit a rewritten _Pragma on its own line.Jordan Rose2012-06-151-1/+0
| | | | | | | | | | | 1. Teach Lexer that pragma lexers are like macro expansions at EOF. 2. Treat pragmas like #define/#undef when printing. 3. If we just printed a directive, add a newline before any more tokens. (4. Miscellaneous cleanup in PrintPreprocessedOutput.cpp) PR10594 and <rdar://problem/11562490> (two separate related problems) llvm-svn: 158571
* Make sure we're producing a newline in the preprocessed output beforeDouglas Gregor2010-09-101-5/+10
| | | | | | emitting a #pragma, whenever one is needed. Fixes <rdar://problem/8417307>. llvm-svn: 113648
* When we parse a pragma, keep track of how that pragma was originallyDouglas Gregor2010-09-091-0/+15
spelled (#pragma, _Pragma, __pragma). In -E mode, use that information to add appropriate newlines when translating _Pragma and __pragma into #pragma, like GCC does. Fixes <rdar://problem/8412013>. llvm-svn: 113553
OpenPOWER on IntegriCloud