aboutsummaryrefslogtreecommitdiff
path: root/Driver/clang.cpp
AgeCommit message (Collapse)Author
2008-07-02Moved logic for -dump-cfg and -view-cfg into AnalysisConsumer.Ted Kremenek
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). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53041 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-02Move -dump-live-variables logic to AnalysisConsumer.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53039 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-02Move logic for "-checker-simple" to the new AnalysisConsumer interface.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53028 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-02Migrated driver logic for running the CF retain/release checker over to the ↵Ted Kremenek
new AnalysisConsumer interface. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53002 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-02Added AnalysisConsumer, a meta-level ASTConsumer class to drive variousTed Kremenek
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). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52996 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-26Make clang work on 32 bit powerpc linux.Matthijs Kooijman
Patch by Nick Lewycky! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52777 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-24Patch by Anders Bergh:Ted Kremenek
'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".' git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52665 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-13Allow -parse-noop -verify options to be used together.Argyrios Kyrtzidis
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52249 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-06Use a common SourceManager when processing multiple files. This allows us ↵Ted Kremenek
to cache the contents of source files already loaded from disk. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52066 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-06Fix crash when running with multiple source files. This can be improved.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52032 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-04Moved LangOptions from TranslationUnit to ASTContext. This induced a ↵Ted Kremenek
variety of cleanups in some ASTConsumers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51943 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-31Correctly preserve the order between -F and -I options.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51803 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-30Use llvm::cl::desc for description of the -Wimplicit-function-declaration ↵Ted Kremenek
option. Patch by Holger Schurig! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51774 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-29Implement support for -w, which silences all warnings. PR2384.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51683 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-22Update driver include paths to work on darwin10.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51431 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-09make #if 0 code compile, even though it still isn't very useful.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50920 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-08Added -g command line options to clang for generating source level debug ↵Sanjiv Gupta
information. This patch currently enables generation of line number debug information (stoppoints) and region begin/end debug information. The new files CGDebugInfo.h and CGDebugInfo.cpp implements the debug info manager class CGDebugInfo. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50848 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-08Remove the ending "." from clang options descriptions.Sanjiv Gupta
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50847 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-08start implementation of a macro rewriter, this is currently just stubbed out.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50845 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-05Add support for -Wimplicit-function-declaration, rdar://5907433Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50672 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-04Fix PR2281: these two warnings should be promoted to error onChris Lattner
pedantic error. Perhaps I should add a class of 'extension' that is 'extension that warns by default', which would be cleaner. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50633 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-29Provide the option to run the CF-retain checker in GC enabled mode.Ted Kremenek
The transfer functions for the checker don't do anything special yet in GC mode. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50394 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-29Add -fobjc-gc and -fobjc-gc-only options to the driver.Ted Kremenek
Add corresponding enum in LangOptions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50387 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-23TranslationUnit now owns IdentifierTable, TargetInfo, and Selectors objectsTed Kremenek
when it is constructed via deserialization. This is done by recording a flag indicating that this is the case, and it deletes these objects by getting the references stored in the ASTContext object. This fixes some memory leaks that occurs when we deserialize translation units from bitcode files. The rationale between having TranslationUnit sometimes own these objects and sometimes not is that a TranslationUnit object can be constructed from state generated by the parser (Preprocessor; semantic analyzer, etc.), and thus in these cases won't own the IdentifierTable or Selectors, etc. During deserialization, there is no Preprocessor, so somebody needs to own these objects in order for them to be properly reclaimed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50149 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-19simplify the return of InitializePreprocessor to be bool instead of a fileidChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49974 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-19simplify ownership of the predefines buffer.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49973 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-17class Preprocessor: Now owns the "predefines" char*; it deletes [] it in its ↵Ted Kremenek
dstor. clang.cpp: InitializePreprocessor now makes a copy of the contents of PredefinesBuffer and passes it to the preprocessor object. clang.cpp: DriverPreprocessorFactory now calls "InitializePreprocessor" instead of this being done in main(). html::HighlightMacros() now takes a PreprocessorFactory, allowing it to conjure up a new Preprocessor to highlight macros. class HTMLDiagnostics now takes a PreprocessorFactory* that it can use for html::HighlightMacros(). Updated clients of HTMLDiagnostics to use this new interface. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49875 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-17Generate the Preprocessor using a local PreprocessorFactory object.Ted Kremenek
While this adds no extra functionality now, we will soon pass the PreprocessorFactory object to some ASTConsumers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49873 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-16Added fixme.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49797 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-16Hook up HTMLDiagnostics to use Chris's new syntax highlighting. --html-diagsTed Kremenek
currently doesn't pass in the Preprocessor from the driver, so we don't get syntax highlighting when we create HTMLDiagnostics in that way. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49796 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-16Add a mode of hackily syntax highlighting comments. This has a number ofChris Lattner
problems, including the fact that it doesn't work well with multi-line comments due to Ted's crazy table. However, that could be fixed, and it does work with single-line ones :). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49778 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-16Add -o support for -emit-html, make it not produce a file on an error.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49777 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-16Remove "--html-test" driver option and its corresponding code; all of thisTed Kremenek
functionality has been migrated into "--emit-html" and "--html-diags". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49776 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-14Rename RewriteTest->RewriteObjC.Steve Naroff
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49692 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-14Added driver option "-checker-opt-analyze-headers" to force the staticTed Kremenek
analyzer to analyze functions declared in header files. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49675 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-14Handle -D and -U options in order, so that they can cancel each other out whenSam Bishop
intermixed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49645 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-10Refactored all logic to run the GRSimpleVals and CFRef checker into a commonTed Kremenek
code path in the clang driver. Renamed options --grsimple to -checker-simple and -check-cfref to -checker-cfref. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49500 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-08Add support for C++ default arguments, and rework Parse-Sema Chris Lattner
interaction for function parameters, fixing PR2046. Patch by Doug Gregor! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49369 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-05Fix handling of implicit int, resolving PR2012 and reverting (andChris Lattner
subsuming) my patch for PR1999. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49251 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-31Inlined clang/Analysis/Analyses/GRSimpleVals.h into LocalCheckers.h and removedTed Kremenek
GRSimpleVals.h Added a PathDiagnosticClient option to the driver functions for the CFRefCountChecker and the GRSimpleVals analysis. Both analyses now accept a "-o" argument from the driver that specifies where HTML reports should be dumped. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48989 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-27Added "HTMLDiagnostic", a generic DiagnosticClient (that also implements ↵Ted Kremenek
PathDiagnostic) so that all diagnostics can be piped to HTML files instead of as text diagnostics using --html-diags. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48865 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-24debian amd64 testingAndrew Lenharth
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48745 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-24debian ia32 testingAndrew Lenharth
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48742 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-22Teach the rewriter how to respect the -o option.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48669 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-19Initial experimentation with adding boxed "annotations" to HTMLized source.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48540 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-18Added the beginning of a set of rewriter functions for pretty-printing sourceTed Kremenek
code as HTML. Added a new driver option "--emit-html" to dump the source of the main input file as HTML. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48505 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-14Only compute targetinfo once and don't leak it. Patch by Sam Bishop!Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48358 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-10Pass LangOptions to RewriteTest().Steve Naroff
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48172 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-09Fix a ted-oChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48089 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-09simplify triple processing code now that there can be only one arch specified.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48066 91177308-0d34-0410-b5e6-96231b3b80d8