};
class InheritableParamAttr : public InheritableAttr {
- virtual void anchor();
+ void anchor() override;
protected:
InheritableParamAttr(attr::Kind AK, SourceRange R,
unsigned SpellingListIndex = 0)
/// location of the statement. For GNU local labels (__label__), the decl
/// location is where the __label__ is.
class LabelDecl : public NamedDecl {
- virtual void anchor();
+ void anchor() override;
LabelStmt *TheStmt;
/// LocStart - For normal labels, this is the same as the main declaration
/// label, i.e., the location of the identifier; for GNU local labels,
bool isGnuLocal() const { return LocStart != getLocation(); }
void setLocStart(SourceLocation L) { LocStart = L; }
- SourceRange getSourceRange() const LLVM_READONLY {
+ SourceRange getSourceRange() const override LLVM_READONLY {
return SourceRange(LocStart, getLocation());
}
NamespaceDecl *PrevDecl);
typedef Redeclarable<NamespaceDecl> redeclarable_base;
- virtual NamespaceDecl *getNextRedeclaration();
- virtual NamespaceDecl *getPreviousDeclImpl();
- virtual NamespaceDecl *getMostRecentDeclImpl();
+ NamespaceDecl *getNextRedeclaration() override;
+ NamespaceDecl *getPreviousDeclImpl() override;
+ NamespaceDecl *getMostRecentDeclImpl() override;
public:
static NamespaceDecl *Create(ASTContext &C, DeclContext *DC,
}
/// Retrieves the canonical declaration of this namespace.
- NamespaceDecl *getCanonicalDecl() {
+ NamespaceDecl *getCanonicalDecl() override {
return getOriginalNamespace();
}
const NamespaceDecl *getCanonicalDecl() const {
return getOriginalNamespace();
}
-
- virtual SourceRange getSourceRange() const LLVM_READONLY {
+
+ SourceRange getSourceRange() const override LLVM_READONLY {
return SourceRange(LocStart, RBraceLoc);
}
/// an lvalue) a function (in which case it is a function designator) or
/// an enum constant.
class ValueDecl : public NamedDecl {
- virtual void anchor();
+ void anchor() override;
QualType DeclType;
protected:
/// range taking into account any outer template declarations.
SourceLocation getOuterLocStart() const;
- virtual SourceRange getSourceRange() const LLVM_READONLY;
+ SourceRange getSourceRange() const override LLVM_READONLY;
SourceLocation getLocStart() const LLVM_READONLY {
return getOuterLocStart();
}
TypeSourceInfo *TInfo, StorageClass SC);
typedef Redeclarable<VarDecl> redeclarable_base;
- virtual VarDecl *getNextRedeclaration() { return RedeclLink.getNext(); }
- virtual VarDecl *getPreviousDeclImpl() {
+ VarDecl *getNextRedeclaration() override { return RedeclLink.getNext(); }
+ VarDecl *getPreviousDeclImpl() override {
return getPreviousDecl();
}
- virtual VarDecl *getMostRecentDeclImpl() {
+ VarDecl *getMostRecentDeclImpl() override {
return getMostRecentDecl();
}
StorageClass S);
static VarDecl *CreateDeserialized(ASTContext &C, unsigned ID);
-
- virtual SourceRange getSourceRange() const LLVM_READONLY;
+
+ SourceRange getSourceRange() const override LLVM_READONLY;
/// \brief Returns the storage class as written in the source. For the
/// computed linkage of symbol, see getLinkage.
return getKind() != Decl::ParmVar && getDeclContext()->isRecord();
}
- virtual VarDecl *getCanonicalDecl();
+ VarDecl *getCanonicalDecl() override;
const VarDecl *getCanonicalDecl() const {
return const_cast<VarDecl*>(this)->getCanonicalDecl();
}
/// \brief Determine whether this is or was instantiated from an out-of-line
/// definition of a static data member.
- virtual bool isOutOfLine() const;
+ bool isOutOfLine() const override;
/// \brief If this is a static data member, find its out-of-line definition.
VarDecl *getOutOfLineDefinition();
};
class ImplicitParamDecl : public VarDecl {
- virtual void anchor();
+ void anchor() override;
public:
static ImplicitParamDecl *Create(ASTContext &C, DeclContext *DC,
SourceLocation IdLoc, IdentifierInfo *Id,
StorageClass S, Expr *DefArg);
static ParmVarDecl *CreateDeserialized(ASTContext &C, unsigned ID);
-
- virtual SourceRange getSourceRange() const LLVM_READONLY;
+
+ SourceRange getSourceRange() const override LLVM_READONLY;
void setObjCMethodScopeInfo(unsigned parameterIndex) {
ParmVarDeclBits.IsObjCMethodParam = true;
DNLoc(NameInfo.getInfo()) {}
typedef Redeclarable<FunctionDecl> redeclarable_base;
- virtual FunctionDecl *getNextRedeclaration() { return RedeclLink.getNext(); }
- virtual FunctionDecl *getPreviousDeclImpl() {
+ FunctionDecl *getNextRedeclaration() override { return RedeclLink.getNext(); }
+ FunctionDecl *getPreviousDeclImpl() override {
return getPreviousDecl();
}
- virtual FunctionDecl *getMostRecentDeclImpl() {
+ FunctionDecl *getMostRecentDeclImpl() override {
return getMostRecentDecl();
}
return DeclarationNameInfo(getDeclName(), getLocation(), DNLoc);
}
- virtual void getNameForDiagnostic(raw_ostream &OS,
- const PrintingPolicy &Policy,
- bool Qualified) const;
+ void getNameForDiagnostic(raw_ostream &OS, const PrintingPolicy &Policy,
+ bool Qualified) const override;
void setRangeEnd(SourceLocation E) { EndRangeLoc = E; }
- virtual SourceRange getSourceRange() const LLVM_READONLY;
+ SourceRange getSourceRange() const override LLVM_READONLY;
/// \brief Returns true if the function has a body (definition). The
/// function body might be in any of the (re-)declarations of this
/// containing the body (if there is one).
bool hasBody(const FunctionDecl *&Definition) const;
- virtual bool hasBody() const {
+ bool hasBody() const override {
const FunctionDecl* Definition;
return hasBody(Definition);
}
/// unnecessary AST de-serialization of the body.
Stmt *getBody(const FunctionDecl *&Definition) const;
- virtual Stmt *getBody() const {
+ Stmt *getBody() const override {
const FunctionDecl* Definition;
return getBody(Definition);
}
void setPreviousDeclaration(FunctionDecl * PrevDecl);
virtual const FunctionDecl *getCanonicalDecl() const;
- virtual FunctionDecl *getCanonicalDecl();
+ FunctionDecl *getCanonicalDecl() override;
unsigned getBuiltinID() const;
/// \brief Determine whether this is or was instantiated from an out-of-line
/// definition of a member function.
- virtual bool isOutOfLine() const;
+ bool isOutOfLine() const override;
/// \brief Identify a memory copying or setting function.
/// If the given function is a memory copy or setting function, returns
return cast<RecordDecl>(getDeclContext());
}
- SourceRange getSourceRange() const LLVM_READONLY;
+ SourceRange getSourceRange() const override LLVM_READONLY;
/// Retrieves the canonical declaration of this field.
- FieldDecl *getCanonicalDecl() { return getFirstDecl(); }
+ FieldDecl *getCanonicalDecl() override { return getFirstDecl(); }
const FieldDecl *getCanonicalDecl() const { return getFirstDecl(); }
// Implement isa/cast/dyncast/etc.
void setInitExpr(Expr *E) { Init = (Stmt*) E; }
void setInitVal(const llvm::APSInt &V) { Val = V; }
- SourceRange getSourceRange() const LLVM_READONLY;
+ SourceRange getSourceRange() const override LLVM_READONLY;
/// Retrieves the canonical declaration of this enumerator.
- EnumConstantDecl *getCanonicalDecl() { return getFirstDecl(); }
+ EnumConstantDecl *getCanonicalDecl() override { return getFirstDecl(); }
const EnumConstantDecl *getCanonicalDecl() const { return getFirstDecl(); }
// Implement isa/cast/dyncast/etc.
/// field injected from an anonymous union/struct into the parent scope.
/// IndirectFieldDecl are always implicit.
class IndirectFieldDecl : public ValueDecl {
- virtual void anchor();
+ void anchor() override;
NamedDecl **Chaining;
unsigned ChainingSize;
/// TypeDecl - Represents a declaration of a type.
///
class TypeDecl : public NamedDecl {
- virtual void anchor();
+ void anchor() override;
/// TypeForDecl - This indicates the Type object that represents
/// this TypeDecl. It is a cache maintained by
/// ASTContext::getTypedefType, ASTContext::getTagDeclType, and
SourceLocation getLocStart() const LLVM_READONLY { return LocStart; }
void setLocStart(SourceLocation L) { LocStart = L; }
- virtual SourceRange getSourceRange() const LLVM_READONLY {
+ SourceRange getSourceRange() const override LLVM_READONLY {
if (LocStart.isValid())
return SourceRange(LocStart, getLocation());
else
/// Base class for declarations which introduce a typedef-name.
class TypedefNameDecl : public TypeDecl, public Redeclarable<TypedefNameDecl> {
- virtual void anchor();
+ void anchor() override;
typedef std::pair<TypeSourceInfo*, QualType> ModedTInfo;
llvm::PointerUnion<TypeSourceInfo*, ModedTInfo*> MaybeModedTInfo;
: TypeDecl(DK, DC, IdLoc, Id, StartLoc), MaybeModedTInfo(TInfo) {}
typedef Redeclarable<TypedefNameDecl> redeclarable_base;
- virtual TypedefNameDecl *getNextRedeclaration() {
+ TypedefNameDecl *getNextRedeclaration() override {
return RedeclLink.getNext();
}
- virtual TypedefNameDecl *getPreviousDeclImpl() {
+ TypedefNameDecl *getPreviousDeclImpl() override {
return getPreviousDecl();
}
- virtual TypedefNameDecl *getMostRecentDeclImpl() {
+ TypedefNameDecl *getMostRecentDeclImpl() override {
return getMostRecentDecl();
}
}
/// Retrieves the canonical declaration of this typedef-name.
- TypedefNameDecl *getCanonicalDecl() { return getFirstDecl(); }
+ TypedefNameDecl *getCanonicalDecl() override { return getFirstDecl(); }
const TypedefNameDecl *getCanonicalDecl() const { return getFirstDecl(); }
// Implement isa/cast/dyncast/etc.
SourceLocation StartLoc, SourceLocation IdLoc,
IdentifierInfo *Id, TypeSourceInfo *TInfo);
static TypedefDecl *CreateDeserialized(ASTContext &C, unsigned ID);
-
- SourceRange getSourceRange() const LLVM_READONLY;
+
+ SourceRange getSourceRange() const override LLVM_READONLY;
// Implement isa/cast/dyncast/etc.
static bool classof(const Decl *D) { return classofKind(D->getKind()); }
IdentifierInfo *Id, TypeSourceInfo *TInfo);
static TypeAliasDecl *CreateDeserialized(ASTContext &C, unsigned ID);
- SourceRange getSourceRange() const LLVM_READONLY;
+ SourceRange getSourceRange() const override LLVM_READONLY;
// Implement isa/cast/dyncast/etc.
static bool classof(const Decl *D) { return classofKind(D->getKind()); }
}
typedef Redeclarable<TagDecl> redeclarable_base;
- virtual TagDecl *getNextRedeclaration() { return RedeclLink.getNext(); }
- virtual TagDecl *getPreviousDeclImpl() {
+ TagDecl *getNextRedeclaration() override { return RedeclLink.getNext(); }
+ TagDecl *getPreviousDeclImpl() override {
return getPreviousDecl();
}
- virtual TagDecl *getMostRecentDeclImpl() {
+ TagDecl *getMostRecentDeclImpl() override {
return getMostRecentDecl();
}
/// getOuterLocStart - Return SourceLocation representing start of source
/// range taking into account any outer template declarations.
SourceLocation getOuterLocStart() const;
- virtual SourceRange getSourceRange() const LLVM_READONLY;
+ SourceRange getSourceRange() const override LLVM_READONLY;
- virtual TagDecl* getCanonicalDecl();
+ TagDecl* getCanonicalDecl() override;
const TagDecl* getCanonicalDecl() const {
return const_cast<TagDecl*>(this)->getCanonicalDecl();
}
/// with a fixed underlying type, and in C we allow them to be forward-declared
/// with no underlying type as an extension.
class EnumDecl : public TagDecl {
- virtual void anchor();
+ void anchor() override;
/// IntegerType - This represent the integer type that the enum corresponds
/// to for code generation purposes. Note that the enumerator constants may
/// have a different type than this does.
void setInstantiationOfMemberEnum(ASTContext &C, EnumDecl *ED,
TemplateSpecializationKind TSK);
public:
- EnumDecl *getCanonicalDecl() {
+ EnumDecl *getCanonicalDecl() override {
return cast<EnumDecl>(TagDecl::getCanonicalDecl());
}
const EnumDecl *getCanonicalDecl() const {
SourceLocation getAsmLoc() const { return getLocation(); }
SourceLocation getRParenLoc() const { return RParenLoc; }
void setRParenLoc(SourceLocation L) { RParenLoc = L; }
- SourceRange getSourceRange() const LLVM_READONLY {
+ SourceRange getSourceRange() const override LLVM_READONLY {
return SourceRange(getAsmLoc(), getRParenLoc());
}
void setIsVariadic(bool value) { IsVariadic = value; }
CompoundStmt *getCompoundBody() const { return (CompoundStmt*) Body; }
- Stmt *getBody() const { return (Stmt*) Body; }
+ Stmt *getBody() const override { return (Stmt*) Body; }
void setBody(CompoundStmt *B) { Body = (Stmt*) B; }
void setSignatureAsWritten(TypeSourceInfo *Sig) { SignatureAsWritten = Sig; }
ManglingContextDecl = Ctx;
}
- virtual SourceRange getSourceRange() const LLVM_READONLY;
+ SourceRange getSourceRange() const override LLVM_READONLY;
// Implement isa/cast/dyncast/etc.
static bool classof(const Decl *D) { return classofKind(D->getKind()); }
static CapturedDecl *CreateDeserialized(ASTContext &C, unsigned ID,
unsigned NumParams);
- Stmt *getBody() const { return Body; }
+ Stmt *getBody() const override { return Body; }
void setBody(Stmt *B) { Body = B; }
unsigned getNumParams() const { return NumParams; }
/// This will return an empty array if the locations of the individual
/// identifiers aren't available.
ArrayRef<SourceLocation> getIdentifierLocs() const;
-
- virtual SourceRange getSourceRange() const LLVM_READONLY;
-
+
+ SourceRange getSourceRange() const override LLVM_READONLY;
+
static bool classof(const Decl *D) { return classofKind(D->getKind()); }
static bool classofKind(Kind K) { return K == Import; }
};
SourceManager &sm, const char *Msg)
: TheDecl(theDecl), Loc(L), SM(sm), Message(Msg) {}
- virtual void print(raw_ostream &OS) const;
+ void print(raw_ostream &OS) const override;
};
typedef llvm::MutableArrayRef<NamedDecl*> DeclContextLookupResult;
/// \brief Sets the location of the colon.
void setColonLoc(SourceLocation CLoc) { ColonLoc = CLoc; }
- SourceRange getSourceRange() const LLVM_READONLY {
+ SourceRange getSourceRange() const override LLVM_READONLY {
return SourceRange(getAccessSpecifierLoc(), getColonLoc());
}
typedef std::reverse_iterator<base_class_const_iterator>
reverse_base_class_const_iterator;
- virtual CXXRecordDecl *getCanonicalDecl() {
+ CXXRecordDecl *getCanonicalDecl() override {
return cast<CXXRecordDecl>(RecordDecl::getCanonicalDecl());
}
virtual const CXXRecordDecl *getCanonicalDecl() const {
void finishedDefaultedOrDeletedMember(CXXMethodDecl *MD);
/// \brief Indicates that the definition of this class is now complete.
- virtual void completeDefinition();
+ void completeDefinition() override;
/// \brief Indicates that the definition of this class is now complete,
/// and provides a final overrider map to help determine
/// In the terminology of the C++ Standard, these are the (static and
/// non-static) member functions, whether virtual or not.
class CXXMethodDecl : public FunctionDecl {
- virtual void anchor();
+ void anchor() override;
protected:
CXXMethodDecl(Kind DK, CXXRecordDecl *RD, SourceLocation StartLoc,
const DeclarationNameInfo &NameInfo,
/// \brief Determine whether this is a move assignment operator.
bool isMoveAssignmentOperator() const;
- CXXMethodDecl *getCanonicalDecl() {
+ CXXMethodDecl *getCanonicalDecl() override {
return cast<CXXMethodDecl>(FunctionDecl::getCanonicalDecl());
}
- const CXXMethodDecl *getCanonicalDecl() const {
+ const CXXMethodDecl *getCanonicalDecl() const override {
return const_cast<CXXMethodDecl*>(this)->getCanonicalDecl();
}
/// };
/// \endcode
class CXXConstructorDecl : public CXXMethodDecl {
- virtual void anchor();
+ void anchor() override;
/// \brief Whether this constructor declaration has the \c explicit keyword
/// specified.
bool IsExplicitSpecified : 1;
/// \brief Set the constructor that this inheriting constructor is based on.
void setInheritedConstructor(const CXXConstructorDecl *BaseCtor);
- const CXXConstructorDecl *getCanonicalDecl() const {
+ const CXXConstructorDecl *getCanonicalDecl() const override {
return cast<CXXConstructorDecl>(FunctionDecl::getCanonicalDecl());
}
- CXXConstructorDecl *getCanonicalDecl() {
+ CXXConstructorDecl *getCanonicalDecl() override {
return cast<CXXConstructorDecl>(FunctionDecl::getCanonicalDecl());
}
/// };
/// \endcode
class CXXDestructorDecl : public CXXMethodDecl {
- virtual void anchor();
+ void anchor() override;
FunctionDecl *OperatorDelete;
/// };
/// \endcode
class CXXConversionDecl : public CXXMethodDecl {
- virtual void anchor();
+ void anchor() override;
/// Whether this conversion function declaration is marked
/// "explicit", meaning that it can only be applied when the user
/// explicitly wrote a cast. This is a C++0x feature.
return decls_empty() ? getLocation() : decls_begin()->getLocEnd();
}
- SourceRange getSourceRange() const LLVM_READONLY {
+ SourceRange getSourceRange() const override LLVM_READONLY {
return SourceRange(ExternLoc, getLocEnd());
}
/// artificial names for all using-directives in order to store
/// them in DeclContext effectively.
class UsingDirectiveDecl : public NamedDecl {
- virtual void anchor();
+ void anchor() override;
/// \brief The location of the \c using keyword.
SourceLocation UsingLoc;
NamedDecl *Nominated,
DeclContext *CommonAncestor);
static UsingDirectiveDecl *CreateDeserialized(ASTContext &C, unsigned ID);
-
- SourceRange getSourceRange() const LLVM_READONLY {
+
+ SourceRange getSourceRange() const override LLVM_READONLY {
return SourceRange(UsingLoc, getLocation());
}
/// namespace Foo = Bar;
/// \endcode
class NamespaceAliasDecl : public NamedDecl {
- virtual void anchor();
+ void anchor() override;
/// \brief The location of the \c namespace keyword.
SourceLocation NamespaceLoc;
NamedDecl *Namespace);
static NamespaceAliasDecl *CreateDeserialized(ASTContext &C, unsigned ID);
-
- virtual SourceRange getSourceRange() const LLVM_READONLY {
+
+ SourceRange getSourceRange() const override LLVM_READONLY {
return SourceRange(NamespaceLoc, IdentLoc);
}
/// }
/// \endcode
class UsingShadowDecl : public NamedDecl, public Redeclarable<UsingShadowDecl> {
- virtual void anchor();
+ void anchor() override;
/// The referenced declaration.
NamedDecl *Underlying;
}
typedef Redeclarable<UsingShadowDecl> redeclarable_base;
- virtual UsingShadowDecl *getNextRedeclaration() {
+ UsingShadowDecl *getNextRedeclaration() override {
return RedeclLink.getNext();
}
- virtual UsingShadowDecl *getPreviousDeclImpl() {
+ UsingShadowDecl *getPreviousDeclImpl() override {
return getPreviousDecl();
}
- virtual UsingShadowDecl *getMostRecentDeclImpl() {
+ UsingShadowDecl *getMostRecentDeclImpl() override {
return getMostRecentDecl();
}
using redeclarable_base::getPreviousDecl;
using redeclarable_base::getMostRecentDecl;
- virtual UsingShadowDecl *getCanonicalDecl() {
+ UsingShadowDecl *getCanonicalDecl() override {
return getFirstDecl();
}
- virtual const UsingShadowDecl *getCanonicalDecl() const {
+ const UsingShadowDecl *getCanonicalDecl() const {
return getFirstDecl();
}
/// using someNameSpace::someIdentifier;
/// \endcode
class UsingDecl : public NamedDecl {
- virtual void anchor();
+ void anchor() override;
/// \brief The source location of the 'using' keyword itself.
SourceLocation UsingLocation;
static UsingDecl *CreateDeserialized(ASTContext &C, unsigned ID);
- SourceRange getSourceRange() const LLVM_READONLY;
+ SourceRange getSourceRange() const override LLVM_READONLY;
static bool classof(const Decl *D) { return classofKind(D->getKind()); }
static bool classofKind(Kind K) { return K == Using; }
/// };
/// \endcode
class UnresolvedUsingValueDecl : public ValueDecl {
- virtual void anchor();
+ void anchor() override;
/// \brief The source location of the 'using' keyword
SourceLocation UsingLocation;
static UnresolvedUsingValueDecl *
CreateDeserialized(ASTContext &C, unsigned ID);
- SourceRange getSourceRange() const LLVM_READONLY;
+ SourceRange getSourceRange() const override LLVM_READONLY;
static bool classof(const Decl *D) { return classofKind(D->getKind()); }
static bool classofKind(Kind K) { return K == UnresolvedUsingValue; }
/// The type associated with an unresolved using typename decl is
/// currently always a typename type.
class UnresolvedUsingTypenameDecl : public TypeDecl {
- virtual void anchor();
+ void anchor() override;
/// \brief The source location of the 'typename' keyword
SourceLocation TypenameLocation;
SourceLocation getRParenLoc() const { return RParenLoc; }
- SourceRange getSourceRange() const LLVM_READONLY {
+ SourceRange getSourceRange() const override LLVM_READONLY {
return SourceRange(getLocation(), getRParenLoc());
}
}
/// Retrieves the source range for the friend declaration.
- SourceRange getSourceRange() const LLVM_READONLY {
+ SourceRange getSourceRange() const override LLVM_READONLY {
if (NamedDecl *ND = getFriendDecl()) {
if (FunctionTemplateDecl *FTD = dyn_cast<FunctionTemplateDecl>(ND))
return FTD->getSourceRange();
/// \brief A definition will return its interface declaration.
/// An interface declaration will return its definition.
/// Otherwise it will return itself.
- virtual ObjCMethodDecl *getNextRedeclaration();
+ ObjCMethodDecl *getNextRedeclaration() override;
public:
static ObjCMethodDecl *
bool HasRelatedResultType = false);
static ObjCMethodDecl *CreateDeserialized(ASTContext &C, unsigned ID);
-
- virtual ObjCMethodDecl *getCanonicalDecl();
+
+ ObjCMethodDecl *getCanonicalDecl() override;
const ObjCMethodDecl *getCanonicalDecl() const {
return const_cast<ObjCMethodDecl*>(this)->getCanonicalDecl();
}
// Location information, modeled after the Stmt API.
SourceLocation getLocStart() const LLVM_READONLY { return getLocation(); }
SourceLocation getLocEnd() const LLVM_READONLY;
- virtual SourceRange getSourceRange() const LLVM_READONLY {
+ SourceRange getSourceRange() const override LLVM_READONLY {
return SourceRange(getLocation(), getLocEnd());
}
const ObjCMethodDecl **InitMethod = 0) const;
/// \brief Determine whether this method has a body.
- virtual bool hasBody() const { return Body.isValid(); }
+ bool hasBody() const override { return Body.isValid(); }
/// \brief Retrieve the body of this method, if it has one.
- virtual Stmt *getBody() const;
+ Stmt *getBody() const override;
void setLazyBody(uint64_t Offset) { Body = Offset; }
/// ObjCProtocolDecl, and ObjCImplDecl.
///
class ObjCContainerDecl : public NamedDecl, public DeclContext {
- virtual void anchor();
+ void anchor() override;
SourceLocation AtStart;
AtEnd = atEnd;
}
- virtual SourceRange getSourceRange() const LLVM_READONLY {
+ SourceRange getSourceRange() const override LLVM_READONLY {
return SourceRange(AtStart, getAtEndRange().getEnd());
}
///
class ObjCInterfaceDecl : public ObjCContainerDecl
, public Redeclarable<ObjCInterfaceDecl> {
- virtual void anchor();
+ void anchor() override;
/// TypeForDecl - This indicates the Type object that represents this
/// TypeDecl. It is a cache maintained by ASTContext::getObjCInterfaceType
void allocateDefinitionData();
typedef Redeclarable<ObjCInterfaceDecl> redeclarable_base;
- virtual ObjCInterfaceDecl *getNextRedeclaration() {
+ ObjCInterfaceDecl *getNextRedeclaration() override {
return RedeclLink.getNext();
}
- virtual ObjCInterfaceDecl *getPreviousDeclImpl() {
+ ObjCInterfaceDecl *getPreviousDeclImpl() override {
return getPreviousDecl();
}
- virtual ObjCInterfaceDecl *getMostRecentDeclImpl() {
+ ObjCInterfaceDecl *getMostRecentDeclImpl() override {
return getMostRecentDecl();
}
static ObjCInterfaceDecl *CreateDeserialized(ASTContext &C, unsigned ID);
- virtual SourceRange getSourceRange() const LLVM_READONLY {
+ SourceRange getSourceRange() const override LLVM_READONLY {
if (isThisDeclarationADefinition())
return ObjCContainerDecl::getSourceRange();
ObjCPropertyDecl
*FindPropertyVisibleInPrimaryClass(IdentifierInfo *PropertyId) const;
- virtual void collectPropertiesToImplement(PropertyMap &PM,
- PropertyDeclOrder &PO) const;
+ void collectPropertiesToImplement(PropertyMap &PM,
+ PropertyDeclOrder &PO) const override;
/// isSuperClassOf - Return true if this class is the specified class or is a
/// super class of the specified interface class.
using redeclarable_base::isFirstDecl;
/// Retrieves the canonical declaration of this Objective-C class.
- ObjCInterfaceDecl *getCanonicalDecl() { return getFirstDecl(); }
+ ObjCInterfaceDecl *getCanonicalDecl() override { return getFirstDecl(); }
const ObjCInterfaceDecl *getCanonicalDecl() const { return getFirstDecl(); }
// Low-level accessor
/// }
///
class ObjCIvarDecl : public FieldDecl {
- virtual void anchor();
+ void anchor() override;
public:
enum AccessControl {
/// \brief Represents a field declaration created by an \@defs(...).
class ObjCAtDefsFieldDecl : public FieldDecl {
- virtual void anchor();
+ void anchor() override;
ObjCAtDefsFieldDecl(DeclContext *DC, SourceLocation StartLoc,
SourceLocation IdLoc, IdentifierInfo *Id,
QualType T, Expr *BW)
///
class ObjCProtocolDecl : public ObjCContainerDecl,
public Redeclarable<ObjCProtocolDecl> {
- virtual void anchor();
+ void anchor() override;
struct DefinitionData {
// \brief The declaration that defines this protocol.
void allocateDefinitionData();
typedef Redeclarable<ObjCProtocolDecl> redeclarable_base;
- virtual ObjCProtocolDecl *getNextRedeclaration() {
+ ObjCProtocolDecl *getNextRedeclaration() override {
return RedeclLink.getNext();
}
- virtual ObjCProtocolDecl *getPreviousDeclImpl() {
+ ObjCProtocolDecl *getPreviousDeclImpl() override {
return getPreviousDecl();
}
- virtual ObjCProtocolDecl *getMostRecentDeclImpl() {
+ ObjCProtocolDecl *getMostRecentDeclImpl() override {
return getMostRecentDecl();
}
/// \brief Starts the definition of this Objective-C protocol.
void startDefinition();
- virtual SourceRange getSourceRange() const LLVM_READONLY {
+ SourceRange getSourceRange() const override LLVM_READONLY {
if (isThisDeclarationADefinition())
return ObjCContainerDecl::getSourceRange();
using redeclarable_base::isFirstDecl;
/// Retrieves the canonical declaration of this Objective-C protocol.
- ObjCProtocolDecl *getCanonicalDecl() { return getFirstDecl(); }
+ ObjCProtocolDecl *getCanonicalDecl() override { return getFirstDecl(); }
const ObjCProtocolDecl *getCanonicalDecl() const { return getFirstDecl(); }
- virtual void collectPropertiesToImplement(PropertyMap &PM,
- PropertyDeclOrder &PO) const;
-
-void collectInheritedProtocolProperties(const ObjCPropertyDecl *Property,
- ProtocolPropertyMap &PM) const;
+ void collectPropertiesToImplement(PropertyMap &PM,
+ PropertyDeclOrder &PO) const override;
+
+ void collectInheritedProtocolProperties(const ObjCPropertyDecl *Property,
+ ProtocolPropertyMap &PM) const;
static bool classof(const Decl *D) { return classofKind(D->getKind()); }
static bool classofKind(Kind K) { return K == ObjCProtocol; }
/// don't support this level of dynamism, which is both powerful and dangerous.
///
class ObjCCategoryDecl : public ObjCContainerDecl {
- virtual void anchor();
+ void anchor() override;
/// Interface belonging to this category
ObjCInterfaceDecl *ClassInterface;
};
class ObjCImplDecl : public ObjCContainerDecl {
- virtual void anchor();
+ void anchor() override;
/// Class interface for this class/category implementation
ObjCInterfaceDecl *ClassInterface;
///
/// ObjCCategoryImplDecl
class ObjCCategoryImplDecl : public ObjCImplDecl {
- virtual void anchor();
+ void anchor() override;
// Category name
IdentifierInfo *Id;
/// specified, they need to be *identical* to the interface.
///
class ObjCImplementationDecl : public ObjCImplDecl {
- virtual void anchor();
+ void anchor() override;
/// Implementation Class's super class.
ObjCInterfaceDecl *SuperClass;
SourceLocation SuperLoc;
/// ObjCCompatibleAliasDecl - Represents alias of a class. This alias is
/// declared as \@compatibility_alias alias class.
class ObjCCompatibleAliasDecl : public NamedDecl {
- virtual void anchor();
+ void anchor() override;
/// Class that this is an alias of.
ObjCInterfaceDecl *AliasedClass;
/// \@property (assign, readwrite) int MyProperty;
/// \endcode
class ObjCPropertyDecl : public NamedDecl {
- virtual void anchor();
+ void anchor() override;
public:
enum PropertyAttributeKind {
OBJC_PR_noattr = 0x00,
return PropertyIvarDecl;
}
- virtual SourceRange getSourceRange() const LLVM_READONLY {
+ SourceRange getSourceRange() const override LLVM_READONLY {
return SourceRange(AtLoc, getLocation());
}
SourceLocation ivarLoc);
static ObjCPropertyImplDecl *CreateDeserialized(ASTContext &C, unsigned ID);
-
- virtual SourceRange getSourceRange() const LLVM_READONLY;
+
+ SourceRange getSourceRange() const override LLVM_READONLY;
SourceLocation getLocStart() const LLVM_READONLY { return AtLoc; }
void setAtLoc(SourceLocation Loc) { AtLoc = Loc; }
/// The TemplateDecl class stores the list of template parameters and a
/// reference to the templated scoped declaration: the underlying AST node.
class TemplateDecl : public NamedDecl {
- virtual void anchor();
+ void anchor() override;
protected:
// This is probably never used.
TemplateDecl(Kind DK, DeclContext *DC, SourceLocation L,
return K >= firstTemplate && K <= lastTemplate;
}
- SourceRange getSourceRange() const LLVM_READONLY {
+ SourceRange getSourceRange() const override LLVM_READONLY {
return SourceRange(TemplateParams->getTemplateLoc(),
TemplatedDecl->getSourceRange().getEnd());
}
public Redeclarable<RedeclarableTemplateDecl>
{
typedef Redeclarable<RedeclarableTemplateDecl> redeclarable_base;
- virtual RedeclarableTemplateDecl *getNextRedeclaration() {
+ RedeclarableTemplateDecl *getNextRedeclaration() override {
return RedeclLink.getNext();
}
- virtual RedeclarableTemplateDecl *getPreviousDeclImpl() {
+ RedeclarableTemplateDecl *getPreviousDeclImpl() override {
return getPreviousDecl();
}
- virtual RedeclarableTemplateDecl *getMostRecentDeclImpl() {
+ RedeclarableTemplateDecl *getMostRecentDeclImpl() override {
return getMostRecentDecl();
}
template <class decl_type> friend class RedeclarableTemplate;
/// \brief Retrieves the canonical declaration of this template.
- RedeclarableTemplateDecl *getCanonicalDecl() { return getFirstDecl(); }
+ RedeclarableTemplateDecl *getCanonicalDecl() override {
+ return getFirstDecl();
+ }
const RedeclarableTemplateDecl *getCanonicalDecl() const {
return getFirstDecl();
}
TemplateParameterList *Params, NamedDecl *Decl)
: RedeclarableTemplateDecl(FunctionTemplate, DC, L, Name, Params, Decl) { }
- CommonBase *newCommon(ASTContext &C) const;
+ CommonBase *newCommon(ASTContext &C) const override;
Common *getCommonPtr() const {
return static_cast<Common *>(RedeclarableTemplateDecl::getCommonPtr());
FunctionDecl *findSpecialization(const TemplateArgument *Args,
unsigned NumArgs, void *&InsertPos);
- FunctionTemplateDecl *getCanonicalDecl() {
+ FunctionTemplateDecl *getCanonicalDecl() override {
return cast<FunctionTemplateDecl>(
RedeclarableTemplateDecl::getCanonicalDecl());
}
/// \brief Returns whether this is a parameter pack.
bool isParameterPack() const;
- SourceRange getSourceRange() const LLVM_READONLY;
+ SourceRange getSourceRange() const override LLVM_READONLY;
// Implement isa/cast/dyncast/etc.
static bool classof(const Decl *D) { return classofKind(D->getKind()); }
using TemplateParmPosition::setPosition;
using TemplateParmPosition::getIndex;
- SourceRange getSourceRange() const LLVM_READONLY;
+ SourceRange getSourceRange() const override LLVM_READONLY;
/// \brief Determine whether this template parameter has a default
/// argument.
class TemplateTemplateParmDecl : public TemplateDecl,
protected TemplateParmPosition
{
- virtual void anchor();
+ void anchor() override;
/// DefaultArgument - The default template argument, if any.
TemplateArgumentLoc DefaultArgument;
DefaultArgumentWasInherited = false;
}
- SourceRange getSourceRange() const LLVM_READONLY {
+ SourceRange getSourceRange() const override LLVM_READONLY {
SourceLocation End = getLocation();
if (hasDefaultArgument() && !defaultArgumentWasInherited())
End = getDefaultArgument().getSourceRange().getEnd();
static ClassTemplateSpecializationDecl *
CreateDeserialized(ASTContext &C, unsigned ID);
- virtual void getNameForDiagnostic(raw_ostream &OS,
- const PrintingPolicy &Policy,
- bool Qualified) const;
+ void getNameForDiagnostic(raw_ostream &OS, const PrintingPolicy &Policy,
+ bool Qualified) const override;
ClassTemplateSpecializationDecl *getMostRecentDecl() {
CXXRecordDecl *Recent = static_cast<CXXRecordDecl *>(
return ExplicitInfo ? ExplicitInfo->TemplateKeywordLoc : SourceLocation();
}
- SourceRange getSourceRange() const LLVM_READONLY;
+ SourceRange getSourceRange() const override LLVM_READONLY;
void Profile(llvm::FoldingSetNodeID &ID) const {
Profile(ID, TemplateArgs->data(), TemplateArgs->size(), getASTContext());
class ClassTemplatePartialSpecializationDecl
: public ClassTemplateSpecializationDecl {
- virtual void anchor();
+ void anchor() override;
/// \brief The list of template parameters
TemplateParameterList* TemplateParams;
: RedeclarableTemplateDecl(ClassTemplate, 0, SourceLocation(),
DeclarationName(), 0, 0) { }
- CommonBase *newCommon(ASTContext &C) const;
+ CommonBase *newCommon(ASTContext &C) const override;
Common *getCommonPtr() const {
return static_cast<Common *>(RedeclarableTemplateDecl::getCommonPtr());
/// in. InsertPos must be obtained from findSpecialization.
void AddSpecialization(ClassTemplateSpecializationDecl *D, void *InsertPos);
- ClassTemplateDecl *getCanonicalDecl() {
+ ClassTemplateDecl *getCanonicalDecl() override {
return cast<ClassTemplateDecl>(
RedeclarableTemplateDecl::getCanonicalDecl());
}
TemplateParameterList *Params, NamedDecl *Decl)
: RedeclarableTemplateDecl(TypeAliasTemplate, DC, L, Name, Params, Decl) { }
- CommonBase *newCommon(ASTContext &C) const;
+ CommonBase *newCommon(ASTContext &C) const override;
Common *getCommonPtr() {
return static_cast<Common *>(RedeclarableTemplateDecl::getCommonPtr());
}
- TypeAliasTemplateDecl *getCanonicalDecl() {
+ TypeAliasTemplateDecl *getCanonicalDecl() override {
return cast<TypeAliasTemplateDecl>(
RedeclarableTemplateDecl::getCanonicalDecl());
}
static VarTemplateSpecializationDecl *CreateDeserialized(ASTContext &C,
unsigned ID);
- virtual void getNameForDiagnostic(raw_ostream &OS,
- const PrintingPolicy &Policy,
- bool Qualified) const;
+ void getNameForDiagnostic(raw_ostream &OS, const PrintingPolicy &Policy,
+ bool Qualified) const override;
VarTemplateSpecializationDecl *getMostRecentDecl() {
VarDecl *Recent = static_cast<VarDecl *>(this)->getMostRecentDecl();
class VarTemplatePartialSpecializationDecl
: public VarTemplateSpecializationDecl {
- virtual void anchor();
+ void anchor() override;
/// \brief The list of template parameters
TemplateParameterList *TemplateParams;
: RedeclarableTemplateDecl(VarTemplate, 0, SourceLocation(),
DeclarationName(), 0, 0) {}
- CommonBase *newCommon(ASTContext &C) const;
+ CommonBase *newCommon(ASTContext &C) const override;
Common *getCommonPtr() const {
return static_cast<Common *>(RedeclarableTemplateDecl::getCommonPtr());
/// in. InsertPos must be obtained from findSpecialization.
void AddSpecialization(VarTemplateSpecializationDecl *D, void *InsertPos);
- VarTemplateDecl *getCanonicalDecl() {
+ VarTemplateDecl *getCanonicalDecl() override {
return cast<VarTemplateDecl>(RedeclarableTemplateDecl::getCanonicalDecl());
}
const VarTemplateDecl *getCanonicalDecl() const {
VirtualBaseClassOffsetOffsetsMapTy;
VirtualBaseClassOffsetOffsetsMapTy VirtualBaseClassOffsetOffsets;
- void computeVTableRelatedInformation(const CXXRecordDecl *RD);
+ void computeVTableRelatedInformation(const CXXRecordDecl *RD) override;
public:
ItaniumVTableContext(ASTContext &Context);
void enumerateVFPtrs(const CXXRecordDecl *ForClass, VPtrInfoVector &Result);
- void computeVTableRelatedInformation(const CXXRecordDecl *RD);
+ void computeVTableRelatedInformation(const CXXRecordDecl *RD) override;
void dumpMethodLocations(const CXXRecordDecl *RD,
const MethodVFTableLocationsTy &NewMethods,
const MethodVFTableLocation &getMethodVFTableLocation(GlobalDecl GD);
- const ThunkInfoVectorTy *getThunkInfo(GlobalDecl GD) {
+ const ThunkInfoVectorTy *getThunkInfo(GlobalDecl GD) override {
// Complete destructors don't have a slot in a vftable, so no thunks needed.
if (isa<CXXDestructorDecl>(GD.getDecl()) &&
GD.getDtorType() == Dtor_Complete)
public:
/// Variable decls are numbered by identifier.
- virtual unsigned getManglingNumber(const VarDecl *VD, unsigned) {
+ unsigned getManglingNumber(const VarDecl *VD, unsigned) override {
return ++VarManglingNumbers[VD->getIdentifier()];
}
- virtual unsigned getManglingNumber(const TagDecl *TD, unsigned) {
+ unsigned getManglingNumber(const TagDecl *TD, unsigned) override {
return ++TagManglingNumbers[TD->getIdentifier()];
}
};
ItaniumCXXABI(ASTContext &Ctx) : Context(Ctx) { }
std::pair<uint64_t, unsigned>
- getMemberPointerWidthAndAlign(const MemberPointerType *MPT) const {
+ getMemberPointerWidthAndAlign(const MemberPointerType *MPT) const override {
const TargetInfo &Target = Context.getTargetInfo();
TargetInfo::IntType PtrDiff = Target.getPtrDiffType(0);
uint64_t Width = Target.getTypeWidth(PtrDiff);
return std::make_pair(Width, Align);
}
- CallingConv getDefaultMethodCallConv(bool isVariadic) const {
+ CallingConv getDefaultMethodCallConv(bool isVariadic) const override {
const llvm::Triple &T = Context.getTargetInfo().getTriple();
if (!isVariadic && T.getOS() == llvm::Triple::MinGW32 &&
T.getArch() == llvm::Triple::x86)
// We cheat and just check that the class has a vtable pointer, and that it's
// only big enough to have a vtable pointer and nothing more (or less).
- bool isNearlyEmpty(const CXXRecordDecl *RD) const {
+ bool isNearlyEmpty(const CXXRecordDecl *RD) const override {
// Check that the class has a vtable pointer.
if (!RD->isDynamicClass())
return Layout.getNonVirtualSize() == PointerSize;
}
- virtual MangleNumberingContext *createMangleNumberingContext() const {
+ MangleNumberingContext *createMangleNumberingContext() const override {
return new ItaniumNumberingContext();
}
};
/// @name Mangler Entry Points
/// @{
- bool shouldMangleCXXName(const NamedDecl *D);
- void mangleCXXName(const NamedDecl *D, raw_ostream &);
- void mangleThunk(const CXXMethodDecl *MD,
- const ThunkInfo &Thunk,
- raw_ostream &);
+ bool shouldMangleCXXName(const NamedDecl *D) override;
+ void mangleCXXName(const NamedDecl *D, raw_ostream &) override;
+ void mangleThunk(const CXXMethodDecl *MD, const ThunkInfo &Thunk,
+ raw_ostream &) override;
void mangleCXXDtorThunk(const CXXDestructorDecl *DD, CXXDtorType Type,
const ThisAdjustment &ThisAdjustment,
- raw_ostream &);
- void mangleReferenceTemporary(const VarDecl *D,
- raw_ostream &);
- void mangleCXXVTable(const CXXRecordDecl *RD,
- raw_ostream &);
- void mangleCXXVTT(const CXXRecordDecl *RD,
- raw_ostream &);
+ raw_ostream &) override;
+ void mangleReferenceTemporary(const VarDecl *D, raw_ostream &) override;
+ void mangleCXXVTable(const CXXRecordDecl *RD, raw_ostream &) override;
+ void mangleCXXVTT(const CXXRecordDecl *RD, raw_ostream &) override;
void mangleCXXCtorVTable(const CXXRecordDecl *RD, int64_t Offset,
- const CXXRecordDecl *Type,
- raw_ostream &);
- void mangleCXXRTTI(QualType T, raw_ostream &);
- void mangleCXXRTTIName(QualType T, raw_ostream &);
- void mangleTypeName(QualType T, raw_ostream &);
+ const CXXRecordDecl *Type, raw_ostream &) override;
+ void mangleCXXRTTI(QualType T, raw_ostream &) override;
+ void mangleCXXRTTIName(QualType T, raw_ostream &) override;
+ void mangleTypeName(QualType T, raw_ostream &) override;
void mangleCXXCtor(const CXXConstructorDecl *D, CXXCtorType Type,
- raw_ostream &);
+ raw_ostream &) override;
void mangleCXXDtor(const CXXDestructorDecl *D, CXXDtorType Type,
- raw_ostream &);
-
- void mangleStaticGuardVariable(const VarDecl *D, raw_ostream &);
- void mangleDynamicInitializer(const VarDecl *D, raw_ostream &Out);
- void mangleDynamicAtExitDestructor(const VarDecl *D, raw_ostream &Out);
- void mangleItaniumThreadLocalInit(const VarDecl *D, raw_ostream &);
- void mangleItaniumThreadLocalWrapper(const VarDecl *D, raw_ostream &);
+ raw_ostream &) override;
+
+ void mangleStaticGuardVariable(const VarDecl *D, raw_ostream &) override;
+ void mangleDynamicInitializer(const VarDecl *D, raw_ostream &Out) override;
+ void mangleDynamicAtExitDestructor(const VarDecl *D,
+ raw_ostream &Out) override;
+ void mangleItaniumThreadLocalInit(const VarDecl *D, raw_ostream &) override;
+ void mangleItaniumThreadLocalWrapper(const VarDecl *D,
+ raw_ostream &) override;
bool getNextDiscriminator(const NamedDecl *ND, unsigned &disc) {
// Lambda closure types are already numbered.
/// Typically these are things like static locals, lambdas, or blocks.
class MicrosoftNumberingContext : public MangleNumberingContext {
public:
- virtual unsigned getManglingNumber(const VarDecl *VD,
- unsigned MSLocalManglingNumber) {
+ unsigned getManglingNumber(const VarDecl *VD,
+ unsigned MSLocalManglingNumber) override {
return MSLocalManglingNumber;
}
- virtual unsigned getManglingNumber(const TagDecl *TD,
- unsigned MSLocalManglingNumber) {
+ unsigned getManglingNumber(const TagDecl *TD,
+ unsigned MSLocalManglingNumber) override {
return MSLocalManglingNumber;
}
};
MicrosoftCXXABI(ASTContext &Ctx) : Context(Ctx) { }
std::pair<uint64_t, unsigned>
- getMemberPointerWidthAndAlign(const MemberPointerType *MPT) const;
+ getMemberPointerWidthAndAlign(const MemberPointerType *MPT) const override;
- CallingConv getDefaultMethodCallConv(bool isVariadic) const {
+ CallingConv getDefaultMethodCallConv(bool isVariadic) const override {
if (!isVariadic &&
Context.getTargetInfo().getTriple().getArch() == llvm::Triple::x86)
return CC_X86ThisCall;
return CC_C;
}
- bool isNearlyEmpty(const CXXRecordDecl *RD) const {
+ bool isNearlyEmpty(const CXXRecordDecl *RD) const override {
// FIXME: Audit the corners
if (!RD->isDynamicClass())
return false;
Layout.getNonVirtualSize() == PointerSize * 2;
}
- MangleNumberingContext *createMangleNumberingContext() const {
+ MangleNumberingContext *createMangleNumberingContext() const override {
return new MicrosoftNumberingContext();
}
};
public:
MicrosoftMangleContextImpl(ASTContext &Context, DiagnosticsEngine &Diags)
: MicrosoftMangleContext(Context, Diags) {}
- virtual bool shouldMangleCXXName(const NamedDecl *D);
- virtual void mangleCXXName(const NamedDecl *D, raw_ostream &Out);
- virtual void mangleVirtualMemPtrThunk(const CXXMethodDecl *MD,
- raw_ostream &);
- virtual void mangleThunk(const CXXMethodDecl *MD,
- const ThunkInfo &Thunk,
- raw_ostream &);
- virtual void mangleCXXDtorThunk(const CXXDestructorDecl *DD, CXXDtorType Type,
- const ThisAdjustment &ThisAdjustment,
- raw_ostream &);
- virtual void mangleCXXVFTable(const CXXRecordDecl *Derived,
- ArrayRef<const CXXRecordDecl *> BasePath,
- raw_ostream &Out);
- virtual void mangleCXXVBTable(const CXXRecordDecl *Derived,
- ArrayRef<const CXXRecordDecl *> BasePath,
- raw_ostream &Out);
- virtual void mangleCXXRTTI(QualType T, raw_ostream &);
- virtual void mangleCXXRTTIName(QualType T, raw_ostream &);
- virtual void mangleTypeName(QualType T, raw_ostream &);
- virtual void mangleCXXCtor(const CXXConstructorDecl *D, CXXCtorType Type,
- raw_ostream &);
- virtual void mangleCXXDtor(const CXXDestructorDecl *D, CXXDtorType Type,
- raw_ostream &);
- virtual void mangleReferenceTemporary(const VarDecl *, raw_ostream &);
- virtual void mangleStaticGuardVariable(const VarDecl *D, raw_ostream &Out);
- virtual void mangleDynamicInitializer(const VarDecl *D, raw_ostream &Out);
- virtual void mangleDynamicAtExitDestructor(const VarDecl *D,
- raw_ostream &Out);
+ bool shouldMangleCXXName(const NamedDecl *D) override;
+ void mangleCXXName(const NamedDecl *D, raw_ostream &Out) override;
+ void mangleVirtualMemPtrThunk(const CXXMethodDecl *MD, raw_ostream &) override;
+ void mangleThunk(const CXXMethodDecl *MD, const ThunkInfo &Thunk,
+ raw_ostream &) override;
+ void mangleCXXDtorThunk(const CXXDestructorDecl *DD, CXXDtorType Type,
+ const ThisAdjustment &ThisAdjustment,
+ raw_ostream &) override;
+ void mangleCXXVFTable(const CXXRecordDecl *Derived,
+ ArrayRef<const CXXRecordDecl *> BasePath,
+ raw_ostream &Out) override;
+ void mangleCXXVBTable(const CXXRecordDecl *Derived,
+ ArrayRef<const CXXRecordDecl *> BasePath,
+ raw_ostream &Out) override;
+ void mangleCXXRTTI(QualType T, raw_ostream &) override;
+ void mangleCXXRTTIName(QualType T, raw_ostream &) override;
+ void mangleTypeName(QualType T, raw_ostream &) override;
+ void mangleCXXCtor(const CXXConstructorDecl *D, CXXCtorType Type,
+ raw_ostream &) override;
+ void mangleCXXDtor(const CXXDestructorDecl *D, CXXDtorType Type,
+ raw_ostream &) override;
+ void mangleReferenceTemporary(const VarDecl *, raw_ostream &) override;
+ void mangleStaticGuardVariable(const VarDecl *D, raw_ostream &Out) override;
+ void mangleDynamicInitializer(const VarDecl *D, raw_ostream &Out) override;
+ void mangleDynamicAtExitDestructor(const VarDecl *D,
+ raw_ostream &Out) override;
bool getNextDiscriminator(const NamedDecl *ND, unsigned &disc) {
// Lambda closure types are already numbered.
if (isLambda(ND))
OS << " }\n\n";
}
- OS << " virtual " << R.getName() << "Attr *clone (ASTContext &C) const;\n";
- OS << " virtual void printPretty(raw_ostream &OS,\n"
- << " const PrintingPolicy &Policy) const;\n";
- OS << " virtual const char *getSpelling() const;\n";
+ OS << " " << R.getName() << "Attr *clone(ASTContext &C) const override;\n";
+ OS << " void printPretty(raw_ostream &OS,\n"
+ << " const PrintingPolicy &Policy) const override;\n";
+ OS << " const char *getSpelling() const override;\n";
if (!ElideSpelling) {
assert(!SemanticToSyntacticMap.empty() && "Empty semantic mapping list");
<< "attr::" << R.getName() << "; }\n";
bool LateParsed = R.getValueAsBit("LateParsed");
- OS << " virtual bool isLateParsed() const { return "
+ OS << " bool isLateParsed() const override { return "
<< LateParsed << "; }\n";
if (R.getValueAsBit("DuplicatesAllowedWhileMerging"))
- OS << " virtual bool duplicatesAllowed() const { return true; }\n\n";
+ OS << " bool duplicatesAllowed() const override { return true; }\n\n";
OS << "};\n\n";
}