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
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.
llvm-svn: 49875
currently doesn't pass in the Preprocessor from the driver, so we don't get
syntax highlighting when we create HTMLDiagnostics in that way.
llvm-svn: 49796
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 :).
llvm-svn: 49778
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.
llvm-svn: 48989
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.
llvm-svn: 48036
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.
llvm-svn: 47285
--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.
llvm-svn: 47146
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.
llvm-svn: 46791
BuildSerializer. The former serializes a single translation unit to a
corresponding .ast file. The second serializes ASTs to a common emission
direction. The latter is not fully implemented yet.
llvm-svn: 45232
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.
llvm-svn: 45211
a bug where the statement pretty-printer used iostreams but the AST printer
did not. This was an issue when dumping ASTs to something other than stderr.
Updated SerializationTest to use the new iostreams interface for the AST printer.
llvm-svn: 44417
which is now used (or subclasssed) by the ASTConsumers. This new class
stores a FILE* that is used for writing, instead of just hardwiring output
to stderr (it defaults to stderr if no FILE* is provided).
Modified CreateASTPrinter() to accept a FILE* for printing.
llvm-svn: 44377
serialization logic as well as driver code is now in
Driver/SerializationTest.cpp. The status of this code is that it
should be used by no clients.
Added --test-pickling option to driver to run the serialization code.
Modified IdentifierInfo and IdentifierTable to have friend classes
that permit object serialization. Such friendship may not be needed
in the final design.
llvm-svn: 43052