| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
llvm-svn: 132879
|
|
|
|
| |
llvm-svn: 132878
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- New isDefined() function checks for deletedness
- isThisDeclarationADefinition checks for deletedness
- New doesThisDeclarationHaveABody() does what
isThisDeclarationADefinition() used to do
- The IsDeleted bit is not propagated across redeclarations
- isDeleted() now checks the canoncial declaration
- New isDeletedAsWritten() does what it says on the tin.
- isUserProvided() now correct (thanks Richard!)
This fixes the bug that we weren't catching
void foo() = delete;
void foo() {}
as being a redefinition.
llvm-svn: 131013
|
|
|
|
| |
llvm-svn: 130676
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
accompanying fixes to make it work today.
The core of this patch is to provide a link from a TemplateTypeParmType
back to the TemplateTypeParmDecl node which declared it. This in turn
provides much more precise information about the type, where it came
from, and how it functions for AST consumers.
To make the patch work almost a year after its first attempt, it needed
serialization support, and it now retains the old getName() interface.
Finally, it requires us to not attempt to instantiate the type in an
unsupported friend decl -- specifically those coming from template
friend decls but which refer to a specific type through a dependent
name.
A cleaner representation of the last item would be to build
FriendTemplateDecl nodes for these, storing their template parameters
etc, and to perform proper instantation of them like any other template
declaration. They can still be flagged as unsupported for the purpose of
access checking, etc.
This passed an asserts-enabled bootstrap for me, and the reduced test
case mentioned in the original review thread no longer causes issues,
likely fixed at somewhere amidst the 24k revisions that have elapsed.
llvm-svn: 130628
|
|
|
|
|
|
| |
pack expansion. Fixes PR9452.
llvm-svn: 130310
|
|
|
|
| |
llvm-svn: 129567
|
|
|
|
| |
llvm-svn: 129565
|
|
|
|
|
|
| |
draft standard (N3291).
llvm-svn: 129541
|
|
|
|
| |
llvm-svn: 127744
|
|
|
|
|
|
|
|
| |
Change the interface to expose the new information and deal with the enormous fallout.
Introduce the new ExceptionSpecificationType value EST_DynamicNone to more easily deal with empty throw specifications.
Update the tests for noexcept and fix the various bugs uncovered, such as lack of tentative parsing support.
llvm-svn: 127537
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
UnresolvedUsingValueDecl to use NestedNameSpecifierLoc rather than the
extremely-lossy NestedNameSpecifier/SourceRange pair it used to use,
improving source-location information.
Various infrastructure updates to support NestedNameSpecifierLoc:
- AST/PCH (de-)serialization
- Recursive AST visitor
- libclang traversal (including the first tests of this
functionality)
llvm-svn: 126459
|
|
|
|
|
|
|
|
|
|
| |
making them be template instantiated in a more normal way and
make them handle attributes like other decls.
This fixes the used/unused label handling stuff, making it use
the same infrastructure as other decls.
llvm-svn: 125771
|
|
|
|
|
|
| |
thousand other things which were (generally inadvertantly) relying on that.
llvm-svn: 123814
|
|
|
|
|
|
|
| |
more accurate, and makes it make sense for it to hold a delegating constructor
call.
llvm-svn: 123084
|
|
|
|
|
|
|
| |
template<template<class> class ...Metafunctions>
struct apply_to_each;
llvm-svn: 122874
|
|
|
|
|
|
|
|
| |
extract the appropriate argument from the argument pack (based on the
current substitution index, of course). Simple instantiation of pack
expansions involving non-type template parameter packs now works.
llvm-svn: 122532
|
|
|
|
| |
llvm-svn: 121795
|
|
|
|
|
|
| |
reason this is limited to C++, and it's certainly not limited to temporaries.
llvm-svn: 120996
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
used in a constructor initializer list:
struct X {
X() : au_i1(123) {}
union {
int au_i1;
float au_f1;
};
};
clang will now deal with au_i1 explicitly as an IndirectFieldDecl.
llvm-svn: 120900
|
|
|
|
| |
llvm-svn: 120828
|
|
|
|
|
|
| |
underlying type, from Daniel Wallin
llvm-svn: 120576
|
|
|
|
| |
llvm-svn: 119817
|
|
|
|
|
|
| |
Goodnow II.
llvm-svn: 114235
|
|
|
|
|
|
| |
provided for a VarDecl. Patch by Jim Goodnow II!
llvm-svn: 113296
|
|
|
|
|
|
| |
This lets us remove Sema.h's dependency on Expr.h and Decl.h.
llvm-svn: 112156
|
|
|
|
| |
llvm-svn: 110860
|
|
|
|
|
|
|
|
| |
and create separate decl nodes for forward declarations and the
definition," which appears to be causing significant Objective-C
breakage.
llvm-svn: 110803
|
|
|
|
|
|
|
|
|
|
| |
forward declarations and the definition.
- Eagerly create ObjCInterfaceTypes for declarations.
- The two above changes lead to a 0.5% increase in memory use and no speed regression when parsing Cocoa.h. On the other hand, now chained PCH works when there's a forward declaration in one PCH and the interface definition in another.
- Add HandleInterestingDecl to ASTConsumer. PCHReader passes the "interesting" decls it finds to this function instead of HandleTopLevelDecl. The default implementation forwards to HandleTopLevelDecl, but ASTUnit's handler for example ignores them. This fixes a potential crash when lazy loading of PCH data would cause ASTUnit's "top level" declaration collection to change while being iterated.
llvm-svn: 110610
|
|
|
|
| |
llvm-svn: 109833
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
for code like this:
template<template<typename T> class U> class V {};
The problem is that the DeclPrinter assumed all TemplateDecls
have a getTemplatedClass(), but template template params don't
(so we got a NULL dereference). The solution is to detect if
we're a template template param, and construct the template
class name ('class U') specially in this case.
OKed by dgregor and chandlerc
llvm-svn: 108007
|
|
|
|
| |
llvm-svn: 107311
|
|
|
|
| |
llvm-svn: 106212
|
|
|
|
| |
llvm-svn: 106100
|
|
|
|
| |
llvm-svn: 106099
|
|
|
|
| |
llvm-svn: 105525
|
|
|
|
|
|
| |
I'm on a roll.
llvm-svn: 103249
|
|
|
|
| |
llvm-svn: 103248
|
|
|
|
|
|
|
|
| |
users of getNameAsString on a stream.
The next step is to print the name directly into the stream, avoiding a temporary std::string copy.
llvm-svn: 101632
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(necessarily simultaneous) changes:
- CXXBaseOrMemberInitializer now contains only a single initializer
rather than a set of initialiation arguments + a constructor. The
single initializer covers all aspects of initialization, including
constructor calls as necessary but also cleanup of temporaries
created by the initializer (which we never handled
before!).
- Rework + simplify code generation for CXXBaseOrMemberInitializers,
since we can now just emit the initializer as an initializer.
- Switched base and member initialization over to the new
initialization code (InitializationSequence), so that it
- Improved diagnostics for the new initialization code when
initializing bases and members, to match the diagnostics produced
by the previous (special-purpose) code.
- Simplify the representation of type-checked constructor initializers in
templates; instead of keeping the fully-type-checked AST, which is
rather hard to undo at template instantiation time, throw away the
type-checked AST and store the raw expressions in the AST. This
simplifies instantiation, but loses a little but of information in
the AST.
- When type-checking implicit base or member initializers within a
dependent context, don't add the generated initializers into the
AST, because they'll look like they were explicit.
- Record in CXXConstructExpr when the constructor call is to
initialize a base class, so that CodeGen does not have to infer it
from context. This ensures that we call the right kind of
constructor.
There are also a few "opportunity" fixes here that were needed to not
regress, for example:
- Diagnose default-initialization of a const-qualified class that
does not have a user-declared default constructor. We had this
diagnostic specifically for bases and members, but missed it for
variables. That's fixed now.
- When defining the implicit constructors, destructor, and
copy-assignment operator, set the CurContext to that constructor
when we're defining the body.
llvm-svn: 94952
|
|
|
|
|
|
| |
context by default.
llvm-svn: 91256
|
|
|
|
| |
llvm-svn: 90974
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
print exception specifications on function types and
declarations. Fixes <rdar://problem/7450999>.
There is some poor source-location information here, because we don't
track locations of the types in exception specifications. Filed PR5719.
Failures during template instantiation of the signature of a function
or function template have wrong point-of-instantiation location
information. I'll tackle that with a separate commit.
llvm-svn: 90863
|
|
|
|
| |
llvm-svn: 90313
|
|
|
|
| |
llvm-svn: 90043
|
|
|
|
| |
llvm-svn: 89657
|
|
|
|
| |
llvm-svn: 89552
|
|
|
|
|
|
|
|
|
|
| |
two classes, one for typenames and one for values; this seems to have some
support from Doug if not necessarily from the extremely-vague-on-this-point
standard. Track the location of the 'typename' keyword in a using-typename
decl. Make a new lookup result for unresolved values and deal with it in
most places.
llvm-svn: 89184
|
|
|
|
|
|
| |
@class.
llvm-svn: 89170
|
|
|
|
|
|
|
| |
decl, create shadow declarations and put them in scope like normal.
Work in progress.
llvm-svn: 89048
|