| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
No functionality change.
llvm-svn: 178402
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Evaluating a C++ new expression now includes generating an intermediate
ExplodedNode, and this node could very well represent a previously-
reachable state in the ExplodedGraph. If so, we can short-circuit the
rest of the evaluation.
Caught by the assertion a few lines later.
<rdar://problem/13510065>
llvm-svn: 178401
|
| |
|
|
|
|
|
|
|
|
|
| |
Sample output:
#0 void construct(pointer __p, llvm::ImutAVLTree<llvm::ImutContainerInfo<clang::ento::BugType *> > *const &__val)
#1 void push_back(const value_type &__x)
#2 void destroy()
#3 void release()
#4 void ~ImmutableSet()
llvm-svn: 178400
|
| |
|
|
| |
llvm-svn: 178398
|
| |
|
|
| |
llvm-svn: 178397
|
| |
|
|
|
|
| |
+ Refactoring.
llvm-svn: 178388
|
| |
|
|
|
|
| |
MallocChecker.cpp factored out to NewDelete-intersections.mm
llvm-svn: 178387
|
| |
|
|
| |
llvm-svn: 178383
|
| |
|
|
|
|
|
|
|
|
|
|
| |
visitor for nil receiver
We can check if the receiver is nil in the node that corresponds to the StmtPoint of the message send.
At that point, the receiver is guaranteed to be live. We will find at least one unreclaimed node due to
my previous commit (look for StmtPoint instead of PostStmt) and the fact that the nil receiver nodes are tagged.
+ a couple of extra tests.
llvm-svn: 178381
|
| |
|
|
|
|
|
|
|
|
| |
trackNullOrUndefValue.
trackNullOrUndefValue tries to find the first node that matches the statement it is tracking.
Since we collect PostStmt nodes (in node reclamation), none of those might be on the
current path, so relax the search to look for any StmtPoint.
llvm-svn: 178380
|
| |
|
|
| |
llvm-svn: 178378
|
| |
|
|
|
|
|
|
|
|
|
|
| |
When using modules we should not ignore overridden methods from
categories that are hidden because the module is not visible.
This will give more consistent results (when imports change) and it's more
correct since the methods are indeed overridden even if they are not "visible"
for lookup purposes.
rdar://13350796
llvm-svn: 178374
|
| |
|
|
|
|
| |
stderr instead of capturing them.
llvm-svn: 178373
|
| |
|
|
|
|
|
|
| |
them
for the IDE case, also create a symlink inside the libclang.dylib directory.
llvm-svn: 178372
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
The array will decay into a pointer, creating an unexpected result.
sizeof(array + int) is an easy to make typo for sizeof(array) + int.
This was motivated by a NetBSD security bug, used sizeof(key - r) instead of
sizeof(key) - r, reducing entropy in a random number generator.
http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/kern/subr_cprng.c.diff?r1=1.14&r2=1.15&only_with_tag=MAIN&f=h
Differential Revision: http://llvm-reviews.chandlerc.com/D571
llvm-svn: 178371
|
| |
|
|
|
|
|
|
|
| |
* Store the .block_descriptor (instead of self) in the alloca so we
can guarantee that all captured variables are available at -O0.
* Add the missing OpDeref for the alloca.
rdar://problem/12767564
llvm-svn: 178361
|
| |
|
|
|
|
|
|
| |
* Let DIType for block-captured self to point to the completed cached
interface type.
rdar://problem/12767564
llvm-svn: 178360
|
| |
|
|
| |
llvm-svn: 178358
|
| |
|
|
| |
llvm-svn: 178351
|
| |
|
|
| |
llvm-svn: 178335
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
We already avoided warning for
extern "C" const char *Version_string = "2.9";
now we also don't produce any warnings for
extern "C" {
extern const char *Version_string2 = "2.9";
}
llvm-svn: 178333
|
| |
|
|
| |
llvm-svn: 178331
|
| |
|
|
| |
llvm-svn: 178330
|
| |
|
|
|
|
| |
variables, not just ones with explicit initializers
llvm-svn: 178322
|
| |
|
|
| |
llvm-svn: 178321
|
| |
|
|
| |
llvm-svn: 178320
|
| |
|
|
| |
llvm-svn: 178318
|
| |
|
|
|
|
|
|
|
| |
for the analyzer.
This setting still isn't enabled yet in the analyzer. This is
just prep work.
llvm-svn: 178317
|
| |
|
|
|
|
|
|
| |
'isa' ivar is accessed provided it is the first
ivar. Fixit hint will follow in another patch.
This is continuation of // rdar://13503456
llvm-svn: 178313
|
| |
|
|
| |
llvm-svn: 178311
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
“newed” pointers to escape
Add a new callback that notifies checkers when a const pointer escapes. Currently, this only works
for const pointers passed as a top level parameter into a function. We need to differentiate the const
pointers escape from regular escape since the content pointed by const pointer will not change;
if it’s a file handle, a file cannot be closed; but delete is allowed on const pointers.
This should suppress several false positives reported by the NewDelete checker on llvm codebase.
llvm-svn: 178310
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
participates in the computation of the nil we warn about.
We should only suppress a bug report if the IDCed or null returned nil value is directly related to the value we are warning about. This was
not the case for nil receivers - we would suppress a bug report that had an IDCed nil receiver on the path regardless of how it’s
related to the warning.
1) Thread EnableNullFPSuppression parameter through the visitors to differentiate between tracking the value which
is directly responsible for the bug and other values that visitors are tracking (ex: general tracking of nil receivers).
2) in trackNullOrUndef specifically address the case when a value of the message send is nil due to the receiver being nil.
llvm-svn: 178309
|
| |
|
|
|
|
|
| |
This covers a few cases where the class of a member pointer is not a
CXXRecordDecl.
llvm-svn: 178307
|
| |
|
|
|
|
|
| |
I'm not 100% sure what should happen here to find the real
CXXRecordDecl.
llvm-svn: 178297
|
| |
|
|
|
|
|
| |
To do this, thread DiagnosticErrorTrap's hasUnrecoverableErrorOccurred through
to Scope.
llvm-svn: 178294
|
| |
|
|
|
|
|
| |
Wouldn't it be cool if we had a compiler for Windows that could warn
about these things?
llvm-svn: 178289
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This also relaxes the requirement on Windows that the member pointer
class type be a complete type (http://llvm.org/PR12070). We still ask
for a complete type to instantiate any templates (MSVC does this), but
if that fails we continue as normal, relying on any inheritance
attributes on the declaration.
Reviewers: rjmccall
CC: triton, timurrrr, cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D568
llvm-svn: 178283
|
| |
|
|
|
|
|
|
| |
is accessed via accessing 'isa' ivar to use
object_getClass/object_setClass apis.
// rdar://13503456
llvm-svn: 178282
|
| |
|
|
|
|
|
|
|
| |
The suggestion was already in the text of the note; this just adds the
actual fixit and the appropriate test cases.
Patch by Alexander Zinenko!
llvm-svn: 178274
|
| |
|
|
|
|
|
|
|
|
|
| |
likely be implicitly truncated:
* All forms of Bitwise-and, bitwise-or, and integer multiplication.
* The assignment form of integer addition, subtraction, and exclusive-or
* The RHS of the comma operator
* The LHS of left shifts.
llvm-svn: 178273
|
| |
|
|
|
|
|
| |
This is about the GNU Binutils' assembler and linker, so reflect that in the
name.
llvm-svn: 178272
|
| |
|
|
|
|
|
|
| |
The concept of such a software distribution is not tied to the Linux kernel;
for example Debian GNU/Linux, Debian GNU/Hurd, and Debian GNU/kFreeBSD all
share the same source packages and generally the same user-space configuration.
llvm-svn: 178270
|
| |
|
|
| |
llvm-svn: 178264
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is an optional variant of the CFG. This allows analyses to model whether
or not a static initializer has run, e.g.:
static Foo x = bar();
For basic dataflow analysis in Sema we will just assume that the initializer
always runs. For the static analyzer we can use this branch to accurately
track whether or not initializers are on.
This patch just adds the (opt-in) functionality to the CFG. The
static analyzer still needs to be modified to adopt this feature.
llvm-svn: 178263
|
| |
|
|
|
|
|
|
|
| |
Comments before preprocessor directives used to be stored with InPPDirective
flag set, which prevented correct comment splitting in this case. Fixed by
flushing comments before switching on InPPDirective. Added a new test and fixed
one of the existing tests.
llvm-svn: 178261
|
| |
|
|
| |
llvm-svn: 178255
|
| |
|
|
|
|
|
|
| |
+ Improved display names for allocators and deallocators
The checker checks if a deallocation function matches allocation one. ('free' for 'malloc', 'delete' for 'new' etc.)
llvm-svn: 178250
|
| |
|
|
| |
llvm-svn: 178247
|
| |
|
|
|
|
|
|
| |
allocate memory in heap.
+ Improved test coverage for cplusplus.NewDelete checker.
llvm-svn: 178244
|
| |
|
|
|
|
|
| |
gcc provides -mpopcntd and -mno-popcntd for controlling the popcntd target
feature; support these options as well.
llvm-svn: 178235
|