summaryrefslogtreecommitdiffstats
path: root/clang/test/Lexer/constants.c
Commit message (Collapse)AuthorAgeFilesLines
* Add driver flags -ftrigraphs, -fno-trigraphs.Nico Weber2014-12-231-1/+1
| | | | | | | | | | | | | | | | | -trigraphs is now an alias for -ftrigraphs. -fno-trigraphs makes it possible to explicitly disable trigraphs, which couldn't be done before. clang -std=c++11 -fno-trigraphs now builds without GNU extensions, but with trigraphs disabled. Previously, trigraphs were only disabled in GNU modes or with -std=c++1z. Make the new -f flags the cc1 interface too. This requires changing -trigraphs to -ftrigraphs in a few cc1 tests. Related to PR21974. llvm-svn: 224790
* Improving the "integer constant too large" diagnostics based on post-commit ↵Aaron Ballman2014-07-241-2/+2
| | | | | | feedback from Richard Smith. Amends r213657. llvm-svn: 213865
* Provide extra information in the "integer constant is too large" diagnostic. ↵Aaron Ballman2014-07-221-2/+2
| | | | | | This will be used to improve other diagnostics. llvm-svn: 213657
* Partially revert r186903.Eli Friedman2013-07-261-1/+1
| | | | | | | | It turns out that Plum Hall depends on us not emitting an error on integer literals which fit into long long, but fit into unsigned long long. So C99 conformance requires not conforming to C99. :) llvm-svn: 187172
* Integers which are too large should be an error.Eli Friedman2013-07-231-1/+6
| | | | | | | | Switch some warnings over to errors which should never have been warnings in the first place. (Also, a minor fix to the preprocessor rules for integer literals while I'm here.) llvm-svn: 186903
* Add and update tests for character literalsSeth Cantrell2012-01-181-1/+1
| | | | llvm-svn: 148392
* Warn about and truncate UCNs that are too big for their character literal type.Craig Topper2011-08-191-0/+2
| | | | llvm-svn: 138031
* 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
* Test for PR7888.Eli Friedman2010-08-191-0/+3
| | | | llvm-svn: 111545
* fix PR4499, patch by Kyle Dean!Chris Lattner2010-07-071-0/+7
| | | | llvm-svn: 107836
* 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
* Diagnose out-of-bounds floating-point constants. Fixes rdar://problem/6974641John McCall2009-12-241-0/+22
| | | | llvm-svn: 92127
* Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'.Daniel Dunbar2009-12-151-1/+1
| | | | | | | | | - 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
* accept "#pragma clang foo" where we accept "#pragma GCC foo".Chris Lattner2009-05-121-2/+2
| | | | llvm-svn: 71572
* Implement -Wfour-char-constants, which is an extension, not an extwarn,Chris Lattner2009-04-281-2/+8
| | | | | | and apparently not part of -Wall llvm-svn: 70329
* implement -WmulticharChris Lattner2009-04-281-1/+15
| | | | llvm-svn: 70315
* merge number.c into constants.c and start running it in -verify mode.Chris Lattner2009-04-281-4/+11
| | | | llvm-svn: 70310
* Rename clang to clang-cc.Daniel Dunbar2009-03-241-1/+1
| | | | | | Tests and drivers updated, still need to shuffle dirs. llvm-svn: 67602
* rename -parse-ast-print to -ast-printChris Lattner2007-10-111-1/+1
| | | | | | | rename -parse-ast-dump to -ast-dump remove -parse-ast, which is redundant with -fsyntax-only llvm-svn: 42852
* Removed option "-parse-ast-check" from clang driver. This is now implementedTed Kremenek2007-09-261-1/+1
| | | | | | | | | | | | using "-parse-ast -verify". Updated all test cases (using a sed script) that invoked -parse-ast-check to now use -parse-ast -verify. Fixed a bug where using "-verify" instead of "-parse-ast-check" would not correctly create the DiagClient needed to accumulate diagnostics. llvm-svn: 42365
* Make octal constant lexing use AdvanceToTokenCharacter to give moreChris Lattner2007-07-161-0/+8
accurate diagnostics. For test/Lexer/comments.c we now emit: int x = 000000080; /* expected-error {{invalid digit}} */ ^ constants.c:7:4: error: invalid digit '8' in octal constant 00080; /* expected-error {{invalid digit}} */ ^ The last line is due to an escaped newline. The full line looks like: int y = 0000\ 00080; /* expected-error {{invalid digit}} */ Previously, we emitted: constants.c:4:9: error: invalid digit '8' in octal constant int x = 000000080; /* expected-error {{invalid digit}} */ ^ constants.c:6:9: error: invalid digit '8' in octal constant int y = 0000\ ^ which isn't too bad, but the new way is better for the user, regardless of whether there is an escaped newline or not. All the other lexer-related diagnostics should switch over to using AdvanceToTokenCharacter where appropriate. Help wanted :). This implements test/Lexer/constants.c. llvm-svn: 39906
OpenPOWER on IntegriCloud