| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
| |
llvm-svn: 184496
|
| |
|
|
| |
llvm-svn: 184493
|
| |
|
|
|
|
|
| |
operations in the case where evaluating a subexpression fails. No functionality
change, but test/Sema/many-logical-ops.c gets ~100x faster with this change.
llvm-svn: 184489
|
| |
|
|
|
|
| |
This is needed to parse libstdc++ 4.7's type_traits, see PR13530.
llvm-svn: 184476
|
| |
|
|
| |
llvm-svn: 184470
|
| |
|
|
| |
llvm-svn: 184466
|
| |
|
|
| |
llvm-svn: 184453
|
| |
|
|
| |
llvm-svn: 184417
|
| |
|
|
|
|
| |
This fixes PR16370, I'll add the test case in a follow-up commit.
llvm-svn: 184401
|
| |
|
|
|
|
|
|
|
| |
up alignment.
Fixes utilities/tuple/tuple.tuple/tuple.creation/tuple_cat.pass.cpp from the
libc++ testsuite.
llvm-svn: 184397
|
| |
|
|
|
|
|
|
|
|
| |
return false;
in a function returning a pointer. 'false' was a null pointer constant in C++98
but is not in C++11. Punch a very small hole in the initialization rules in
C++11 mode to allow this specific case in system headers.
llvm-svn: 184395
|
| |
|
|
| |
llvm-svn: 184379
|
| |
|
|
| |
llvm-svn: 184378
|
| |
|
|
| |
llvm-svn: 184332
|
| |
|
|
|
|
|
|
| |
This fixes an issue when parsing atlbase.h.
Patch by Will Wilson!
llvm-svn: 184319
|
| |
|
|
|
|
|
|
|
|
|
| |
We now reject things like
struct ABC {
static double a;
};
register double ABC::a = 1.0;
llvm-svn: 184300
|
| |
|
|
| |
llvm-svn: 184299
|
| |
|
|
| |
llvm-svn: 184277
|
| |
|
|
|
|
|
|
|
|
|
|
| |
to provide proper overloading, and also prevents mangling conflicts with
template arguments of protocol-qualified type.
This is a non-backward-compatible mangling change, but per discussion with
John, the benefits outweigh this cost.
Fixes <rdar://problem/14074822>.
llvm-svn: 184250
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
name, change the class name to the "real" one.
If we have something like
@class NewImage;
@compatibility_alias OldImage NewImage;
@class OldImage;
the lookup for 'OldImage' will return the 'NewImage' decl ("@class NewImage").
In such a case, when creating the decl for "@class OldImage" use the real declaration name ("NewImage"),
instead of the alias one ("OldImage"), otherwise we will break IdentifierResolver and redecls-chain invariants.
Fixes crash of rdar://14112291.
llvm-svn: 184238
|
| |
|
|
|
|
|
| |
namespaces, by treating them just like we treat extern "C" declarations in
function scope.
llvm-svn: 184223
|
| |
|
|
|
|
| |
whether to emit a -Wformat-security warning. <rdar://problem/14178260>.
llvm-svn: 184214
|
| |
|
|
|
|
|
| |
selector would be correted to identical selector name
in certain corner cases. // rdar://7853549
llvm-svn: 184208
|
| |
|
|
|
|
|
|
| |
in addition of receiver having static type, but also when
receiver has dynamic type (of 'id' variety) as well as when
receiver is of 'Class' type vareity. // rdar://7853549
llvm-svn: 184195
|
| |
|
|
| |
llvm-svn: 184167
|
| |
|
|
| |
llvm-svn: 184165
|
| |
|
|
| |
llvm-svn: 184154
|
| |
|
|
|
|
|
|
|
| |
This reverts commit r184100.
It was faling on some bots:
http://bb.pgr.jp/builders/cmake-clang-i686-mingw32/builds/1973/steps/test_clang/logs/Clang%20%3A%3A%20SemaCXX__cxx1y-contextual-conversion-tweaks.cpp
llvm-svn: 184108
|
| |
|
|
| |
llvm-svn: 184100
|
| |
|
|
|
|
|
|
|
| |
Make use of getTypeSizeInChars to detect structs/unions of zero size. It allows
more accurate detection of types of zero size. It however has a side effect -
sequence of used types may change, that is why the test 'override-layout' was
modified.
llvm-svn: 184088
|
| |
|
|
|
|
| |
is sent to a receiver object. This is wip. // rdar://7853549
llvm-svn: 184086
|
| |
|
|
|
|
| |
an asm label.
llvm-svn: 184069
|
| |
|
|
|
|
| |
Patch by Robert Wilhelm.
llvm-svn: 184052
|
| |
|
|
|
|
| |
previously overlooked part: implicitly converting array sizes to size_t, rather than contextually converting them to some unique type.
llvm-svn: 184048
|
| |
|
|
|
|
|
|
|
|
| |
by ensuring DiagnoseUseOfDecl is called both on the found decl and the
decl being used (i.e the specialization in the case of member templates) whenever they are different.
Per the exchange captured in
http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20130610/081636.html
a more comprehensive fix that allows both decls to be passed into DiagnoseUseOfDecl is (or should be) forthcoming relatively soon.
llvm-svn: 184043
|
| |
|
|
|
|
|
|
|
|
|
| |
the result of a cast-to-reference-type lifetime-extends the object to which the
reference inside the cast binds.
This requires us to look for subobject adjustments on both the inside and the
outside of the MaterializeTemporaryExpr when looking for a temporary to
lifetime-extend (which we also need for core issue 616, and possibly 1213).
llvm-svn: 184024
|
| |
|
|
|
|
|
| |
only permitted if the source object is of class type, and should materialize a
temporary for the reference to bind to.
llvm-svn: 184017
|
| |
|
|
|
|
|
|
| |
random checks for ObjC object return types to SemaType.cpp.
Fixes issue with ObjC method type checking reported on cfe-dev.
llvm-svn: 184006
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, it only ever fired for zeros which formed null pointers.
Now, hilariously, in C++98 this was almost anything. Including tricks
like warning on the divisor in this code:
typedef char c3[3];
size_t f(c3* ptr) {
return (sizeof(ptr) / sizeof(*ptr)) / (size_t)(!(sizeof(ptr) % sizeof(*ptr)));
}
Why the RHS of the outer divide is a null pointer constant is a sordid
tale of sorrow. Anyways, the committee fixed this for C++11 and onward
as part of core isssue 903, and Richard recently implemented this fix
causing the warning to go away here (and elsewhere).
This patch restores the warning here and adds it for numerous other
somewhat obvious gaffes:
int g(int x) {
return x / (int)(0.0);
}
The patch is essentially just using the full power of our constant
folding in Clang to produce the warning, but insisting that it must fold
to an *integer* which is zero so that we don't get false positives
anywhere.
llvm-svn: 183970
|
| |
|
|
| |
llvm-svn: 183942
|
| |
|
|
|
|
| |
conversion-to-function-pointer member.
llvm-svn: 183931
|
| |
|
|
|
|
|
|
|
| |
__clear_cache is special. It needs no signature, but is a real function in
compiler_rt or libgcc.
Patch by Andrew Turner.
llvm-svn: 183926
|
| |
|
|
|
|
|
|
| |
implicit definition of a copy operation is deprecated. Add a warning for this
to -Wdeprecated. This warning is disabled by default for now, pending
investigation into how common this situation is.
llvm-svn: 183884
|
| |
|
|
|
|
| |
doesn't seem to be any value in even adding a -W flag for this.
llvm-svn: 183882
|
| |
|
|
|
|
| |
explicit constructors.
llvm-svn: 183879
|
| |
|
|
|
|
| |
pack expanded constructor initializer list. Fixes PR16303!
llvm-svn: 183878
|
| |
|
|
|
|
| |
fix a two-phase lookup issue. That's not permitted.
llvm-svn: 183874
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Introduce CXXStdInitializerListExpr node, representing the implicit
construction of a std::initializer_list<T> object from its underlying array.
The AST representation of such an expression goes from an InitListExpr with a
flag set, to a CXXStdInitializerListExpr containing a MaterializeTemporaryExpr
containing an InitListExpr (possibly wrapped in a CXXBindTemporaryExpr).
This more detailed representation has several advantages, the most important of
which is that the new MaterializeTemporaryExpr allows us to directly model
lifetime extension of the underlying temporary array. Using that, this patch
*drastically* simplifies the IR generation of this construct, provides IR
generation support for nested global initializer_list objects, fixes several
bugs where the destructors for the underlying array would accidentally not get
invoked, and provides constant expression evaluation support for
std::initializer_list objects.
llvm-svn: 183872
|
| |
|
|
|
|
|
| |
CXXCtorInitializers to the point where we perform the questionable lifetime
extension. This exposed a selection of false negatives in the warning.
llvm-svn: 183869
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
were lacking ExprWithCleanups nodes in some cases where the new approach to
lifetime extension needed them).
Original commit message:
Rework IR emission for lifetime-extended temporaries. Instead of trying to walk
into the expression and dig out a single lifetime-extended entity and manually
pull its cleanup outside the expression, instead keep a list of the cleanups
which we'll need to emit when we get to the end of the full-expression. Also
emit those cleanups early, as EH-only cleanups, to cover the case that the
full-expression does not terminate normally. This allows IR generation to
properly model temporary lifetime when multiple temporaries are extended by the
same declaration.
We have a pre-existing bug where an exception thrown from a temporary's
destructor does not clean up lifetime-extended temporaries created in the same
expression and extended to automatic storage duration; that is not fixed by
this patch.
llvm-svn: 183859
|