summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* make the verbose raw-lexer ctor fully explicit instead of havingChris Lattner2009-01-172-13/+7
| | | | | | embedded magic. llvm-svn: 62417
* add a simplified lexer ctor that sets up the lexer to raw-lex anChris Lattner2009-01-173-10/+17
| | | | | | entire file. llvm-svn: 62414
* refactor some common initialization code out of the two lexer ctors.Chris Lattner2009-01-171-52/+45
| | | | llvm-svn: 62411
* suck the call to "getSpellingLoc" that all clients do intoChris Lattner2009-01-172-6/+5
| | | | | | the implementation of PTHManager::getSpelling. llvm-svn: 62408
* this massive patch introduces a simple new abstraction: it makesChris Lattner2009-01-1716-227/+225
| | | | | | | | | | | | | | | "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
* make "ContentCache::Buffer" mutable to avoid a const_cast.Chris Lattner2009-01-171-3/+1
| | | | llvm-svn: 62403
* Instead of iterating over FileID's, have PTH generation iterate over theChris Lattner2009-01-171-2/+1
| | | | | | | content cache directly. Content cache has a 1-1 mapping with fileentries, whereas multiple FileIDs can be the same FileEntry. llvm-svn: 62401
* Warn about typedefs of enums without any declarator name. Fixes ↵Douglas Gregor2009-01-171-3/+3
| | | | | | rdar://problem/6503878 llvm-svn: 62397
* Fix analyzer crash found when scanning Wine sources where the analyzer used ↵Ted Kremenek2009-01-171-35/+25
| | | | | | old logic to determine the value of a switch 'case' label. llvm-svn: 62395
* PODify LookupResult, for a measly 1% speedup on Cocoa.h.Douglas Gregor2009-01-172-103/+77
| | | | llvm-svn: 62391
* add support for usage of cast to union thing with static varsNuno Lopes2009-01-171-20/+28
| | | | llvm-svn: 62387
* Teach DeclContext how to find the primary declaration for any TagDeclDouglas Gregor2009-01-177-85/+60
| | | | | | | | | | | | | 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
* Catch a foreach parse error.Fariborz Jahanian2009-01-171-0/+5
| | | | llvm-svn: 62382
* Convert some more statement actions to smart pointers.Sebastian Redl2009-01-163-81/+95
| | | | | | Fix a type error; parser wanted to pass the third part of a for-statement as a statement; should be expression. llvm-svn: 62380
* eliminate FullSourceLoc::getLocation() now that FullSourceLocChris Lattner2009-01-164-11/+10
| | | | | | *is* the location. This eliminates some weird X.getLocation().getLocation()'s. llvm-svn: 62376
* Make FullSourceLoc derive from SourceLocation instead of Chris Lattner2009-01-161-27/+27
| | | | | | | containing one. Containment is generally better than derivation, but in this case FullSourceLoc really 'isa' SourceLocation. llvm-svn: 62375
* elimiante FullSourceLoc::getCanonicalFileIDChris Lattner2009-01-162-13/+6
| | | | llvm-svn: 62374
* remove FullSourceLoc::isFileIDChris Lattner2009-01-161-1/+1
| | | | llvm-svn: 62371
* an instantiation loc is always a file loc.Chris Lattner2009-01-161-3/+0
| | | | llvm-svn: 62370
* Fix PR2477 - clang misparses "//*" in C89 modeChris Lattner2009-01-161-9/+24
| | | | llvm-svn: 62368
* Don't ICE (issue diagnostics) when receiver is a non-objcFariborz Jahanian2009-01-161-2/+3
| | | | | | type. llvm-svn: 62355
* Don't ICE on user redeclaration of objc's built-in types.Fariborz Jahanian2009-01-162-8/+21
| | | | | | Issue diagnostics instead if types do not match. llvm-svn: 62349
* As a performance optimization, don't bother calling MacroInfo::isIdenticalTo Chris Lattner2009-01-161-9/+16
| | | | | | | | 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
* silence release-assert warning.Chris Lattner2009-01-161-4/+4
| | | | llvm-svn: 62346
* Fix <rdar://problem/6502934>. We were creating an ImplicitCastExprDouglas Gregor2009-01-161-2/+4
| | | | | | with reference type (it should be an lvalue with non-reference type). llvm-svn: 62345
* StringRegion::print: Remove copy/paste code and just call ↵Ted Kremenek2009-01-161-17/+1
| | | | | | Stmt::printPretty() for the StringLiteral. llvm-svn: 62340
* make ast-print handle random non-printable characters correctly with octal ↵Chris Lattner2009-01-161-3/+13
| | | | | | escapes. llvm-svn: 62337
* Changed the API yet again.Fariborz Jahanian2009-01-161-5/+3
| | | | llvm-svn: 62335
* only notify callbacks if they exist.Chris Lattner2009-01-161-1/+2
| | | | llvm-svn: 62334
* Improve #pragma comment support by building the string argument andChris Lattner2009-01-161-11/+36
| | | | | | notifying PPCallbacks about it. llvm-svn: 62333
* minor cleanups to StringLiteralParser: no need to pass target infoChris Lattner2009-01-162-11/+13
| | | | | | | into its ctor. Also, make it handle validity checking of pascal strings instead of making clients do it. llvm-svn: 62332
* Fix PR 3337 [retain/release checker]: Handle FunctionDecl's declared using ↵Ted Kremenek2009-01-161-1/+3
| | | | | | typedefs. llvm-svn: 62331
* Part one of handling C++ functional casts. This handles semanticDouglas Gregor2009-01-164-17/+105
| | | | | | | | 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]). llvm-svn: 62329
* Used a more suitable api to get to the type of a recordFariborz Jahanian2009-01-161-1/+1
| | | | | | in code gen. llvm-svn: 62326
* Use a single function for doing vararg argument promotion. Also, make sure ↵Anders Carlsson2009-01-164-28/+36
| | | | | | to do the promotion before checking the type - fixes PR3340. llvm-svn: 62323
* Implement basic support for parsing #pragma comment, a microsoft extensionChris Lattner2009-01-161-0/+80
| | | | | | | | | | 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. llvm-svn: 62317
* more SourceLocation lexicon change: instead of referring to theChris Lattner2009-01-1616-104/+99
| | | | | | "logical" location, refer to the "instantiation" location. llvm-svn: 62316
* rename "virtual location" of a macro to "instantiation location".Chris Lattner2009-01-162-3/+4
| | | | llvm-svn: 62315
* rename PP::getPhysicalCharacterAt -> PP::getSpelledCharacterAt.Chris Lattner2009-01-161-4/+4
| | | | | | | Slightly speed up sema of numbers like '1' by going directly to TargetInfo instead of through ASTContext. llvm-svn: 62314
* remove obsolete comment which happened to go over 80 cols.Chris Lattner2009-01-161-8/+1
| | | | llvm-svn: 62313
* remove an unneeded const_cast.Chris Lattner2009-01-161-7/+5
| | | | llvm-svn: 62311
* Change some terminology in SourceLocation: instead of referring to Chris Lattner2009-01-169-60/+61
| | | | | | | the "physical" location of tokens, refer to the "spelling" location. This is more concrete and useful, tokens aren't really physical objects! llvm-svn: 62309
* Don't advance the statement iterator after we've deallocated the statementDouglas Gregor2009-01-161-2/+3
| | | | llvm-svn: 62306
* Extract code dealing with typedef declarators into a separate function.Zhongxing Xu2009-01-162-37/+49
| | | | | | No functionality change. llvm-svn: 62303
* Extract code dealing with variable declarator into a separate function.Zhongxing Xu2009-01-162-100/+113
| | | | | | No functionality change. llvm-svn: 62300
* Attempt to unbreak Windows build.Daniel Dunbar2009-01-161-3/+3
| | | | llvm-svn: 62295
* postpone sizeof objc-class computatin to the clients.Fariborz Jahanian2009-01-161-0/+4
| | | | llvm-svn: 62292
* Extract code dealing with declarators of function type into a separate functionZhongxing Xu2009-01-162-288/+307
| | | | | | | Sema::ActOnFunctionDeclarator(). No functionality change. llvm-svn: 62290
* Implemented code gen for sizeof(objc class interface).Fariborz Jahanian2009-01-161-1/+8
| | | | llvm-svn: 62289
* Improve diagnostics for ambiguous name lookup resultsDouglas Gregor2009-01-164-10/+56
| | | | llvm-svn: 62287
OpenPOWER on IntegriCloud