| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| |
|
|
| |
llvm-svn: 83577
|
| |
|
|
|
|
|
| |
Also, eliminate a redundant diagnostic by marking a variable declared
with incomplete type as an invalid declaration.
llvm-svn: 83553
|
| |
|
|
|
|
|
|
| |
function and member function templates that are not definitions. Add
more tests to ensure that explicit specializations of member function
templates prevent instantiation.
llvm-svn: 83550
|
| |
|
|
|
|
|
|
|
|
|
| |
templates, and keep track of how those member classes were
instantiated or specialized.
Make sure that we don't try to instantiate an explicitly-specialized
member class of a class template, when that explicit specialization
was a declaration rather than a definition.
llvm-svn: 83547
|
| |
|
|
|
|
|
|
| |
track of the kind of specialization or instantiation. Also, check the
scope of the specialization and ensure that a specialization
declaration without an initializer is not a definition.
llvm-svn: 83533
|
| |
|
|
|
|
|
|
| |
enums.
Don't create a new declaration for friend classes if a declaration already exists.
llvm-svn: 83505
|
| |
|
|
|
|
|
|
| |
templates. Previously, these weren't handled as specializations at
all. The AST for representing these as specializations is still a work
in progress.
llvm-svn: 83498
|
| |
|
|
|
|
|
|
|
| |
for bases, members, overridden virtual methods, etc. The operations
isDerivedFrom and lookupInBases are now provided by CXXRecordDecl,
rather than by Sema, so that CodeGen and other clients can use them
directly.
llvm-svn: 83396
|
| |
|
|
|
|
|
|
|
|
|
|
| |
of the flow-control checks for falling off the end of a function,
since the return type may instantiate to void. Similarly, if a
return statement has an expression and the return type of the function
is void, don't complain if the expression is type-dependent, since
that type could instantiate to void.
Fixes PR5071.
llvm-svn: 83222
|
| |
|
|
|
|
| |
since this is not allowed by the embedded c extension spec.
llvm-svn: 83165
|
| |
|
|
| |
llvm-svn: 83014
|
| |
|
|
|
|
| |
pushed into scope. Fixes PR5056.
llvm-svn: 83003
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
functions that occur in multiple declaration contexts, e.g., because
some were found via using declarations. Now, isDeclInScope will build
a new overload set (when needed) containing only those declarations
that are actually in scope. This eliminates a problem found with
libstdc++'s <iostream>, where the presence of using
In the longer term, I'd like to eliminate Sema::isDeclInScope in favor
of better handling of the RedeclarationOnly flag in the name-lookup
routines. That way, name lookup only returns the entities that matter,
rather than taking the current two-pass approach of producing too many
results and then filtering our the wrong results. It's not efficient,
and I'm sure that we aren't filtering everywhere we should be.
llvm-svn: 82954
|
| |
|
|
|
|
|
|
|
| |
class templates. We now treat friend class templates much more like
normal class templates, except that they still get special name lookup
rules. Fixes PR5057 and eliminates a bunch of spurious diagnostics in
<iostream>.
llvm-svn: 82848
|
| |
|
|
|
|
| |
explicit template specializations, when available.
llvm-svn: 82824
|
| |
|
|
|
|
|
|
|
|
|
| |
template void f<int>(int);
~~~~~~
Previously, we silently dropped the template arguments. With this
change, we now use the template arguments (when available) as the
explicitly-specified template arguments used to aid template argument
deduction for explicit template instantiations.
llvm-svn: 82806
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
first implementation recognizes when a function declaration is an
explicit function template specialization (based on the presence of a
template<> header), performs template argument deduction + ambiguity
resolution to determine which template is being specialized, and hooks
There are many caveats here:
- We completely and totally drop any explicitly-specified template
arguments on the floor
- We don't diagnose any of the extra semantic things that we should
diagnose.
- I haven't looked to see that we're getting the right linkage for
explicit specializations
On a happy note, this silences a bunch of errors that show up in
libstdc++'s <iostream>, although Clang still can't get through the
entire header.
llvm-svn: 82728
|
| |
|
|
|
|
|
|
| |
Type hierarchy. Demote 'volatile' to extended-qualifier status. Audit our
use of qualifiers and fix a few places that weren't dealing with qualifiers
quite right; many more remain.
llvm-svn: 82705
|
| |
|
|
|
|
|
|
|
|
|
| |
Several of the existing methods were identical to their respective
specializations, and so have been removed entirely. Several more 'leaf'
optimizations were introduced.
The getAsFoo() methods which imposed extra conditions, like
getAsObjCInterfacePointerType(), have been left in place.
llvm-svn: 82501
|
| |
|
|
|
|
|
| |
complain about specializations of member functions that are not
definitions. Fixes PR4995.
llvm-svn: 82159
|
| |
|
|
|
|
| |
same.
llvm-svn: 82088
|
| |
|
|
|
|
|
|
|
|
|
|
| |
give them the appropriate exception specifications. This,
unfortunately, requires us to maintain and/or implicitly generate
handles to namespace "std" and the class "std::bad_alloc". However,
every other approach I've come up with was more hackish, and this
standard requirement itself is quite the hack.
Fixes PR4829.
llvm-svn: 81939
|
| |
|
|
|
|
| |
it's been merged with the previous declaration. This ensures that getPreviousDecl() will have the right value when ActOnConversionDeclarator is called.
llvm-svn: 81720
|
| |
|
|
|
|
|
|
| |
generated for an inline function definition, taking into account C99
and GNU inline/extern inline semantics. This solution is simpler,
cleaner, and fixes PR4536.
llvm-svn: 81670
|
| |
|
|
| |
llvm-svn: 81590
|
| |
|
|
| |
llvm-svn: 81589
|
| |
|
|
| |
llvm-svn: 81504
|
| |
|
|
|
|
|
| |
of class type whose default constructor is trivial. Should un-break
testing on x86_64-pc-linux-gnu.
llvm-svn: 81405
|
| |
|
|
|
|
|
|
| |
such initializations properly convert constructor arguments and fill
in default arguments where necessary. This also makes the ownership
model more clear.
llvm-svn: 81394
|
| |
|
|
| |
llvm-svn: 81346
|
| |
|
|
| |
llvm-svn: 81317
|
| |
|
|
|
|
| |
declaration of that array in C++.
llvm-svn: 81309
|
| |
|
|
|
|
|
|
|
|
| |
order because it was doing so while iterating over a densemap.
There are still similar problems in other places, for example
WeakUndeclaredIdentifiers is still written to the PCH file in a nondeterminstic
order, and we emit warnings about #pragma weak in nondeterminstic order.
llvm-svn: 81236
|
| |
|
|
| |
llvm-svn: 81160
|
| |
|
|
|
|
|
|
| |
ways: remove elab types during desugaring, enhance pretty-printing to allow
tags to be suppressed without suppressing scopes, look through elab types
when associating a typedef name with an anonymous record type.
llvm-svn: 81065
|
| |
|
|
|
|
| |
friends.
llvm-svn: 80977
|
| |
|
|
|
|
| |
base and data members when they are needed.
llvm-svn: 80967
|
| |
|
|
|
|
|
|
| |
whether the current context is dependent.
Thanks to Anders for pointing this out.
llvm-svn: 80828
|
| |
|
|
|
|
|
|
|
|
| |
specifier
of any previous declaration in case we replace it in a class's declaration table.
Fixes bug 4858. This sort of thing makes me reconsider putting friend declarations in
declaration lists.
llvm-svn: 80750
|
| |
|
|
|
|
|
| |
decl list, and remove some workarounds that were due to this. Thanks to Eli for
pointing this out and providing the test case.
llvm-svn: 80745
|
| |
|
|
|
|
| |
existing declaration chains.
llvm-svn: 80636
|
| |
|
|
|
|
| |
err_typecheck_no_member to err_typecheck_no_member_deprecated. The idea is that err_typecheck_no_member_deprecated should be phased out and any call sites that reference it should call DiagnoseMissingMember instead.
llvm-svn: 80469
|
| |
|
|
| |
llvm-svn: 80412
|
| |
|
|
|
|
| |
attributes added to a redeclaration in C++
llvm-svn: 80403
|
| |
|
|
|
|
| |
redeclaration or not.
llvm-svn: 80383
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
declarations of same, introduce a single AST class and add appropriate bits
(encoded in the namespace) for whether a decl is "real" or not. Much hackery
about previously-declared / not-previously-declared, but it's essentially
mandated by the standard that friends alter lookup, and this is at least
fairly non-intrusive.
Refactor the Sema methods specific to friends for cleaner flow and less nesting.
Incidentally solve a few bugs, but I remain confident that we can put them back.
llvm-svn: 80353
|
| |
|
|
| |
llvm-svn: 80273
|
| |
|
|
| |
llvm-svn: 80272
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
templates within class templates, producing a member function template
of a class template specialization. If you can parse that, I'm
sorry. Example:
template<typename T>
struct X {
template<typename U> void f(T, U);
};
When we instantiate X<int>, we now instantiate the declaration
X<int>::f, which looks like this:
template<typename U> void X<int>::f(int, U);
The path this takes through
TemplateDeclInstantiator::VisitCXXMethodDecl is convoluted and
ugly, but I don't know how to improve it yet. I'm resting my hopes on
the multi-level substitution required to instantiate definitions of
nested templates, which may simplify this code as well.
More testing to come...
llvm-svn: 80252
|
| |
|
|
| |
llvm-svn: 80182
|