Fariborz Jahanian
18789e1c21
Diagnose that property name cannot be a bitfield
...
llvm-svn: 62432
2009-01-17 23:21:10 +00:00
Fariborz Jahanian
091ae97786
Diagnose when method parameter is an object.
...
llvm-svn: 62431
2009-01-17 21:57:49 +00:00
Fariborz Jahanian
705c6d9cdd
Patch to re-implement ivar-list meta-data generation to fix
...
cases of unnamed ivar bitfields.
llvm-svn: 62429
2009-01-17 19:36:33 +00:00
Chris Lattner
71dc14b9f0
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.
llvm-svn: 62427
2009-01-17 08:45:21 +00:00
Chris Lattner
5509d533f6
simplify some lookups.
...
llvm-svn: 62426
2009-01-17 08:30:10 +00:00
Chris Lattner
757169b60f
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.
llvm-svn: 62425
2009-01-17 08:27:52 +00:00
Chris Lattner
ab1d4b8abd
simplify PTHManager::CreateLexer
...
llvm-svn: 62424
2009-01-17 08:06:50 +00:00
Chris Lattner
c809089b26
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.
llvm-svn: 62422
2009-01-17 08:03:42 +00:00
Chris Lattner
8ddb5cf0cf
in Preprocessor::AdvanceToTokenCharacter, don't actually bother
...
creating a whole lexer when we just want one static method.
llvm-svn: 62420
2009-01-17 07:57:25 +00:00
Chris Lattner
5965a28a4b
More simplifications to the lexer ctors.
...
llvm-svn: 62419
2009-01-17 07:56:59 +00:00
Chris Lattner
fcf6452eb4
make the verbose raw-lexer ctor fully explicit instead of having
...
embedded magic.
llvm-svn: 62417
2009-01-17 07:42:27 +00:00
Chris Lattner
1db27eefa1
use simplified Lexer ctor.
...
llvm-svn: 62416
2009-01-17 07:41:36 +00:00
Chris Lattner
08354fef13
add a simplified lexer ctor that sets up the lexer to raw-lex an
...
entire file.
llvm-svn: 62414
2009-01-17 07:35:14 +00:00
Chris Lattner
f76b92092e
refactor some common initialization code out of the two lexer ctors.
...
llvm-svn: 62411
2009-01-17 06:55:17 +00:00
Ted Kremenek
1da5987cb9
Update checker build.
...
llvm-svn: 62409
2009-01-17 06:41:35 +00:00
Chris Lattner
3793bba26f
suck the call to "getSpellingLoc" that all clients do into
...
the implementation of PTHManager::getSpelling.
llvm-svn: 62408
2009-01-17 06:29:33 +00:00
Chris Lattner
d32480d3db
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.
llvm-svn: 62407
2009-01-17 06:22:33 +00:00
Chris Lattner
800979259e
make "ContentCache::Buffer" mutable to avoid a const_cast.
...
llvm-svn: 62403
2009-01-17 03:54:16 +00:00
Chris Lattner
1ed28ce3fd
no need to check this: content cache is already 1-1 map with fileentries.
...
llvm-svn: 62402
2009-01-17 03:49:48 +00:00
Chris Lattner
1abd20901b
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.
llvm-svn: 62401
2009-01-17 03:48:08 +00:00
Chris Lattner
3feddd91f7
remove an irrelevant idea
...
llvm-svn: 62400
2009-01-17 03:46:44 +00:00
Douglas Gregor
051d8fd809
Warn about typedefs of enums without any declarator name. Fixes rdar://problem/6503878
...
llvm-svn: 62397
2009-01-17 02:55:50 +00:00
Daniel Dunbar
5f40dec258
ccc: Support running piped jobs (-pipe now works).
...
llvm-svn: 62396
2009-01-17 02:02:35 +00:00
Ted Kremenek
1ab188f48a
Fix analyzer crash found when scanning Wine sources where the analyzer used old logic to determine the value of a switch 'case' label.
...
llvm-svn: 62395
2009-01-17 01:54:16 +00:00
Douglas Gregor
f23311d63b
PODify LookupResult, for a measly 1% speedup on Cocoa.h.
...
llvm-svn: 62391
2009-01-17 01:13:24 +00:00
Douglas Gregor
088ea012cd
Add -fnext-runtime to Objective-C properties testcase
...
llvm-svn: 62390
2009-01-17 00:53:59 +00:00
Daniel Dunbar
ee5a4a8cce
ccc: Don't be pedantically compatible with -Z options, these are the
...
result of an internal implementation detail of gcc.
llvm-svn: 62389
2009-01-17 00:53:19 +00:00
Daniel Dunbar
563dc04faa
Return success indicator from CmpDriver.
...
llvm-svn: 62388
2009-01-17 00:50:45 +00:00
Nuno Lopes
4d78cf0fa7
add support for usage of cast to union thing with static vars
...
llvm-svn: 62387
2009-01-17 00:48:48 +00:00
Douglas Gregor
dee1be8e95
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.
llvm-svn: 62386
2009-01-17 00:42:38 +00:00
Fariborz Jahanian
94234ea63e
Catch a foreach parse error.
...
llvm-svn: 62382
2009-01-17 00:00:40 +00:00
Sebastian Redl
fbfaafc0a9
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.
llvm-svn: 62380
2009-01-16 23:28:06 +00:00
Ted Kremenek
f5359ea9d0
Updated checker build.
...
llvm-svn: 62379
2009-01-16 23:26:38 +00:00
Daniel Dunbar
b3a633fc0c
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.
llvm-svn: 62378
2009-01-16 23:12:12 +00:00
Chris Lattner
48a8c57936
eliminate FullSourceLoc::getLocation() now that FullSourceLoc
...
*is* the location. This eliminates some weird X.getLocation().getLocation()'s.
llvm-svn: 62376
2009-01-16 23:06:35 +00:00
Chris Lattner
fb1fd911cb
Make FullSourceLoc derive from SourceLocation instead of
...
containing one. Containment is generally better than derivation,
but in this case FullSourceLoc really 'isa' SourceLocation.
llvm-svn: 62375
2009-01-16 23:03:56 +00:00
Chris Lattner
fcc0a5a3f7
elimiante FullSourceLoc::getCanonicalFileID
...
llvm-svn: 62374
2009-01-16 22:59:51 +00:00
Chris Lattner
7067b4f49d
remove FullSourceLoc::isFileID
...
llvm-svn: 62371
2009-01-16 22:53:56 +00:00
Chris Lattner
671689a440
an instantiation loc is always a file loc.
...
llvm-svn: 62370
2009-01-16 22:53:27 +00:00
Chris Lattner
5882771102
Fix PR2477 - clang misparses "//*" in C89 mode
...
llvm-svn: 62368
2009-01-16 22:39:25 +00:00
Chris Lattner
dde6eb34bb
Make sure to escape " when it occurs in a string in pragma comment
...
llvm-svn: 62367
2009-01-16 22:13:37 +00:00
Daniel Dunbar
c1a2043c5b
ccc: Fix thinko, add gross but effective test of translation for Darwin/X86/cc1.
...
llvm-svn: 62360
2009-01-16 21:20:42 +00:00
Daniel Dunbar
245df5f4ac
ccc: Darwin/X86: gcc compatibility, only add
...
'-feliminate-unused-debug-symbols' in reponse to '-g' (not '-g*').
llvm-svn: 62357
2009-01-16 21:07:21 +00:00
Fariborz Jahanian
10401ce2e0
Don't ICE (issue diagnostics) when receiver is a non-objc
...
type.
llvm-svn: 62355
2009-01-16 20:35:09 +00:00
Daniel Dunbar
1e3677c907
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'. ;)
llvm-svn: 62353
2009-01-16 20:25:36 +00:00
Fariborz Jahanian
1778f4bf6d
Don't ICE on user redeclaration of objc's built-in types.
...
Issue diagnostics instead if types do not match.
llvm-svn: 62349
2009-01-16 19:58:32 +00:00
Chris Lattner
5244f34e75
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
llvm-svn: 62347
2009-01-16 19:50:11 +00:00
Chris Lattner
d3fb18fba2
silence release-assert warning.
...
llvm-svn: 62346
2009-01-16 19:44:00 +00:00
Douglas Gregor
225b321a85
Fix <rdar://problem/6502934>. We were creating an ImplicitCastExpr
...
with reference type (it should be an lvalue with non-reference type).
llvm-svn: 62345
2009-01-16 19:38:23 +00:00
Chris Lattner
972347d4f1
Random note so I remember how to do this :)
...
llvm-svn: 62344
2009-01-16 19:33:59 +00:00