summaryrefslogtreecommitdiffstats
path: root/test/Lexer
Commit message (Collapse)AuthorAgeFilesLines
* MultiTestRunner: Validate '&&' at the end of RUN lines.Daniel Dunbar2009-07-251-1/+1
| | | | | | | | | - This is just to normalize, these will go away soon hopefully. Added all the missing '&&'s that have crept in. :) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77062 91177308-0d34-0410-b5e6-96231b3b80d8
* PR4395: Don't detect token concatenation in C mode for Eli Friedman2009-06-151-0/+4
| | | | | | | | C++-specific tokens. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73408 91177308-0d34-0410-b5e6-96231b3b80d8
* PR4353: Add support for \E as a character escape.Eli Friedman2009-06-101-0/+21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73153 91177308-0d34-0410-b5e6-96231b3b80d8
* accept "#pragma clang foo" where we accept "#pragma GCC foo".Chris Lattner2009-05-121-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71572 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement -Wfour-char-constants, which is an extension, not an extwarn,Chris Lattner2009-04-281-2/+8
| | | | | | | and apparently not part of -Wall git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70329 91177308-0d34-0410-b5e6-96231b3b80d8
* implement -WmulticharChris Lattner2009-04-281-1/+15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70315 91177308-0d34-0410-b5e6-96231b3b80d8
* merge number.c into constants.c and start running it in -verify mode.Chris Lattner2009-04-282-13/+11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70310 91177308-0d34-0410-b5e6-96231b3b80d8
* implement the microsoft/gnu "__COUNTER__" macro: rdar://4329310Chris Lattner2009-04-131-0/+16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68933 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement the first set of changes for PR3963 and rdar://6759604,Chris Lattner2009-04-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | which tries to do better error recovery when it is "obvious" that an identifier is a mis-typed typename. In this case, we try to parse it as a typename instead of as the identifier in a declarator, which gives us several options for better error recovery and immediately makes diagnostics more useful. For example, we now produce: t.c:4:8: error: unknown type name 'foo_t' static foo_t a = 4; ^ instead of: t.c:4:14: error: invalid token after top level declarator static foo_t a = 4; ^ Also, since we now parse "a" correctly, we make a decl for it, preventing later uses of 'a' from emitting things like: t.c:12:20: error: use of undeclared identifier 'a' int bar() { return a + b; } ^ I'd really appreciate any scrutiny possible on this, it is a tricky area. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68911 91177308-0d34-0410-b5e6-96231b3b80d8
* fix rdar://6757323, where an escaped newline in a // commentChris Lattner2009-04-051-0/+6
| | | | | | | was causing the char after the newline to get eaten. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68430 91177308-0d34-0410-b5e6-96231b3b80d8
* Move the rest of the fixit tests to the FixIt area.Mike Stump2009-04-021-13/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68349 91177308-0d34-0410-b5e6-96231b3b80d8
* Update wording.Mike Stump2009-04-021-4/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68347 91177308-0d34-0410-b5e6-96231b3b80d8
* A code modification hint for files that don't end in a newline.Mike Stump2009-04-021-0/+13
| | | | | | | | Eventually, would be nice to be able to run these modifications even when we don't want the warning or errors for the actual diagnostic. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68272 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename clang to clang-cc.Daniel Dunbar2009-03-2418-27/+27
| | | | | | | Tests and drivers updated, still need to shuffle dirs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67602 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't use &> in tests; dash doesn't understand it.Eli Friedman2009-03-221-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67483 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix -E mismatch; an identifier followed by a numeric constant does notDaniel Dunbar2009-03-181-0/+4
| | | | | | | | | require a space (to avoid concatenation) if the numeric constant had a leading period. - PR3819. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67163 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't accept '$' in identifiers in assembler-with-cpp mode.Daniel Dunbar2009-03-151-0/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67013 91177308-0d34-0410-b5e6-96231b3b80d8
* this test isn't testing anything.Chris Lattner2009-03-081-3/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66389 91177308-0d34-0410-b5e6-96231b3b80d8
* change a diagnostic message from something pedantically correct butChris Lattner2009-02-271-1/+1
| | | | | | | | useless to something more vague but hopefully more clear. rdar://6624173 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65639 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR2477 - clang misparses "//*" in C89 modeChris Lattner2009-01-161-0/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62368 91177308-0d34-0410-b5e6-96231b3b80d8
* rdar://6060752 - don't warn about trigraphs in bcpl-style commentsChris Lattner2008-12-121-0/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60942 91177308-0d34-0410-b5e6-96231b3b80d8
* split into two tests.Chris Lattner2008-11-212-10/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59770 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement support for C++ nested-name-specifiers ('foo::bar::x') in the ↵Argyrios Kyrtzidis2008-11-081-1/+1
| | | | | | | | Parser side. No Sema functionality change, just the signatures of the Action/Sema methods. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58913 91177308-0d34-0410-b5e6-96231b3b80d8
* Test case for previous commit (Workaround gcc bug causing crash on ourDaniel Dunbar2008-09-051-0/+3
| | | | | | | preprocessed outputs) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55826 91177308-0d34-0410-b5e6-96231b3b80d8
* Following gcc's behavior, only enable trigraphs if '-trigraphs' or '-ansi' isTed Kremenek2008-09-032-9/+9
| | | | | | | specified, or -std is set to a conforming mode. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55738 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix for PR2750; don't check for an 'e' in the trash after the token.Eli Friedman2008-09-021-0/+13
| | | | | | | | | | Note that this isn't really a complete fix; I think there are other potential overrun situations. I don't really know what the best systematic fix is, though. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55622 91177308-0d34-0410-b5e6-96231b3b80d8
* update this testcase.Chris Lattner2008-07-251-2/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54037 91177308-0d34-0410-b5e6-96231b3b80d8
* Add test case for hex floating point constants in < C99 modeDaniel Dunbar2008-07-251-0/+14
| | | | | | | - For: rdar://6096838 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54036 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR2252: don't warn on negating an unsigned value ever, and don't emitChris Lattner2008-07-031-1/+4
| | | | | | | 'integer constant is so large that it is unsigned' warning for hex literals. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53070 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a bug reported by Kelly Wilson, where we incorrectlyChris Lattner2008-06-301-0/+2
| | | | | | | rejected FP immediates like 08.123 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52890 91177308-0d34-0410-b5e6-96231b3b80d8
* Multiple tests in a single test file must be linked with '&&'.Argyrios Kyrtzidis2008-06-121-1/+1
| | | | | | Otherwise, failing tests other than the last one will not be reported. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52231 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix the run line for this test.Eli Friedman2008-06-101-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52169 91177308-0d34-0410-b5e6-96231b3b80d8
* Make this test C instead of C++; making it C++ causes a failure on Linux Eli Friedman2008-06-101-0/+0
| | | | | | | | because clang can't parse stdio.h in C++ mode yet. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52168 91177308-0d34-0410-b5e6-96231b3b80d8
* fix PR2357 (#ifs didnt invalidate the multiple-inclusion optimization state)Nuno Lopes2008-06-011-0/+27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51843 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR2090, a typo in digraph processing.Chris Lattner2008-02-241-0/+15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47540 91177308-0d34-0410-b5e6-96231b3b80d8
* pull .ll and .bc writing out of the ASTConsumer destructors into some topChris Lattner2008-02-061-2/+2
| | | | | | | | | | | level code in clang. This is a cleanup, but does implement "-o" for -emit-llvm. One effect of this is that "clang foo.c -emit-llvm" will now emit into foo.ll instead of stdout. Use "clang foo.c -emit-llvm -o -" or "clang < foo.c -emit-llvm" to get the old behavior. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46791 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for #pragma mark, which shouldn't warn about bogus tokens.Chris Lattner2007-12-191-0/+11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45212 91177308-0d34-0410-b5e6-96231b3b80d8
* Doh! Check in this long overdue test fix.Christopher Lamb2007-11-301-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44450 91177308-0d34-0410-b5e6-96231b3b80d8
* Support floating point literals of the form "1e-16f" which specify an ↵Christopher Lamb2007-11-291-0/+7
| | | | | | exponent but no decimal point. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44431 91177308-0d34-0410-b5e6-96231b3b80d8
* The checking for the delimiters of expected error/warning messages wasBill Wendling2007-11-261-1/+1
| | | | | | | | | looking only for { and } instead of {{ and }}. Changed it to check for this explicitly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44326 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a bug handling hex floats in c90 mode, pointed out by Neil.Chris Lattner2007-11-141-0/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44120 91177308-0d34-0410-b5e6-96231b3b80d8
* rename -parse-ast-print to -ast-printChris Lattner2007-10-113-3/+3
| | | | | | | | | rename -parse-ast-dump to -ast-dump remove -parse-ast, which is redundant with -fsyntax-only git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42852 91177308-0d34-0410-b5e6-96231b3b80d8
* Removed option "-parse-ast-check" from clang driver. This is now implementedTed Kremenek2007-09-263-3/+3
| | | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42365 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a lexer bug where we incorrectly rejectedChris Lattner2007-07-211-0/+3
| | | | | | | | | | | int i = /*/ */ 1; Thanks to Neil for pointing this out. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40379 91177308-0d34-0410-b5e6-96231b3b80d8
* 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@39906 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for C++'0x keywords, patch by Doug GregorChris Lattner2007-07-162-0/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@39897 91177308-0d34-0410-b5e6-96231b3b80d8
* Stage two of getting CFE top correct.Reid Spencer2007-07-115-0/+48
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@39734 91177308-0d34-0410-b5e6-96231b3b80d8