| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
libclangGRCore
llvm-svn: 122421
|
|
|
|
|
|
|
|
|
| |
to libAnalysis. Similar to Format (format string checking),
CocoaConventions has the
potential to serve clients other than the
static analyzer.
llvm-svn: 122040
|
|
|
|
|
|
|
|
| |
diagnostic notes
the sequence of events; useful for testing.
llvm-svn: 120770
|
|
|
|
| |
llvm-svn: 120696
|
|
|
|
|
|
| |
reflects what the class actually does.
llvm-svn: 120605
|
|
|
|
| |
llvm-svn: 116164
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
instead"
This reverts commit r113631
Conflicts:
CMakeLists.txt
lib/CodeGen/CMakeLists.txt
llvm-svn: 113817
|
|
|
|
|
|
| |
of whatever we were using before...
llvm-svn: 113631
|
|
|
|
|
|
| |
mutex can be nil
llvm-svn: 113573
|
|
|
|
|
|
| |
statistics about analysis. Running clang with the -analyzer-stats flag will emit warnings containing the information. We can then run a postanalysis script to take this data and give useful information about how much the analyzer missed in a project.
llvm-svn: 113568
|
|
|
|
| |
llvm-svn: 113489
|
|
|
|
|
|
| |
their own CheckerHelpers file.
llvm-svn: 109560
|
|
|
|
|
|
|
|
|
|
| |
analyzer checks.
- Created a new class to do post-analysis
- Updated several test cases with unreachable code to expect a warning
- Added some general tests
llvm-svn: 109286
|
|
|
|
| |
llvm-svn: 108668
|
|
|
|
| |
llvm-svn: 108621
|
|
|
|
|
|
|
| |
Let AnalysisContext contain a TranslationUnit.
Let CallEnter refer to an AnalysisContext instead of a FunctionDecl.
llvm-svn: 108617
|
|
|
|
|
|
| |
null-terminated strings and memory blocks. Currently only checks memcpy(), memmove(), and bcopy(), but this is intended to be expanded soon.
llvm-svn: 107722
|
|
|
|
| |
llvm-svn: 107709
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(-analyzer-idempotent-operation). Finds idempotent and/or tautological operations in a path sensitive context, flagging operations that have no effect or a predictable effect.
Example:
{
int a = 1;
int b = 5;
int c = b / a; // a is 1 on all paths
}
- New IdempotentOperationChecker class
- Moved recursive Stmt functions in r107675 to IdempotentOperationChecker
- Minor refactoring of SVal to allow checking for any integer
- Added command line option for check
- Added basic test cases
llvm-svn: 107706
|
|
|
|
| |
llvm-svn: 106188
|
|
|
|
|
|
| |
This is the start.
llvm-svn: 106082
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
library configuration
Currently, all AST consumers are located in the Frontend library,
meaning that in a shared library configuration, Frontend has a
dependency on Rewrite, Checker and CodeGen. This is suboptimal for
clients which only wish to make use of the frontend. CodeGen in
particular introduces a large number of unwanted dependencies.
This patch breaks the dependency by moving all AST consumers with
dependencies on Rewrite, Checker and/or CodeGen to their respective
libraries. The patch therefore introduces dependencies in the other
direction (i.e. from Rewrite, Checker and CodeGen to Frontend).
After applying this patch, Clang builds correctly using CMake and
shared libraries ("cmake -DBUILD_SHARED_LIBS=ON").
N.B. This patch includes file renames which are indicated in the
patch body.
Changes in this revision of the patch:
- Fixed some copy-paste mistakes in the header files
- Modified certain aspects of the coding to comply with the LLVM
Coding Standards
llvm-svn: 106010
|
|
|
|
| |
llvm-svn: 105708
|
|
|
|
|
|
| |
the function call is left where the local variable is declared.
llvm-svn: 105602
|
|
|
|
|
|
|
|
| |
The macros required for DeclNodes use have changed to match the use of
StmtNodes. The FooFirst enumerator constants have been named firstFoo
to match usage elsewhere.
llvm-svn: 105165
|
|
|
|
|
|
|
| |
whether the size of the symbolic region is a multiple of the size of T.
Fixes PR6123 and PR7217.
llvm-svn: 104584
|
|
|
|
| |
llvm-svn: 103077
|
|
|
|
| |
llvm-svn: 101772
|
|
|
|
| |
llvm-svn: 99269
|
|
|
|
| |
llvm-svn: 99191
|
|
|
|
|
|
|
|
|
|
|
|
| |
for calls
to various MacOS X functions. The checks in BasicObjCFoundationChecks.cpp will
gradually be migrated here.
As a first check, check that when 'dispatch_once()' is passed a predicate value
that has non-local storage.
llvm-svn: 97116
|
|
|
|
|
|
|
|
| |
unused
when it is explicitly marked as unused via __attribute__((unused)).
llvm-svn: 97104
|
|
|
|
|
|
|
|
|
|
|
| |
for calls
to various unix/posix functions, e.g. 'open()'.
As a first check, check that when 'open()' is passed 'O_CREAT' that it has
a third argument.
llvm-svn: 97086
|
|
|
|
| |
llvm-svn: 96341
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
-analyzer-check-llvm-conventions
Currently these checks are intended to be largely syntactical, but may get more
sophisticated over time.
As an initial foray into this brave new world, emit a static analyzer warning
when binding a temporary 'std::string' to an 'llvm::StringRef' where the
lifetime of the 'std::string' does not outlive the 'llvm::StringRef'.
llvm-svn: 96147
|
|
|
|
|
|
|
|
| |
a different return type. While we don't emit any errors (yet), at
least we avoid cases where we might crash because of an assertion
failure later on (when the return type differs from what is expected).
llvm-svn: 95268
|
|
|
|
| |
llvm-svn: 95215
|
|
|
|
| |
llvm-svn: 94663
|
|
(1) libAnalysis is a generic analysis library that can be used by
Sema. It defines the CFG, basic dataflow analysis primitives, and
inexpensive flow-sensitive analyses (e.g. LiveVariables).
(2) libChecker contains the guts of the static analyzer, incuding the
path-sensitive analysis engine and domain-specific checks.
Now any clients that want to use the frontend to build their own tools
don't need to link in the entire static analyzer.
This change exposes various obvious cleanups that can be made to the
layout of files and headers in libChecker. More changes pending. :)
This change also exposed a layering violation between AnalysisContext
and MemRegion. BlockInvocationContext shouldn't explicitly know about
BlockDataRegions. For now I've removed the BlockDataRegion* from
BlockInvocationContext (removing context-sensitivity; although this
wasn't used yet). We need to have a better way to extend
BlockInvocationContext (and any LocationContext) to add
context-sensitivty.
llvm-svn: 94406
|