Граф коммитов

120 Коммитов

Автор SHA1 Сообщение Дата
Chris Lattner 019ef7e102 ||/&& do not do UAC's either. This silences a bogus warning on #if -1 || 4U.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50632 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-04 23:46:17 +00:00
Chris Lattner 463ec60993 Neil points out that commas don't do UACs either.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50631 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-04 23:38:48 +00:00
Chris Lattner 9189156429 Fix the rest of PR2279:
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.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50625 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-04 18:36:18 +00:00
Chris Lattner d5214b22cc Fix PR2279 part C: shifts don't perform the UACs, thanks to Neil
for pointing this out.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50624 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-04 18:25:32 +00:00
Chris Lattner 3b6911527a fix a nasty bug that Neil identifier in pp-expr parsing (this is PR2279 part D).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50617 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-04 07:15:21 +00:00
Chris Lattner 70f66ab053 for exponent-related errors, emit the diagnostic on the 'e' or 'p'.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49997 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-20 18:47:55 +00:00
Chris Lattner 0b7f69d789 when emitting diagnostics about some character in a numeric
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 };
                ^



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49996 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-20 18:41:46 +00:00
Chris Lattner aa39197431 simplify ownership of the predefines buffer.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49973 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-19 23:09:31 +00:00
Ted Kremenek 339b9c2775 class Preprocessor: Now owns the "predefines" char*; it deletes [] it in its 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.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49875 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-17 22:31:54 +00:00
Ted Kremenek ec6c574478 Added "PreprocessorFactory", an interface for lazily creating Preprocessor objects on-demand.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49868 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-17 21:23:07 +00:00
Nate Begeman 5253c7ff26 Fix typo
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49632 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-14 02:26:39 +00:00
Chris Lattner d98d975ccd Fix PR2220, making diagnostics for unexpected tokens in pp expressions
more nice.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49619 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-13 20:38:43 +00:00
Chris Lattner b25e5d79d9 don't diagnose empty source files, thanks Neil!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49575 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-12 05:54:25 +00:00
Chris Lattner 8fa3078cfe don't read off the front of the buffer. Thanks to Sam for pointing this out.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49535 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-11 16:20:41 +00:00
Steve Naroff 0c29b22f43 Support MS-specific integer suffixes (i8, i16, i32, i64, i128).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49229 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-04 21:02:54 +00:00
Chris Lattner 35de512b9c Update to match simplified llvm MemoryBuffer interfaces for files.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49042 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-01 18:04:30 +00:00
Chris Lattner ea301e15a6 Avoid overflowing buffer, patch by Algeris Kirtzidis!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48741 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-24 21:14:55 +00:00
Sam Bishop 9a4939f7ed Plug a memory leak in the "this macro expands into a single trivially-
expanded token" case.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48637 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-21 07:13:02 +00:00
Chris Lattner f90a248578 move #include to the file that needs it.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48485 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-18 05:59:11 +00:00
Chris Lattner bda0b626e7 Make a major restructuring of the clang tree: introduce a top-level
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.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48402 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-15 23:59:48 +00:00