| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
toolchain flags for MIPS targets.
llvm-svn: 178232
|
|
|
|
|
|
|
|
| |
gcc provides -mmfcrf and -mno-mfcrf for controlling what we call
the mfocrf target feature. Also, PPC is now making use of the
static function AddTargetFeature used by the Mips Driver code.
llvm-svn: 178227
|
|
|
|
| |
llvm-svn: 178226
|
|
|
|
|
|
|
| |
typedef. Also don't warn on the _Atomic type specifier, just on the _Atomic
type qualifier.
llvm-svn: 178218
|
|
|
|
|
|
| |
type qualifier.
llvm-svn: 178217
|
|
|
|
| |
llvm-svn: 178211
|
|
|
|
|
|
| |
sugar for the _Atomic type specifier.
llvm-svn: 178210
|
|
|
|
|
|
|
|
|
| |
each of which was only present in one version:
* Give the right diagnostic for 'restrict' applied to a non-pointer, non-reference type.
* Don't reject 'restrict' applied indirectly to an Objective-C object pointer type (eg, through template instantiation).
llvm-svn: 178200
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When we are consuming the current token just to enter a new token stream, we push
the current token in the back of the stream so that we get it again.
Unfortunately this had the effect where if the current token is a code-completion one,
we would code-complete once during consuming it and another time after the stream ended.
Fix this by making sure that, in this case, ConsumeAnyToken() will consume a code-completion
token without invoking code-completion.
rdar://12842503
llvm-svn: 178199
|
|
|
|
|
|
| |
a pointer or reference type.
llvm-svn: 178198
|
|
|
|
|
|
| |
far from clear whether these have undefined behavior, and these checks are helping no-one. Keep the double->float overflow warnings, though, since those are useful in practice, even though it's unclear whether such operations have defined behavior.
llvm-svn: 178194
|
|
|
|
|
|
|
|
|
| |
Per feedback by Doug, we should avoid platform-specific implementations
in lib/Headers as much as possible.
This reverts commit r178110.
llvm-svn: 178181
|
|
|
|
|
|
|
| |
is accessing 'isa' as an object pointer.
// rdar://13503456. FixIt to follow in another patch.
llvm-svn: 178179
|
|
|
|
|
|
|
|
|
|
| |
These types will not have a CXXConstructExpr to do the initialization for
them. Previously we just used a simple call to ProgramState::bindLoc, but
that doesn't trigger proper checker callbacks (like pointer escape).
Found by Anton Yartsev.
llvm-svn: 178160
|
|
|
|
|
|
| |
comment
llvm-svn: 178153
|
|
|
|
|
|
|
|
|
| |
reclaimed
The visitor should look for the PreStmt node as the receiver is nil in the PreStmt and this is the node. Also, tag the nil
receiver nodes with a special tag for consistency.
llvm-svn: 178152
|
|
|
|
|
|
|
|
|
|
|
|
| |
affect the translation unit that
imports the module.
Getting diagnostic sections from modules properly working is a fixme.
rdar://13516663
llvm-svn: 178151
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: Insert extra new line before access specifiers.
Reviewers: djasper
Reviewed By: djasper
CC: cfe-commits, klimek
Differential Revision: http://llvm-reviews.chandlerc.com/D581
llvm-svn: 178149
|
|
|
|
|
|
|
|
|
|
|
| |
information about a particular module file.
This option can be useful for end users who want to know why they
ended up with a ton of different variants of the "std" module in their
module cache. This problem should go away over time, as we reduce the
need for module variants, but it will never go away entirely.
llvm-svn: 178148
|
|
|
|
| |
llvm-svn: 178146
|
|
|
|
|
|
| |
unqualified name lookup into declarations contexts represented by the qualified-id but not in the actual scope hierarchy.
llvm-svn: 178136
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Split line comments that exceed column limit + fixed leading whitespace
handling when splitting block comments.
Reviewers: djasper, klimek
Reviewed By: djasper
CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D577
llvm-svn: 178133
|
|
|
|
| |
llvm-svn: 178120
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
and _Builtin_intrinsics.sse2
Module "sse" implicitly exports module "sse2".
This is bad because we also have module "sse2" export module "sse" (as intended) so we end up with a cycle
in the module import graph:
1. sse2 -> (also imports) sse
2. sse -> (also imports) sse2
To eliminate the cycle remove 2.; importing module "sse2" will also import module "sse", but just importing
module "sse" will not also import module "sse2".
rdar://13240552
llvm-svn: 178117
|
|
|
|
|
|
|
|
| |
<type_traits>.
Patch by me and Ryan Molden.
llvm-svn: 178111
|
|
|
|
|
|
| |
This makes it identical with the system definition.
llvm-svn: 178110
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
this is a case where
the system macro uses a not identical definition compared to a macro from the clang headers.
For example (these come from different modules):
\#define LONG_MAX __LONG_MAX__ (clang's limits.h)
\#define LONG_MAX 0x7fffffffffffffffL (system's limits.h)
in which case don't mark them ambiguous to avoid the "ambiguous macro expansion" warning.
llvm-svn: 178109
|
|
|
|
| |
llvm-svn: 178107
|