summaryrefslogtreecommitdiffstats
path: root/clang/Driver
Commit message (Collapse)AuthorAgeFilesLines
...
* for now, disable all debug info generation at -O1 and above. This mirrorsChris Lattner2009-02-121-0/+7
| | | | | | similar logic in llvm-gcc and will hopefully be fixed soon. llvm-svn: 64349
* PTH: Have meta data be at the beginning of the PTH file, not the end.Ted Kremenek2009-02-111-8/+6
| | | | llvm-svn: 64338
* PTH: Replace string identifier to persistent ID lookup with a hashtable. This isTed Kremenek2009-02-111-85/+104
| | | | | | | actually *slightly* slower than the binary search. Since this is algorithmically better, further performance tuning should be able to make this faster. llvm-svn: 64326
* Fix <rdar://problem/6243503> [sema] @throw; accepted outside catch block.Steve Naroff2009-02-111-1/+2
| | | | llvm-svn: 64318
* PTH: Don't emit the PTH offset of the IdentifierInfo string data as that data isTed Kremenek2009-02-111-20/+10
| | | | | | referenced by other tables. llvm-svn: 64304
* Add private extern to pretty printer(s).Mike Stump2009-02-101-5/+6
| | | | llvm-svn: 64258
* PTH generation: Discard tokens that appear after and on the same line as ↵Ted Kremenek2009-02-101-2/+11
| | | | | | '#endif'. llvm-svn: 64250
* make -dM emit macros in a deterministic (sorted) order instead of Chris Lattner2009-02-101-2/+14
| | | | | | random hash table order, I don't like non-determinstic output. llvm-svn: 64248
* PTH generation: Don't call 'EmitToken' in the loop condition. This is ↵Ted Kremenek2009-02-101-5/+10
| | | | | | preparing for other changes within the loop. llvm-svn: 64247
* PTH: Replace ad hoc 'file name' -> 'PTH data' lookup table in the PTH file ↵Ted Kremenek2009-02-101-43/+70
| | | | | | with an on-disk chained hash table. This data structure is implemented using templates, and will be used to replace similar data structures. This change leads to no visibile performance impact on Cocoa.h, but now we only pay a price for the table on order with the number of files accessed and not the number in the PTH file. llvm-svn: 64245
* use efficient form of getSpelling, this speeds up -dM by 16%.Chris Lattner2009-02-101-1/+9
| | | | llvm-svn: 64244
* Fixup -ast-print so that:Mike Stump2009-02-101-10/+89
| | | | | | | | | | | | | | We handle indentation of decls better. We Indent extern "C" { } stuff better. We print out structure contents more often. We handle pass indentation information into the statement printer, so that nested things come out more indented. We print out FieldDecls. We print out Vars. We print out namespaces. We indent functions better. llvm-svn: 64232
* Rearrange code. No functionality change.Ted Kremenek2009-02-101-107/+112
| | | | llvm-svn: 64193
* Fix potential padding error in PTH file and add stub code for emitting an ↵Ted Kremenek2009-02-101-33/+160
| | | | | | on-disk chained hash table. llvm-svn: 64192
* CallExpr now uses ASTContext's allocate to allocate/delete its array of ↵Ted Kremenek2009-02-091-12/+18
| | | | | | subexpressions. llvm-svn: 64162
* Make one expected-diag directive match exactly one actual diagnostic.Sebastian Redl2009-02-071-36/+56
| | | | | | This uncovers some bugs, so several test cases now fail. llvm-svn: 64025
* Overhaul of Stmt allocation:Ted Kremenek2009-02-071-106/+137
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Made allocation of Stmt objects using vanilla new/delete a *compiler error* by making this new/delete "protected" within class Stmt. - Now the only way to allocate Stmt objects is by using the new operator that takes ASTContext& as an argument. This ensures that all Stmt nodes are allocated from the same (pool) allocator. - Naturally, these two changes required that *all* creation sites for AST nodes use new (ASTContext&). This is a large patch, but the majority of the changes are just this mechanical adjustment. - The above changes also mean that AST nodes can no longer be deallocated using 'delete'. Instead, one most do StmtObject->Destroy(ASTContext&) or do ASTContextObject.Deallocate(StmtObject) (the latter not running the 'Destroy' method). Along the way I also... - Made CompoundStmt allocate its array of Stmt* using the allocator in ASTContext (previously it used std::vector). There are a whole bunch of other Stmt classes that need to be similarly changed to ensure that all memory allocated for ASTs comes from the allocator in ASTContext. - Added a new smart pointer ExprOwningPtr to Sema.h. This replaces the uses of llvm::OwningPtr within Sema, as llvm::OwningPtr used 'delete' to free memory instead of a Stmt's 'Destroy' method. Big thanks to Doug Gregor for helping with the acrobatics of making 'new/delete' private and the new smart pointer ExprOwningPtr! llvm-svn: 63997
* Semantic checking for class template declarations andDouglas Gregor2009-02-061-2/+1
| | | | | | | | | | | | | | | redeclarations. For example, checks that a class template redeclaration has the same template parameters as previous declarations. Detangled class-template checking from ActOnTag, whose logic was getting rather convoluted because it tried to handle C, C++, and C++ template semantics in one shot. Made some inroads toward eliminating extraneous "declaration does not declare anything" errors by adding an "error" type specifier. llvm-svn: 63973
* Move StringLiteral to allocate its internal string data using the allocator inTed Kremenek2009-02-061-15/+22
| | | | | | | | | | | ASTContext. This required changing all clients to pass in the ASTContext& to the constructor of StringLiteral. I also changed all allocations of StringLiteral to use new(ASTContext&). Along the way, I updated a bunch of new()'s in StmtSerialization.cpp to use the allocator from ASTContext& (not complete). llvm-svn: 63958
* Add an implementation of -dM that follows GCC closely enough to permitChris Lattner2009-02-061-25/+87
| | | | | | | diffing the output of: clang -dM -o - -E -x c foo.c | sort llvm-svn: 63926
* add support for -x c++-header, update comment.Chris Lattner2009-02-061-20/+25
| | | | llvm-svn: 63924
* factor some code out into a helper function.Chris Lattner2009-02-061-40/+49
| | | | llvm-svn: 63922
* default diag::err_pp_file_not_found to mapping to fatal,Chris Lattner2009-02-061-2/+7
| | | | | | implementing PR3492: #include failures should be a fatal error llvm-svn: 63915
* Put the invalid flag of OwningResult into the Action pointer.Sebastian Redl2009-02-051-1/+1
| | | | | | | | This shrinks OwningResult by one pointer. Since it is no longer larger than OwningPtr, merge the two. This leads to simpler client code and speeds up my benchmark by 2.7%. For some reason, this exposes a previously hidden bug, causing a regression in SemaCXX/condition.cpp. llvm-svn: 63867
* Overhaul BugReporter interface and implementation. The new interface cleans upTed Kremenek2009-02-041-2/+2
| | | | | | | | | | | | | | | | | | | | | the ownership of BugTypes and BugReports. Now BugReports are owned by BugTypes, and BugTypes are owned by the BugReporter object. The major functionality change in this patch is that reports are not immediately emitted by a call to BugReporter::EmitWarning (now called EmitReport), but instead of queued up in report "equivalence classes". When BugReporter::FlushReports() is called, it emits one diagnostic per report equivalence class. This provides a nice cleanup with the caching of reports as well as enables the BugReporter engine to select the "best" path for reporting a path-sensitive bug based on all the locations in the ExplodedGraph that the same bug could occur. Along with this patch, Leaks are now coalesced into a common equivalence class by their allocation site, and the "summary" diagnostic for leaks now reports the allocation site as the location of the bug (this may later be augmented to also provide an example location where the leak occurs). llvm-svn: 63796
* Add -femit-all-decls codegen option.Daniel Dunbar2009-02-041-0/+6
| | | | | | | | - Emits all declarations, even unused (static) ones. - Useful when doing minimization of codegen problems (otherwise problems localized to a static function aren't minimized well). llvm-svn: 63776
* Basic representation of C++ class templates, from Andrew Sutton.Douglas Gregor2009-02-041-0/+15
| | | | llvm-svn: 63750
* spelling change.Chris Lattner2009-02-041-1/+1
| | | | llvm-svn: 63711
* lower the interface to getLineNumber like we did forChris Lattner2009-02-042-2/+3
| | | | | | | | getColumnNumber. This fixes a FIXME in SourceManager::getPresumedLoc because we now just decompose the sloc once. llvm-svn: 63701
* Fix <rdar://problem/6521757> clang ObjC rewriter: Mixed Mac and Windows line ↵Steve Naroff2009-02-031-4/+9
| | | | | | endings after rewrite. llvm-svn: 63657
* Allow taking the address of data members, resulting in a member pointer.Sebastian Redl2009-02-031-3/+5
| | | | | | Pointers to functions don't work yet, and pointers to overloaded functions even less. Also, far too much illegal code is accepted. llvm-svn: 63655
* switch SourceManager from using an std::map and std::list of Chris Lattner2009-02-031-1/+1
| | | | | | | | | ContentCache objects to using a densemap and list, and allocating the ContentCache objects from a bump pointer. This does not speed up or slow down things substantially, but gives us control over their alignment. llvm-svn: 63628
* Use the updated CommandLine api for -fno-blocks.Mike Stump2009-02-021-6/+7
| | | | llvm-svn: 63563
* AnalysisConsumer:Ted Kremenek2009-02-021-10/+4
| | | | | | | - Pass "Actions" vector by reference. - Remove guard against checking macro-generated code. llvm-svn: 63546
* RewriteObjC::RewriteBlockDeclRefExpr(): Add parens to enforce precedence. ↵Steve Naroff2009-02-021-2/+9
| | | | | | | | This fixes <rdar://problem/6529468> clang ObjC rewriter: Need parenthesis around dereferences in rewritten Blocks. Also changed RewriteObjC::SynthesizeBlockFunc() to declare a pointer to the block argument even when there are no user-supplied arguments to the block. llvm-svn: 63522
* Fix typo noticed by Chris.Anders Carlsson2009-01-301-1/+1
| | | | llvm-svn: 63449
* Turn on -flax-vector-conversions by default, issue a warning whenever one is ↵Anders Carlsson2009-01-301-5/+6
| | | | | | done. Add a -fnolax-vector-conversions option. Fixes PR2862. llvm-svn: 63447
* wire up -fno-show-source-location option, patch by Alexei Svitkine!Chris Lattner2009-01-301-1/+7
| | | | llvm-svn: 63409
* avoid emitting a bogus line marker for the top level #includeChris Lattner2009-01-301-1/+3
| | | | | | | | | | | | | | | | | | | | | location. We now -E a file containing "foo" into: # 1 "t.c" # 1 "t.c" 1 # 1 "<predefines>" 1 # 1 "t.c" 2 foo instead of: # 1 "t.c" # 1 "t.c" 1 # 0 "t.c" # 1 "<predefines>" 1 # 1 "t.c" 2 foo llvm-svn: 63405
* Add -fno-blocks support. This fixes block-no-block-def.c.Mike Stump2009-01-301-2/+5
| | | | llvm-svn: 63385
* Fix name of -x option for C preprocessed input; it should beDaniel Dunbar2009-01-291-1/+1
| | | | | | cpp-output, not c-cpp-output. llvm-svn: 63345
* next round of diagnostics cleanups, moving some Chris Lattner2009-01-291-1/+0
| | | | | | | diags around, eliminating #defines, etc. Patch by Anders Johnsen! llvm-svn: 63318
* Fix -Wimplicit-function-declaration, which required some refactoring andChris Lattner2009-01-291-1/+5
| | | | | | changes in various diagnostics code. llvm-svn: 63282
* Fix a wart that existed from before we had EXTWARN.Chris Lattner2009-01-291-9/+0
| | | | llvm-svn: 63272
* move library-specific diagnostic headers into library private dirs. ReduceChris Lattner2009-01-291-1/+1
| | | | | | redundant #includes. Patch by Anders Johnsen! llvm-svn: 63271
* Code generation support for C99 designated initializers.Douglas Gregor2009-01-281-2/+2
| | | | | | | | | | | | | | | | | | | | The approach I've taken in this patch is relatively straightforward, although the code itself is non-trivial. Essentially, as we process an initializer list we build up a fully-explicit representation of the initializer list, where each of the subobject initializations occurs in order. Designators serve to "fill in" subobject initializations in a non-linear way. The fully-explicit representation makes initializer lists (both with and without designators) easy to grok for codegen and later semantic analyses. We keep the syntactic form of the initializer list linked into the AST for those clients interested in exactly what the user wrote. Known limitations: - Designating a member of a union that isn't the first member may result in bogus initialization (we warn about this) - GNU array-range designators are not supported (we warn about this) llvm-svn: 63242
* Enhance PTHManager::Create() to take an optional Diagnostic* argument that ↵Ted Kremenek2009-01-281-1/+1
| | | | | | can be used to report issues such as a missing PTH file. llvm-svn: 63231
* fix a crash I introduced, thanks to Ted for the awesome reducedChris Lattner2009-01-281-2/+5
| | | | | | testcase :) llvm-svn: 63182
* Patch by Alexei Svitkine: Refactor Sema::ParseAST API to allow clients to ↵Ted Kremenek2009-01-281-3/+14
| | | | | | pass as an argument a TranslationUnit object whose contents live beyond the call to ParseAST. llvm-svn: 63175
* Add a preliminary version number.Mike Stump2009-01-281-0/+4
| | | | llvm-svn: 63168
OpenPOWER on IntegriCloud