aboutsummaryrefslogtreecommitdiff
path: root/Driver/clang.cpp
AgeCommit message (Collapse)Author
2008-03-07Added --trim-path-graph to the driver to trim paths from the ExplodedGraphTed Kremenek
that are not related to error nodes. Fixed bug where we did not detect some NULL dereferences. Added "ExplodedGraph::Trim" to trim all nodes that cannot transitively reach a set of provided nodes. Fixed subtle bug in ExplodedNodeImpl where we could create predecessor iterators that included the mangled "sink" bit. The better fix is to integrate this bit into the void* for the wrapped State, not the NodeGroups representing a node's predecessors and successors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48036 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-06Added boilerplate to execute the CF reference count checker (which isn't yet ↵Ted Kremenek
implemented). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47982 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-05Remove the first layer of support for "portability" warnings. This is Chris Lattner
theoretically useful, but not useful in practice. It adds a bunch of complexity, and not much value. It's best to nuke it. One big advantage is that it means the target interfaces will soon lose their SLoc arguments and target queries can never emit diagnostics anymore (yay). Removing this also simplifies some of the core preprocessor which should make it slightly faster. Ted, I didn't simplify TripleProcessor, which can now have at most one triple, and can probably just be removed. Please poke at it when you have time. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47930 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-03avoid a warning.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47839 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-03Find clang headers in the clang headers dir, search it before Chris Lattner
the system headers dir. This produces an annoying warning: clang.cpp:883: warning: ISO C++ forbids casting between pointer-to-function and pointer-to-object I'm not sure how to remove it. :( git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47836 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-01Add support for the CPATH, C_INCLUDE_PATH, CPLUS_INCLUDE_PATH,Chris Lattner
OBJC_INCLUDE_PATH, and OBJCPLUS_INCLUDE_PATH environment variables. Patch by Sam Bishop! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47785 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-26fix an interaction between -isystem . and isysroot.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47646 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-25convert tabs to spaces, patch by Mike Stump!Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47560 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-25enable digraphs for C94, thanks to Neil for pointing this out.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47543 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-22Modified clang driver option -dump-live-variables to (optionally) use theTed Kremenek
--analyze-function option to analyze specific functions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47498 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-22clang driver options --dump-cfg and --view-cfg now (optionally) use theTed Kremenek
--analyze-function option to dump/view the CFGs of specific functions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47497 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-18Running -grsimple now emits diagnostics about the time spent analyzing each ↵Ted Kremenek
function. Will probably make this a separate command line option later. Added "--analyze-function" option to the driver to (gradually) allow different analyses to only be run on specific functions. Currently only --grsimple uses this option. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47285 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-15Set Ubuntu 7.10 c++ include path.Lauro Ramos Venancio
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47186 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-15Added --grsimple-view option to clang driver; this is the same asTed Kremenek
--grsimple except that it visualizes the ExplodedGraph using dot and outputs the current function being analyzed. --grsimple is now silent except when it emits diagnostics. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47146 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-14Renamed GRConstants => GRSimpleVals.Ted Kremenek
Moved driver logic for --grsimple to GRSimpleVals.cpp. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47137 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-11Move policy on unnamed fields (a Microsoft extension) from ↵Steve Naroff
Parser::ParseStructDeclaration() to the driver. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46974 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-07Added proof-of-concept NULL pointer diagnostics to GRConstants.Ted Kremenek
Modified the driver to pass the Diagnostic object to GRConstants. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46847 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-07Implement -fms-extensions. This allows us to fuzzy parse non-standard MS ↵Steve Naroff
constructs used in "windows.h". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46838 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-06move the codegen ASTConsumer out of the driver into libcodegen,Chris Lattner
eliminating a bunch of forwarding methods and generally simplifying things. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46792 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-06pull .ll and .bc writing out of the ASTConsumer destructors into some topChris Lattner
level code in clang. This is a cleanup, but does implement "-o" for -emit-llvm. One effect of this is that "clang foo.c -emit-llvm" will now emit into foo.ll instead of stdout. Use "clang foo.c -emit-llvm -o -" or "clang < foo.c -emit-llvm" to get the old behavior. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46791 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-06rename ASTSTreamer.{h|cpp} -> ParseAST.{h|cpp}Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46786 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-27Make -o work with -E, patch contributed by Shantonu Sen!Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46426 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-23add support for -Wundef.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46274 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-21Add Ubuntu 7.10 include path.Lauro Ramos Venancio
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46233 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-18Insert #pragma once when rewriting a header file.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46155 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-16Shortened driver option for running the GR-constants analysis to --grconstants.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46076 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-16Hooked up the GRConstants analysis to the driver.Ted Kremenek
Fixed some compilation errors with GREngine that showed up during template instantiation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46074 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-10add support for the GCC -include option.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45810 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-10Ted apparently likes crazy whitespace at the end of line. Crush his spirit byChris Lattner
removing them, fitting the file into 80 columns. :) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45807 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-08Added most of the boilerplate to the driver needed to run the graph-reachabilityTed Kremenek
constant propagation analysis. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45747 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-04Fix PR1897, patch by Wilhansen LiChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45593 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-30Rename stats to print-stats to avoid conflicting with llvm'sNate Begeman
stats statistic when clang is built as a dylib. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45441 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-29Don't attribute in file headers anymore. See llvmdev for theChris Lattner
discussion of this change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45410 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-24Implement -emit-llvm-bc optionSeo Sanghyeon
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45339 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-20Converted uses of scoped_ptr to OwningPtr.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45265 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-19Added methods createMainFileID() and createMainFileIDForMemBuffer() toTed Kremenek
SourceManager to allow SourceManager to directly intern the MainFileID when it is created. Removed setMainFileID(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45231 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-19Interned MainFileID within SourceManager. Since SourceManager is referenced byTed Kremenek
both Preprocessor and ASTContext, we no longer need to explicitly pass MainFileID around in function calls that also pass either Preprocessor or ASTContext. This resulted in some nice cleanups in the ASTConsumers and the driver. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45228 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-19Typo fix.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45227 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-19Added storage of the FileID of the the main source file of a translation unitTed Kremenek
in SourceManager. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45225 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-19Removed "SourceFile" from TranslationUnit. This same information will (soon)Ted Kremenek
be available by querying the SourceManager within the ASTContext referenced by the TranslationUnit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45223 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-19Cleaned up "-o" option to print "-o=<path>" instead of "-o=<string>" whenTed Kremenek
doing clang --help. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45215 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-19Added "-o" option to driver. ASTConsumers will need to be graduallyTed Kremenek
rewired to utilize this option. Renamed option --serialize-ast --serialize. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45213 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-19Removed storing inode and device number in TranslationUnit.Ted Kremenek
Added "SourceFile" string to TranslationUnit to record corresponding source file. Updated serialization of TranslationUnits and logic in the driver to correctly pass the source file information to the serializer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45211 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-19Moved generation of the name of the serialized AST file intoTed Kremenek
CreateASTSerializer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45201 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-18Moved ReadBitcodeFile and EmitBitcodeFile out of TranslationUnit and made themTed Kremenek
the standalone functions ReadASTBitcodeFile and EmitASTBitcodeFile respectively. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45180 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-18Moved TranslationUnit from Driver to AST library.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45175 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-17Start reading the headermap header, drop the 'errorstr' argument toChris Lattner
the create method. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45109 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-17Sink getName into DirectoryLookup to simplify the client in clang.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45106 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-17Fixed 80 col violation.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45104 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-17Added driver option -Wno-format-nonliteral to silence format string relatedTed Kremenek
warnings. This flag is the inverse of to GCC's -Wformat-nonliteral option (in the clang driver, these warnings are on by default). Patch provided by Shantonu Sen. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45103 91177308-0d34-0410-b5e6-96231b3b80d8