summaryrefslogtreecommitdiffstats
path: root/clang/Driver
Commit message (Collapse)AuthorAgeFilesLines
...
* Prevent clang from emitting output when input has errorsDaniel Dunbar2008-07-181-0/+6
| | | | | | | | + test case <rdar://problem/6080040> http://llvm.org/bugs/show_bug.cgi?id=2280 llvm-svn: 53756
* RewriteObjC::SynthMessageExpr(): Fix super rewrite (a fairly recent regression).Steve Naroff2008-07-161-1/+4
| | | | | | Fixes <rdar://problem/6046663> clang ObjC rewriter: Regression in handling of 'super' in latest build. llvm-svn: 53703
* Remove a FIXME from RewriteObjC::RewriteObjCSynchronizedStmt().Steve Naroff2008-07-161-2/+5
| | | | llvm-svn: 53696
* RewriteObjC::Initialize(): add function decls used by @synchronized.Steve Naroff2008-07-161-0/+3
| | | | | | This fixes <rdar://problem/6040143> clang ObjC rewriter: @synchronized keyword inserts undeclared objc functions. llvm-svn: 53695
* Two fixes:Steve Naroff2008-07-161-7/+13
| | | | | | | - Make sure ObjCIvarDecl propagates the bitfield width. - RewriteObjC::SynthesizeIvarOffsetComputation(): Avoid using the __OFFSETOF__ mumbo jumbo for bitfields (since it isn't legal C). This fixes <rdar://problem/5986079> clang ObjC rewriter: bitfields and ivar access don't mix. llvm-svn: 53694
* RewriteObjC::RewriteObjCTryStmt():Don't synthesize a catch begin if there ↵Steve Naroff2008-07-161-13/+13
| | | | | | | | are 0 catch clauses. This fixes <rdar://problem/5987211> clang ObjC rewriter: @try / @finally block produces unbalanced output. llvm-svn: 53679
* Teach RewriteObjC::RewriteObjCMethodDecl() to deal with pointer to function ↵Steve Naroff2008-07-161-1/+33
| | | | | | | | return types. This fixes <rdar://problem/6034961> clang ObjC rewriter: rewriting methods with function pointer return values does not work llvm-svn: 53678
* Provide an "Analysis Scope" for Analyses so checks can either be run on code ↵Ted Kremenek2008-07-154-13/+15
| | | | | | declarations (bodies) or Objective-C @implementation blocks. llvm-svn: 53584
* Break off declaration of Analysis enum into Analyses.def. The driver options inTed Kremenek2008-07-144-75/+67
| | | | | | | | | | | | clang.cpp now #include these definitions to create the command line options, and AnalysisConsumer #includes this file to generate the switch statement to create actions. Renamed -check-objc-methodsigs to -warn-objc-methodsigs. The "missing -dealloc" check is now optional: -warn-objc-missing-dealloc llvm-svn: 53575
* Add new check: -check-objc-methodsigs. This check scans methods inTed Kremenek2008-07-113-3/+17
| | | | | | | | | ObjCImplementationDecls and sees if a ancestor class defines a method with the same selector but with a different type signature. Right now it just compares return types, and mainly looks at differences in primitive values. The checking will be expanded in the future. llvm-svn: 53482
* In a report-XXXXX.html, make the title include the name of the file with the ↵Ted Kremenek2008-07-072-2/+5
| | | | | | | | bug. Patch by Jean-Daniel Dupas! http://lists.cs.uiuc.edu/pipermail/cfe-dev/2008-July/002166.html llvm-svn: 53184
* add gentoo stable gcc headers path so that all tests pass here (CPATH isnt ↵Nuno Lopes2008-07-051-0/+4
| | | | | | enough..) llvm-svn: 53143
* For the -dealloc checker, check the LangOptions to determine whether or not ↵Ted Kremenek2008-07-031-2/+5
| | | | | | the code is compiled with GC. llvm-svn: 53098
* Have BugReporter::getCFG and BugReporter::getLiveVariables returns pointers ↵Ted Kremenek2008-07-031-20/+34
| | | | | | | | instead of references, because they can both fail on functions we cannot construct full CFGs for yet. llvm-svn: 53081
* Added static analysis check to see if a subclass of NSObject implements ↵Ted Kremenek2008-07-031-9/+35
| | | | | | -dealloc, and whether or not that implementation calls [super dealloc]. llvm-svn: 53075
* Unify the code path for the Dead Stores checker to always use the ↵Ted Kremenek2008-07-021-8/+7
| | | | | | BugReporter interface. llvm-svn: 53054
* Refactored some of the BugReporter interface so that data such as the ↵Ted Kremenek2008-07-021-24/+26
| | | | | | | | ASTContext&, PathDiagnosticClient*, can be provided by an external source. Split BugReporter into BugReporter and GRBugReporter so checkers not based on GRExprEngine can still use the BugReporter mechanism. llvm-svn: 53048
* GRExprEngine now expects the LiveVariables information to be provided by its ↵Ted Kremenek2008-07-021-1/+3
| | | | | | | | creator. This allows an optimization in AnalysisConsumer where the same LiveVariables information is used between multiple analyses. llvm-svn: 53046
* Added version of CheckDeadStores that accepts a client-provided ↵Ted Kremenek2008-07-021-1/+2
| | | | | | | | LiveVariables object. Modified the DeadStores logic in AnalysisConsumer.cpp to use the LiveVariables object created by the AnalysisManager. llvm-svn: 53043
* Moved logic for -dump-cfg and -view-cfg into AnalysisConsumer.Ted Kremenek2008-07-025-102/+23
| | | | | | Renamed -dump-cfg to -cfg-dump, and -view-cfg to -cfg-view. This naming better matches the same options for asts (e.g. -ast-dump). llvm-svn: 53041
* Move -dump-live-variables logic to AnalysisConsumer.Ted Kremenek2008-07-025-39/+28
| | | | llvm-svn: 53039
* Migrate CheckerConsumer diagnostics to the new AnalysisConsumer interface.Ted Kremenek2008-07-022-100/+42
| | | | | | Remove CheckerConsumer. llvm-svn: 53029
* Move logic for "-checker-simple" to the new AnalysisConsumer interface.Ted Kremenek2008-07-025-63/+33
| | | | llvm-svn: 53028
* Migrated driver logic for running the CF retain/release checker over to the ↵Ted Kremenek2008-07-025-68/+62
| | | | | | new AnalysisConsumer interface. llvm-svn: 53002
* Added AnalysisConsumer, a meta-level ASTConsumer class to drive variousTed Kremenek2008-07-025-71/+309
| | | | | | | | | | | | | | | | | | analyses. This potentially is the primordial origins of a Clang-equivalent "PassManager". The new AnalysisConsumer interface allows multiple analyses to be run from a single invocation of Clang. Migrated the logic of "-warn-dead-stores" and "-warn-uninit-values" to use the new AnalysisConsumer interface. The new interface results in a significant code reduction to incorporate an analysis into the Driver. Updated a test case to (correctly) acknowledge that it contains a dead store (this check wasn't being performed because it was previously masked by -warn-uninit-values). llvm-svn: 52996
* Make clang work on 32 bit powerpc linux.Matthijs Kooijman2008-06-261-0/+4
| | | | | | Patch by Nick Lewycky! llvm-svn: 52777
* Link in LLVMAnalysis after LLVMCodeGen, since the latter depends on the formerMatthijs Kooijman2008-06-261-4/+2
| | | | | | since LLVM r52748. llvm-svn: 52776
* a temporary minimal hack to get clang building after the getStringValue ↵Chris Lattner2008-06-261-0/+1
| | | | | | changes in llvm mainline. llvm-svn: 52753
* Patch by Anders Bergh:Ted Kremenek2008-06-241-0/+19
| | | | | | | | | | 'There's not much to say about this patch, it just adds the Arch Linux gcc 4.3.1 header paths for i686 and amd64. The patch was generated using "svn diff" with clang at revision 52660. The paths aren't distribution-specific, so they should work for all Linux distributions using the default(?) names like "i686-pc-linux-gnu".' llvm-svn: 52665
* Implement printing for ObjCClassDecl's, patch by Jean-Daniel Dupas!Chris Lattner2008-06-211-2/+9
| | | | llvm-svn: 52598
* Switch 'super' from being a weird cast thing to being a predefined expr node.Chris Lattner2008-06-211-25/+8
| | | | | | Patch by David Chisnall with objc rewriter and stmtdumper updates from me. llvm-svn: 52580
* Updated call to dead stores to use proper arguments.Ted Kremenek2008-06-201-1/+3
| | | | llvm-svn: 52560
* Change self/_cmd to be instances of ImplicitParamDecl instead of ParmVarDecl.Chris Lattner2008-06-171-3/+4
| | | | | | Patch by David Chisnall! llvm-svn: 52422
* Allow -parse-noop -verify options to be used together.Argyrios Kyrtzidis2008-06-133-1/+11
| | | | llvm-svn: 52249
* -Changes to TagDecl:Argyrios Kyrtzidis2008-06-091-6/+8
| | | | | | | | | Added TagKind enum. Added getTagKind() method. Added convenience methods: isEnum(), isStruct(), isUnion(), isClass(). -RecordDecl/CXXRecordDecl::Create() accept a TagKind enum instead of a DeclKind one. llvm-svn: 52160
* Get -serialize working again, plus a bit of minor cleanup.Eli Friedman2008-06-091-21/+10
| | | | llvm-svn: 52152
* Use a common SourceManager when processing multiple files. This allows us ↵Ted Kremenek2008-06-061-4/+10
| | | | | | to cache the contents of source files already loaded from disk. llvm-svn: 52066
* Fix crash when running with multiple source files. This can be improved.Ted Kremenek2008-06-061-0/+6
| | | | llvm-svn: 52032
* Moved LangOptions from TranslationUnit to ASTContext. This induced a ↵Ted Kremenek2008-06-044-40/+21
| | | | | | variety of cleanups in some ASTConsumers. llvm-svn: 51943
* make rewrite macros insert a space when commenting out macros where the ↵Chris Lattner2008-06-031-2/+3
| | | | | | | | token didn't lead with a space. llvm-svn: 51896
* Fix <rdar://problem/5976164> clang ObjC rewriter: for ... in enumeration ↵Steve Naroff2008-06-021-0/+1
| | | | | | inserts undeclared function (objc_enumerationMutation should be in preamble) llvm-svn: 51880
* Two identifiers are not the same unless they have the same identifier info.Chris Lattner2008-05-311-1/+7
| | | | llvm-svn: 51827
* Added "InitializeTU" to ASTConsumer. This is used by Sema::ParseAST to pass aTed Kremenek2008-05-312-4/+9
| | | | | | | | | | | TranslationUnit object instead of an ASTContext. By default it calls Initialize(ASTConstext& Context) (to match with the current interface used by most ASTConsumers). Modified the ObjC-Rewriter to use InitializeTU, and to tell the TranslationUnit to not free its Decls. This is a workaround for: <rdar://problem/5966749> llvm-svn: 51825
* Fix <rdar://problem/5917992> clang ObjC rewriter: #end from #if statement ↵Steve Naroff2008-05-311-3/+60
| | | | | | | | lost in translation. Some fancy footwork to accommodate embedded preprocessor directives within an interface. llvm-svn: 51815
* Fix <rdar://problem/5969777> clang ObjC rewriter: #imported file name ↵Steve Naroff2008-05-311-4/+1
| | | | | | | | | mysteriously commented out This fix involved tightening up needToScanForQualifiers(), which predated ObjCQualifiedIdType. It also includes a minor tweak to the code that searches for the beginning of the qualified type. If the AST contained the correct beginning of the declaration (i.e. the beginning of the declaration specifiers), this code would be more robust. Since it doesn't, we apply an adhoc heuristic. Note that DeclSpec contains this info...we just don't propagate it to the AST (at present). llvm-svn: 51812
* Hack RewriteObjC::RewriteObjCStringLiteral() to include the filename in the ↵Steve Naroff2008-05-311-0/+11
| | | | | | generated code (replacing any non-alphanumeric characters with "_"). This allows header files to contain ObjCStringLiterals. llvm-svn: 51811
* Correctly preserve the order between -F and -I options.Ted Kremenek2008-05-311-6/+16
| | | | llvm-svn: 51803
* Use llvm::cl::desc for description of the -Wimplicit-function-declaration ↵Ted Kremenek2008-05-301-2/+2
| | | | | | | | option. Patch by Holger Schurig! llvm-svn: 51774
* Fix crash with -serialize (reported to cfe-dev). The issue was Eli Friedman2008-05-301-0/+1
| | | | | | | | | essentially that we were destroying the declarations twice. (Note that we don't use -serialize directly in the testsuite, only SerializeTest.) llvm-svn: 51768
* Implement support for -w, which silences all warnings. PR2384.Chris Lattner2008-05-291-0/+4
| | | | llvm-svn: 51683
OpenPOWER on IntegriCloud