summaryrefslogtreecommitdiffstats
path: root/clang/test/Preprocessor
Commit message (Collapse)AuthorAgeFilesLines
* basic support for -Wunknown-pragmas, more coming.Chris Lattner2009-04-191-2/+3
| | | | llvm-svn: 69547
* move token paste poisoning diagnostics to after the instantiation locChris Lattner2009-04-191-0/+13
| | | | | | | for a token is set, this makes the diagnostic "expanded from stack" work for this diagnostic. Add a testcase for PR3918. llvm-svn: 69544
* pick a smaller header, one that we control to test this.Chris Lattner2009-04-191-1/+1
| | | | llvm-svn: 69540
* rename test for consistency with other pragma test.Chris Lattner2009-04-191-0/+0
| | | | llvm-svn: 69539
* merge pragma poison tests into one file with -verify mode.Chris Lattner2009-04-194-21/+18
| | | | llvm-svn: 69538
* merge two testsChris Lattner2009-04-192-17/+18
| | | | llvm-svn: 69537
* convert to -verify mode.Chris Lattner2009-04-191-2/+2
| | | | llvm-svn: 69532
* Fix PR4006, incorrect handling of __VA_ARGS__ when it was the first tokenChris Lattner2009-04-191-0/+6
| | | | | | | in a function-like macro body. This has the added bonus of moving some function-like macro specific code out of the object-like macro codepath. llvm-svn: 69530
* fix rdar://6804322 by wiring up -fdollars-in-identifiersChris Lattner2009-04-191-1/+10
| | | | | | with assembler-with-cpp mode. llvm-svn: 69520
* convert to -verify mode.Chris Lattner2009-04-191-12/+11
| | | | llvm-svn: 69518
* Fix PR3917: the location of a #line directive is the location of the first _.Chris Lattner2009-04-181-0/+8
| | | | llvm-svn: 69485
* more fun with line markers: the digit string is required to be interpretedChris Lattner2009-04-181-2/+8
| | | | | | | as decimal, even if it starts with 0. Also, since things like 0x1 are completely illegal, don't even bother using numericliteralparser for them. llvm-svn: 69454
* fix PR3927 by being more careful about the pp test for identifier.Chris Lattner2009-04-181-2/+11
| | | | llvm-svn: 69423
* second half of PR3940: #line requires simple digit sequence.Chris Lattner2009-04-181-0/+3
| | | | llvm-svn: 69422
* this is really just a recommendation, not a requirement.Chris Lattner2009-04-181-1/+1
| | | | llvm-svn: 69416
* enforce requirements imposed by C90 6.8 TC1, fixing PR3919.Chris Lattner2009-04-181-0/+10
| | | | llvm-svn: 69415
* Fix PR3938 by taking into account C99 6.10p4.Chris Lattner2009-04-181-0/+7
| | | | llvm-svn: 69413
* convert test to -verify style.Chris Lattner2009-04-181-3/+4
| | | | llvm-svn: 69412
* Substantially restructure function-like macro argument parsing.Chris Lattner2009-04-181-0/+27
| | | | | | | | | Highlights: PP::isNextPPTokenLParen() no longer eats the ( when present. We now simplify slightly the logic parsing macro arguments. We now handle PR3937 and other related cases correctly. llvm-svn: 69411
* Fix two problems from PR3916, and one problem I noticed while hackingChris Lattner2009-04-171-1/+14
| | | | | | on the code. llvm-svn: 69404
* implement PR3940: #line numbers not fully checkedChris Lattner2009-04-171-0/+2
| | | | llvm-svn: 69403
* #line is allowed to have macros that expand to nothing after them.Chris Lattner2009-04-171-0/+8
| | | | llvm-svn: 69401
* tweak redefinition of a typedef a bit to fix a couple of problems:Chris Lattner2009-04-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | 1. We had logic in sema to decide whether or not to emit the error based on manually checking whether in a system header file. 2. we were allowing redefinitions of typedefs in class scope in C++ if in header file. 3. there was no way to force typedef redefinitions to be accepted by the C compiler, which annoys me when stripping linemarkers out of .i files. The fix is to split the C++ class typedef redefinition path from the C path, and change the C path to be a warning that normally maps to error. This causes it to properly be ignored in system headers, etc. and gives us a way to control it. Passing -Wtypedef-redefinition now turns the error into a warning. One behavior change is that we now diagnose cases where you redefine a typedef in your .c file that was defined in a header file. This seems like reasonable behavior, and the diagnostic now indicates that it can be controlled with -Wtypedef-redefinition. llvm-svn: 69391
* Implement support for GCC's -dD mode, which dumps -E output *and*Chris Lattner2009-04-121-0/+3
| | | | | | macro definitions. llvm-svn: 68884
* use doug's new %S thing to make this work when run from different locations.Chris Lattner2009-04-102-2/+2
| | | | llvm-svn: 68788
* Force triple for these tests.Daniel Dunbar2009-04-081-3/+3
| | | | llvm-svn: 68651
* finish the implementation of -imacros. The driver still needs to be hooked up.Chris Lattner2009-04-081-0/+4
| | | | llvm-svn: 68640
* More fixes to builtin preprocessor defines.Daniel Dunbar2009-04-081-1/+1
| | | | | | | | | | | | | | | | | | | | | - Add -static-define option driver can use when __STATIC__ should be defined (instead of __DYNAMIC__). - Don't set __OPTIMIZE_SIZE__ on Os, __OPTIMIZE_SIZE__ is tied to Oz. - Set __NO_INLINE__ following GCC 4.2. - Set __GNU_GNU_INLINE__ or __GNU_STDC_INLINE__ following GCC 4.2. - Set __EXCEPTIONS for Objective-C NonFragile ABI. - Set __STRICT_ANSI__ for standard conforming modes. - I added a clang style test case in utils for this, but its not particularly portable and I don't think it belongs in the test suite. llvm-svn: 68621
* Set __PIC__ (more) correctly.Daniel Dunbar2009-04-081-0/+10
| | | | | | | | | | | - Add -pic-level clang-cc option to specify the value for the define, updated driver to pass this. - Added __pic__ - Added OBJC_ZEROCOST_EXCEPTIONS define while I was here (to match gcc). llvm-svn: 68584
* Fix broken test case. I have no idea why this ever worked.Anders Carlsson2009-04-071-3/+3
| | | | llvm-svn: 68526
* Use %s in test, not hard coded name.Daniel Dunbar2009-04-071-3/+3
| | | | llvm-svn: 68521
* implement rdar://6762183. I'm not sure if it is more insane thatChris Lattner2009-04-071-0/+8
| | | | | | | GCC ignores macro definitions after \n's or that real code depends on this. llvm-svn: 68511
* Define __OPTIMIZE__ and __OPTIMIZE_SIZE__ if the -O[12] and -Os flags are ↵Anders Carlsson2009-04-061-0/+29
| | | | | | passed to the compiler. llvm-svn: 68450
* Pull clang-cc code for generating PTH files based on the input type.Daniel Dunbar2009-04-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | - <rdar://problem/6741594> [pth] don't abuse -x to drive pth generation - Simpler, and fixes PR3915. Cleanup test cases for PTH: - Update to use -emit-pth - Removed PTH test of carbon.c and cocoa.mm; these didn't actually verify anything, and since PTH is token based the extra coverage (over cocoa.m) isn't particularly helpful. - Split PTH tests in cocoa.m to cocoa-pth.m, solely to increase available parallelism when running tests. Ted, could you update the PTH test cases (include-pth.c and cocoa-pth.m) to have some sort of positive check that the PTH is getting used? "# of PTH cache hits" or "tokens read from PTH cache" statistics would work great. :) llvm-svn: 68189
* fix PR3880, fixing a comma swallowing bug handling macros that only takeChris Lattner2009-03-251-0/+5
| | | | | | ... arguments. llvm-svn: 67706
* Rename clang to clang-cc.Daniel Dunbar2009-03-24100-188/+189
| | | | | | Tests and drivers updated, still need to shuffle dirs. llvm-svn: 67602
* The individual pieces of an invalid paste as still candidates for expansion.Chris Lattner2009-03-231-0/+11
| | | | | | | This matters in assembler mode, where this is silently allowed. This fixes rdar://6709206. llvm-svn: 67539
* Fix include-pth.c test case to (hopefully) more resilient to where and how testsTed Kremenek2009-03-201-1/+2
| | | | | | are executed. llvm-svn: 67419
* Add test case for '-include-pth'.Ted Kremenek2009-03-201-0/+1
| | | | llvm-svn: 67386
* add tests for the various .S bugs I fixed on wednesday.Chris Lattner2009-03-201-2/+32
| | | | llvm-svn: 67381
* rename this test from .S to .c so that it gets run.Chris Lattner2009-03-201-1/+1
| | | | llvm-svn: 67380
* fix PR3764 - A redefinition of a pre-processor macro failsChris Lattner2009-03-091-0/+17
| | | | | | | Redefinition checking should ignore the leading whitespace and start of line flags on the first token of an expansion. llvm-svn: 66442
* convert this to use -verify.Chris Lattner2009-03-091-1/+1
| | | | llvm-svn: 66441
* rename testChris Lattner2009-03-091-0/+0
| | | | llvm-svn: 66440
* #import is not considered an extension for ObjC.Chris Lattner2009-03-061-0/+4
| | | | llvm-svn: 66246
* fix PR3579: __LINE__ expands to the presumed location of the Chris Lattner2009-02-151-1/+10
| | | | | | | | *end* of a macro instantiation, not the start of it. This is really all about bug-for-bug compatibility with GCC, but not doing this breaks the FreeBSD kernel. llvm-svn: 64603
* track "just a little more" location information for macro instantiations.Chris Lattner2009-02-151-3/+3
| | | | | | | | | | | | Now instead of just tracking the expansion history, also track the full range of the macro that got replaced. For object-like macros, this doesn't change anything. For _Pragma and function-like macros, this means we track the locations of the ')'. This is required for PR3579 because apparently GCC uses the line of the ')' of a function-like macro as the location to expand __LINE__ to. llvm-svn: 64601
* Fix limits.h for linux, as glibc does a #include_next unlessMike Stump2009-02-121-0/+3
| | | | | | | | | _GCC_LIMITS_H_ is defined, when __GNUC__ is defined. Also, we need to stay away from possible conflicts with header guards. We should use CLANG_ to prefix all header guards. llvm-svn: 64408
* Add an implementation of -dM that follows GCC closely enough to permitChris Lattner2009-02-061-0/+31
| | | | | | | diffing the output of: clang -dM -o - -E -x c foo.c | sort llvm-svn: 63926
* smaller header.Chris Lattner2009-02-041-1/+1
| | | | llvm-svn: 63766
OpenPOWER on IntegriCloud