aboutsummaryrefslogtreecommitdiff
path: root/Driver/clang.cpp
AgeCommit message (Collapse)Author
2007-09-25Added "CheckASTConsumer", a function that generalizesTed Kremenek
"CheckDiagnostics" (used for -parse-ast-check) to check the diagnostics of any ASTConsumer. Reimplemented CheckDiagnostics to use CheckASTConsumer instead. Added driver option -warn-dead-stores-check, which checks the diagnostics generated by the DeadStores checker. This is implemented using CheckASTConsumer.111 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42310 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-25Changed command line options "-check-dead-stores" andTed Kremenek
"-check-uninit-values" to "-warn-dead-stores" and "-warn-uninit-values" git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42307 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-19Added support to clang driver to view ASTs using GraphViz. ThisTed Kremenek
functionality is still preliminary. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42152 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-17Made driver flag --check-uninit-values more self-explanatory.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42062 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-17UninitialuzedValues now only tracks BlockVarDecls; obviating false positives ↵Ted Kremenek
with globals and function parameters. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42055 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-16switch the llvm emitter to ASTConsumer interface.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42013 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-15switch the various CFG-based stuff over to using ASTConsumer interface,Chris Lattner
this eliminates their dependence on the preprocessor and eliminates some duplicated code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41993 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-15convert ast printer and dumper ocver to ASTConsumer interface,Chris Lattner
genericizing them and eliminating boilerplate code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41992 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-15add a new ASTConsumer consumer to simplify stuff in the driver.Chris Lattner
Switch -parse-ast over to it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41991 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-06Added "Dead Stores", a flow-sensitive checker that checks for storesTed Kremenek
to variables that are no longer live. This analysis is built on top of CFGs and the LiveVariables analysis. changes to driver: added driver option "-check-dead-stores" to run the analysis git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41754 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-06LiveVariables:Ted Kremenek
- Finished 99% of analysis logic. Probably a few bugs. - Added querying functions to query liveness. - Added better pretty printing of liveness. - Added better bookkeeping of per-variable liveness information. - Added LiveVariablesAuditor interface, which allows "lazy" querying of intra-basic block liveness information. Driver: - Minor cleanups involved in dumping liveness information. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41753 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-06Added an early implementation of Live-Variables analysis built onTed Kremenek
source-level CFGs. This code may change significantly in the near future as we explore different means to implement dataflow analyses. Added a driver option, -dump-live-variables, to view the output of live variable analysis. This output is very ALPHA; it will be improved shortly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41737 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-29Added GraphTraits to source-level CFGs (CFG and CFGBlock) to allowTed Kremenek
(LLVM-provided) graph algorithms such as DFS and graph visualization to work effortless on source-level CFGs. Further cleanup on pretty printing of CFGs. CFGBlock::dump and CFGBlock::print now take the parent CFG as an argument. This allows CFGBlocks to print their own appropriate label indicating whether or not they are the Entry/Exit/IndirectGotoBlock without the CFG::print routine doing it instead. Added Graphviz visualization for CFGs: CFG::viewCFG. This employs the GraphTraits just implemented. Added "-view-cfg" mode the to clang driver. This is identical to "-dump-cfg" except that it calls Graphviz to visualize the CFGs instead of dumping them to the terminal. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41580 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-26Add isysroot support, patch by Keith BauerChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41455 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-21Added CFG infrastructure (CFG.cpp and CFG.h) for clang ASTs.Ted Kremenek
Added builder code to translate ASTs to CFGs. This currently supports if, return, and non-control flow statements. Added pretty-printer to debug CFGs. Added a "-dump-cfg" option to the clang driver to dump CFGs for code sent through the frontend. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41252 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-08add a new AST dumper interface (E->dump()). This dumps outChris Lattner
the AST in a structural, non-pretty, form useful for understanding the AST. It isn't quite done yet, but is already somewhat useful. For this example: int test(short X, long long Y) { return X < ((100)); } we get (with -parse-ast-dump): int test(short X, long long Y) (CompoundStmt 0x2905ce0 (ReturnStmt 0x2905cd0 (BinaryOperator 0x2905cb0 '<' (ImplicitCastExpr 0x2905ca0 (DeclRefExpr 0x2905c20 Decl='X' 0x2905bb0)) (ParenExpr 0x2905c80 (ParenExpr 0x2905c60 (IntegerLiteral 0x2905c40 100)))))) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40954 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-22GCC doesn't set __STDC_VERSION__ usually. It never sets it inChris Lattner
C++ mode, even gnu C++ mode. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40408 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-22when running in -E mode on multiple files, there is no reason to accumulate Chris Lattner
fileid's and macroid's across files. Clearing between files keeps the tables smaller and slightly speeds up compilation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40383 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-21Return an exit code of 1 if errors occur, not an exit code equal to the # ↵Chris Lattner
errors :) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40189 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-20At one point there were going to be lexer and parser tokens.Chris Lattner
Since that point is now long gone, we should rename LexerToken to Token, as it is the only kind of token we have. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40105 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-16Add support for C++'0x keywords, patch by Doug GregorChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@39897 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-11Stage two of getting CFE top correct.Reid Spencer
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@39734 91177308-0d34-0410-b5e6-96231b3b80d8