| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
| |
Like properties, loading from a weak ivar twice in the same function can
give you inconsistent results if the object is deallocated between the
two loads. It is safer to assign to a strong local variable and use that.
Second half of <rdar://problem/12280249>.
llvm-svn: 164855
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The motivating example:
if (self.weakProp)
use(self.weakProp);
As with any non-atomic test-then-use, it is possible a weak property to be
non-nil at the 'if', but be deallocated by the time it is used. The correct
way to write this example is as follows:
id tmp = self.weakProp;
if (tmp)
use(tmp);
The warning is controlled by -Warc-repeated-use-of-receiver, and uses the
property name and base to determine if the same property on the same object
is being accessed multiple times. In cases where the base is more
complicated than just a single Decl (e.g. 'foo.bar.weakProp'), it picks a
Decl for some degree of uniquing and reports the problem under a subflag,
-Warc-maybe-repeated-use-of-receiver. This gives a way to tune the
aggressiveness of the warning for a particular project.
The warning is not on by default because it is not flow-sensitive and thus
may have a higher-than-acceptable rate of false positives, though it is
less noisy than -Wreceiver-is-weak. On the other hand, it will not warn
about some cases that may be legitimate issues that -Wreceiver-is-weak
will catch, and it does not attempt to reason about methods returning weak
values.
Even though this is not a real "analysis-based" check I've put the bug
emission code in AnalysisBasedWarnings for two reasons: (1) to run on
every kind of code body (function, method, block, or lambda), and (2) to
suggest that it may be enhanced by flow-sensitive analysis in the future.
The second (smaller) half of this work is to extend it to weak locals
and weak ivars. This should use most of the same infrastructure.
Part of <rdar://problem/12280249>
llvm-svn: 164854
|
|
|
|
|
|
| |
struct assignment.
llvm-svn: 164853
|
|
|
|
|
|
| |
Improve performance of StringExtractor::GetHexS8().
llvm-svn: 164852
|
|
|
|
|
|
|
| |
record, skip at least one element from the InitListExpr to avoid an infinite
loop if we're initializing an array of unknown bound.
llvm-svn: 164851
|
|
|
|
|
|
| |
rdar://9142819
llvm-svn: 164850
|
|
|
|
| |
llvm-svn: 164849
|
|
|
|
| |
llvm-svn: 164848
|
|
|
|
|
|
|
|
|
| |
In reStructuredText, indented blocks denote block quotes [1]. This list
is not a block quote.
[1]. http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#block-quotes
llvm-svn: 164847
|
|
|
|
| |
llvm-svn: 164846
|
|
|
|
| |
llvm-svn: 164845
|
|
|
|
|
|
|
|
| |
constructing the ObjCInterfaceDecl for an ISA,
we'd continue and try to use that Decl anyway,
possibly causing a crash.
llvm-svn: 164844
|
|
|
|
|
|
| |
now be printed with highlighting.
llvm-svn: 164843
|
|
|
|
| |
llvm-svn: 164842
|
|
|
|
|
|
| |
Tijl Coosemans!
llvm-svn: 164841
|
|
|
|
| |
llvm-svn: 164840
|
|
|
|
|
|
| |
functions. Reworked one of the conditionals. No functional changes.
llvm-svn: 164839
|
|
|
|
|
|
|
| |
use the integrated pre-processor, preprocess in objective-c++ mode.
// rdar://12189793.
llvm-svn: 164836
|
|
|
|
|
|
|
|
| |
second output of SUB with first output of TEST.
PR13966
llvm-svn: 164835
|
|
|
|
| |
llvm-svn: 164833
|
|
|
|
|
|
| |
does not impact any of the implementation of libc++, and does not impact the ABI in any way.
llvm-svn: 164832
|
|
|
|
|
|
| |
Patch committed on behalf of Kirill Uhanov
llvm-svn: 164831
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously the analyzer treated all inlined constructors like lvalues,
setting the value of the CXXConstructExpr to the newly-constructed
region. However, some CXXConstructExprs behave like rvalues -- in
particular, the implicit copy constructor into a pass-by-value argument.
In this case, we want only the /contents/ of a temporary object to be
passed, so that we can use the same "copy each argument into the
parameter region" algorithm that we use for scalar arguments.
This may change when we start modeling destructors of temporaries,
but for now this is the last part of <rdar://problem/12137950>.
llvm-svn: 164830
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
An rvalue has no address, but calling a C++ member function requires a
'this' pointer. This commit makes the analyzer create a temporary region
in which to store the struct rvalue and use as a 'this' pointer whenever
a member function is called on an rvalue, which is essentially what
CodeGen does.
More of <rdar://problem/12137950>. The last part is tracking down the
C++ FIXME in array-struct-region.cpp.
llvm-svn: 164829
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Struct rvalues are represented in the analyzer by CompoundVals,
LazyCompoundVals, or plain ConjuredSymbols -- none of which have associated
regions. If the entire structure is going to persist, this is not a
problem -- either the rvalue will be assigned to an existing region, or
a MaterializeTemporaryExpr will be present to create a temporary region.
However, if we just need a field from the struct, we need to create the
temporary region ourselves.
This is inspired by the way CodeGen handles calls to temporaries;
support for that in the analyzer is coming next.
Part of <rdar://problem/12137950>
llvm-svn: 164828
|
|
|
|
|
|
|
| |
- 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: 164826
|
|
|
|
|
|
| |
when we have a StopInfo object.
llvm-svn: 164825
|
|
|
|
|
|
|
|
|
|
|
| |
diagnostic count.
If a DiagnosticConsumer sub-class overwrites IncludeInDiagnosticCounts,
this should change diagnostic counts. However, it currently also
influences Diag.ErrorOccurred, which in turn influences the behavior of
parsing and semantic analysis (in a way that can make it crash).
llvm-svn: 164824
|
|
|
|
| |
llvm-svn: 164823
|
|
|
|
|
|
| |
Patch by Martinez, Javier E.
llvm-svn: 164822
|
|
|
|
|
|
| |
asan_test_config.h file
llvm-svn: 164821
|
|
|
|
| |
llvm-svn: 164819
|
|
|
|
|
|
|
|
| |
If the it's the condition of a SwitchInst, reload it.
Fixes PR13972.
llvm-svn: 164818
|
|
|
|
| |
llvm-svn: 164817
|
|
|
|
|
|
| |
This way building without -DASAN_* in CFLAGS produces working binaries.
llvm-svn: 164816
|
|
|
|
|
|
|
|
| |
is only stored once.
Fixes PR13968.
llvm-svn: 164815
|
|
|
|
| |
llvm-svn: 164814
|
|
|
|
|
|
| |
gcc 4.7.
llvm-svn: 164813
|
|
|
|
|
|
|
| |
names in addition to the rax/rbp/rip register names when
deciding whether a register is volatile or not.
llvm-svn: 164812
|
|
|
|
|
|
|
|
|
| |
2. As part of this, added assembly format FEXT_RI16_SP_explicit_ins and
moved other lines for FEXT_RI16 formats to be in the right place in the code.
3. Added mayLoad and mayStore assignements for the load/store instructions added and for ones already there that did not have this assignment.
4. Another patch will deal with the problem of load/store byte/halfword to the stack. This is a particular Mips16 problem.
llvm-svn: 164811
|
|
|
|
|
|
|
|
| |
resolve -
1 location added to breakpoint 2
llvm-svn: 164810
|
|
|
|
|
|
| |
std::string under the exception classes. I think the changes to stdexcept.cpp have got that down now. 2) On Apple platforms I'm seeing visibility bugs in applications with respect to type_info's being hidden. This is causing dynamic_cast to malfunction because there are multiple type_info's running around for one type within an application, making dynamic_cast believe that one type is actually multiple types. As a stop gap measure I'm trying to detect this error, print out an error message, but continue with the most likely desired result. This is all under __APPLE__. This behavior can be expanded to other platforms if desired.
llvm-svn: 164809
|
|
|
|
|
|
|
| |
out of the metaclass, so as to enumerate class
methods for an object.
llvm-svn: 164808
|
|
|
|
|
|
|
|
|
| |
The new coalescer can turn a full virtual register definition into a
partial redef by merging another value into an unused vector lane.
Make sure to clear the <read-undef> flag on such defs.
llvm-svn: 164807
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
symfile add" command.
We can now do:
Specify a path to a debug symbols file:
(lldb) add-dsym <path-to-dsym>
Go and download the dSYM file for the "libunc.dylib" module in your target:
(lldb) add-dsym --shlib libunc.dylib
Go and download the dSYM given a UUID:
(lldb) add-dsym --uuid <UUID>
Go and download the dSYM file for the current frame:
(lldb) add-dsym --frame
llvm-svn: 164806
|
|
|
|
| |
llvm-svn: 164805
|
|
|
|
| |
llvm-svn: 164804
|
|
|
|
| |
llvm-svn: 164803
|
|
|
|
|
|
| |
through property getters.
llvm-svn: 164802
|