| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
diagnostics.
llvm-svn: 135398
|
|
|
|
|
|
| |
neither was inline. Fixes bug introduced in r135377.
llvm-svn: 135380
|
|
|
|
|
|
| |
Fixes PR10233!
llvm-svn: 135377
|
|
|
|
|
|
|
|
|
|
|
| |
to allow clients to specify that they've already (correctly) loaded
declarations, and that no further action is needed.
Also, make sure that we clear the "has external lexical declarations"
bit before calling FindExternalLexicalDecls(), to avoid infinite
recursion.
llvm-svn: 135306
|
|
|
|
|
|
| |
convertToInt(integerParts*) and make them more reliable.
llvm-svn: 135279
|
|
|
|
|
|
|
|
| |
to represent a fully-substituted non-type template parameter.
This should improve source fidelity, as well as being generically
useful for diagnostics and such.
llvm-svn: 135243
|
|
|
|
|
|
| |
'expansion'.
llvm-svn: 135224
|
|
|
|
|
|
| |
As it turns out, this is my fault for not noticing this was an issue when I was looking at this a long time ago. :(
llvm-svn: 135026
|
|
|
|
|
|
| |
Previously we got the source range wrong for everything in the virtual bases list.
llvm-svn: 135011
|
|
|
|
| |
llvm-svn: 135010
|
|
|
|
|
|
| |
Make it also available in ObjC++ propeties. // rdar://9740328
llvm-svn: 135001
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
block pointers) that don't have any qualification to be POD types. We
were previously considering them to be non-POD types, because this was
convenient in C++ for is_pod-like traits. However, we now end up
inferring lifetime in such cases (template arguments infer __strong),
so it is not necessary.
Moreover, we want rvalues of object type (which have their lifetime
stripped) to be PODs to allow, e.g., va_arg(arglist, id) to function
properly. Fixes <rdar://problem/9758798>.
llvm-svn: 134993
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
dependent. This covers an odd class of types such as
int (&)[sizeof(sizeof(T() + T()))];
which involve template parameters but, because of some trick typically
involving a form of expression that is never type-dependent, resolve
down to a non-dependent type. Such types need to be mangled
essentially as they were written in the source code (involving
template parameters), rather than via their canonical type.
In general, instantiation-dependent types should be mangled as
they were written in the source. However, since we can't do that now
without non-trivial refactoring of the AST (see the new FIXME), I've
gone for this partial solution: only use the as-written-in-the-source
mangling for these strange types that are instantiation-dependent but
not dependent. This provides better compatibility with previous
incarnations of Clang and with GCC. In the future, we'd like to get
this right.
Fixes <rdar://problem/9663282>.
llvm-svn: 134984
|
|
|
|
| |
llvm-svn: 134974
|
|
|
|
|
|
|
|
|
|
| |
isSugared() and desugar() routines previously provided were never
actually called, since the corresponding types
(DependentTypeOfExprType, DependentDecltypeType) don't have
corresponding type classes. Outside of the current (incomplete) patch
I'm working on, I haven't found a way to trigger this problem.
llvm-svn: 134973
|
|
|
|
| |
llvm-svn: 134967
|
|
|
|
|
|
| |
non-instantiation-dependent sizeof and alignof expressions.
llvm-svn: 134963
|
|
|
|
|
|
| |
code so that they only occur in a single place. No functionality change.
llvm-svn: 134961
|
|
|
|
| |
llvm-svn: 134932
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When two different types has the same text representation in the same
diagnostic message, print an a.k.a. after the type if the a.k.a. gives extra
information about the type.
class versa_string;
typedef versa_string string;
namespace std {template <typename T> class vector;}
using std::vector;
void f(vector<string> v);
namespace std {
class basic_string;
typedef basic_string string;
template <typename T> class vector {};
void g() {
vector<string> v;
f(v);
}
}
Old message:
----------------
test.cc:15:3: error: no matching function for call to 'f'
f(&v);
^
test.cc:7:6: note: candidate function not viable: no known conversion from
'vector<string>' to 'vector<string>' for 1st argument
void f(vector<string> v);
^
1 error generated.
New message:
---------------
test.cc:15:3: error: no matching function for call to 'f'
f(v);
^
test.cc:7:6: note: candidate function not viable: no known conversion from
'vector<string>' (aka 'std::vector<std::basic_string>') to
'vector<string>' (aka 'std::vector<versa_string>') for 1st argument
void f(vector<string> v);
^
1 error generated.
llvm-svn: 134904
|
|
|
|
|
|
|
| |
lvalue/xvalue/rvalue, rather than just (incorrectly) assuming it's an
lvalue. Fixes PR10285 / <rdar://problem/9743926>.
llvm-svn: 134700
|
|
|
|
|
|
| |
so roll it out.
llvm-svn: 134638
|
|
|
|
|
|
| |
function. Fixes PR10233!
llvm-svn: 134634
|
|
|
|
|
|
|
|
|
|
|
|
| |
where we have an immediate need of a retained value.
As an exception, don't do this when the call is made as the immediate
operand of a __bridge retain. This is more in the way of a workaround
than an actual guarantee, so it's acceptable to be brittle here.
rdar://problem/9504800
llvm-svn: 134605
|
|
|
|
| |
llvm-svn: 134578
|
|
|
|
|
|
|
| |
passed to it, and unknown selectors causing potential leak.
// rdar://9659270
llvm-svn: 134449
|
|
|
|
|
|
| |
Tested by valgrind & Sema/asm.c.
llvm-svn: 134404
|
|
|
|
|
|
|
| |
fprintf, and to be more consistent in formatting with the other stats
printing routines.
llvm-svn: 134374
|
|
|
|
|
|
| |
fprintf. There is more cleanup to be done to the AST stats printing...
llvm-svn: 134373
|
|
|
|
|
|
| |
context.
llvm-svn: 134320
|
|
|
|
|
|
|
|
| |
-Remove unnecessary 'return'.
-Remove unnecessary 'if' check (llvm_unreachable make sure attrStr will be non-null)
-Add a test of transferring ownership to a reference cast type.
llvm-svn: 134285
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ownership, if the
cast type has no ownership specified, implicitly "transfer" the ownership of the cast'ed type
to the cast type:
id x;
static_cast<NSString**>(&x); // Casting as (__strong NSString**).
This currently only works for C++ named casts, C casts to follow.
llvm-svn: 134273
|
|
|
|
|
|
|
| |
This is kindof questionable but seems to do more-or-less the right thing.
This is not a particularly friendly part of the ABI.
llvm-svn: 134227
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
type/expression/template argument/etc. is instantiation-dependent if
it somehow involves a template parameter, even if it doesn't meet the
requirements for the more common kinds of dependence (dependent type,
type-dependent expression, value-dependent expression).
When we see an instantiation-dependent type, we know we always need to
perform substitution into that instantiation-dependent type. This
keeps us from short-circuiting evaluation in places where we
shouldn't, and lets us properly implement C++0x [temp.type]p2.
In theory, this would also allow us to properly mangle
instantiation-dependent-but-not-dependent decltype types per the
Itanium C++ ABI, but we aren't quite there because we still mangle
based on the canonical type in cases like, e.g.,
template<unsigned> struct A { };
template<typename T>
void f(A<sizeof(sizeof(decltype(T() + T())))>) { }
template void f<int>(A<sizeof(sizeof(int))>);
and therefore get the wrong answer.
llvm-svn: 134225
|
|
|
|
|
|
|
| |
that serve as the base template name of an unresolved-name to
be mangled as a substitution.
llvm-svn: 134213
|
|
|
|
| |
llvm-svn: 134195
|
|
|
|
|
|
| |
This fixes PR10223.
llvm-svn: 134183
|
|
|
|
| |
llvm-svn: 134139
|
|
|
|
|
|
|
|
|
|
|
| |
for a template template parameter.
Uses to follow.
I've also made the uniquing of SubstTemplateTemplateParmPacks
use a ContextualFoldingSet as a minor space efficiency.
llvm-svn: 134137
|
|
|
|
|
|
| |
TemplateSpecializationType.
llvm-svn: 134120
|
|
|
|
|
|
|
| |
a vector for collection. Use iterators where needed instead.
// rdar://6817577
llvm-svn: 134015
|
|
|
|
| |
llvm-svn: 134011
|
|
|
|
|
|
| |
aren't completely off, roughly a 1% speedup on SingleSource/UnitTests/ObjC/trivial-interface.m .
llvm-svn: 133968
|
|
|
|
|
|
| |
for explicit specializations with their own explicit visibility.
llvm-svn: 133958
|
|
|
|
|
|
|
|
| |
'ownership', not 'lifetime'.
rdar://9477613.
llvm-svn: 133779
|
|
|
|
|
|
|
|
| |
works in a 'while(false)' loop. Simplify this code; it was
complicated only in anticipation of C++0x lambdas, and it can
become complicated again when those happen. :)
llvm-svn: 133761
|
|
|
|
|
|
| |
to its header to avoid an explicit instantiation.
llvm-svn: 133753
|
|
|
|
| |
llvm-svn: 133731
|
|
|
|
|
|
| |
same declaration. Templatize dropAttr for general use.
llvm-svn: 133724
|
|
|
|
|
|
| |
// rdar://9538608
llvm-svn: 133721
|