| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(-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
|
| |
|
|
|
|
| |
elements (macros, enum constants, etc).
llvm-svn: 107675
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
if/while/switch/for statements to ensure that walking the children of
these statements actually works. Previously, we stored the condition
variable as a VarDecl. However, StmtIterator isn't able to walk from a
VarDecl to a set of statements, and would (in some circumstances) walk
beyond the end of the list of statements, cause Bad Behavior.
In this change, we've gone back to representing the condition
variables as DeclStmts. While not as memory-efficient as VarDecls, it
greatly simplifies iteration over the children.
Fixes the remainder of <rdar://problem/8104754>.
llvm-svn: 106504
|
| |
|
|
|
|
|
| |
Also rename ABSTRACT to ABSTRACT_STMT, in keeping with the other .def
files
llvm-svn: 104017
|
| |
|
|
|
|
|
| |
with no whitespace. This will allow statements to be referred to in
attribute TableGen files.
llvm-svn: 103087
|
| |
|
|
|
|
|
| |
whitespace which makes this patch unreadable. Will recommit without the
whitespace.
llvm-svn: 103086
|
| |
|
|
| |
llvm-svn: 103072
|
| |
|
|
|
|
|
|
|
|
| |
statements. Instead of the @try having a single @catch, where all of
the @catch's were chained (using an O(n^2) algorithm nonetheless),
@try just holds an array of its @catch blocks. The resulting AST is
slightly more compact (not important) and better represents the actual
language semantics (good).
llvm-svn: 102221
|
| |
|
|
|
|
| |
variants. This fixes neon inline asm which my patch for PR6780 broke.
llvm-svn: 102181
|
| |
|
|
| |
llvm-svn: 100449
|
| |
|
|
| |
llvm-svn: 100027
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
dyn_cast) invocations for C++ and Objective-C types, declarations,
expressions, and statements. The statistics will be printed when
-print-stats is provided to Clang -cc1, with results such as:
277073 clang - Number of checks for C++ declaration nodes
13311 clang - Number of checks for C++ expression nodes
18 clang - Number of checks for C++ statement nodes
174182 clang - Number of checks for C++ type nodes
92300 clang - Number of checks for Objective-C declaration nodes
9800 clang - Number of checks for Objective-C expression nodes
7 clang - Number of checks for Objective-C statement nodes
65733 clang - Number of checks for Objective-C type nodes
The statistics are only gathered when NDEBUG is not defined, since
they introduce potentially-expensive operations into very low-level
routines (isa).
llvm-svn: 99912
|
| |
|
|
|
|
| |
instead allocate the statements after the object.
llvm-svn: 95199
|
| |
|
|
| |
llvm-svn: 95190
|
| |
|
|
|
|
| |
appropriately. Call out a few missing cases in the expression mangler.
llvm-svn: 95176
|
| |
|
|
| |
llvm-svn: 94951
|
| |
|
|
| |
llvm-svn: 94926
|
| |
|
|
| |
llvm-svn: 94925
|
| |
|
|
| |
llvm-svn: 94922
|
| |
|
|
| |
llvm-svn: 94921
|
| |
|
|
| |
llvm-svn: 94918
|
| |
|
|
| |
llvm-svn: 94361
|
| |
|
|
| |
llvm-svn: 92526
|
| |
|
|
|
|
| |
into garbage values.
llvm-svn: 92115
|
| |
|
|
|
|
| |
returned by ForStmt to include the initializer of the condition variable.
llvm-svn: 92112
|
| |
|
|
|
|
| |
the condition variable.
llvm-svn: 92104
|
| |
|
|
|
|
| |
the condition variable.
llvm-svn: 92100
|
| |
|
|
|
|
|
|
|
|
| |
variable initializer and the other expressions in an IfStmt.
This change required adding a 'DoDestroy()' method for IfStmt that did
not include destroying the initializer (since that is owned by the
VarDecl).
llvm-svn: 92089
|
| |
|
|
|
|
| |
expressions (via StmtIterator), as those expressions are owned by the Decls and Types (which are destroyed elsewhere). This fixes a crasher reported in <rdar://problem/7487294>.
llvm-svn: 91990
|
| |
|
|
| |
llvm-svn: 90153
|
| |
|
|
|
|
| |
functionality change.
llvm-svn: 90078
|
| |
|
|
| |
llvm-svn: 84436
|
| |
|
|
| |
llvm-svn: 81346
|
| |
|
|
| |
llvm-svn: 79916
|
| |
|
|
| |
llvm-svn: 78452
|
| |
|
|
|
|
|
| |
to allow sharing of nodes. Simplifies some aspects of template
instantiation, and fixes both PR3444 and <rdar://problem/6757457>.
llvm-svn: 78450
|
| |
|
|
|
|
|
| |
or expression (Destroy) from the virtual function used to actually
destroy a given expression (DoDestroy).
llvm-svn: 78375
|
| |
|
|
| |
llvm-svn: 72415
|
| |
|
|
| |
llvm-svn: 72035
|
| |
|
|
| |
llvm-svn: 71903
|
| |
|
|
| |
llvm-svn: 71823
|
| |
|
|
| |
llvm-svn: 70105
|
| |
|
|
|
|
|
| |
This completes support for all of C (+ extensions). We can (again)
build a PCH file for Carbon.h.
llvm-svn: 69385
|
| |
|
|
|
|
| |
compound, case, default, if, switch, and break statements.
llvm-svn: 69329
|
| |
|
|
|
|
| |
operand. This matches llvm-gcc and fixes PR3908.
llvm-svn: 68371
|
| |
|
|
| |
llvm-svn: 66738
|
| |
|
|
| |
llvm-svn: 66732
|
| |
|
|
| |
llvm-svn: 66618
|
| |
|
|
| |
llvm-svn: 66614
|
| |
|
|
|
|
|
|
| |
Sema/asm.c:64:9: error: invalid % escape in inline assembly string
asm("%!" : ); // expected-error {{invalid % escape in inline assembly string}}
~~^~
llvm-svn: 66606
|