| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| |
|
|
|
|
| |
self-host :)
llvm-svn: 102050
|
| |
|
|
| |
llvm-svn: 102037
|
| |
|
|
|
|
| |
base or not. Use this in CheckConstructorAccess.
llvm-svn: 102020
|
| |
|
|
| |
llvm-svn: 101952
|
| |
|
|
|
|
|
|
| |
function declaration, since it may end up being changed (e.g.,
"extern" can become "static" if a prior declaration was static). Patch
by Enea Zaffanella and Paolo Bolzoni.
llvm-svn: 101826
|
| |
|
|
| |
llvm-svn: 101666
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
TryStaticImplicitCast (for references, class types, and everything
else, respectively) into a single invocation of
InitializationSequence.
One of the paths (for class types) was the only client of
Sema::TryInitializationByConstructor, which I have eliminated. This
also simplified the interface for much of the cast-checking logic,
eliminating yet more code.
I've kept the representation of C++ functional casts with <> 1
arguments the same, despite the fact that I hate it. That fix will
come soon. To satisfy my paranoia, I've bootstrapped + tested Clang
with these changes.
llvm-svn: 101549
|
| |
|
|
| |
llvm-svn: 101495
|
| |
|
|
|
|
|
|
|
|
|
| |
intended for redeclarations, fixing those that need it. Fixes PR6831.
This uncovered an issue where the C++ type-specifier-seq parsing logic
would try to perform name lookup on an identifier after it already had
a type-specifier, which could also lead to spurious ambiguity errors
(as in PR6831, but with a different test case).
llvm-svn: 101419
|
| |
|
|
|
|
|
|
| |
in case it ends up doing something that might trigger diagnostics
(template instantiation, ambiguity reporting, access
reporting). Noticed while working on PR6831.
llvm-svn: 101412
|
| |
|
|
|
|
|
| |
that have reference or const scalar members, since those members can
never be initializer or modified. Fixes <rdar://problem/7804350>.
llvm-svn: 101316
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
generally recover from typos in keywords (since we would effectively
have to mangle the token stream). However, there are still benefits to
typo-correcting with keywords:
- We don't make stupid suggestions when the user typed something
that is similar to a keyword.
- We can suggest the keyword in a diagnostic (did you mean
"static_cast"?), even if we can't recover and therefore don't have
a fix-it.
llvm-svn: 101274
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
for reference binding. The code attempted to handle both the
computation of the ICS and the actual conversion, but the latter is an
anachronism: we now use InitializationSequence for that.
Sema::CheckReferenceInit is now a static function TryReferenceInit
that's only use within overload resolution, and has been simplified
slightly. It still needs to be updated per C++ [over.ics.ref], by
eliminating more of the lvalue/rvalue checks.
llvm-svn: 101136
|
| |
|
|
|
|
|
| |
direct reference binding when the source and target types are not
reference-related. Fixes PR6066.
llvm-svn: 101132
|
| |
|
|
|
|
| |
members of non-templated classes.
llvm-svn: 101122
|
| |
|
|
| |
llvm-svn: 101098
|
| |
|
|
|
|
|
|
| |
sure to introduce them into the current Scope (when we have one) in
addition to the DeclContext for the class, so that they can be found
by name lookup for inline members of the class. Fixes PR6570.
llvm-svn: 101047
|
| |
|
|
|
|
| |
initializes a virtual base or not.
llvm-svn: 101004
|
| |
|
|
|
|
|
| |
member. Use a better diagnostic for this case. Also fix a bug with nested
anonymous structs/unions for -Wreorder; this last was PR6575.
llvm-svn: 100923
|
| |
|
|
|
|
|
|
|
|
| |
when they're instantiated. Merge the note into the -Wreorder warning; it
doesn't really contribute much, and it was splitting a thought across diagnostics
anyway. Don't crash in the parser when a constructor's initializers end in a
comma and there's no body; the recovery here is still terrible, but anything's
better than a crash.
llvm-svn: 100922
|
| |
|
|
|
|
|
| |
fails to find a type. There are no cases where it's valid for this to produce
an error.
llvm-svn: 100878
|
| |
|
|
|
|
|
| |
Declarator that depends on it. This fixes several redundant errors and bad
recoveries.
llvm-svn: 100779
|
| |
|
|
| |
llvm-svn: 100753
|
| |
|
|
|
|
|
| |
code won't actually get used yet because we don't handle non-type
parameter packs, but when we do, this code should jump in and work.
llvm-svn: 100716
|
| |
|
|
| |
llvm-svn: 100707
|
| |
|
|
|
|
|
|
|
|
|
| |
- When instantiating a friend type template, perform semantic
analysis on the resulting type.
- Downgrade the errors concerning friend type declarations that do
not refer to classes to ExtWarns in C++98/03. C++0x allows
practically any type to be befriended, and ignores the friend
declaration if the type is not a class.
llvm-svn: 100635
|
| |
|
|
|
|
|
|
| |
semantic analysis) and Sema::ActOnFriendTypeDecl (the action
callback). This is a prerequisite for improving template instantiation
of friend type declarations.
llvm-svn: 100633
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
poor (and wrong) approximation of the actual rules governing when to
build a copy and when it can be elided.
The correct implementation is actually simpler than the
approximation. When we only enumerate constructors as part of
initialization (e.g., for direct initialization or when we're copying
from a class type or one of its derived classes), we don't create a
copy. When we enumerate all conversion functions, we do create a
copy. Before, we created some extra copies and missed some
others. The new test copy-initialization.cpp shows a case where we
missed creating a (required, non-elidable) copy as part of a
user-defined conversion, which resulted in a miscompile. This commit
also fixes PR6757, where the missing copy made us reject well-formed
code in the ternary operator.
This commit also cleans up our handling of copy elision in the case
where we create an extra copy of a temporary object, which became
necessary now that we produce the right copies. The code that seeks to
find the temporary object being copied has moved into
Expr::getTemporaryObject(); it used to have two different
not-quite-the-same implementations, one in Sema and one in CodeGen.
Note that we still do not attempt to perform the named return value
optimization, so we miss copy elisions for return values and throw
expressions.
llvm-svn: 100196
|
| |
|
|
|
|
| |
initializers as they are written. Fixes a bug where we wouldn't show initialization order warnings when instantiating.
llvm-svn: 100180
|
| |
|
|
| |
llvm-svn: 100179
|
| |
|
|
| |
llvm-svn: 100175
|
| |
|
|
| |
llvm-svn: 100174
|
| |
|
|
| |
llvm-svn: 100173
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
(such as "class T::foo") from an ElaboratedType of a TypenameType to a
DependentNameType, which more accurately models the underlying
concept.
Improve template instantiation for DependentNameType nodes that
represent nested-name-specifiers, by performing tag name lookup and
checking the resulting tag appropriately. Fixes PR5681.
There is still much testing and cleanup to do in this area.
llvm-svn: 100054
|
| |
|
|
|
|
| |
the C-only "optimization".
llvm-svn: 100022
|
| |
|
|
| |
llvm-svn: 100018
|
| |
|
|
|
|
|
| |
term "fix-it" everywhere and even *I* get tired of long names
sometimes. No functionality change.
llvm-svn: 100008
|
| |
|
|
| |
llvm-svn: 99979
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
the underlying/instantiated decl) through a lot of API, including "intermediate"
MemberExprs required for (e.g.) template instantiation. This is necessary
because of the access semantics of member accesses to using declarations:
only the base class *containing the using decl* need be accessible from the
naming class.
This allows us to complete an access-controlled selfhost, if there are no
recent regressions.
llvm-svn: 99936
|
| |
|
|
|
|
|
|
| |
This introduces FunctionType::ExtInfo to hold the calling convention and the
noreturn attribute. The next patch will extend it to include the regparm
attribute and fix the bug.
llvm-svn: 99920
|
| |
|
|
|
|
| |
fields in an anonymous struct.
llvm-svn: 99891
|
| |
|
|
| |
llvm-svn: 99889
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
cache of PartialDiagnostic::Storage objects into an allocator within
the ASTContext. This eliminates a significant amount of malloc
traffic, for a 10% performance improvement in -fsyntax-only wall-clock
time with 403.gcc's combine.c.
Also, eliminate the RequireNonAbstractType hack I put in earlier,
which was but a symptom of this larger problem.
Fixes <rdar://problem/7806091>.
llvm-svn: 99849
|
| |
|
|
|
|
| |
a 2.47% speedup in 403.gcc.
llvm-svn: 99830
|
| |
|
|
|
|
| |
end of a struct/class/union in C++, from Justin Bogner!
llvm-svn: 99811
|
| |
|
|
|
|
| |
namespace aliases. Fixes PR6341.
llvm-svn: 99664
|
| |
|
|
|
|
|
|
| |
through the bases and fields of the definition of the class in which
the constructor is declared, rather than some other declaration of
that class.
llvm-svn: 99661
|
| |
|
|
|
|
| |
Fixes PR6706.
llvm-svn: 99582
|
| |
|
|
| |
llvm-svn: 99525
|
| |
|
|
|
|
|
|
|
|
| |
each namespace, even when the outer namespace has multiple
definitions. As part of this, collapsed two pointers worth of storage
(original namespace and inner anonymous namespace) into a single
pointer with a distinguishing bit, since the two are mutually
exclusive, saving a pointer per NamespaceDecl. Fixes PR6620.
llvm-svn: 99368
|