summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
* Introduce -flimit-debug-info.Devang Patel2010-09-301-0/+1
| | | | | | In this experimental mode try avoiding debug info emission for classes as much as possible. The goal is to reduce size of produced debuginfo without reducing quality of debug info in general. This is a work in progress. llvm-svn: 115188
* Added two new command line arguments:Marcin Swiderski2010-09-301-0/+2
| | | | | | | -cfg-add-implicit-dtors - sets CFG::BuildOptions::AddImplicitDtors for AnalysisCosumer to true, -cfg-add-initializers - sets CFG::BuildOptions::AddInitializers for AnalysisCosumer to true. llvm-svn: 115142
* Frontend/XML: Add support for printing nested structures, patch by Martin ↵Daniel Dunbar2010-09-291-0/+12
| | | | | | Vejnár! llvm-svn: 115041
* Remove libclang logging codeDouglas Gregor2010-09-271-32/+2
| | | | llvm-svn: 114836
* When setting the globally-visible declarations for a particularDouglas Gregor2010-09-241-2/+32
| | | | | | | | | | | | | identifier, we may have a Sema object but no translation unit scope (because parsing is finished). In this case, we still need to update the IdResolver, which might still be used when writing a PCH containing another PCH (without chaining). This bug manifested as a failure with precompiled preambles. Also, add a little environment-variable-sensitive logging for libclang. llvm-svn: 114774
* Teach libclang to enable multithreading in LLVM, since libclang clients are ↵Douglas Gregor2010-09-241-0/+3
| | | | | | likely to be multithreaded. Also move the printing of timers to somewhere better for multithreaded libclang clients llvm-svn: 114760
* Synchronize globally-cached code completion results with the resultsDouglas Gregor2010-09-231-4/+6
| | | | | | | | | | | | | | provided when the optimization is disabled. In particular, split the completion context CCC_Other into two contexts: CCC_Other, which means that it's an undisclosed context for which any other results are unwelcome, and CCC_Recovery, which is used in recovery cases. Since we're now using the completion context within the completion results builder, make sure that it's always set to something. Fixes <rdar://problem/8470644>. llvm-svn: 114704
* Tweak priorities for some types and macros:Douglas Gregor2010-09-201-0/+1
| | | | | | | | | | - In Objective-C, we prefer BOOL to bool for historic reasons; slightly penalize "bool". - Treat Nil macro as a NULL pointer constant. - Treat YES, NO, true, and false macros as constants. - Treat the bool macro as a type. llvm-svn: 114356
* Add a -ftrapv-handler= option which allows a handler to invoke instead of ↵David Chisnall2010-09-171-2/+11
| | | | | | simply aborting when a signed operation overflows. This mirrors the (GCC-incompatible) behaviour from clang 1.0 and 1.1 when -ftrapv was specified, but allows the handler to be defined for each compilation unit. llvm-svn: 114192
* Use a temporary file for output which gets renamed after all the writing is ↵Argyrios Kyrtzidis2010-09-171-14/+52
| | | | | | | | finished. This mainly prevents failures and/or crashes when multiple processes try to read/write the same PCH file. (rdar://8392711&8294781); suggestion & review by Daniel! llvm-svn: 114187
* Handle '#line' in '-E' that has an empty file name. Fixes ↵Ted Kremenek2010-09-171-2/+2
| | | | | | <rdar://problem/8439412>. llvm-svn: 114142
* Introduce a new code-completion context for a parenthesizedDouglas Gregor2010-09-141-5/+12
| | | | | | | | expression, e.g., after the '(' that could also be a type cast. Here, we provide types as code-completion results in C/Objective-C (C++ already had them), although we wouldn't in a normal expression context. llvm-svn: 113904
* Revert "CMake: Update to use standard CMake dependency tracking facilities ↵Michael J. Spencer2010-09-131-15/+12
| | | | | | | | | | | | | instead" This reverts commit r113631 Conflicts: CMakeLists.txt lib/CodeGen/CMakeLists.txt llvm-svn: 113817
* The two libclang crash-recovery tests that involve precompiledDouglas Gregor2010-09-111-0/+7
| | | | | | | | | | preambles end up leaving the precompiled preambles around. This is by design, since we do minimal cleanup during crash recovery. However, it's unfortunate for testing, so introduce a hook that allows these two tests to put the precompiled preamble somewhere where we can delete them after testing. llvm-svn: 113698
* If we fail to create a temporary file for the precompiled preamble,Douglas Gregor2010-09-111-1/+10
| | | | | | | | | just abort creation of the precompiled preamble rather than doing silly things. This is the second part of the fix for the weird preamble-related failures on Windows. Big thanks to Francois Pichet for the great detective work! llvm-svn: 113697
* add latest gentoo gcc pathNuno Lopes2010-09-111-0/+4
| | | | llvm-svn: 113696
* Tweak GetPreamblePCHPath() to more closely match the behavior of theDouglas Gregor2010-09-111-0/+5
| | | | | | | | Windows GetTempPath() function, and be sure to create the directory in which the precompiled preamble will reside before creating the temporary file itself. llvm-svn: 113695
* Make sure we're producing a newline in the preprocessed output beforeDouglas Gregor2010-09-101-2/+1
| | | | | | emitting a #pragma, whenever one is needed. Fixes <rdar://problem/8417307>. llvm-svn: 113648
* CMake: Update to use standard CMake dependency tracking facilities insteadMichael J. Spencer2010-09-101-12/+15
| | | | | | of whatever we were using before... llvm-svn: 113631
* Added AnalyzerStatsChecker, a path sensitive check that reports visitation ↵Tom Care2010-09-101-0/+3
| | | | | | statistics about analysis. Running clang with the -analyzer-stats flag will emit warnings containing the information. We can then run a postanalysis script to take this data and give useful information about how much the analyzer missed in a project. llvm-svn: 113568
OpenPOWER on IntegriCloud