]>
granicus.if.org Git - clang/log
Anders Carlsson [Sun, 18 Jan 2009 02:54:17 +0000 (02:54 +0000)]
Make CCC_ECHO output to stderr
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62452
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 18 Jan 2009 02:52:26 +0000 (02:52 +0000)]
Avoid malloc thrashing on the std::vector for ConditionalStack. Because
there is one of these per header, this almost always gets alloc/free'd for
each #ifdef.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62451
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 18 Jan 2009 02:34:01 +0000 (02:34 +0000)]
rename some variables, only set a tokens identifierinfo if non-null.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62450
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Sun, 18 Jan 2009 02:27:45 +0000 (02:27 +0000)]
Eliminate tabs
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62449
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 18 Jan 2009 02:19:54 +0000 (02:19 +0000)]
Fix a runtime error I saw
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62448
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 18 Jan 2009 02:19:16 +0000 (02:19 +0000)]
On i386 and x86-64, just do unaligned loads
instead of assembling from bytes. This speeds up -Eonly PTH reading
of cocoa.h by about 2ms, which is 4.2%.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62447
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 18 Jan 2009 02:12:04 +0000 (02:12 +0000)]
Handle the 'X' constraint. Fixes <rdar://problem/
6504897 >.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62446
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 18 Jan 2009 02:10:31 +0000 (02:10 +0000)]
switch PTHLexer to use Read32 and friends instead of lots of inlined
copies. I verified that this causes no performance change in PTH.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62445
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 18 Jan 2009 02:06:20 +0000 (02:06 +0000)]
CG support for inline asm constraints with symbolic names. Fixes PR3345
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62444
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Sun, 18 Jan 2009 02:01:21 +0000 (02:01 +0000)]
A couple more vector component access fixes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62443
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 18 Jan 2009 01:57:14 +0000 (01:57 +0000)]
switch PTH lexer from using "const char*"s to "const unsigned char*"s
internally. This is just a cleanup that reduces the need to cast to
unsigned char before assembling a larger integer.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62442
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 18 Jan 2009 01:56:57 +0000 (01:56 +0000)]
Add sema support for symbolic names in inline asm statements.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62441
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Sun, 18 Jan 2009 01:47:54 +0000 (01:47 +0000)]
Update support for vector component access on ExtVectors.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62440
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Sun, 18 Jan 2009 01:08:03 +0000 (01:08 +0000)]
Fit in 80 cols
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62439
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Sun, 18 Jan 2009 01:01:34 +0000 (01:01 +0000)]
Add support for vectors to APValue. Vector constant evaluator and tests coming.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62438
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Sun, 18 Jan 2009 00:45:31 +0000 (00:45 +0000)]
Remove outdated diagnostic. Tests are coming.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62437
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 18 Jan 2009 00:18:31 +0000 (00:18 +0000)]
Set tab width to 2 characters for all files in lib/Basic
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62435
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Sat, 17 Jan 2009 23:56:13 +0000 (23:56 +0000)]
Allow targets to override IntMaxTWidth
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62434
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 17 Jan 2009 23:36:15 +0000 (23:36 +0000)]
Change TargetInfo::validateInputConstraint to take begin/end name iterators instead of the number of outputs. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62433
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Sat, 17 Jan 2009 23:21:10 +0000 (23:21 +0000)]
Diagnose that property name cannot be a bitfield
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62432
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Sat, 17 Jan 2009 21:57:49 +0000 (21:57 +0000)]
Diagnose when method parameter is an object.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62431
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Sat, 17 Jan 2009 19:36:33 +0000 (19:36 +0000)]
Patch to re-implement ivar-list meta-data generation to fix
cases of unnamed ivar bitfields.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62429
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 17 Jan 2009 08:45:21 +0000 (08:45 +0000)]
Rename SourceLocation::getFileID to getChunkID, because it returns
the chunk ID not the file ID. This exposes problems in
TextDiagnosticPrinter where it should have been using the canonical
file ID but wasn't. Fix these along the way.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62427
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 17 Jan 2009 08:30:10 +0000 (08:30 +0000)]
simplify some lookups.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62426
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 17 Jan 2009 08:27:52 +0000 (08:27 +0000)]
Change the Lexer ctor used to lex _Pragma directives into a static factory
method. This lets us clean up the interface and make it more obvious that
this method is *really really* _Pragma specific.
Note that _Pragma handling uglifies the Lexer in the critical path. It would
be very interesting to consider making _Pragma remapping be a new special
lexer class of its own.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62425
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 17 Jan 2009 08:06:50 +0000 (08:06 +0000)]
simplify PTHManager::CreateLexer
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62424
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 17 Jan 2009 08:03:42 +0000 (08:03 +0000)]
Change the Lexer ctor used in the non _Pragma case to take a FileID instead
of a SourceLocation. This should speed it up and definitely simplifies it.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62422
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 17 Jan 2009 07:57:25 +0000 (07:57 +0000)]
in Preprocessor::AdvanceToTokenCharacter, don't actually bother
creating a whole lexer when we just want one static method.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62420
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 17 Jan 2009 07:56:59 +0000 (07:56 +0000)]
More simplifications to the lexer ctors.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62419
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 17 Jan 2009 07:42:27 +0000 (07:42 +0000)]
make the verbose raw-lexer ctor fully explicit instead of having
embedded magic.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62417
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 17 Jan 2009 07:41:36 +0000 (07:41 +0000)]
use simplified Lexer ctor.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62416
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 17 Jan 2009 07:35:14 +0000 (07:35 +0000)]
add a simplified lexer ctor that sets up the lexer to raw-lex an
entire file.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62414
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 17 Jan 2009 06:55:17 +0000 (06:55 +0000)]
refactor some common initialization code out of the two lexer ctors.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62411
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sat, 17 Jan 2009 06:41:35 +0000 (06:41 +0000)]
Update checker build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62409
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 17 Jan 2009 06:29:33 +0000 (06:29 +0000)]
suck the call to "getSpellingLoc" that all clients do into
the implementation of PTHManager::getSpelling.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62408
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 17 Jan 2009 06:22:33 +0000 (06:22 +0000)]
this massive patch introduces a simple new abstraction: it makes
"FileID" a concept that is now enforced by the compiler's type checker
instead of yet-another-random-unsigned floating around.
This is an important distinction from the "FileID" currently tracked by
SourceLocation. *That* FileID may refer to the start of a file or to a
chunk within it. The new FileID *only* refers to the file (and its
#include stack and eventually #line data), it cannot refer to a chunk.
FileID is a completely opaque datatype to all clients, only SourceManager
is allowed to poke and prod it.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62407
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 17 Jan 2009 03:54:16 +0000 (03:54 +0000)]
make "ContentCache::Buffer" mutable to avoid a const_cast.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62403
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 17 Jan 2009 03:49:48 +0000 (03:49 +0000)]
no need to check this: content cache is already 1-1 map with fileentries.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62402
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 17 Jan 2009 03:48:08 +0000 (03:48 +0000)]
Instead of iterating over FileID's, have PTH generation iterate over the
content cache directly. Content cache has a 1-1 mapping with fileentries,
whereas multiple FileIDs can be the same FileEntry.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62401
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 17 Jan 2009 03:46:44 +0000 (03:46 +0000)]
remove an irrelevant idea
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62400
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Sat, 17 Jan 2009 02:55:50 +0000 (02:55 +0000)]
Warn about typedefs of enums without any declarator name. Fixes rdar://problem/
6503878
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62397
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 17 Jan 2009 02:02:35 +0000 (02:02 +0000)]
ccc: Support running piped jobs (-pipe now works).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62396
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sat, 17 Jan 2009 01:54:16 +0000 (01:54 +0000)]
Fix analyzer crash found when scanning Wine sources where the analyzer used old logic to determine the value of a switch 'case' label.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62395
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Sat, 17 Jan 2009 01:13:24 +0000 (01:13 +0000)]
PODify LookupResult, for a measly 1% speedup on Cocoa.h.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62391
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Sat, 17 Jan 2009 00:53:59 +0000 (00:53 +0000)]
Add -fnext-runtime to Objective-C properties testcase
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62390
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 17 Jan 2009 00:53:19 +0000 (00:53 +0000)]
ccc: Don't be pedantically compatible with -Z options, these are the
result of an internal implementation detail of gcc.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62389
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 17 Jan 2009 00:50:45 +0000 (00:50 +0000)]
Return success indicator from CmpDriver.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62388
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nuno Lopes [Sat, 17 Jan 2009 00:48:48 +0000 (00:48 +0000)]
add support for usage of cast to union thing with static vars
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62387
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Sat, 17 Jan 2009 00:42:38 +0000 (00:42 +0000)]
Teach DeclContext how to find the primary declaration for any TagDecl
even when we are still defining the TagDecl. This is required so that
qualified name lookup of a class name within its definition works (see
the new bits in test/SemaCXX/qualified-id-lookup.cpp).
As part of this, move the nested redefinition checking code into
ActOnTag. This gives us diagnostics earlier (when we try to perform
the nested redefinition, rather than when we try to complete the 2nd
definition) and removes some code duplication.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62386
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Sat, 17 Jan 2009 00:00:40 +0000 (00:00 +0000)]
Catch a foreach parse error.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62382
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Fri, 16 Jan 2009 23:28:06 +0000 (23:28 +0000)]
Convert some more statement actions to smart pointers.
Fix a type error; parser wanted to pass the third part of a for-statement as a statement; should be expression.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62380
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 16 Jan 2009 23:26:38 +0000 (23:26 +0000)]
Updated checker build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62379
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 16 Jan 2009 23:12:12 +0000 (23:12 +0000)]
ccc: Clean up (user level) error handling.
- ccc now checks for existence of input files (more annoying to test,
but matches gcc).
- Fix some test cases.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62378
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 16 Jan 2009 23:06:35 +0000 (23:06 +0000)]
eliminate FullSourceLoc::getLocation() now that FullSourceLoc
*is* the location. This eliminates some weird X.getLocation().getLocation()'s.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62376
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 16 Jan 2009 23:03:56 +0000 (23:03 +0000)]
Make FullSourceLoc derive from SourceLocation instead of
containing one. Containment is generally better than derivation,
but in this case FullSourceLoc really 'isa' SourceLocation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62375
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 16 Jan 2009 22:59:51 +0000 (22:59 +0000)]
elimiante FullSourceLoc::getCanonicalFileID
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62374
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 16 Jan 2009 22:53:56 +0000 (22:53 +0000)]
remove FullSourceLoc::isFileID
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62371
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 16 Jan 2009 22:53:27 +0000 (22:53 +0000)]
an instantiation loc is always a file loc.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62370
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 16 Jan 2009 22:39:25 +0000 (22:39 +0000)]
Fix PR2477 - clang misparses "//*" in C89 mode
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62368
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 16 Jan 2009 22:13:37 +0000 (22:13 +0000)]
Make sure to escape " when it occurs in a string in pragma comment
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62367
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 16 Jan 2009 21:20:42 +0000 (21:20 +0000)]
ccc: Fix thinko, add gross but effective test of translation for Darwin/X86/cc1.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62360
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 16 Jan 2009 21:07:21 +0000 (21:07 +0000)]
ccc: Darwin/X86: gcc compatibility, only add
'-feliminate-unused-debug-symbols' in reponse to '-g' (not '-g*').
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62357
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Fri, 16 Jan 2009 20:35:09 +0000 (20:35 +0000)]
Don't ICE (issue diagnostics) when receiver is a non-objc
type.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62355
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 16 Jan 2009 20:25:36 +0000 (20:25 +0000)]
ccc: Darwin/X86: Implement remainder of (non -Z...) generic argument
translation.
- As is my general strategy, this is initially pedantically
compatible with gcc and can be cleaned up later. So, for example,
we still pass -static to collect2 4 times if you say '-mkernel
-fapple-kext'. ;)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62353
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Fri, 16 Jan 2009 19:58:32 +0000 (19:58 +0000)]
Don't ICE on user redeclaration of objc's built-in types.
Issue diagnostics instead if types do not match.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62349
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 16 Jan 2009 19:50:11 +0000 (19:50 +0000)]
As a performance optimization, don't bother calling MacroInfo::isIdenticalTo
if warnings in system headers are disabled. isIdenticalTo can end up
calling the expensive getSpelling method, and other bad stuff and is
completely unneeded if the warning will be discarded anyway. rdar://
6502956
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62347
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 16 Jan 2009 19:44:00 +0000 (19:44 +0000)]
silence release-assert warning.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62346
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 16 Jan 2009 19:38:23 +0000 (19:38 +0000)]
Fix <rdar://problem/
6502934 >. We were creating an ImplicitCastExpr
with reference type (it should be an lvalue with non-reference type).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62345
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 16 Jan 2009 19:33:59 +0000 (19:33 +0000)]
Random note so I remember how to do this :)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62344
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 16 Jan 2009 19:26:50 +0000 (19:26 +0000)]
StringRegion::print: Remove copy/paste code and just call Stmt::printPretty() for the StringLiteral.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62340
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 16 Jan 2009 19:25:54 +0000 (19:25 +0000)]
Make -E mode propagate #pragma comment's into the output.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62339
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 16 Jan 2009 19:25:18 +0000 (19:25 +0000)]
make ast-print handle random non-printable characters correctly with octal escapes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62337
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Fri, 16 Jan 2009 19:02:53 +0000 (19:02 +0000)]
Changed the API yet again.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62335
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 16 Jan 2009 19:01:46 +0000 (19:01 +0000)]
only notify callbacks if they exist.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62334
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 16 Jan 2009 18:59:23 +0000 (18:59 +0000)]
Improve #pragma comment support by building the string argument and
notifying PPCallbacks about it.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62333
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 16 Jan 2009 18:51:42 +0000 (18:51 +0000)]
minor cleanups to StringLiteralParser: no need to pass target info
into its ctor. Also, make it handle validity checking of pascal
strings instead of making clients do it.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62332
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 16 Jan 2009 18:40:33 +0000 (18:40 +0000)]
Fix PR 3337 [retain/release checker]: Handle FunctionDecl's declared using typedefs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62331
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 16 Jan 2009 18:33:17 +0000 (18:33 +0000)]
Part one of handling C++ functional casts. This handles semantic
analysis and AST-building for the cases where we have N != 1
arguments. For N == 1 arguments, we need to finish the C++
implementation of explicit type casts (C++ [expr.cast]).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62329
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Fri, 16 Jan 2009 17:41:13 +0000 (17:41 +0000)]
Used a more suitable api to get to the type of a record
in code gen.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62326
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 16 Jan 2009 17:06:33 +0000 (17:06 +0000)]
Add test case for member name lookup
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62324
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Fri, 16 Jan 2009 16:48:51 +0000 (16:48 +0000)]
Use a single function for doing vararg argument promotion. Also, make sure to do the promotion before checking the type - fixes PR3340.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62323
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 16 Jan 2009 08:21:25 +0000 (08:21 +0000)]
Implement basic support for parsing #pragma comment, a microsoft extension
documented here:
http://msdn.microsoft.com/en-us/library/7f0aews7(VS.80).aspx
This is according to my understanding reading the docs, I don't know if it
really agrees fully with what VC++ allows.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62317
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 16 Jan 2009 07:36:28 +0000 (07:36 +0000)]
more SourceLocation lexicon change: instead of referring to the
"logical" location, refer to the "instantiation" location.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62316
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 16 Jan 2009 07:15:35 +0000 (07:15 +0000)]
rename "virtual location" of a macro to "instantiation location".
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62315
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 16 Jan 2009 07:10:29 +0000 (07:10 +0000)]
rename PP::getPhysicalCharacterAt -> PP::getSpelledCharacterAt.
Slightly speed up sema of numbers like '1' by going directly to
TargetInfo instead of through ASTContext.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62314
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 16 Jan 2009 07:04:11 +0000 (07:04 +0000)]
remove obsolete comment which happened to go over 80 cols.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62313
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 16 Jan 2009 07:02:14 +0000 (07:02 +0000)]
remove an unneeded const_cast.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62311
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 16 Jan 2009 07:00:50 +0000 (07:00 +0000)]
update for terminology change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62310
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 16 Jan 2009 07:00:02 +0000 (07:00 +0000)]
Change some terminology in SourceLocation: instead of referring to
the "physical" location of tokens, refer to the "spelling" location.
This is more concrete and useful, tokens aren't really physical objects!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62309
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 16 Jan 2009 06:50:08 +0000 (06:50 +0000)]
Don't advance the statement iterator after we've deallocated the statement
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62306
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Fri, 16 Jan 2009 03:34:13 +0000 (03:34 +0000)]
Extract code dealing with typedef declarators into a separate function.
No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62303
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 16 Jan 2009 03:02:29 +0000 (03:02 +0000)]
Add test for contextual conversion to bool, and enable some FIXME'd tests
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62302
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Fri, 16 Jan 2009 02:36:34 +0000 (02:36 +0000)]
Extract code dealing with variable declarator into a separate function.
No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62300
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 16 Jan 2009 01:50:29 +0000 (01:50 +0000)]
Attempt to unbreak Windows build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62295
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Fri, 16 Jan 2009 01:42:12 +0000 (01:42 +0000)]
postpone sizeof objc-class computatin to the clients.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62292
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Fri, 16 Jan 2009 01:13:29 +0000 (01:13 +0000)]
Extract code dealing with declarators of function type into a separate function
Sema::ActOnFunctionDeclarator().
No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62290
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Fri, 16 Jan 2009 00:57:08 +0000 (00:57 +0000)]
Implemented code gen for sizeof(objc class interface).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62289
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 16 Jan 2009 00:38:09 +0000 (00:38 +0000)]
Improve diagnostics for ambiguous name lookup results
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62287
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nuno Lopes [Thu, 15 Jan 2009 20:14:33 +0000 (20:14 +0000)]
add codegen support to union casts
init of static vars still not working. I'll get back to it tomorrow or so
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62278
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 15 Jan 2009 19:28:38 +0000 (19:28 +0000)]
PTH: Fix termination condition in binary search.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62277
91177308 -0d34-0410-b5e6-
96231b3b80d8