| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| |
|
|
|
|
|
|
|
|
|
|
|
| |
in several important ways:
- VLAs of non-POD types are not permitted.
- VLAs cannot be used in conjunction with C++ templates.
These restrictions are intended to keep VLAs out of the parts of the
C++ type system where they cause the most trouble. Fixes PR5678 and
<rdar://problem/8013618>.
llvm-svn: 104443
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
temporaries. There are actually several interrelated fixes here:
- When converting an object to a base class, it's only an lvalue
cast when the original object was an lvalue and we aren't casting
pointer-to-derived to pointer-to-base. Previously, we were
misclassifying derived-to-base casts of class rvalues as lvalues,
causing various oddities (including problems with reference binding
not extending the lifetimes of some temporaries).
- Teach the code for emitting a reference binding how to look
through no-op casts and parentheses directly, since
Expr::IgnoreParenNoOpCasts is just plain wrong for this. Also, make
sure that we properly look through multiple levels of indirection
from the temporary object, but destroy the actual temporary object;
this fixes the reference-binding issue mentioned above.
- Teach Objective-C message sends to bind the result as a temporary
when needed. This is actually John's change, but it triggered the
reference-binding problem above, so it's included here. Now John
can actually test his return-slot improvements.
llvm-svn: 104434
|
| |
|
|
| |
llvm-svn: 104432
|
| |
|
|
|
|
|
|
| |
'-fasm' and explicitly map from that flag to -fgnu-keywords in the driver. Turn
off the driver in the lexer test for this madness and add a test to the driver
that the translation actually works.
llvm-svn: 104428
|
| |
|
|
|
|
|
| |
critical for ObjC++ correctness; hard to test independently of various
required Sema changes, though.
llvm-svn: 104422
|
| |
|
|
|
|
|
|
|
|
|
| |
short name of the tool in use, instead of the name of the action that created
the command. The practical impact is we now get:
clang: error: clang frontend command failed due to signal 6 (use -v to see invocation)
instead of:
clang: error: assembler command failed due to signal 6 (use -v to see invocation)
when clang crashes on a job that uses the integrated assembler.
llvm-svn: 104417
|
| |
|
|
| |
llvm-svn: 104416
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the required "template" keyword, using the same heuristics we do for
dependent template names in member access expressions, e.g.,
test/SemaTemplate/dependent-template-recover.cpp:11:8: error: use 'template'
keyword to treat 'getAs' as a dependent template name
T::getAs<U>();
^
template
Fixes PR5404.
llvm-svn: 104409
|
| |
|
|
|
|
| |
for variable arguments list methods. (radar 8006060).
llvm-svn: 104407
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
that is missing the 'template' keyword, e.g.,
t->getAs<T>()
where getAs is a member of an unknown specialization. C++ requires
that we treat "getAs" as a value, but that would fail to parse since T
is the name of a type. We would then fail at the '>', since a type
cannot be followed by a '>'.
This is a very common error for C++ programmers to make, especially
since GCC occasionally allows it when it shouldn't (as does Visual
C++). So, when we are in this case, we use tentative parsing to see if
the tokens starting at "<" can only be parsed as a template argument
list. If so, we produce a diagnostic with a fix-it that states that
the 'template' keyword is needed:
test/SemaTemplate/dependent-template-recover.cpp:5:8: error: 'template' keyword
is required to treat 'getAs' as a dependent template name
t->getAs<T>();
^
template
This is just a start of this patch; I'd like to apply the same
approach to everywhere that a template-id with dependent template name
can be parsed.
llvm-svn: 104406
|
| |
|
|
| |
llvm-svn: 104390
|
| |
|
|
|
|
|
|
| |
represented
in the ASTs. Fixes <rdar://problem/8015556>.
llvm-svn: 104389
|
| |
|
|
|
|
| |
in the Objective-C memory checker.
llvm-svn: 104388
|
| |
|
|
|
|
| |
setting null data member pointers correctly. Fixes PR7139.
llvm-svn: 104387
|
| |
|
|
|
|
|
| |
be sure to merge its parameter scope with its parent's scope. Fixes
PR7184.
llvm-svn: 104386
|
| |
|
|
| |
llvm-svn: 104382
|
| |
|
|
|
|
| |
Fixes <rdar://problem/7987650>.
llvm-svn: 104376
|
| |
|
|
|
|
|
|
| |
expressions
within the increment code of a for loop.
llvm-svn: 104375
|
| |
|
|
|
|
|
| |
CXXBasePaths::isAmbiguous(), rather than just asserting that we have a
canonical type. Fixes PR7176.
llvm-svn: 104374
|
| |
|
|
|
|
| |
Steven Watanabe!
llvm-svn: 104373
|
| |
|
|
| |
llvm-svn: 104371
|
| |
|
|
|
|
|
|
| |
emitted the increment expression. Fixes PR7189.
If someone knows how to write a useful test for this, I'd be grateful.
llvm-svn: 104335
|
| |
|
|
|
|
|
|
| |
not make copies non-POD arguments or arguments passed by reference:
just copy the pointers directly. This eliminates another source of the
dreaded memcpy-of-non-PODs. Fixes PR7188.
llvm-svn: 104327
|
| |
|
|
| |
llvm-svn: 104314
|
| |
|
|
|
|
|
|
|
|
| |
'self' variable arising from uses of the 'super' keyword. Also reorganize
some code so that BlockInfo (now CGBlockInfo) can be opaque outside of
CGBlocks.cpp.
Fixes rdar://problem/8010633.
llvm-svn: 104312
|
| |
|
|
|
|
|
| |
class initialization, drill down through an arbitrary number of anonymous
records.
llvm-svn: 104310
|
| |
|
|
|
|
| |
to the associated object declaration.
llvm-svn: 104309
|
| |
|
|
|
|
|
|
|
| |
sure that the anonymous struct/union record declaration gets
instantiated before the variable declaration, and that it and its
fields (recursively) get entries in the local instantiation map. Fixes
PR7088.
llvm-svn: 104305
|
| |
|
|
| |
llvm-svn: 104299
|
| |
|
|
|
|
| |
classes whose base class have GC'able object pointers.
llvm-svn: 104296
|
| |
|
|
|
|
|
|
| |
recursively, e.g. so that members of anonymous unions inside anonymous structs
still get initialized. Also generate default constructor calls for anonymous
struct members when necessary.
llvm-svn: 104292
|
| |
|
|
|
|
| |
<rdar://problem/7971948>.
llvm-svn: 104291
|
| |
|
|
|
|
|
|
|
| |
capture failures when we try to initialize an incomplete
type. Previously, we would (ab)use FK_ConversionFailed, then
occasionally dereference a null pointer when trying to diagnose the
failure. Fixes <rdar://problem/7959007>.
llvm-svn: 104286
|
| |
|
|
|
|
| |
(or -save-temps), when the integrated assembler is enabled.
llvm-svn: 104282
|
| |
|
|
|
|
| |
in Objective-C++ mode.
llvm-svn: 104281
|
| |
|
|
| |
llvm-svn: 104280
|
| |
|
|
|
|
|
| |
class for UnresolvedLookupExprs, even when occuring on template
names" along with a fix for an Objective-C++ crasher it introduced.
llvm-svn: 104277
|
| |
|
|
|
|
| |
approximately the same interface as 'llvm-mc'.
llvm-svn: 104239
|
| |
|
|
| |
llvm-svn: 104237
|
| |
|
|
|
|
| |
be turned into a setter call (fixes radar 8008649).
llvm-svn: 104235
|
| |
|
|
| |
llvm-svn: 104230
|
| |
|
|
| |
llvm-svn: 104229
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
particular issue was the cause of the Boost.Interprocess failures, and
in general will lead to horrendous, hard-to-diagnose miscompiles. The
assertion itself has survives self-host and a full Boost build, so we
are close to eradicating this problem in C++.
Note that the assertion is *not* turned on for Objective-C++, where we
still have problems with introducing memcpy's of non-POD class
types. That part of the assertion will go away as soon as we fix the
known issues in Objective-C++.
llvm-svn: 104227
|
| |
|
|
| |
llvm-svn: 104226
|
| |
|
|
|
|
| |
returning non-pointer-sized things were generating invalid IR inside @try blocks.
llvm-svn: 104222
|
| |
|
|
|
|
| |
getFullSourceRange -> getSourceRange for TypeLoc.
llvm-svn: 104220
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
subobject. Previously, we could only properly bind to a base class
subobject while extending the lifetime of the complete object (of a
derived type); for non-static data member subobjects, we could memcpy
(!) the result and bind to that, which is rather broken.
Now, we pull apart the expression that we're binding to, to figure out
which subobject we're accessing, then construct the temporary object
(adding a destruction if needed) and, finally, dig out the subobject
we actually meant to access.
This fixes yet another instance where we were memcpy'ing rather than
doing the right thing. However, note the FIXME in references.cpp:
there's more work to be done for binding to subobjects, since the AST
is incorrectly modeling some member accesses in base classes as
lvalues when they are really rvalues.
llvm-svn: 104219
|
| |
|
|
| |
llvm-svn: 104218
|
| |
|
|
|
|
| |
<rdar://problem/7995494>.
llvm-svn: 104217
|
| |
|
|
|
|
|
|
|
| |
class type (that uses a return slot), pass the return slot to the
callee directly rather than allocating new storage and trying to copy
the object. This appears to have been the cause of the remaining two
Boost.Interprocess failures.
llvm-svn: 104215
|