summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend
Commit message (Collapse)AuthorAgeFilesLines
* Remove all uses of PathV1::GetRootDirectory.Michael J. Spencer2010-12-251-7/+6
| | | | llvm-svn: 122552
* Add -fobjc-default-synthesized-properties flagTed Kremenek2010-12-231-0/+4
| | | | | | | | | | | | to allow us to explicitly control whether or not Objective-C properties are default synthesized. Currently this feature only works when using the -fobjc-non-fragile-abi2 flag (so there is no functionality change), but we can now turn off this feature without turning off all the features coupled with -fobjc-non-fragile-abi2. llvm-svn: 122519
* Add WIP prototype of a new buffer overflowTed Kremenek2010-12-231-1/+4
| | | | | | | checker based on using raw (symbolic) byte offsets from a base region. llvm-svn: 122469
* Introduced raw_identifier token kind.Abramo Bagnara2010-12-221-4/+4
| | | | llvm-svn: 122394
* Replace all uses of PathV1::makeAbsolute with PathV2::fs::make_absolute.Michael J. Spencer2010-12-212-5/+8
| | | | llvm-svn: 122340
* Fix spelling.Michael J. Spencer2010-12-211-1/+1
| | | | llvm-svn: 122339
* Add IndirectField case in DeclContextPrinter::PrintDeclContext.Francois Pichet2010-12-211-0/+5
| | | | | | Fix PR8832. llvm-svn: 122311
* Replace all uses of PathV1::isAbsolute with PathV2::is_{absolute,relative}.Michael J. Spencer2010-12-172-5/+4
| | | | llvm-svn: 122087
* MemoryBuffer API update.Michael J. Spencer2010-12-161-4/+3
| | | | llvm-svn: 121956
* Gather cached code completions after the first reparse, not after theDouglas Gregor2010-12-091-8/+8
| | | | | | second reparse. llvm-svn: 121413
* Use error_code instead of std::string* for MemoryBuffer.Michael J. Spencer2010-12-091-1/+4
| | | | llvm-svn: 121378
* Remove the TypesCompatibleExprClass AST node. Merge its functionality into ↵Francois Pichet2010-12-081-7/+0
| | | | | | BinaryTypeTraitExpr. llvm-svn: 121298
* Use atomic operations for libclang's object count tracking.Douglas Gregor2010-12-071-3/+4
| | | | llvm-svn: 121073
* Implement -cl-std=Peter Collingbourne2010-12-041-0/+7
| | | | llvm-svn: 120882
* Implement -cl-mad-enablePeter Collingbourne2010-12-041-0/+1
| | | | llvm-svn: 120881
* Implement -cl-fast-relaxed-mathPeter Collingbourne2010-12-042-2/+8
| | | | llvm-svn: 120880
* Implement -cl-unsafe-math-optimizationsPeter Collingbourne2010-12-041-0/+1
| | | | llvm-svn: 120879
* Implement -cl-finite-math-onlyPeter Collingbourne2010-12-041-0/+1
| | | | llvm-svn: 120878
* Implement -cl-single-precision-constantPeter Collingbourne2010-12-041-0/+1
| | | | llvm-svn: 120877
* Implement -cl-opt-disablePeter Collingbourne2010-12-041-1/+5
| | | | llvm-svn: 120876
* Refactor optimisation level codePeter Collingbourne2010-12-041-14/+16
| | | | llvm-svn: 120875
* Introduce CompilerInvocation::setLangDefaults functionPeter Collingbourne2010-12-041-23/+33
| | | | | | | | | | | This patch refactors the CompilerInvocation code to introduce a CompilerInvocation::setLangDefaults function, which can set up a LangOptions with the defaults for a given language and language standard. This function is useful for non-command line based Clang clients which need to set up a CompilerInvocation manually for a specific language. llvm-svn: 120874
* Driver, Frontend: add CUDA language supportPeter Collingbourne2010-12-013-0/+10
| | | | llvm-svn: 120544
* Don't check the isysroot path for Path::isValid(); if the user hasDan Gohman2010-12-011-1/+0
| | | | | | | specified a syntactically invalid path, it's better to let the OS diagnose the problem than to silently skip it. llvm-svn: 120542
* Such function decls,as objc's objc_msgSend, builtins in Fariborz Jahanian2010-11-301-1/+1
| | | | | | | | | a specific language. We are adding such language info. by extensing Builtins.def and via a language flag added to LIBBUILTIN/BUILTIN and check for that when deciding a name is builtin or not. Implements //rdar://8689273. llvm-svn: 120429
* When using a precompiled preamble with detailed preprocessing records,Douglas Gregor2010-11-301-2/+68
| | | | | | | | | | trap the serialized preprocessing records (macro definitions, macro instantiations, macro definitions) from the generation of the precompiled preamble, then replay those when walking the list of preprocessed entities. This eliminates a bug where clang_getCursor() wasn't able to find preprocessed-entity cursors in the preamble. llvm-svn: 120396
* When loading a precompiled preamble, use the file ID of theDouglas Gregor2010-11-301-2/+5
| | | | | | | | | | | | precompiled preamble as the "main" source file's file ID within the source manager. This makes compiling with a precompiled preamble produce the same source locations as when compiling without the precompiled preamble; prior to this change, we ended up with different file IDs for source locations within the precompiled preamble vs. those after the precompiled preamble, even for entities (e.g., preprocessing entities) in the same file. llvm-svn: 120390
* Merge System into Support.Michael J. Spencer2010-11-297-12/+12
| | | | llvm-svn: 120297
* When performing code completion within ASTUnit, allocate the ↵Douglas Gregor2010-11-291-6/+6
| | | | | | AugmentedCodeCompleteConsumer on the heap, so it's always cleaned up properly llvm-svn: 120290
* Add GCC 4.4.5 for Gentoo, and order them in a more sensible way. This allowsChandler Carruth2010-11-281-13/+15
| | | | | | | | Gentoo systems with multiple versions to pick up the newest one first. This is especially important with Gentoo because some of the older versions are left on systems in strange states. llvm-svn: 120238
* Add C++ header path for openSUSE 11.4.Rafael Espindola2010-11-251-0/+7
| | | | | | Patch by İsmail Dönmez. llvm-svn: 120154
* Add -cc1 -ast-dump-xml, an excessively detailed XML dump of the internalsJohn McCall2010-11-243-0/+34
| | | | | | | | | | | | | of the ASTs. Only available in assertions builds. No stability guarantee. This is intended solely as a debugging tool. I'm not sure if the goals are sufficiently aligned with the XML printer to allow a common implementation. Currently just falls back on the StmtDumper to display statements, which means it doesn't produce valid XML in those cases. llvm-svn: 120088
* change the 'is directory' indicator to be a null-or-notChris Lattner2010-11-231-2/+3
| | | | | | | | | pointer that is passed down through the APIs, and make FileSystemStatCache::get be the one that filters out directory lookups that hit files. This also paves the way to have stat queries be able to return opened files. llvm-svn: 120060
* simplify the cache miss handling code, eliminating CacheMissing.Chris Lattner2010-11-231-8/+3
| | | | llvm-svn: 120038
* rework the stat cache, pulling it out of FileManager.h intoChris Lattner2010-11-231-13/+19
| | | | | | | its own header and giving it some more structure. No functionality change. llvm-svn: 120030
* tidy up. Split FileManager::getBufferForFile intoChris Lattner2010-11-231-3/+2
| | | | | | | | | | two copies, since they are fundamentally different operations and the StringRef one should go away (it shouldn't be part of FileManager at least). Remove some dead arguments. llvm-svn: 120013
* don't allow remapping PTH file paths with -fworking-directory, theChris Lattner2010-11-231-1/+1
| | | | | | client should just pass in absolute paths. llvm-svn: 120012
* now the FileManager has a FileSystemOpts ivar, stop threadingChris Lattner2010-11-238-58/+38
| | | | | | | | | FileSystemOpts through a ton of apis, simplifying a lot of code. This also fixes a latent bug in ASTUnit where it would invoke methods on FileManager without creating one in some code paths in cindextext. llvm-svn: 120010
* give FileManager a 'FileSystemOptions' ivar, which will be usedChris Lattner2010-11-233-5/+5
| | | | | | | to simplify a bunch of code in it. It should ultimately get inlined into FileManager. llvm-svn: 120007
* Partially revert Doug's PCH validation patch (r98585).Chris Lattner2010-11-231-3/+2
| | | | | | | | | | | | | | | | | | | | | | This patch completely defeated the "passing in a prestat'd size to MemoryBuffer" optimization, leading to an extra fstat call for every buffer opened, in order to find out if the datestamp and size of the file on disk matches what is in the stat cache. I fully admit that I don't completely understand what is going on here: why punish code when a stat cache isn't in use? what is the point of a stat cache if you have to turn around and stat stuff to validate it? To resolve both these issues, just drop the modtime check and check the file size, which is the important thing anyway. This should also resolve PR6812, because presumably windows is stable when it comes to file sizes. If the modtime is actually important, we should get it and keep it on the first stat. This eliminates 833 fstat syscalls when processing Cocoa.h, speeding up system time on -Eonly Cocoa.h from 0.041 to 0.038s. llvm-svn: 120001
* Several PPCallbacks take an SourceLocation + IdentifierInfo, ratherCraig Silverstein2010-11-191-10/+7
| | | | | | | | | | | than a Token that holds the same information all in one easy-to-use package. There's no technical reason to prefer the former -- the information comes from a Token originally -- and it's clumsier to use, so I've changed the code to use tokens everywhere. Approved by clattner llvm-svn: 119845
* Use hasErrorOccurred() instead of getNumErrors() where it makes sense.Argyrios Kyrtzidis2010-11-181-1/+1
| | | | llvm-svn: 119746
* Remove the hack where, to get the return status, we had special case for ↵Argyrios Kyrtzidis2010-11-182-18/+2
| | | | | | | | VerifyDiagnosticsClient and just check the number of errors from the DiagnosticClient. llvm-svn: 119736
* Since multiple diagnostics can share one diagnostic client, have the client ↵Argyrios Kyrtzidis2010-11-185-12/+13
| | | | | | | | keeping track of the total number of warnings/errors reported. llvm-svn: 119731
* Refactoring of Diagnostic class.Argyrios Kyrtzidis2010-11-183-16/+25
| | | | | | | | | | | -Move the stuff of Diagnostic related to creating/querying diagnostic IDs into a new DiagnosticIDs class. -DiagnosticIDs can be shared among multiple Diagnostics for multiple translation units. -The rest of the state in Diagnostic object is considered related and tied to one translation unit. -Have Diagnostic point to the SourceManager that is related with. Diagnostic can now accept just a SourceLocation instead of a FullSourceLoc. -Reflect the changes to various interfaces. llvm-svn: 119730
* -Rename -Wargument-larger-than -> -Wlarge-by-value-copyArgyrios Kyrtzidis2010-11-181-1/+1
| | | | | | | | | -Improve the diagnostic message -Add some comments Suggestions by Chris. llvm-svn: 119594
* Introduce option -Wargument-larger-than[=N] which warns about function ↵Argyrios Kyrtzidis2010-11-171-0/+2
| | | | | | | | | | definitions if they take by-value or return by-value any POD that is larger than some threshold (default is 64 bytes). Implements rdar://8548050. llvm-svn: 119583
* Fix source-range information for Objective-C properties. Previously,Douglas Gregor2010-11-171-0/+14
| | | | | | | | | | | | we were just getting a range covering only the property name, which is certainly not correct (and broke token annotation, among other things). Also, teach libclang about the relationship between @synthesize/@dynamic and @property, so we get property name and cursor-reference information for @synthesize and @dynamic. llvm-svn: 119409
* Use an OwningPtr for the preamble buffer in ASTUnit. This plugs a leakDouglas Gregor2010-11-161-15/+5
| | | | | | | where we failed to free this buffer along one of the paths, and detangles the code a little. llvm-svn: 119379
* Add gcc-4.4.4 headers on Gentoo systems. Patch by Bertjan Broeksema!Nico Weber2010-11-161-0/+5
| | | | llvm-svn: 119348
OpenPOWER on IntegriCloud