summaryrefslogtreecommitdiffstats
path: root/clang/lib/Lex
Commit message (Collapse)AuthorAgeFilesLines
...
* predefine the macro linux when compiled on a linux system. this fixes the ↵Nuno Lopes2008-07-051-0/+5
| | | | | | build of libtidy llvm-svn: 53145
* Fix PR2252: don't warn on negating an unsigned value ever, and don't emitChris Lattner2008-07-031-6/+4
| | | | | | 'integer constant is so large that it is unsigned' warning for hex literals. llvm-svn: 53070
* Fix a bug reported by Kelly Wilson, where we incorrectlyChris Lattner2008-06-301-4/+15
| | | | | | rejected FP immediates like 08.123 llvm-svn: 52890
* refactor some code out into a new method.Chris Lattner2008-06-301-83/+104
| | | | llvm-svn: 52889
* clang uses the llvm backend, so define __llvm__ like llvm-gcc. Chris Lattner2008-06-261-0/+3
| | | | | | | Additionally, define __clang__ so clients can predicate based on clang features. llvm-svn: 52788
* fix PR2357 (#ifs didnt invalidate the multiple-inclusion optimization state)Nuno Lopes2008-06-011-9/+10
| | | | llvm-svn: 51843
* Fix rewriter bug <rdar://problem/5929344> clang ObjC rewriter: "extern int ↵Steve Naroff2008-05-151-0/+2
| | | | | | | | __CFConstantStringClassReference[];" should be extern "C". Have clang predefine OBJC_NEW_PROPERTIES (which is what gcc does). llvm-svn: 51163
* DO NOT pre-defined __OBJC2__. The __OBJC2__ macro should only be defined ↵Steve Naroff2008-05-091-2/+0
| | | | | | when targeting the new, Apple 2.0 *runtime ABI*. It is not intended to be used to #ifdef ObjC 2.0 langauge features. This is unfortunate (given it's name). In a perfect world, this defined would be named __OBJC2_RUNTIME_ABI__. Oh well. llvm-svn: 50913
* The awesome GNU "comma elision extension" works with both the standardChris Lattner2008-05-081-3/+6
| | | | | | | __VA_ARGS__ syntax as well as with the amazingly awesome GNU "named variadic macro" extension. Allow it with the GNU syntax as well. llvm-svn: 50843
* Fix typo, improve comment.Chris Lattner2008-05-051-5/+6
| | | | llvm-svn: 50666
* Fix a few more bugs in preprocessor expressions w.r.t. ?:. Now I Chris Lattner2008-05-051-12/+24
| | | | | | think it is really right. :) This fixes PR2284. llvm-svn: 50665
* Neil pointed out that clang doesn't generate ranges from diagnosticsChris Lattner2008-05-052-120/+192
| | | | | | | | | | | | | | | | | | | | | | | | related to pp-expressions. Doing so is pretty simple and this patch implements it, yielding nice diagnostics like: t.c:2:7: error: division by zero in preprocessor expression #if 1 / (0 + 0) ~ ^ ~~~~~~~ t.c:5:14: error: expected ')' in preprocessor expression #if (412 + 42 ~~~~~~~~^ t.c:5:5: error: to match this '(' #if (412 + 42 ^ t.c:10:10: warning: left side of operator converted from negative value to unsigned: -42 to 18446744073709551574 #if (-42 + 0U) / -2 ~~~ ^ ~~ t.c:10:16: warning: right side of operator converted from negative value to unsigned: -2 to 18446744073709551614 #if (-42 + 0U) / -2 ~~~~~~~~~~ ^ ~~ 5 diagnostics generated. llvm-svn: 50638
* fix a bug handling right associative operators that Neil noticed, hopefullyChris Lattner2008-05-051-14/+4
| | | | | | the final part of PR2279 llvm-svn: 50635
* ||/&& do not do UAC's either. This silences a bogus warning on #if -1 || 4U.Chris Lattner2008-05-041-4/+10
| | | | llvm-svn: 50632
* Neil points out that commas don't do UACs either.Chris Lattner2008-05-041-1/+1
| | | | llvm-svn: 50631
* Fix the rest of PR2279:Chris Lattner2008-05-041-4/+7
| | | | | | | | | a) correct rejection of ',' in pp expressions. b) the precedence of ',' was wrong w.r.t. ?:. Thanks again to Neil for finding these and providing testcases. llvm-svn: 50625
* Fix PR2279 part C: shifts don't perform the UACs, thanks to Neil Chris Lattner2008-05-041-2/+4
| | | | | | for pointing this out. llvm-svn: 50624
* fix a nasty bug that Neil identifier in pp-expr parsing (this is PR2279 part D).Chris Lattner2008-05-041-5/+13
| | | | llvm-svn: 50617
* for exponent-related errors, emit the diagnostic on the 'e' or 'p'.Chris Lattner2008-04-201-4/+7
| | | | llvm-svn: 49997
* when emitting diagnostics about some character in a numericChris Lattner2008-04-201-20/+26
| | | | | | | | | | | literal, indicate what character the error is about or where it would be. For example: pr2241.c:1:17: error: exponent has no digits float f[] = { 1e , 1ee0 }; ^ llvm-svn: 49996
* simplify ownership of the predefines buffer.Chris Lattner2008-04-191-5/+1
| | | | llvm-svn: 49973
* class Preprocessor: Now owns the "predefines" char*; it deletes [] it in its ↵Ted Kremenek2008-04-171-0/+2
| | | | | | | | | | | | | | | | | dstor. clang.cpp: InitializePreprocessor now makes a copy of the contents of PredefinesBuffer and passes it to the preprocessor object. clang.cpp: DriverPreprocessorFactory now calls "InitializePreprocessor" instead of this being done in main(). html::HighlightMacros() now takes a PreprocessorFactory, allowing it to conjure up a new Preprocessor to highlight macros. class HTMLDiagnostics now takes a PreprocessorFactory* that it can use for html::HighlightMacros(). Updated clients of HTMLDiagnostics to use this new interface. llvm-svn: 49875
* Added "PreprocessorFactory", an interface for lazily creating Preprocessor ↵Ted Kremenek2008-04-171-0/+2
| | | | | | objects on-demand. llvm-svn: 49868
* Fix typoNate Begeman2008-04-141-1/+1
| | | | llvm-svn: 49632
* Fix PR2220, making diagnostics for unexpected tokens in pp expressions Chris Lattner2008-04-131-3/+3
| | | | | | more nice. llvm-svn: 49619
* don't diagnose empty source files, thanks Neil!Chris Lattner2008-04-121-2/+3
| | | | llvm-svn: 49575
* don't read off the front of the buffer. Thanks to Sam for pointing this out.Chris Lattner2008-04-111-1/+1
| | | | llvm-svn: 49535
* Support MS-specific integer suffixes (i8, i16, i32, i64, i128).Steve Naroff2008-04-041-0/+29
| | | | llvm-svn: 49229
* Update to match simplified llvm MemoryBuffer interfaces for files.Chris Lattner2008-04-011-2/+1
| | | | llvm-svn: 49042
* Avoid overflowing buffer, patch by Algeris Kirtzidis!Chris Lattner2008-03-241-1/+1
| | | | llvm-svn: 48741
* Plug a memory leak in the "this macro expands into a single trivially-Sam Bishop2008-03-211-1/+4
| | | | | | expanded token" case. llvm-svn: 48637
* move #include to the file that needs it.Chris Lattner2008-03-182-1/+1
| | | | llvm-svn: 48485
* Make a major restructuring of the clang tree: introduce a top-levelChris Lattner2008-03-1516-0/+7673
lib dir and move all the libraries into it. This follows the main llvm tree, and allows the libraries to be built in parallel. The top level now enforces that all the libs are built before Driver, but we don't care what order the libs are built in. This speeds up parallel builds, particularly incremental ones. llvm-svn: 48402
OpenPOWER on IntegriCloud