| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
| |
It is valid to do this:
printf("%u", (int)x);
But if we see this:
printf("%lu", (int)x);
...our fixit should suggest %d, not %u.
llvm-svn: 172739
|
|
|
|
|
|
|
|
| |
it apart from [[gnu::noreturn]] / __attribute__((noreturn)), since their
semantics are not equivalent (for instance, we treat [[gnu::noreturn]] as
affecting the function type, whereas [[noreturn]] does not).
llvm-svn: 172691
|
|
|
|
|
|
| |
brought into 'clang' namespace by clang/Basic/LLVM.h
llvm-svn: 172323
|
|
|
|
| |
llvm-svn: 172195
|
|
|
|
|
|
|
|
|
| |
First check only wrapped with i==8, second wrapped at i==2,8,18,28,...
This fix restores the intended behavior: i==8,18,28,...
Found with -fsanitize=integer.
llvm-svn: 171718
|
|
|
|
| |
llvm-svn: 171367
|
|
|
|
| |
llvm-svn: 171238
|
|
|
|
| |
llvm-svn: 170907
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
deterministic.
Commit message for r170826:
[analyzer] Traverse the Call Graph in topological order.
Modify the call graph by removing the parentless nodes. Instead all
nodes are children of root to ensure they are all reachable. Remove the
tracking of nodes that are "top level" or global. This information is
not used and can be obtained from the Decls stored inside
CallGraphNodes.
Instead of existing ordering hacks, analyze the functions in topological
order over the Call Graph.
Together with the addition of devirtualizable ObjC message sends and
blocks to the call graph, this gives around 6% performance improvement
on several large ObjC benchmarks.
llvm-svn: 170906
|
|
|
|
|
|
|
|
| |
./bin/clang -cc1 -internal-isystem /home/espindola/llvm/build/lib/clang/3.3/include/ -analyze -analyzer-checker=debug.DumpCallGraph /home/espindola/llvm/clang/test/Analysis/debug-CallGraph.c -fblocks
changes in each run.
llvm-svn: 170829
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Modify the call graph by removing the parentless nodes. Instead all
nodes are children of root to ensure they are all reachable. Remove the
tracking of nodes that are "top level" or global. This information is
not used and can be obtained from the Decls stored inside
CallGraphNodes.
Instead of existing ordering hacks, analyze the functions in topological
order over the Call Graph.
Together with the addition of devirtualizable ObjC message sends and
blocks to the call graph, this gives around 6% performance improvement
on several large ObjC benchmarks.
llvm-svn: 170826
|
|
|
|
|
|
|
|
|
|
|
| |
This paves the road for constructing a better function dependency graph.
If we analyze a function before the functions it calls and inlines,
there is more opportunity for optimization.
Note, we add call edges to the called methods that correspond to
function definitions (declarations with bodies).
llvm-svn: 170825
|
|
|
|
| |
llvm-svn: 169669
|
|
|
|
|
|
|
|
|
| |
BlockDataRegion. Fixes <rdar://problem/12415065>.
We still need to do a recursive walk to determine all static/global variables
referenced by a block, which is needed for region invalidation.
llvm-svn: 169481
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For most cases where a conversion specifier doesn't match an argument,
we usually guess that the conversion specifier is wrong. However, if
the argument is an integer type and the specifier is %C, it's likely
the user really did mean to print the integer as a character.
(This is more common than %c because there is no way to specify a unichar
literal -- you have to write an integer literal, such as '0x2603',
and then cast it to unichar.)
This does not change the behavior of %S, since there are fewer cases
where printing a literal Unicode *string* is necessary, but this could
easily be changed in the future.
<rdar://problem/11982013>
llvm-svn: 169400
|
|
|
|
|
|
|
| |
We tried to account for 'uint8_t' by saying that /typedefs/ of 'char'
should be corrected as %hhd rather than %c, but the condition was wrong.
llvm-svn: 169397
|
|
|
|
|
|
| |
copy constructors.
llvm-svn: 169350
|
|
|
|
|
|
| |
adjust checkAccess. No change in functionality.
llvm-svn: 169348
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
uncovered.
This required manually correcting all of the incorrect main-module
headers I could find, and running the new llvm/utils/sort_includes.py
script over the files.
I also manually added quite a few missing headers that were uncovered by
shuffling the order or moving headers up to be main-module-headers.
llvm-svn: 169237
|
|
|
|
| |
llvm-svn: 169095
|
|
|
|
|
|
|
|
|
| |
pull in all the generated Attr code.
Required to pull some functions out of line, but this shouldn't have a perf impact.
No functionality change.
llvm-svn: 169092
|
|
|
|
|
|
| |
2.5% using intelligent pruning of blocks during the final reporting pass.
llvm-svn: 168257
|
|
|
|
|
|
|
|
|
| |
an initial baseline for enqueued blocks, but use a simple DFS stack
for propagating changes quickly up back edges.
This provides a 3.5% reduction in -fsyntax-only time on sqlite3.c.
llvm-svn: 168241
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This code assigned the last created CFGBlock* to the variable 'Block',
which is a scratch variable which is null'ed out after a block is
completed. By assigning the last created block to 'Block', we start
editing a completed block, inserting CFGStmts that should be in
another block. This was the case with 'try'. The test case that
showed this had a while loop inside a 'try', and the logic before
the while loop was being included as part of the "condition block"
for the loop. This showed up as a bogus dead store, but could
have lots of implications.
Turns out this bug was replicated a few times within CFG.cpp, so
I went and fixed up those as well.
llvm-svn: 167788
|
|
|
|
| |
llvm-svn: 167351
|
|
|
|
| |
llvm-svn: 165836
|
|
|
|
| |
llvm-svn: 165835
|
|
|
|
|
|
| |
OSAtomicCompareAndSwap if the return type is not a boolean.
llvm-svn: 165774
|
|
|
|
|
|
| |
objc_atomicCompareAndSwap.
llvm-svn: 165743
|
|
|
|
| |
llvm-svn: 165339
|
|
|
|
|
|
|
|
| |
Clang will now honor the FP_CONTRACT pragma and emit LLVM
fmuladd intrinsics for expressions of the form A * B + C (when they occur in a
single statement).
llvm-svn: 164989
|
|
|
|
|
|
|
| |
- The size of the packed vector is often small, save mallocs using SmallBitVector.
- Copying SmallBitVectors is also cheap, remove a level of indirection.
llvm-svn: 164827
|
|
|
|
| |
llvm-svn: 164557
|
|
|
|
|
|
| |
so that they visually look like an AST dump.
llvm-svn: 164401
|
|
|
|
| |
llvm-svn: 164400
|
|
|
|
| |
llvm-svn: 164399
|
|
|
|
| |
llvm-svn: 164397
|
|
|
|
| |
llvm-svn: 164396
|
|
|
|
|
|
|
| |
where a call to function marked 'noreturn' is followed by unreachable
implicit destructor calls.
llvm-svn: 164394
|
|
|
|
|
|
| |
them being correctly constructed.
llvm-svn: 164392
|
|
|
|
| |
llvm-svn: 164391
|
|
|
|
| |
llvm-svn: 164348
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
when
their implementations are unavailable. Start by simulating dispatch_sync().
This change is largely a bunch of plumbing around something very simple. We
use AnalysisDeclContext to conjure up a fake function body (using the
current ASTContext) when one does not exist. This is controlled
under the analyzer-config option "faux-bodies", which is off by default.
The plumbing in this patch is largely to pass the necessary machinery
around. CallEvent needs the AnalysisDeclContextManager to get
the function definition, as one may get conjured up lazily.
BugReporter and PathDiagnosticLocation needed to be relaxed to handle
invalid locations, as the conjured body has no real source locations.
We do some primitive recovery in diagnostic generation to generate
some reasonable locations (for arrows and events), but it can be
improved.
llvm-svn: 164339
|
|
|
|
|
|
| |
as exclusive.
llvm-svn: 164332
|
|
|
|
|
|
| |
lock expressions.
llvm-svn: 164324
|
|
|
|
|
|
| |
is placed on a function that has no path to the exit block.
llvm-svn: 164244
|
|
|
|
|
|
|
| |
LOCKS_EXCLUDED is used on a method with a name that is is not a simple
identifier.
llvm-svn: 164242
|
|
|
|
| |
llvm-svn: 163775
|
|
|
|
|
|
| |
<rdar://problem/12061922>
llvm-svn: 163772
|
|
|
|
|
|
|
|
|
| |
These will warn under -Wformat-non-iso, and will still be rejected
outright on other platforms.
<rdar://problem/12061922>
llvm-svn: 163771
|