- Apr 19, 2011
-
-
Fariborz Jahanian authored
// rdar://9132143 llvm-svn: 129822
-
Daniel Dunbar authored
llvm-svn: 129820
-
Chris Lattner authored
redundancy pointed out by John. llvm-svn: 129808
-
Argyrios Kyrtzidis authored
gcc's unused warnings which don't get emitted if the function is referenced even in an unevaluated context (e.g. in templates, sizeof, etc.). Also, saying that a function is 'unused' because it won't get codegen'ed is somewhat misleading. - Don't emit 'unused' warnings for functions that are referenced in any part of the user's code. - A warning that an internal function/variable won't get emitted is useful though, so introduce -Wunneeded-internal-declaration which will warn if a function/variable with internal linkage is not "needed" ('used' from the codegen perspective), e.g: static void foo() { } template <int> void bar() { foo(); } test.cpp:1:13: warning: function 'foo' is not needed and will not be emitted static void foo() { } ^ Addresses rdar://8733476. llvm-svn: 129794
-
Peter Collingbourne authored
CL_AddressableVoid is the expression classification used for void expressions whose address can be taken, i.e. the result of [], * or void variable references in C, as opposed to things like the result of a void function call. llvm-svn: 129783
-
Anders Carlsson authored
llvm-svn: 129741
-
Daniel Dunbar authored
llvm-svn: 129734
-
Ted Kremenek authored
llvm-svn: 129728
-
- Apr 18, 2011
-
-
Daniel Dunbar authored
llvm-svn: 129721
-
Fariborz Jahanian authored
of conditional expressions of objc pointer types where one type is the immediate base type of the other. // rdar://9296866 llvm-svn: 129718
-
Daniel Dunbar authored
llvm-svn: 129712
-
Ted Kremenek authored
llvm-svn: 129704
-
Devang Patel authored
llvm-svn: 129703
-
Richard Smith authored
Fix PR9741. The implicit declarations created for range-based for loops weren't being added to the DeclContext (nor were they being marked as implicit). Also, the declarations were being emitted in the wrong order when building the CFG. llvm-svn: 129700
-
Douglas Gregor authored
implementation such as @synthesize Prop1 = Give priority to ivars whose type matches or closely matches the property type (as we do for several other kinds of results). Additionally, if there is an ivar with the same name as the property, or differs only due to a _ prefix or suffix, give that ivar a priority bump. Finally, verify that this search is properly returning ivars within class extensions and implementations (<rdar://problem/8488854>). llvm-svn: 129699
-
Anders Carlsson authored
llvm-svn: 129698
-
Douglas Gregor authored
implementation @synthesize <property> = also produce a completion for a to-be-synthesized ivar named _<property>. llvm-svn: 129697
-
Anders Carlsson authored
llvm-svn: 129682
-
Chris Lattner authored
it down. we effectively were compile the testcase into: void test14(int x) { switch (x) { case 11: break; case 42: test14(97); // fallthrough default: test14(42); break; which is not the same thing at all. This fixes a miscompilation of MallocBench/gs seen on the clang-x86_64-linux-fnt buildbot. llvm-svn: 129679
-
- Apr 17, 2011
-
-
Anders Carlsson authored
turns out that a field or base needs to be laid out in the tail padding of the base, CGRecordLayoutBuilder::ResizeLastBaseFieldIfNecessary will convert it to an array of i8. I've audited the new test results to make sure that they are still valid. I've also verified that we pass a self-host with this change. This (finally) fixes PR5589! llvm-svn: 129673
-
Anders Carlsson authored
llvm-svn: 129671
-
Anders Carlsson authored
llvm-svn: 129669
-
Anders Carlsson authored
Use a SmallVector for field types in CGRecordLayoutBuilder now that llvm::StructType::get takes an ArrayRef. llvm-svn: 129667
-
Michael J. Spencer authored
Also, fold the sse4 and sse4.1 cases together. Patch by Alexander Best! llvm-svn: 129665
-
Eli Friedman authored
properly. llvm-svn: 129657
-
-
Chris Lattner authored
are trivial. This exposes opportunities earlier, and allows fastisel to do good things with these at -O0. This addresses rdar://9289468 - clang doesn't fold memset_chk at -O0 llvm-svn: 129651
-
rdar://9289603Chris Lattner authored
fix rdar://9289603 - clang should fold trivial ?: for enums as well as integer constants into select at -O0 by making the isCheapEnoughToEvaluateUnconditionally predicate handle anything that folds to a constant. In particular, we now fold enums. llvm-svn: 129649
-
- Apr 16, 2011
-
-
Richard Trieu authored
llvm-svn: 129629
-
Argyrios Kyrtzidis authored
Introduce Rewriter::IncreaseIndentation() which increase indentations for the lines between the given source range. To determine what the indentation should be, a SourceLocation 'parentIndent' parameter is used that should be at a source location with an indentation one degree lower than the given range. llvm-svn: 129628
-
Devang Patel authored
llvm-svn: 129626
-
Devang Patel authored
llvm-svn: 129625
-
Tanya Lattner authored
Add test case. llvm-svn: 129617
-
Fariborz Jahanian authored
// rdar://9287695 llvm-svn: 129615
-
Douglas Gregor authored
llvm-svn: 129614
-
- Apr 15, 2011
-
-
Douglas Gregor authored
Objective-C pointer to void* as a "conversion to void*". This allows us to prefer an Objective-C object pointer conversion to a superclass object pointer over an Objective-C object pointer conversion to cv-void*. Fixes PR9735. llvm-svn: 129603
-
Douglas Gregor authored
address space. I could see that this functionality would be useful, but not in its current form (where the address space is ignored): rather, we'd want to encode the address space into the parameter list passed to operator new/operator delete somehow, which would require a bunch more semantic analysis. llvm-svn: 129593
-
Douglas Gregor authored
"new" expression. This matches GCC's parser. Test is forthcoming. llvm-svn: 129592
-
Fariborz Jahanian authored
and output file is not writable. // rdar://9286457. llvm-svn: 129587
-
Douglas Gregor authored
dealing with address-space- and GC-qualified pointers. Previously, these qualifiers were being treated just like cvr-qualifiers (in some cases) or were completely ignored, leading to uneven behavior. For example, const_cast would allow conversion between pointers to different address spaces. The new semantics are fairly simple: reinterpret_cast can be used to explicitly cast between pointers to different address spaces (including adding/removing addresss spaces), while static_cast/dynamic_cast/const_cast do not tolerate any changes in the address space. C-style casts can add/remove/change address spaces through the reinterpret_cast mechanism. Other non-CVR qualifiers (e.g., Objective-C GC qualifiers) work similarly. As part of this change, I tweaked the "casts away constness" diagnostic to use the term "casts away qualifiers". The term "constness" actually comes from the C++ standard, despite the fact that removing "volatile" also falls under that category. In Clang, we also have restrict, address spaces, ObjC GC attributes, etc., so the more general "qualifiers" is clearer. llvm-svn: 129583
-