clang API Documentation
#include "clang/Serialization/ASTReader.h"
#include "ASTCommon.h"
#include "ASTReaderInternals.h"
#include "clang/AST/ASTConsumer.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/DeclCXX.h"
#include "clang/AST/DeclGroup.h"
#include "clang/AST/DeclTemplate.h"
#include "clang/AST/DeclVisitor.h"
#include "clang/AST/Expr.h"
#include "clang/Sema/IdentifierResolver.h"
#include "clang/Sema/Sema.h"
#include "clang/Sema/SemaDiagnostic.h"
#include "llvm/Support/SaveAndRestore.h"
#include "clang/Serialization/AttrPCHRead.inc"
#include "clang/AST/DeclNodes.inc"
Go to the source code of this file.
Classes | |
class | clang::ASTDeclReader |
class | clang::ASTDeclReader::RedeclarableResult |
RAII class used to capture the first ID within a redeclaration chain and to introduce it into the list of pending redeclaration chains on destruction. | |
class | clang::ASTDeclReader::FindExistingResult |
Class used to capture the result of searching for an existing declaration of a specific kind and name, along with the ability to update the place where this result was found (the declaration chain hanging off an identifier or the DeclContext we searched in) if requested. | |
Namespaces | |
namespace | clang |
Defines | |
#define | OR_FIELD(Field) DD.Field |= MergeDD.Field; |
#define | MATCH_FIELD(Field) |
#define | ABSTRACT_DECL(TYPE) |
#define | DECL(TYPE, BASE) |
#define | ABSTRACT_DECL(TYPE) |
#define | DECL(TYPE, BASE) |
#define | ABSTRACT_DECL(TYPE) |
#define | DECL(TYPE, BASE) |
Functions | |
template<typename T > | |
static T | assert_cast (T t) |
"Cast" to type T, asserting if we don't have an implicit conversion. We use this to put code in a template that will only be valid for certain instantiations. | |
template<typename T > | |
static T | assert_cast (...) |
static bool | isConsumerInterestedIn (Decl *D, bool HasBody) |
Determine whether the consumer will be interested in seeing this declaration (via HandleTopLevelDecl). | |
static bool | isSameTemplateParameterList (const TemplateParameterList *X, const TemplateParameterList *Y) |
Determine whether two template parameter lists are similar enough that they may be used in declarations of the same template. | |
static bool | isSameTemplateParameter (const NamedDecl *X, const NamedDecl *Y) |
Determine whether two template parameters are similar enough that they may be used in declarations of the same template. | |
static NamespaceDecl * | getNamespace (const NestedNameSpecifier *X) |
static bool | isSameQualifier (const NestedNameSpecifier *X, const NestedNameSpecifier *Y) |
static bool | isSameEntity (NamedDecl *X, NamedDecl *Y) |
Determine whether the two declarations refer to the same entity. | |
static DeclContext * | getPrimaryContextForMerging (DeclContext *DC) |
static NamedDecl * | getDeclForMerging (NamedDecl *Found, bool IsTypedefNameForLinkage) |
template<typename DeclT > | |
llvm::iterator_range < MergedRedeclIterator< DeclT > > | merged_redecls (DeclT *D) |
template<typename DeclT , typename Fn > | |
static void | forAllLaterRedecls (DeclT *D, Fn F) |
#define ABSTRACT_DECL | ( | TYPE | ) |
#define ABSTRACT_DECL | ( | TYPE | ) |
#define ABSTRACT_DECL | ( | TYPE | ) |
case Decl::TYPE: \ attachPreviousDeclImpl(Reader, cast<TYPE##Decl>(D), Previous); \ break;
case Decl::TYPE: \ attachLatestDeclImpl(cast<TYPE##Decl>(D), Latest); \ break;
case Decl::TYPE: \ ASTDeclReader::markIncompleteDeclChainImpl(cast<TYPE##Decl>(D)); \ break;
#define MATCH_FIELD | ( | Field | ) |
DetectedOdrViolation |= DD.Field != MergeDD.Field; \ OR_FIELD(Field)
#define OR_FIELD | ( | Field | ) | DD.Field |= MergeDD.Field; |
static T assert_cast | ( | T | t | ) | [static] |
"Cast" to type T, asserting if we don't have an implicit conversion. We use this to put code in a template that will only be valid for certain instantiations.
Definition at line 2110 of file ASTReaderDecl.cpp.
static T assert_cast | ( | ... | ) | [static] |
Definition at line 2111 of file ASTReaderDecl.cpp.
static void forAllLaterRedecls | ( | DeclT * | D, |
Fn | F | ||
) | [static] |
Definition at line 3491 of file ASTReaderDecl.cpp.
References clang::Decl::getMostRecentDecl(), and clang::Decl::getPreviousDecl().
Referenced by clang::ASTDeclReader::UpdateDecl().
static NamedDecl* getDeclForMerging | ( | NamedDecl * | Found, |
bool | IsTypedefNameForLinkage | ||
) | [static] |
Find the declaration that should be merged into, given the declaration found by name lookup. If we're merging an anonymous declaration within a typedef, we need a matching typedef, and we merge with the type inside it.
Definition at line 2577 of file ASTReaderDecl.cpp.
References clang::Decl::isFromASTFile().
static NamespaceDecl* getNamespace | ( | const NestedNameSpecifier * | X | ) | [static] |
Definition at line 2348 of file ASTReaderDecl.cpp.
References clang::NestedNameSpecifier::getAsNamespace(), and clang::NestedNameSpecifier::getAsNamespaceAlias().
Referenced by isSameQualifier().
static DeclContext* getPrimaryContextForMerging | ( | DeclContext * | DC | ) | [static] |
Find the context in which we should search for previous declarations when looking for declarations to merge.
Definition at line 2532 of file ASTReaderDecl.cpp.
References clang::DeclContext::getPrimaryContext().
static bool isConsumerInterestedIn | ( | Decl * | D, |
bool | HasBody | ||
) | [static] |
Determine whether the consumer will be interested in seeing this declaration (via HandleTopLevelDecl).
This routine should return true for anything that might affect code generation, e.g., inline function definitions, Objective-C declarations with metadata, etc.
Definition at line 2270 of file ASTReaderDecl.cpp.
References clang::VarDecl::Definition, and Func.
static bool isSameEntity | ( | NamedDecl * | X, |
NamedDecl * | Y | ||
) | [static] |
Determine whether the two declarations refer to the same entity.
Definition at line 2410 of file ASTReaderDecl.cpp.
References clang::DeclContext::Equals(), clang::Decl::getASTContext(), clang::Decl::getDeclContext(), clang::NamedDecl::getDeclName(), clang::Decl::getKind(), clang::NamedDecl::getLinkageInternal(), clang::DeclContext::getRedeclContext(), clang::TagDecl::getTagKind(), clang::UsingShadowDecl::getTargetDecl(), clang::TemplateDecl::getTemplatedDecl(), clang::TemplateDecl::getTemplateParameters(), clang::ValueDecl::getType(), clang::ASTContext::hasSameType(), clang::NamespaceDecl::isInline(), isSameQualifier(), isSameTemplateParameterList(), clang::TTK_Class, clang::TTK_Interface, clang::TTK_Struct, and X.
static bool isSameQualifier | ( | const NestedNameSpecifier * | X, |
const NestedNameSpecifier * | Y | ||
) | [static] |
Definition at line 2356 of file ASTReaderDecl.cpp.
References clang::NestedNameSpecifier::getAsIdentifier(), clang::NestedNameSpecifier::getAsType(), clang::Type::getCanonicalTypeInternal(), clang::NestedNameSpecifier::getKind(), getNamespace(), clang::NestedNameSpecifier::getPrefix(), clang::NestedNameSpecifier::Global, clang::NestedNameSpecifier::Identifier, clang::NestedNameSpecifier::Namespace, clang::NestedNameSpecifier::NamespaceAlias, clang::NestedNameSpecifier::Super, clang::NestedNameSpecifier::TypeSpec, and clang::NestedNameSpecifier::TypeSpecWithTemplate.
Referenced by isSameEntity().
static bool isSameTemplateParameter | ( | const NamedDecl * | X, |
const NamedDecl * | Y | ||
) | [static] |
Determine whether two template parameters are similar enough that they may be used in declarations of the same template.
Definition at line 2325 of file ASTReaderDecl.cpp.
References clang::Decl::getKind(), clang::TemplateDecl::getTemplateParameters(), clang::ValueDecl::getType(), clang::TemplateTypeParmDecl::isParameterPack(), clang::NonTypeTemplateParmDecl::isParameterPack(), clang::TemplateTemplateParmDecl::isParameterPack(), isSameTemplateParameterList(), and X.
Referenced by isSameTemplateParameterList().
static bool isSameTemplateParameterList | ( | const TemplateParameterList * | X, |
const TemplateParameterList * | Y | ||
) | [static] |
Determine whether two template parameter lists are similar enough that they may be used in declarations of the same template.
Definition at line 2397 of file ASTReaderDecl.cpp.
References clang::TemplateParameterList::getParam(), isSameTemplateParameter(), and clang::TemplateParameterList::size().
Referenced by isSameEntity(), and isSameTemplateParameter().
llvm::iterator_range<MergedRedeclIterator<DeclT> > merged_redecls | ( | DeclT * | D | ) |
Definition at line 3484 of file ASTReaderDecl.cpp.
Referenced by clang::ASTDeclReader::UpdateDecl().