| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
the declaration chain in search of a definition. This is necessary for a sane chained PCH implementation. No observable performance change on Carbon.h syntax-only, and bootstraps cleanly.
llvm-svn: 110051
|
|
|
|
| |
llvm-svn: 109380
|
|
|
|
|
|
| |
since we aren't going to be calling them ever.
llvm-svn: 109377
|
|
|
|
|
|
|
|
|
|
|
| |
detail and introduce
FunctionTemplateDecl::findSpecialization.
Redeclarations of specializations will not cause the previous decl to be removed from the set,
the set will keep the canonical decl. findSpecialization will return the most recent redeclaration.
llvm-svn: 108834
|
|
|
|
|
|
|
|
| |
of getBody() when we are just checking the existence of a body, to avoid de-serialization of the body from PCH.
Makes de-serialization of the function body even more "lazier".
llvm-svn: 107768
|
|
|
|
|
|
|
| |
TagDecl subclasses when out-of-line template declaration information
is available, from Peter Collingbourne!
llvm-svn: 107686
|
|
|
|
| |
llvm-svn: 107616
|
|
|
|
|
|
| |
them for PCH reading.
llvm-svn: 107468
|
|
|
|
|
|
| |
ClassTemplatePartialSpecializationDecl to allow PCH read/write.
llvm-svn: 106624
|
|
|
|
|
|
|
|
|
|
|
| |
Introduce:
-FunctionDecl::getTemplatedKind() which returns an enum signifying what kind of templated
FunctionDecl it is.
-An overload of FunctionDecl::setFunctionTemplateSpecialization() which accepts arrays of
TemplateArguments and TemplateArgumentLocs
-A constructor to TemplateArgumentList which accepts an array of TemplateArguments.
llvm-svn: 106532
|
|
|
|
|
|
|
| |
particular sequence causes its definition to not be generated in the object file.
(fixes radar 8071804).
llvm-svn: 106424
|
|
|
|
|
|
| |
ASTContext rather than via the normal heap.
llvm-svn: 106008
|
|
|
|
|
|
|
|
|
|
|
|
| |
Decl.cpp:716:28: warning: initialization of pointer of type 'clang::VarDecl *' from literal 'false' [-Wbool-conversions]
VarDecl *LastTentative = false;
^
RewriteRope.cpp:535:12: warning: initialization of pointer of type '<anonymous>::RopePieceBTreeNode *' from literal 'false'
[-Wbool-conversions]
return false;
^
llvm-svn: 105946
|
|
|
|
|
|
| |
methods.
llvm-svn: 105882
|
|
|
|
|
|
| |
valgrind problems.
llvm-svn: 105062
|
|
|
|
| |
llvm-svn: 104990
|
|
|
|
|
|
|
|
|
|
|
|
| |
the x86-64 __va_list_tag with this attribute. The attribute causes the
affected type to behave like a fundamental type when considered by ADL.
(x86-64 is the only target we currently provide with a struct-based
__builtin_va_list)
Fixes PR6762.
llvm-svn: 104941
|
|
|
|
|
|
| |
to the associated object declaration.
llvm-svn: 104309
|
|
|
|
| |
llvm-svn: 104226
|
|
|
|
|
|
| |
getFullSourceRange -> getSourceRange for TypeLoc.
llvm-svn: 104220
|
|
|
|
|
|
|
| |
some seriously non-linear performance with deeply nested template
instantiations, as shown in PR6998.
llvm-svn: 104139
|
|
|
|
|
|
|
| |
class template conflicts with an existing (non-template)
definition. This is another part of PR6952.
llvm-svn: 103948
|
|
|
|
| |
llvm-svn: 103517
|
|
|
|
|
|
|
|
| |
inlineable. That header file has to be TypeLoc.h, which means that
TypeLoc.h needs to depend on Decl.h because TypeSourceInfo doesn't
have its own header. That could be remedied, though.
llvm-svn: 103176
|
|
|
|
|
|
|
| |
an enum in the enum decl itself. Use some spare bits from TagDecl for this
purpose.
llvm-svn: 103173
|
|
|
|
| |
llvm-svn: 103165
|
|
|
|
|
|
|
|
|
| |
InjectedClassNameType's Decl to point at the definition. It's a little
messy, but we do the same thing with classes and their record types,
since much of Clang expects that the TagDecl* one gets out of a type
is the definition. Fixes several Boost.Proto failures.
llvm-svn: 102691
|
|
|
|
|
|
|
|
| |
ObjCMethodDecl::isVariadic().
Do some minor refactoring along the way.
llvm-svn: 102635
|
|
|
|
| |
llvm-svn: 102498
|
|
|
|
| |
llvm-svn: 102145
|
|
|
|
| |
llvm-svn: 101953
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
raw_ostream. Use it in getAsString and NamedDecl's raw_ostream operator.
llvm-svn: 101633
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
code the first time.
Fixes PR6827.
llvm-svn: 101184
|
|
|
|
| |
llvm-svn: 100753
|
|
|
|
|
|
|
|
| |
that protected members be used on objects of types which derive from the
naming class of the lookup. My first N attempts at this were poorly-founded,
largely because the standard is very badly worded here.
llvm-svn: 100562
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
templates.
What happens here is that we actually turn the first declaration into a
definition, regardless of whether it was actually originally a definition,
and furthermore we do this all after we've instantiated all the declarations.
This exposes a bug in my DefinitionData patch where it was only setting the
DefinitionData for previous declarations, not future declarations.
Fortunately, there's an iterator for that.
llvm-svn: 99657
|
|
|
|
| |
llvm-svn: 98684
|
|
|
|
|
|
|
|
|
|
|
| |
on unqualified declarations.
Patch by Enea Zaffanella! Minimal adjustments: allocate the ExtInfo nodes
with the ASTContext and delete them during Destroy(). I audited a bunch of
Destroy methods at the same time, to ensure that the correct teardown was
being done.
llvm-svn: 98540
|
|
|
|
|
|
|
| |
are for out of line declarations more easily. This simplifies the logic and
handles the case of out-of-line class definitions correctly. Fixes PR6107.
llvm-svn: 96729
|
|
|
|
|
|
|
|
|
| |
array allocated using the allocator in ASTContext. This addresses
these strings getting leaked when using a BumpPtrAllocator (in
ASTContext).
Fixes: <rdar://problem/7636765>
llvm-svn: 95853
|
|
|
|
|
|
| |
Decl subclasses. No functionality change.
llvm-svn: 95841
|
|
|
|
|
|
|
| |
and CXXRecordDecl::getDefinition(); it's totally unnecessary. No
functionality change.
llvm-svn: 95836
|
|
|
|
|
|
| |
Fixes latent and not-so-latent objc++ and blocks++ bugs.
llvm-svn: 95340
|
|
|
|
|
|
|
|
| |
of a C++ record. Exposed a lot of problems where various routines were
silently doing The Wrong Thing (or The Acceptable Thing in The Wrong Order)
when presented with a non-definition. Also cuts down on memory usage.
llvm-svn: 95330
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
that is in an anonymous namespace, give that function or variable
internal linkage.
This change models an oddity of the C++ standard, where names declared
in an anonymous namespace have external linkage but, because anonymous
namespace are really "uniquely-named" namespaces, the names cannot be
referenced from other translation units. That means that they have
external linkage for semantic analysis, but the only sensible
implementation for code generation is to give them internal
linkage. We now model this notion via the UniqueExternalLinkage
linkage type. There are several changes here:
- Extended NamedDecl::getLinkage() to produce UniqueExternalLinkage
when the declaration is in an anonymous namespace.
- Added Type::getLinkage() to determine the linkage of a type, which
is defined as the minimum linkage of the types (when we're dealing
with a compound type that is not a struct/class/union).
- Extended NamedDecl::getLinkage() to consider the linkage of the
template arguments and template parameters of function template
specializations and class template specializations.
- Taught code generation to rely on NamedDecl::getLinkage() when
determining the linkage of variables and functions, also
considering the linkage of the types of those variables and
functions (C++ only). Map UniqueExternalLinkage to internal
linkage, taking out the explicit checks for
isInAnonymousNamespace().
This fixes much of PR5792, which, as discovered by Anders Carlsson, is
actually the reason behind the pass-manager assertion that causes the
majority of clang-on-clang regression test failures. With this fix,
Clang-built-Clang+LLVM passes 88% of its regression tests (up from
67%). The specific numbers are:
LLVM:
Expected Passes : 4006
Expected Failures : 32
Unsupported Tests : 40
Unexpected Failures: 736
Clang:
Expected Passes : 1903
Expected Failures : 14
Unexpected Failures: 75
Overall:
Expected Passes : 5909
Expected Failures : 46
Unsupported Tests : 40
Unexpected Failures: 811
Still to do:
- Improve testing
- Check whether we should allow the presence of types with
InternalLinkage (in addition to UniqueExternalLinkage) given
variables/functions internal linkage in C++, as mentioned in
PR5792.
- Determine how expensive the getLinkage() calls are in practice;
consider caching the result in NamedDecl.
- Assess the feasibility of Chris's idea in comment #1 of PR5792.
llvm-svn: 95216
|
|
|
|
| |
llvm-svn: 95096
|
|
|
|
|
|
| |
definition. With that in mind, rename getDefinition to getAnyInitializer (to distinguish it from getInit) and reimplement it in terms of isThisDeclarationADefinition. Update all code to use this new function.
llvm-svn: 94999
|
|
|
|
|
|
| |
logic for when a variable declaration is a (possibly tentativ) definition. Add a few functions building on this, and shift C tentative definition handling over to this new functionality. This shift also kills the Sema::TentativeDefinitions map and instead simply stores all declarations in the renamed list. The correct handling for multiple tentative definitions is instead shifted to the final walk of the list.
llvm-svn: 94968
|