- Sep 29, 2012
-
-
Richard Smith authored
observe their addresses (taking their address gives the vtable slot) so we are free to merge their definitions. llvm-svn: 164864
-
Howard Hinnant authored
Set up code under _LIBCXX_DYNAMIC_FALLBACK which is off by default. For a full description of _LIBCXX_DYNAMIC_FALLBACK, see src/private_typeinfo.cpp. llvm-svn: 164863
-
Jordan Rose authored
We can't specialize the usual llvm::DenseMapInfo at the end of the file because by that point the DenseMap in FunctionScopeInfo has already been instantiated. No functionality change. llvm-svn: 164862
-
Fariborz Jahanian authored
(I still need to add a test once I figure it out). Reviewed off-line by Doug. // rdar://12378879 llvm-svn: 164861
-
Bill Wendling authored
llvm-svn: 164860
-
Jordan Rose authored
No need to specialize BeforeThanCompare for a comparator that's only going to be used once. llvm-svn: 164859
-
Alexander Kornienko authored
Summary: When issuing a diagnostic message for the -Wimplicit-fallthrough diagnostics, always try to find the latest macro, defined at the point of fallthrough, which is immediately expanded to "[[clang::fallthrough]]", and use it's name instead of the actual sequence. Known issues: * uses PP.getSpelling() to compare macro definition with a string (anyone can suggest a convenient way to fill a token array, or maybe lex it in runtime?); * this can be generalized and used in other similar cases, any ideas where it should reside then? Reviewers: doug.gregor, rsmith Reviewed By: rsmith CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D50 llvm-svn: 164858
-
Jordan Rose authored
New output: warning: weak property may be unpredictably set to nil note: property declared here note: assign the value to a strong variable to keep the object alive during use <rdar://problem/12277204> llvm-svn: 164857
-
Jordan Rose authored
The infrastructure for -Warc-repeated-use-of-weak got a little too heavy to leave sitting at the top of Sema.cpp. No functionality change. llvm-svn: 164856
-
Jordan Rose authored
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
-
Jordan Rose authored
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
-
- Sep 28, 2012
-
-
Dan Gohman authored
struct assignment. llvm-svn: 164853
-
rdar://problem/12398225Greg Clayton authored
Improve performance of StringExtractor::GetHexS8(). llvm-svn: 164852
-
Richard Smith authored
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
-
-
Akira Hatanaka authored
llvm-svn: 164849
-
Bill Wendling authored
llvm-svn: 164848
-
Sean Silva authored
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
-
Michael J. Spencer authored
llvm-svn: 164846
-
Akira Hatanaka authored
llvm-svn: 164845
-
Sean Callanan authored
constructing the ObjCInterfaceDecl for an ISA, we'd continue and try to use that Decl anyway, possibly causing a crash. llvm-svn: 164844
-
Richard Trieu authored
now be printed with highlighting. llvm-svn: 164843
-
Manman Ren authored
llvm-svn: 164842
-
Richard Smith authored
llvm-svn: 164841
-
Akira Hatanaka authored
llvm-svn: 164840
-
Richard Trieu authored
functions. Reworked one of the conditionals. No functional changes. llvm-svn: 164839
-
Fariborz Jahanian authored
use the integrated pre-processor, preprocess in objective-c++ mode. // rdar://12189793. llvm-svn: 164836
-
Manman Ren authored
second output of SUB with first output of TEST. PR13966 llvm-svn: 164835
-
Howard Hinnant authored
llvm-svn: 164833
-
Howard Hinnant authored
Due to a mistake on my own part, I need to burn some version numbers. This does not impact any of the implementation of libc++, and does not impact the ABI in any way. llvm-svn: 164832
-
Andrew Kaylor authored
Patch committed on behalf of Kirill Uhanov llvm-svn: 164831
-
Jordan Rose authored
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
-
Jordan Rose authored
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
-
Jordan Rose authored
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
-
Benjamin Kramer authored
- 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
-
Benjamin Kramer authored
llvm-svn: 164826
-
Filipe Cabecinhas authored
Fix a bug introduced in an earlier revision: actually return the StopReason, when we have a StopInfo object. llvm-svn: 164825
-
Daniel Jasper authored
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
-
Benjamin Kramer authored
llvm-svn: 164823
-
Dmitri Gribenko authored
Patch by Martinez, Javier E. llvm-svn: 164822
-