summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend
Commit message (Collapse)AuthorAgeFilesLines
...
* Remove an unintended restriction on sysroots introduced during the PathChandler Carruth2010-11-161-1/+1
| | | | | | conversion. llvm-svn: 119346
* Tweak libclang's heuristics for building precompiled preambles andDouglas Gregor2010-11-151-8/+3
| | | | | | | | caching global code-completion results. In particular, don't perform either operation the first time we parse, but do both after the first reparse. llvm-svn: 119285
* Fix a think-o. Fixes PR8606.Chandler Carruth2010-11-151-0/+1
| | | | llvm-svn: 119139
* Clean up some names and fix the handling of default sysroots on Windows andChandler Carruth2010-11-151-9/+12
| | | | | | | | | | | other platforms where the textual default of '/' isn't the system's root directory. We should probably still make the textual default platform specific, but this should avoid the particularly bad problem with the previous state: we applied a sysroot of '/' to '/usr/local/google' which added '//usr/local/include' to the windows header search path, a share on another machine named 'usr'. Oops. llvm-svn: 119131
* Switch the sysroot logic to use the Path interface, resolving a FIXME andChandler Carruth2010-11-151-10/+12
| | | | | | making the code less gross. llvm-svn: 119099
* Make sysroot only apply to baked in paths which start with a '/'.Chandler Carruth2010-11-151-10/+7
| | | | llvm-svn: 119095
* Make sure to always check the result ofDouglas Gregor2010-11-123-13/+41
| | | | | | | SourceManager::getPresumedLoc(), so that we don't try to make use of an invalid presumed location. Doing so can cause crashes. llvm-svn: 118885
* Improve ASTUnit's capture of diagnostics so that theDouglas Gregor2010-11-112-44/+40
| | | | | | | | | | diagnostic-capturing client lives as long as the ASTUnit itself does. Otherwise, we can end up with crashes when we get a diagnostic outside of parsing/code completion. The circumstances under which this happen are really hard to reproduce, because a file needs to change from under us. llvm-svn: 118751
* make sure #pragma clang is treated the same way as #pragma gcc in -E mode,Chris Lattner2010-11-101-2/+3
| | | | | | unknown pragmas should just be passed through to the .i file. llvm-svn: 118659
* Simplify code.Benjamin Kramer2010-11-091-28/+10
| | | | llvm-svn: 118619
* Appeasing MSVC, take 3Douglas Gregor2010-11-091-0/+1
| | | | llvm-svn: 118493
* Try to appease MSVCDouglas Gregor2010-11-091-0/+4
| | | | llvm-svn: 118487
* Add missing includeDouglas Gregor2010-11-091-0/+1
| | | | llvm-svn: 118485
* sprintf -> snprintf conversion, from Vladimir KirillovDouglas Gregor2010-11-091-1/+1
| | | | llvm-svn: 118478
* Change the StringSet used by CalculateHiddenNames() to use a BumpPtrAllocator.Ted Kremenek2010-11-071-6/+6
| | | | llvm-svn: 118372
* Implement -working-directory.Argyrios Kyrtzidis2010-11-038-33/+94
| | | | | | | | | | | | | | | | | | | When -working-directory is passed in command line, file paths are resolved relative to the specified directory. This helps both when using libclang (where we can't require the user to actually change the working directory) and to help reproduce test cases when the reproduction work comes along. --FileSystemOptions is introduced which controls how file system operations are performed (currently it just contains the working directory value if set). --FileSystemOptions are passed around to various interfaces that perform file operations. --Opening & reading the content of files should be done only through FileManager. This is useful in general since file operations will be abstracted in the future for the reproduction mechanism. FileSystemOptions is independent of FileManager so that we can have multiple translation units sharing the same FileManager but with different FileSystemOptions. Addresses rdar://8583824. llvm-svn: 118203
* Add support for Fedora 14. Patch by Daniel Kozlowski.Rafael Espindola2010-11-021-0/+5
| | | | llvm-svn: 118035
* Teach SourceManager::getPresumedLoc() how to fail gracefully if ↵Douglas Gregor2010-11-021-1/+1
| | | | | | getLineNumber/getColumnNumber fail llvm-svn: 117990
* Disable some timing codeDouglas Gregor2010-11-011-1/+1
| | | | llvm-svn: 117910
* If Consumer object failed to create due to someFariborz Jahanian2010-10-291-0/+2
| | | | | | | user error, fail gracefully. Fixes pr8508. llvm-svn: 117692
* Simplify ASTUnit's internal timers, by not trying to keep a pile ofDouglas Gregor2010-10-281-66/+64
| | | | | | | | timers to be dumped whenever the ASTUnit is destroyed. Instead, just print the time elapsed for each operation after we perform the operation. llvm-svn: 117550
* Introduce libclang-level options for C++ precompiled preambles,Douglas Gregor2010-10-271-3/+14
| | | | | | separating out chaining precompiled preambles from non-chaining ones. llvm-svn: 117457
* Add support for code completion on stdin.Dan Gohman2010-10-261-1/+4
| | | | llvm-svn: 117414
* Simplify this code: don't check for the same error twoDan Gohman2010-10-261-4/+6
| | | | | | | different ways. Check once, and use an assert to handle consistency checking. llvm-svn: 117397
* Put the mechanism in place to track modifications in an AST entity that were ↵Argyrios Kyrtzidis2010-10-241-0/+2
| | | | | | | | | | | | committed after its initial creation/deserialization and store the changes in a chained PCH. The idea is that the AST entities call methods on the ASTMutationListener to give notifications of changes; the PCHWriter implements the ASTMutationListener interface and stores the incremental changes of the updated entity. WIP llvm-svn: 117235
* Substantially revise how clang computes the visibility of a declaration toJohn McCall2010-10-221-6/+6
| | | | | | | | more closely parallel the computation of linkage. This gets us to a state much closer to what gcc emits, modulo bugs, which will undoubtedly arise in abundance. llvm-svn: 117147
* Reorganize predefined macros for all Windows targets.Michael J. Spencer2010-10-211-0/+3
| | | | | | | | | | This adds an option to set the _MSC_VER macro without recompiling. This is very useful when testing compatibility with the Windows SDK and c++stdlib headers. -fmsc-version=<version> (defaults to VS2003 (1300)) llvm-svn: 116999
* Fix Whitespace.Michael J. Spencer2010-10-211-13/+13
| | | | llvm-svn: 116990
* "Fix" bogus idempotent operations warning due to loop unrolling not ↵Ted Kremenek2010-10-181-1/+1
| | | | | | | | | | unrolling enough loops to show that an invariant doesn't hold. This fix is to increase the loop unrolling count to 4, which experiments show doesn't typically impact analysis time. The real fix is to modify the IdempotentOperationsChecker to suppress warnings where an analysis point could be preceded by a point where we gave up due to loop unrolling. llvm-svn: 116769
* Add declarations nested in a linkage specification to the output ofDouglas Gregor2010-10-181-1/+1
| | | | | | -ast-print-xml, from Martin Vejnar! llvm-svn: 116702
* Wire up the -fstrict-aliasing and -fno-strict-aliasing optionsDan Gohman2010-10-141-0/+1
| | | | | | to CodeGenOption flags. llvm-svn: 116530
* Give a default implementation for ASTDeserializationListener's methods, no ↵Argyrios Kyrtzidis2010-10-141-14/+0
| | | | | | functionality change. llvm-svn: 116506
* Introduce command line option -error-on-deserialized-decl that is ↵Argyrios Kyrtzidis2010-10-142-0/+45
| | | | | | | | | | accompanied by a name and emits an error if a declaration with this name is deserialized from PCH. This is for testing, to make sure that we don't deserialize stuff needlessly. llvm-svn: 116505
* Introduce command line option -dump-deserialized-decls which is used to ↵Argyrios Kyrtzidis2010-10-142-2/+38
| | | | | | print the PCH decls that got deserialized, for testing purposes. llvm-svn: 116503
* Eliminate usage of ObjCSuperExpr used forFariborz Jahanian2010-10-141-6/+0
| | | | | | | 'super' as receiver of property or a setter/getter methods. //rdar: //8525788 llvm-svn: 116483
* Parse default arguments within member functions in source order, fromDouglas Gregor2010-10-121-0/+1
| | | | | | Manuel Klimek! Fixes PR7715. llvm-svn: 116311
* When we load an ASTUnit from command-line arguments, hold on to theDouglas Gregor2010-10-121-72/+111
| | | | | | | | | diagnostics produced by the driver itself. Previously, we were allowing these to either be dropped or to slip through to stderr. Fixes <rdar://problem/7595339>. llvm-svn: 116285
* Eliminate the (de-)serialization of code completion results, now thatDouglas Gregor2010-10-112-11/+1
| | | | | | libclang does not support out-of-process code completion. llvm-svn: 116253
* Eliminate -fdiagnostics-binary and all of the infrastructure forDouglas Gregor2010-10-112-36/+1
| | | | | | | | emitting diagnostics in a binary form to be consumed by libclang, since libclang no longer does any of its work out-of-process, making this code dead. Besides, this stuff never worked at 100% anyway. llvm-svn: 116250
* Switch c-index-test from clang_codeComplete() over toDouglas Gregor2010-10-111-1/+10
| | | | | | | | | | clang_codeCompleteAt(). This uncovered a few issues with the latter: - ASTUnit wasn't saving/restoring diagnostic state appropriately between reparses and code completions. - "Overload" completions weren't being passed through to the client llvm-svn: 116241
* Declare argv parameters as const char* const* instead of to char** to ↵Axel Naumann2010-10-111-2/+2
| | | | | | clarify that they are not modified, and to allow for string literals as arguments. llvm-svn: 116200
* Tighten up constness of argv parameters to allow for string literals as ↵Axel Naumann2010-10-111-3/+3
| | | | | | argumants and to reflect actual (non-modifying) use. llvm-svn: 116199
* lib/Frontend/InitHeaderSearch.cpp: Fix compatibility to Cygming.NAKAMURA Takumi2010-10-111-8/+9
| | | | | | | | | | - lib/gcc/include should not be included. Clang oughta have alternatives. (PR7956) - Cygwin: /usr/include/w32api should be included. gcc/cygwin does. - gcc/cygwin uses gcc paths as /usr/lib not /lib. They are same on Cygwin environment, though, We have to take what gcc/cygwin does. - Cygwin-1.7: Use 4.3.4. - Cygwin-1.5: Use 4.3.2 for gcc-4. llvm-svn: 116182
* Improve XML output for class/struct/union declarations, from Martin Vejnar!Douglas Gregor2010-10-081-21/+3
| | | | llvm-svn: 116103
* Fix three related, wily issues with the recompilation of precompiledDouglas Gregor2010-10-081-14/+5
| | | | | | | | | | | | | | | | | | | | | | | preambles: - When we rebuild a precompiled preamble, make sure to disable skipping anything in the main file; we may have had leftover preamble-skipping values in the lexer, which leads to very empty preamble. This is a correctness issue. - When we rebuild a precompiled preamble, clear out any prior state in the Diagnostic object. Otherwise, we might think that there were errors when we were building the preamble itself, and therefore reject the resulting preamble. This is mainly a performance issue. - Don't remove old remappings when digging out the remapping for the main file. Having the old mappings around does not hurt in the common case (later remappings will just overwrite them), and is important when we fail to find a preamble: we don't want to have removed the remapping, because we'll need it later. llvm-svn: 116041
* Implement -fshort-enums (rdar://8490496).Argyrios Kyrtzidis2010-10-081-0/+1
| | | | llvm-svn: 116020
* Don't force spell checking when code-completing. Let the client decideDouglas Gregor2010-10-071-7/+0
| | | | llvm-svn: 115931
* Fix a double-free error that can occur in rare cases where loadingDouglas Gregor2010-10-061-0/+1
| | | | | | | of the precompiled preamble (or any PCH file it depends on) fails during reparsing. llvm-svn: 115838
* Give every file that ASTReader loads a type: module, PCH, precompiled ↵Sebastian Redl2010-10-052-8/+9
| | | | | | preamble or main file. Base Decls' PCHLevel on this to make it more sane. llvm-svn: 115626
* Enable chained precompiled headers for use with precompiled preamblesDouglas Gregor2010-10-011-3/+1
| | | | llvm-svn: 115260
OpenPOWER on IntegriCloud