summaryrefslogtreecommitdiffstats
path: root/clang/test/Preprocessor
Commit message (Collapse)AuthorAgeFilesLines
* Remove tabs, and whitespace cleanups.Mike Stump2009-09-091-1/+1
| | | | llvm-svn: 81346
* Force triple for this test (non-fragile ABI is default on x86_64-apple-darwin9).Daniel Dunbar2009-09-011-1/+1
| | | | llvm-svn: 80645
* Added test cases for presence and absence of ↵David Chisnall2009-08-312-0/+16
| | | | | | __has_feature(objc_nonfragile_abi) with and without -fobjc-nonfragile-abi. llvm-svn: 80593
* MultiTestRunner: Validate '&&' at the end of RUN lines.Daniel Dunbar2009-07-253-4/+4
| | | | | | | | - This is just to normalize, these will go away soon hopefully. Added all the missing '&&'s that have crept in. :) llvm-svn: 77062
* add push/pop semantics for diagnostics. Patch by Louis Gerbarg!Chris Lattner2009-07-121-0/+17
| | | | llvm-svn: 75431
* Fix #pragma GCC system_header by making it insert a virtual linemarker intoChris Lattner2009-06-152-0/+7
| | | | | | | the file at the point of the pragma. This allows clang to know that all sourcelocations after the pragma are in a system header. llvm-svn: 73376
* rename testChris Lattner2009-06-151-0/+0
| | | | llvm-svn: 73375
* convert this test to -verify mode.Chris Lattner2009-06-151-2/+2
| | | | llvm-svn: 73374
* Fix PR2741 by making our newline tracking be aware of newlines thatChris Lattner2009-06-151-0/+4
| | | | | | can occur in the middle of comment tokens. llvm-svn: 73365
* Sink the BuiltinInfo object from ASTContext into theChris Lattner2009-06-141-1/+2
| | | | | | | | preprocessor and initialize it early in clang-cc. This ensures that __has_builtin works in all modes, not just when ASTContext is around. llvm-svn: 73319
* implement and document a new __has_feature and __has_builtin magic Chris Lattner2009-06-131-0/+30
| | | | | | | | | builtin preprocessor macro. This appears to work with two caveats: 1) builtins are registered in -E mode, and 2) target-specific builtins are unconditionally registered even if they aren't supported by the target (e.g. SSE4 builtin when only SSE1 is enabled). llvm-svn: 73289
* PR4288: Make -dD (dump macros with preprocessed source) play nicely with Eli Friedman2009-06-021-0/+13
| | | | | | # line directives. llvm-svn: 72724
* PR4283: Don't truncate multibyte character constants in the Eli Friedman2009-06-011-0/+5
| | | | | | preprocessor. llvm-svn: 72686
* update test for r72519Chris Lattner2009-05-281-4/+4
| | | | llvm-svn: 72520
* Make the bad paste diagnostic print the entire pasted token.Eli Friedman2009-05-271-1/+3
| | | | llvm-svn: 72497
* Fix a couple of bugs:Chris Lattner2009-05-251-6/+12
| | | | | | | | | | | | 1. When we accept "#garbage" in asm-with-cpp mode, change the token kind of the # to unknown so that the preprocessor won't try to process it as a real #. This fixes a crash on the attached example 2. Fix macro definition extents processing to handle #foo at the end of a macro to say the definition ends with the foo, not the #. This is a follow-on fix to r72283, and rdar://6916026 llvm-svn: 72388
* fix this test to fail when the patch isn't applied.Chris Lattner2009-05-251-1/+1
| | | | llvm-svn: 72385
* Make sure an invalid concatentaion doesn't insert whitespace before Eli Friedman2009-05-241-0/+5
| | | | | | the RHS. Fixes assembler-with-cpp issue reported on cfe-dev. llvm-svn: 72370
* In assembler-with-cpp mode, don't error on '#' (stringize) operator applied toDaniel Dunbar2009-05-221-0/+10
| | | | | | non-argument names, pass the tokens through. llvm-svn: 72283
* PR3942: Don't warn on unsigned overflow in preprocessor expressions.Eli Friedman2009-05-161-0/+25
| | | | llvm-svn: 71960
* Fix rdar://6880630 - # in _Pragma does not start a preprocessor directive.Chris Lattner2009-05-131-1/+7
| | | | llvm-svn: 71643
* convert test to use -verify Chris Lattner2009-05-131-2/+2
| | | | llvm-svn: 71642
* rename testChris Lattner2009-05-131-0/+0
| | | | llvm-svn: 71641
* When we expect two arguments but have zero, make sure to addChris Lattner2009-05-131-0/+3
| | | | | | | | | two empty arguments. Also, add an assert so that this bug manifests as an assertion failure, not a valgrind problem. This fixes rdar://6880648 - [cpp] crash in ArgNeedsPreexpansion llvm-svn: 71616
* Handle -march for the LLVM recognized cpu names.Daniel Dunbar2009-05-061-0/+10
| | | | | | | - x86 target feature handling should not be feature complete, even if the code quality is lacking. llvm-svn: 71123
* More x86 target feature support.Daniel Dunbar2009-05-061-0/+25
| | | | | | | | | | | | | | | | | | - Apologies for the extremely gross code duplication, I want to get this working and then decide how to get this information out of the back end. - This replaces -m[no-]sse4[12] by -m[no-]sse4, it appears gcc doesn't distinguish them? - -msse, etc. now properly disable/enable related features. - Don't always define __SSE3__... - The main missing functionality bit here is that we don't initialize the features based on the CPU for all -march options. llvm-svn: 71117
* Fix the testcase for PR4132.Eli Friedman2009-05-031-3/+4
| | | | llvm-svn: 70796
* Fix for PR4132: make sure to insert whitespace consistently before a Eli Friedman2009-05-031-0/+5
| | | | | | pasted token. llvm-svn: 70793
* PR4063, with feeling: Chain PP callbacks by default.Daniel Dunbar2009-05-031-1/+2
| | | | | | | - This is somewhat cleaner and also fixes PR4063 for real, I had the order wrong so we were just creating an empty dependency file. llvm-svn: 70687
* PR4063: Fix dependency generation with -E.Daniel Dunbar2009-05-031-0/+4
| | | | llvm-svn: 70686
* Simplify the scheme used for keywords, and change the classification Eli Friedman2009-04-281-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | scheme to be more useful. The new scheme introduces a set of categories that should be more readable, and also reflects what we want to consider as an extension more accurately. Specifically, it makes the "what is a keyword" determination accurately reflect whether the keyword is a GNU or Microsoft extension. I also introduced separate flags for keyword aliases; this is useful because the classification of the aliases is mostly unrelated to the classification of the original keyword. This patch treats anything that's in the implementation namespace (prefixed with "__", or "_X" where "X" is any upper-case letter) as a keyword without marking it as an extension. This is consistent with the standards in that an implementation is allowed to define arbitrary extensions in the implementation namespace without violating the standard. This gets rid of all the nasty "extension used" warnings for stuff like __attribute__ in -pedantic mode. We still warn for extensions outside of the the implementation namespace, like typeof. If someone wants to implement -Wextensions or something like that, we could add additional information to the keyword table. This also removes processing for the unused "Boolean" language option; such an extension isn't supported on any other C implementation, so I don't see any point to adding it. The changes to test/CodeGen/inline.c are required because previously, we weren't actually disabling the "inline" keyword in -std=c89 mode. I'll remove Boolean and NoExtensions from LangOptions in a follow-up commit. llvm-svn: 70281
* Change our silencing of C typedef redefinition handling to what we hadChris Lattner2009-04-271-2/+5
| | | | | | | | before r69391: typedef redefinition is an error by default, but if *either* the old or new definition are from a system header, we silence it. llvm-svn: 70177
* make -Wtypedef-redefinition an extwarn instead of defaultingChris Lattner2009-04-271-2/+2
| | | | | | to error, doing this breaks too many programs (e.g. Adium). llvm-svn: 70170
* fix rdar://6816766 - Crash with function-like macro test at end of directive.Chris Lattner2009-04-241-0/+6
| | | | llvm-svn: 69964
* apply Eli's patch to fix PR4008, with a testcase. Thanks Eli!Chris Lattner2009-04-211-7/+12
| | | | llvm-svn: 69750
* fix the second half of PR4006 and rdar://6807000 by treatingChris Lattner2009-04-201-1/+8
| | | | | | | () as being either zero arguments or one empty argument depending on situation. llvm-svn: 69627
* Fix PR4007: clang doesn't know -Werror-foo is the same as -Werror=fooChris Lattner2009-04-191-1/+2
| | | | llvm-svn: 69557
* Warn about uses of #pragma STDC FENV_ACCESS ON, since we don't Chris Lattner2009-04-191-1/+1
| | | | | | | | | | support it. I don't know what evaluation method we use for complex arithmetic, so I don't know whether/if we should warn about use of CX_LIMITED_RANGE. This concludes my planned hacking on STDC pragmas, flame away :) llvm-svn: 69556
* diagnose invalid syntax of STDC pragmas.Chris Lattner2009-04-191-3/+6
| | | | llvm-svn: 69554
* reject invalid stuff in the STDC namespace.Chris Lattner2009-04-191-2/+3
| | | | llvm-svn: 69551
* stub out STDC #pragmas.Chris Lattner2009-04-191-0/+17
| | | | llvm-svn: 69550
* 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
OpenPOWER on IntegriCloud