summaryrefslogtreecommitdiffstats
path: root/clang/test/Lexer
Commit message (Collapse)AuthorAgeFilesLines
...
* Tests for UTF-8 encoding in strings in source code. Patch by Seth Cantrell.Eli Friedman2011-11-011-0/+15
| | | | llvm-svn: 143418
* Add __has_feature(cxx_raw_string_literals) andDouglas Gregor2011-11-011-0/+18
| | | | | | __has_feature(cxx_unicode_literals), from Michel Morin! llvm-svn: 143412
* Add __has_feature(cxx_defaulted_functions) for querying "defaultedDouglas Gregor2011-11-011-0/+8
| | | | | | functions", from Michel Morin! llvm-svn: 143411
* Give __STDC_VERSION__ the value 201001L when we're in C1x mode. TheDouglas Gregor2011-10-281-0/+9
| | | | | | | committee hasn't set a value for __STDC_VERSION__ yet, so this is a placeholder. But at least it's > 199901L. llvm-svn: 143245
* Make the -Wc++11-compat warnings ignored by default, so we don't breakDouglas Gregor2011-10-251-1/+1
| | | | | | | valid C++98/03 code. However, add these warnings to -Wall, for those who obviously already like clean code. llvm-svn: 142903
* Make -fms-compatibility imply -fms-extensions. Fixes PR11204.Douglas Gregor2011-10-241-0/+1
| | | | llvm-svn: 142797
* Add c_alignas and cxx_alignas featuresPeter Collingbourne2011-10-143-0/+26
| | | | llvm-svn: 142020
* Update all tests other than Driver/std.cpp to use -std=c++11 rather thanRichard Smith2011-10-136-6/+6
| | | | | | -std=c++0x. Patch by Ahmed Charles! llvm-svn: 141900
* We do parse hexfloats in C++11; make it actually work.Douglas Gregor2011-10-121-7/+2
| | | | llvm-svn: 141798
* Handle Perforce-style conflict markers like normal conflict markers. PerforceRichard Smith2011-10-121-2/+10
| | | | | | | swaps over the <<<< and >>>> markers, and uses shorter markers than traditional tools. llvm-svn: 141751
* Fix test: don't use __thread without a target triple.Richard Smith2011-10-111-3/+3
| | | | llvm-svn: 141719
* Add a -Wc++0x-compat warning for C++11 keywords used as identifiers when inRichard Smith2011-10-111-2/+35
| | | | | | C++98 mode. Only the first occurrence of each keyword will produce a warning. llvm-svn: 141700
* Make -fobjc-nonfragile-abi the -cc1 default, since it's theJohn McCall2011-10-021-2/+2
| | | | | | | | | | | | | | | | | | | increasingly prevailing case to the point that new features like ARC don't even support the fragile ABI anymore. This required a little bit of reshuffling with exceptions because a check was assuming that ObjCNonFragileABI was only being set in ObjC mode, and that's actually a bit obnoxious to do. Most, though, it involved a perl script to translate a ton of test cases. Mostly no functionality change for driver users, although there are corner cases with disabling language-specific exceptions that we should handle more correctly now. llvm-svn: 140957
* When parsing a character literal, extract the characters from theDouglas Gregor2011-09-271-0/+4
| | | | | | | | buffer as an 'unsigned char', so that integer promotion doesn't sign-extend character values > 127 into oblivion. Fixes <rdar://problem/10188919>. llvm-svn: 140608
* Advertise support for cxx_range_for as an extension in C++98 mode. Patch by ↵Richard Smith2011-09-061-0/+5
| | | | | | | | Jean-Daniel Dupas! Also provide a modicum of test coverage for ranged for in C++98. llvm-svn: 139149
* Speed up BCPL comment lexing by looking aggressively for newlines and then ↵Benjamin Kramer2011-09-051-0/+12
| | | | | | | | scannig backwards to see if the newline is escaped. 3% speedup in preprocessing all of clang with -Eonly. Also includes a small testcase for coverage. llvm-svn: 139116
* Add test case for defaulted copy and move structure validation.Sebastian Redl2011-09-041-0/+9
| | | | | | | | Fix bug this uncovered. Address minor comments from Doug. Enable cxx_implicit_moves feature. llvm-svn: 139101
* Make Lexer::ComputePreamble accept a LangOptions parameter, otherwise it may beArgyrios Kyrtzidis2011-08-251-2/+2
| | | | | | out-of-sync how a file is compiled. Patch by Matthias Kleine! llvm-svn: 138580
* Warn about and truncate UCNs that are too big for their character literal type.Craig Topper2011-08-191-0/+2
| | | | llvm-svn: 138031
* Fix a couple raw string literal testsCraig Topper2011-08-122-7/+0
| | | | llvm-svn: 137422
* Add tests for string literal concatenation.Craig Topper2011-08-111-0/+33
| | | | llvm-svn: 137302
* Add support for C++0x raw string literals.Craig Topper2011-08-112-0/+14
| | | | llvm-svn: 137298
* Add support for C++0x unicode string and character literals, from Craig Topper!Douglas Gregor2011-07-271-2/+2
| | | | llvm-svn: 136210
* Expose no newline at end of file warning under Wnewline-eof flag.Anna Zaks2011-07-221-0/+5
| | | | llvm-svn: 135822
* Remember to add a has_feature macro for __underlying_type now that it isAlexis Hunt2011-07-181-0/+5
| | | | | | correctly impelmented llvm-svn: 135401
* Change the driver's logic about Objective-C runtimes: abstract out aJohn McCall2011-07-061-2/+2
| | | | | | | | | | | | structure to hold inferred information, then propagate each invididual bit down to -cc1. Separate the bits of "supports weak" and "has a native ARC runtime"; make the latter a CodeGenOption. The tool chain is still driving this decision, because it's the place that has the required deployment target information on Darwin, but at least it's better-factored now. llvm-svn: 134453
* Automatic Reference Counting.John McCall2011-06-151-0/+20
| | | | | | | | | | Language-design credit goes to a lot of people, but I particularly want to single out Blaine Garst and Patrick Beard for their contributions. Compiler implementation credit goes to Argyrios, Doug, Fariborz, and myself, in no particular order. llvm-svn: 133103
* Audit and finish the implementation of C++0x nullptr, fixing twoDouglas Gregor2011-05-211-1/+1
| | | | | | | | | | | | | | minor issues along the way: - Non-type template parameters of type 'std::nullptr_t' were not permitted. - We didn't properly introduce built-in operators for nullptr ==, !=, <, <=, >=, or > as candidate functions . To my knowledge, there's only one (minor but annoying) part of nullptr that hasn't been implemented: catching a thrown 'nullptr' as a pointer or pointer-to-member, per C++0x [except.handle]p4. llvm-svn: 131813
* Revert r131672 until __underlying_type is properly implemented in theAlexis Hunt2011-05-191-4/+0
| | | | | | template case. llvm-svn: 131692
* Implement a __has_feature for __underlying_typeAlexis Hunt2011-05-191-0/+4
| | | | llvm-svn: 131672
* Introduce __has_extension macroPeter Collingbourne2011-05-133-0/+86
| | | | | | | | | | | | | | | __has_extension is a function-like macro which takes the same set of feature identifiers as __has_feature. It evaluates to 1 if the feature is supported by Clang in the current language (either as a language extension or a standard language feature) or 0 if not. At the same time, add support for the C1X feature identifiers c_generic_selections (renamed from generic_selections) and c_static_assert, and document them. Patch by myself and Jean-Daniel Dupas. llvm-svn: 131308
* Implement the __is_trivially_copyable type traitAlexis Hunt2011-05-131-0/+5
| | | | llvm-svn: 131270
* enable __has_feature(is_standard_layout)Howard Hinnant2011-05-121-0/+5
| | | | llvm-svn: 131240
* Change magic string "abc" to better magic string "qux".Matt Beaumont-Gay2011-05-101-6/+2
| | | | | | | | | | | | | Wait, what? So, we run Clang (and LLVM) tests in an environment where the md5sum of the input files becomes a component of the path. When testing the preprocessor, the path becomes part of the output (in line directives). In this test, we were grepping for the absence of "abc" in the output. When the stars aligned properly, the md5sum component of the path contained "abc" and the test failed. Oops. llvm-svn: 131147
* Implement support for C++0x alias templates.Richard Smith2011-05-051-0/+9
| | | | llvm-svn: 130953
* Have #pragma message not turn into error by -Werror, by default. Fixes ↵Argyrios Kyrtzidis2011-04-211-1/+1
| | | | | | rdar://9308989. llvm-svn: 129916
* Add __has_feature(cxx_range_for) check for C++11 range-based for loop.Richard Smith2011-04-151-0/+11
| | | | llvm-svn: 129573
* clang has had full and tested support for C++0x trailing-return-type and ↵Richard Smith2011-04-031-0/+10
| | | | | | | | auto type deduction since r126166. Update the website to reflect this, and add a __has_feature test. trailing-return-type codegen is not tested yet (name mangling in particular). llvm-svn: 128787
* we can now claim to fully support the override control feature in C++0x.Anders Carlsson2011-03-251-0/+8
| | | | llvm-svn: 128281
* Create __has_feature(cxx_noexcept) and mark it as working.Sebastian Redl2011-03-151-0/+9
| | | | | | | Find out that our C++0x status has only one field for noexcept expression and specification together, and that it was accidentally already marked as fully implemented. This completes noexcept specification work. llvm-svn: 127701
* Turn on __has_feature(cxx_auto_type). The feature is now fully implemented.Richard Smith2011-02-201-2/+1
| | | | llvm-svn: 126078
* Warn for missing terminating " or ' instead of error for gcc compatibility. ↵Argyrios Kyrtzidis2011-02-151-0/+7
| | | | | | Fixed rdar://8914293. llvm-svn: 125616
* Add a __has_feature check for default template arguments in functionDouglas Gregor2011-02-051-0/+9
| | | | | | templates, a C++0x feature. llvm-svn: 124973
* Add __has_feature() for each of the type traitsDouglas Gregor2011-02-031-0/+91
| | | | llvm-svn: 124820
* Add __has_feature(cxx_reference_qualified_functions); update tests andDouglas Gregor2011-01-261-0/+10
| | | | | | documentation. llvm-svn: 124322
* Clean up the C++0x __has_feature tests. Specifically:Douglas Gregor2011-01-261-19/+18
| | | | | | | | | | | | | - Don't publicize a C++0x feature through __has_feature if we aren't in C++0x mode (even if the feature is available only with a warning). - "auto" is not implemented well enough for its __has_feature to be turned on. - Fix the test of C++0x __has_feature to actually test what we're trying to test. Searching for the substring "foo" when our options are "foo" and "no_foo" doesn't work :) llvm-svn: 124291
* Downgrade the error about rvalue references to an extension warningDouglas Gregor2011-01-251-2/+2
| | | | | | | | and turn on __has_feature(cxx_rvalue_references). The core rvalue references proposal seems to be fully implemented now, pending lots more testing. llvm-svn: 124169
* Eradicate any mention of C++0x concepts.Douglas Gregor2011-01-191-10/+0
| | | | llvm-svn: 123860
* Variadic templates are fully implemented.Douglas Gregor2011-01-191-2/+3
| | | | | | | | Turn on the __has_feature switch for variadic templates, document their completion, and put the ExtWarn into the c++0x-extensions warning group. llvm-svn: 123854
* Added testcase for commit r122963.Abramo Bagnara2011-01-061-0/+2
| | | | llvm-svn: 122964
OpenPOWER on IntegriCloud