summaryrefslogtreecommitdiffstats
path: root/clang/test/Lexer
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix diagnostic for reporting bad escape sequence.Ted Kremenek2010-12-031-0/+1
| | | | | | Patch by Paul Curtis! llvm-svn: 120759
* Split out -Wconversion warnings about constant precision into theirJohn McCall2010-11-091-4/+4
| | | | | | | | | | | own subcategory, -Wconstant-conversion, which is on by default. Tweak the constant folder to give better results in the invalid case of a negative shift amount. Implements rdar://problem/6792488 llvm-svn: 118636
* Add a __has_attribute macro that works much like __has_feature and ↵Anders Carlsson2010-10-201-0/+12
| | | | | | __has_builtin. llvm-svn: 116906
* tests: Force triple to avoid limited precision warning on win32.Daniel Dunbar2010-10-182-3/+3
| | | | llvm-svn: 116770
* 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
* allow I128 suffixes in msextensions mode just like i128 suffixes, patchChris Lattner2010-10-141-0/+1
| | | | | | by Martin Vejnar! llvm-svn: 116460
* Add support for UCNs for character literalsNico Weber2010-10-092-0/+7
| | | | llvm-svn: 116129
* Remove hard CRLF end-of-line markers from two files. These should be addedChandler Carruth2010-10-061-14/+14
| | | | | | | automatically when syncing due to the auto-props selecting svn:eol-style of 'native'. llvm-svn: 115758
* Add support for 4-byte UCNs like \U12345678. Warn about UCNs in c90 mode.Nico Weber2010-10-062-0/+10
| | | | llvm-svn: 115743
* Lexer: Implement GCC's version of pragma message.Michael J. Spencer2010-09-271-0/+14
| | | | llvm-svn: 114814
* Allow the use of C++0x deleted functions as an extension in C++98.Anders Carlsson2010-09-241-2/+2
| | | | llvm-svn: 114762
* Add __char16_t and __char32_t as aliases for the C++0x char16_t andDouglas Gregor2010-09-132-1/+5
| | | | | | | char32_t, respectively, but which can also be used in C++98/03 mode. Fixes <rdar://problem/8418510>. llvm-svn: 113813
* 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
* tests: Use -ffreestanding when including stdint.h, to avoid platform ↵Daniel Dunbar2010-09-071-1/+1
| | | | | | dependencies. llvm-svn: 113301
* Implement __has_feature(cxx_inline_namespaces)Sebastian Redl2010-08-311-0/+10
| | | | llvm-svn: 112671
* improve isHexaLiteral to work with escaped newlines and trigraphs,Chris Lattner2010-08-311-0/+8
| | | | | | patch by Francois Pichet! llvm-svn: 112602
* In Microsoft compatibility mode, don't parse the exponent as part ofDouglas Gregor2010-08-301-0/+8
| | | | | | | the pp-number in a hexadecimal floating point literal, from Francois Pichet! Fixes PR7968. llvm-svn: 112481
* Test for PR7888.Eli Friedman2010-08-191-0/+3
| | | | llvm-svn: 111545
* 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-212-13/+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-202-0/+36
| | | | | | | | | 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
* Complain when string literals are too long for the active languageDouglas Gregor2010-07-201-0/+16
| | | | | | standard's minimum requirements. llvm-svn: 108837
* rename testChris Lattner2010-07-171-0/+0
| | | | llvm-svn: 108622
* change the 'invalid token after top level declarator' message to beChris Lattner2010-07-111-1/+1
| | | | | | 'expected ';' after top level declarator' which is much less vague. llvm-svn: 108106
* fix PR4499, patch by Kyle Dean!Chris Lattner2010-07-071-0/+7
| | | | llvm-svn: 107836
* tests: Use %clangxx when using driver for C++, in case C++ support is disabled.Daniel Dunbar2010-06-293-6/+6
| | | | llvm-svn: 107153
* A bug I've introduced in STDIN handling surfaced a few broken tests, fix them.Benjamin Kramer2010-06-251-2/+3
| | | | | | Lexer/hexfloat.cpp is now XFAIL'd, I'd appreciate if someone could look into it. llvm-svn: 106840
* Daniel re-educated me about what Alias does and does not do. Turn that off forChandler Carruth2010-05-221-4/+4
| | | | | | | | '-fasm' and explicitly map from that flag to -fgnu-keywords in the driver. Turn off the driver in the lexer test for this madness and add a test to the driver that the translation actually works. llvm-svn: 104428
* Don't warn about use of hex floats in c++ mode by default,Chris Lattner2010-05-201-2/+2
| | | | | | | | | matching G++'s behavior. Warn when -pedantic or -Wc++-hex-floats is passed, and don't warn if -pedantic -Wno-c++-hex-floats are both passed. llvm-svn: 104295
* robustify the conflict marker stuff. Don't add 7 twice, which wouldChris Lattner2010-05-171-2/+3
| | | | | | | | | | | | | | | | | | | | | make it miss (invalid) things like: <<<<<<< >>>>>>> and crash if <<<<<<< was at the end of the line. When we find a >>>>>>> that is not at the end of the line, make sure to reset Pos so we don't crash on something like: <<<<<<< >>>>>>> This isn't worth making testcases for, since each would require a new file. rdar://7987078 - signal 11 compiling "<<<<<<<<<<" llvm-svn: 103968
* push some source location information down through the compiler,Chris Lattner2010-04-201-2/+4
| | | | | | | | into ContentCache::getBuffer. This allows it to produce diagnostics on the broken #include line instead of without a location. llvm-svn: 101939
* enhance sourcemgr to detect various UTF BOM's and emit a fatal errorChris Lattner2010-04-202-0/+4
| | | | | | | | | about it instead of producing tons of garbage from the lexer. It would be even better for sourcemgr to dynamically transcode (e.g. from UTF16 -> UTF8). llvm-svn: 101924
* Add testcase that I forgot for r101667 for gnu-keywords.Chandler Carruth2010-04-181-0/+12
| | | | llvm-svn: 101700
* At sabre's request, drop the FP bounds diagnostics down to warnings and fileJohn McCall2010-02-261-8/+8
| | | | | | them under -Wbad-literal. They're still on by default. llvm-svn: 97284
* Fixes test.Fariborz Jahanian2010-01-221-2/+2
| | | | llvm-svn: 94236
* ui64, etc. are valid VS suffixes.Fariborz Jahanian2010-01-221-1/+14
| | | | | | Fixes radar 7562363. llvm-svn: 94224
* Update test function names so as not to use potential keywords.Alexis Hunt2010-01-131-5/+5
| | | | llvm-svn: 93314
* Add a bunch more feature-checking macros for C++0x features. Some of these areAlexis Hunt2010-01-131-0/+101
| | | | | | | disabled with the intent that users can start with them now and not have to change a thing to have them work when we implement the features. llvm-svn: 93312
* Do not parse hexadecimal floating point literals in C++0x mode because they areAlexis Hunt2010-01-101-0/+8
| | | | | | | | | | | | | | | | | | incompatible with user-defined literals, specifically with the following form: 0x1p+1 The preprocessing-number token extends only as far as the 'p'; the '+' is not included. Previously we could get away with this extension as p was an invalid suffix, but now with user-defined literals, 'p' might well be a valid suffix and we are forced to consider it as such. This patch also adds a warning in non-0x C++ modes telling the user that this extension is incompatible with C++0x that is enabled by default (previously and with other languages, we warn only with a compliance option such as -pedantic). llvm-svn: 93135
* add a bunch of missing prototypes to testsChris Lattner2010-01-091-1/+1
| | | | llvm-svn: 93072
* Diagnose out-of-bounds floating-point constants. Fixes rdar://problem/6974641John McCall2009-12-241-0/+22
| | | | llvm-svn: 92127
* reimplement r90860, fixing a couple of problems:Chris Lattner2009-12-171-1/+3
| | | | | | | | | 1. Don't make a copy of LangOptions every time a lexer is created. 2. Don't make CharInfo global mutable state. 3. Fix the implementation to properly treat ^Z as EOF instead of as horizontal whitespace, which matches the semantic implemented by VC++. llvm-svn: 91586
* Update tests to use %clang instead of 'clang', and forcibly disable use of 'Daniel Dunbar2009-12-154-6/+6
| | | | | | | clang ' or ' clang -cc1 ' or ' clang-cc ' in test lines (by substituting them to garbage). llvm-svn: 91460
* Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'.Daniel Dunbar2009-12-1522-30/+30
| | | | | | | | | - This is designed to make it obvious that %clang_cc1 is a "test variable" which is substituted. It is '%clang_cc1' instead of '%clang -cc1' because it can be useful to redefine what gets run as 'clang -cc1' (for example, to set a default target). llvm-svn: 91446
* teach clang to recover gracefully from conflict markers left in sourceChris Lattner2009-12-141-0/+29
| | | | | | files: PR5238. llvm-svn: 91270
* Integrate the following from the 'objective-rewrite' branch:Steve Naroff2009-12-081-0/+5
| | | | | | http://llvm.org/viewvc/llvm-project?view=rev&revision=80043 llvm-svn: 90860
* Add 'has_feature(cxx_exceptions)' to allow code to determine via ↵Ted Kremenek2009-12-031-0/+11
| | | | | | preprocessor logic if C++ exceptions are enabled. llvm-svn: 90378
* Rename has_feature(rtti) to has_feature(cxx_rtti) for clarity.Ted Kremenek2009-12-031-1/+1
| | | | llvm-svn: 90376
OpenPOWER on IntegriCloud