| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
| |
llvm-svn: 97686
|
| |
|
|
| |
llvm-svn: 97677
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
nested-name-specifier. For example, this allows member access in
diamond-shaped hierarchies like:
struct Base {
void Foo();
int Member;
};
struct D1 : public Base {};
struct D2 : public Base {};
struct Derived : public D1, public D2 { }
void Test(Derived d) {
d.Member = 17; // error: ambiguous cast from Derived to Base
d.D1::Member = 17; // error: okay, modify D1's Base's Member
}
Fixes PR5820 and <rdar://problem/7535045>. Also, eliminate some
redundancy between Sema::PerformObjectMemberConversion() and
Sema::PerformObjectArgumentInitialization() -- the latter now calls
the former.
llvm-svn: 97674
|
| |
|
|
|
|
|
|
|
|
|
|
| |
declarations after the member has been explicitly specialized. We already
did this after explicit instantiation definitions; not doing it for
declarations meant that subsequent definitions would see a previous
member declaration with specialization kind "explicit instantiation decl",
which would then happily get overridden.
Fixes PR 6458.
llvm-svn: 97605
|
| |
|
|
|
|
|
|
| |
we need to synthesize has been marked as used by Sema.
Change Sema to avoid these asserts.
llvm-svn: 97589
|
| |
|
|
|
|
| |
careful about value-dependent enumerators. Fixes PR5786.
llvm-svn: 97570
|
| |
|
|
|
|
|
| |
used to do this, but it got lost when we switched functional-style
cast syntax over to using the new initialization code. Fixes PR6457.
llvm-svn: 97568
|
| |
|
|
|
|
| |
base/member initializers.
llvm-svn: 97560
|
| |
|
|
|
|
|
|
|
|
|
| |
category. Use this in a few places to eliminate unnecessary TST cases and
do some future-proofing. Provide terrible manglings for typeof. Mangle
decltype with some hope of accuracy.
Our manglings for some of the cases covered in the testcase are different
from gcc's, which I've raised as an issue with the ABI list.
llvm-svn: 97523
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
which has the label map, switch statement stack, etc. Previously, we
had a single set of maps in Sema (for the function) along with a stack
of block scopes. However, this lead to funky behavior with nested
functions, e.g., in the member functions of local classes.
The explicit-stack approach is far cleaner, and we retain a 1-element
cache so that we're not malloc/free'ing every time we enter a
function. Fixes PR6382.
Also, tweaked the unused-variable warning suppression logic to look at
errors within a given Scope rather than within a given function. The
prior code wasn't looking at the right number-of-errors count when
dealing with blocks, since the block's count would be deallocated
before we got to ActOnPopScope. This approach works with nested
blocks/functions, and gives tighter error recovery.
llvm-svn: 97518
|
| |
|
|
|
|
|
| |
re-declare them. This fixes PR6317. Also add the beginnings of an interesting
test case for p1 of [class.friend] which also covers PR6317.
llvm-svn: 97499
|
| |
|
|
|
|
| |
in it.
llvm-svn: 97498
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
a fixme and PR6451.
Only perform jump checking if the containing function has no errors,
and add the infrastructure needed to do this.
On the testcase in the PR, we produce:
t.cc:6:3: error: illegal goto into protected scope
goto later;
^
t.cc:7:5: note: jump bypasses variable initialization
X x;
^
llvm-svn: 97497
|
| |
|
|
| |
llvm-svn: 97494
|
| |
|
|
|
|
| |
redeclarations. Fixes PR6449
llvm-svn: 97478
|
| |
|
|
|
|
|
| |
enumeration constants get placed into the local instantiation hash
table. Fixes PR6375.
llvm-svn: 97471
|
| |
|
|
|
|
|
|
|
| |
template definition. Do this both by being more tolerant of errors in
our asserts and by not dropping a variable declaration completely when
its initializer is ill-formed. Fixes the crash-on-invalid in PR6375,
but not the original issue.
llvm-svn: 97463
|
| |
|
|
|
|
| |
TransformDefinition.
llvm-svn: 97445
|
| |
|
|
|
|
|
| |
given declaration in a template, make sure that the context we're
searching through is complete. Fixes PR6376.
llvm-svn: 97444
|
| |
|
|
|
|
|
|
| |
larger unsigned value, since this is implementation-defined
behavior. (We previously suppressed this warning when converting from
a signed value to an unsigned value of the same size).
llvm-svn: 97430
|
| |
|
|
| |
llvm-svn: 97404
|
| |
|
|
|
|
| |
returns a StringRef. Use it to simplify some repetitive code.
llvm-svn: 97322
|
| |
|
|
|
|
| |
doing printf format string checking. This is a recent regression.
llvm-svn: 97318
|
| |
|
|
|
|
| |
Along the way, coelesce some of the diagnostics.
llvm-svn: 97297
|
| |
|
|
| |
llvm-svn: 97291
|
| |
|
|
|
|
| |
them under -Wbad-literal. They're still on by default.
llvm-svn: 97284
|
| |
|
|
|
|
|
|
|
| |
index out of
Sema and into analyze_printf::ParseFormatString(). Also use a bitvector to determine
what arguments have been covered (instead of just checking to see if the last argument consumed is the max argument). This is prep. for support positional arguments (an IEEE extension).
llvm-svn: 97248
|
| |
|
|
|
|
|
| |
instantiation so long as that explicit specialization was declared
previously. Fixes PR6160.
llvm-svn: 97210
|
| |
|
|
|
|
|
|
|
|
| |
how we find the operator delete that matches withe operator new we
found in a C++ new-expression.
This will also need CodeGen support. On a happy note, we're now a
"nans" away from building tramp3d-v4.
llvm-svn: 97209
|
| |
|
|
| |
llvm-svn: 97202
|
| |
|
|
|
|
|
|
|
| |
used when we instantiate C++ new expressions, delete expressions, and
object-construction expressions. Fixes PR6424, although we can't test
all of it until we finish implementing lookup of "operator delete" for
new expressions (!).
llvm-svn: 97195
|
| |
|
|
|
|
|
|
| |
to mark the constructor as referenced. Fixes the narrow issue reported
in PR6424, but there are a few other places that I'll fix before
closing out that PR.
llvm-svn: 97185
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
equality comparisons, and conditional operators, produce a composite
pointer type with the appropriate additional "const" qualifiers if the
pointer types would otherwise be incompatible. This is a small
extension (also present in GCC and EDG in a slightly different form)
that permits code like:
void** i; void const** j;
i == j;
with the following extwarn:
t.cpp:5:5: warning: comparison of distinct pointer types ('void **' and
'void const **') uses non-standard composite pointer type
'void const *const *' [-pedantic]
i == j;
~ ^ ~
Fixes PR6346, and I'll be filing a core issue about this with the C++
committee.
llvm-svn: 97177
|
| |
|
|
|
|
|
| |
binding and a copy-construction. Fixes an overloading problem in the
Clang-on-Clang build.
llvm-svn: 97161
|
| |
|
|
|
|
| |
ill-formed. Fixes PR6421
llvm-svn: 97152
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
compilation using g++ v3.4.
I'll watch the buildbots and back out if necessary.
Feel free to do the same if something breaks.
Without this patch I get (on g++ 3.4.6) following error:
In file included from clang/lib/Sema/SemaTemplate.cpp:14:
clang/lib/Sema/TreeTransform.h: In member function `clang::ASTOwningResult<&clang::ActionBase::DeleteExpr> clang::TreeTransform<Derived>::RebuildCXXPseudoDestructorExpr(clang::ASTOwningResult<&clang::ActionBase::DeleteExpr>, clang::SourceLocation, bool, clang::NestedNameSpecifier*, clang::SourceRange, clang::TypeSourceInfo*, clang::SourceLocation, clang::SourceLocation, clang::PseudoDestructorTypeStorage)':
clang/lib/Sema/TreeTransform.h:5784: error: expected primary-expression before '>' token
clang/lib/Sema/TreeTransform.h:5784: error: expected primary-expression before ')' token
make[4]: *** [clang/lib/Sema/Release/SemaTemplate.o] Error 1
llvm-svn: 97136
|
| |
|
|
|
|
|
|
|
|
|
| |
skip the object argument conversion if either of the candidates didn't
initialize it.
Fixes PR6421, which is such a very straightforward extension of PR6398 that I
should have worked it into the last test case (and therefore caught it then).
Ah well.
llvm-svn: 97135
|
| |
|
|
|
|
| |
cases.
llvm-svn: 97134
|
| |
|
|
|
|
|
|
| |
types. Rank these conversions below other conversions. This allows overload
resolution when the only distinction is between a complex and scalar type. It
also brings the complex overload resolutin in line with GCC's.
llvm-svn: 97128
|
| |
|
|
|
|
|
|
|
| |
class types, dependent types, and namespaces. I had previously
weakened this invariant while working on parsing pseudo-destructor
expressions, but recent work in that area has made these changes
unnecessary.
llvm-svn: 97112
|
| |
|
|
| |
llvm-svn: 97103
|
| |
|
|
|
|
| |
instantiation changes.
llvm-svn: 97095
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
expressions that look like pseudo-destructors, e.g.,
p->T::~T()
where p has dependent type.
At template instantiate time, we determine whether we actually have a
pseudo-destructor or a member access, and funnel down to the
appropriate routine in Sema.
Fixes PR6380.
llvm-svn: 97092
|
| |
|
|
|
|
|
| |
When diagnosing bad conversions, skip the conversion for ignored object
arguments. Fixes PR 6398.
llvm-svn: 97090
|
| |
|
|
| |
llvm-svn: 97080
|
| |
|
|
|
|
|
|
|
|
|
| |
CXXPseudoDestructorExpr.
Update template instantiation for pseudo-destructor expressions to use
this source information and to make use of
Sema::BuildPseudoDestructorExpr when the base expression is dependent
or refers to a scalar type.
llvm-svn: 97079
|
| |
|
|
|
|
| |
pseudo-destructor expression. Attempt #1 at fixing the MSVC buildbot.
llvm-svn: 97076
|
| |
|
|
|
|
|
|
| |
parser's data structures and the part that performs semantic analysis
and AST building, in preparation for improved template instantiation
of pseudo-destructor expressions.
llvm-svn: 97070
|
| |
|
|
|
|
|
|
| |
pseudo-destructor expression such as
p->T::~T()
llvm-svn: 97060
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
pseudo-destructor expressions, and builds the CXXPseudoDestructorExpr
node directly. Currently, this only affects pseudo-destructor
expressions when they are parsed, but not after template
instantiation. That's coming next...
Improve parsing of pseudo-destructor-names. When parsing the
nested-name-specifier and we hit the sequence of tokens X :: ~, query
the actual module to determine whether X is a type-name (in which case
the X :: is part of the pseudo-destructor-name but not the
nested-name-specifier) or not (in which case the X :: is part of the
nested-name-specifier).
llvm-svn: 97058
|