blob: 071188fa0541bae41d7e13dc481da83950dbe48b [file] [log] [blame]
/*===- TableGen'erated file -------------------------------------*- C++ -*-===*\
|* *|
|*Attribute classes' member function definitions *|
|* *|
|* Automatically generated file, do not edit! *|
|* *|
\*===----------------------------------------------------------------------===*/
ARMInterruptAttr *ARMInterruptAttr::clone(ASTContext &C) const {
auto *A = new (C) ARMInterruptAttr(getLocation(), C, interrupt, getSpellingListIndex());
A->Inherited = Inherited;
A->IsPackExpansion = IsPackExpansion;
A->Implicit = Implicit;
return A;
}
void ARMInterruptAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
break;
case 0 : {
OS << " __attribute__((interrupt(" << getInterrupt() << ")))";
break;
}
}
}
const char *ARMInterruptAttr::getSpelling() const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
return "(No spelling)";
case 0:
return "interrupt";
}
}
AcquireCapabilityAttr *AcquireCapabilityAttr::clone(ASTContext &C) const {
auto *A = new (C) AcquireCapabilityAttr(getLocation(), C, args_, args_Size, getSpellingListIndex());
A->Inherited = Inherited;
A->IsPackExpansion = IsPackExpansion;
A->Implicit = Implicit;
return A;
}
void AcquireCapabilityAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
break;
case 0 : {
OS << " __attribute__((acquire_capability(";
bool isFirst = true;
for (const auto &Val : args()) {
if (isFirst) isFirst = false;
else OS << ", ";
OS << Val;
}
OS << ")))";
break;
}
case 1 : {
OS << " [[clang::acquire_capability(";
bool isFirst = true;
for (const auto &Val : args()) {
if (isFirst) isFirst = false;
else OS << ", ";
OS << Val;
}
OS << ")]]";
break;
}
case 2 : {
OS << " __attribute__((acquire_shared_capability(";
bool isFirst = true;
for (const auto &Val : args()) {
if (isFirst) isFirst = false;
else OS << ", ";
OS << Val;
}
OS << ")))";
break;
}
case 3 : {
OS << " [[clang::acquire_shared_capability(";
bool isFirst = true;
for (const auto &Val : args()) {
if (isFirst) isFirst = false;
else OS << ", ";
OS << Val;
}
OS << ")]]";
break;
}
case 4 : {
OS << " __attribute__((exclusive_lock_function(";
bool isFirst = true;
for (const auto &Val : args()) {
if (isFirst) isFirst = false;
else OS << ", ";
OS << Val;
}
OS << ")))";
break;
}
case 5 : {
OS << " __attribute__((shared_lock_function(";
bool isFirst = true;
for (const auto &Val : args()) {
if (isFirst) isFirst = false;
else OS << ", ";
OS << Val;
}
OS << ")))";
break;
}
}
}
const char *AcquireCapabilityAttr::getSpelling() const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
return "(No spelling)";
case 0:
return "acquire_capability";
case 1:
return "acquire_capability";
case 2:
return "acquire_shared_capability";
case 3:
return "acquire_shared_capability";
case 4:
return "exclusive_lock_function";
case 5:
return "shared_lock_function";
}
}
AcquiredAfterAttr *AcquiredAfterAttr::clone(ASTContext &C) const {
auto *A = new (C) AcquiredAfterAttr(getLocation(), C, args_, args_Size, getSpellingListIndex());
A->Inherited = Inherited;
A->IsPackExpansion = IsPackExpansion;
A->Implicit = Implicit;
return A;
}
void AcquiredAfterAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
break;
case 0 : {
OS << " __attribute__((acquired_after(";
bool isFirst = true;
for (const auto &Val : args()) {
if (isFirst) isFirst = false;
else OS << ", ";
OS << Val;
}
OS << ")))";
break;
}
}
}
const char *AcquiredAfterAttr::getSpelling() const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
return "(No spelling)";
case 0:
return "acquired_after";
}
}
AcquiredBeforeAttr *AcquiredBeforeAttr::clone(ASTContext &C) const {
auto *A = new (C) AcquiredBeforeAttr(getLocation(), C, args_, args_Size, getSpellingListIndex());
A->Inherited = Inherited;
A->IsPackExpansion = IsPackExpansion;
A->Implicit = Implicit;
return A;
}
void AcquiredBeforeAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
break;
case 0 : {
OS << " __attribute__((acquired_before(";
bool isFirst = true;
for (const auto &Val : args()) {
if (isFirst) isFirst = false;
else OS << ", ";
OS << Val;
}
OS << ")))";
break;
}
}
}
const char *AcquiredBeforeAttr::getSpelling() const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
return "(No spelling)";
case 0:
return "acquired_before";
}
}
AliasAttr *AliasAttr::clone(ASTContext &C) const {
auto *A = new (C) AliasAttr(getLocation(), C, getAliasee(), getSpellingListIndex());
A->Inherited = Inherited;
A->IsPackExpansion = IsPackExpansion;
A->Implicit = Implicit;
return A;
}
void AliasAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
break;
case 0 : {
OS << " __attribute__((alias(\"" << getAliasee() << "\")))";
break;
}
case 1 : {
OS << " [[gnu::alias(\"" << getAliasee() << "\")]]";
break;
}
}
}
const char *AliasAttr::getSpelling() const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
return "(No spelling)";
case 0:
return "alias";
case 1:
return "alias";
}
}
AlignMac68kAttr *AlignMac68kAttr::clone(ASTContext &C) const {
auto *A = new (C) AlignMac68kAttr(getLocation(), C, getSpellingListIndex());
A->Inherited = Inherited;
A->IsPackExpansion = IsPackExpansion;
A->Implicit = Implicit;
return A;
}
void AlignMac68kAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
}
const char *AlignMac68kAttr::getSpelling() const {
return "(No spelling)";
}
bool AlignedAttr::isAlignmentDependent() const {
if (isalignmentExpr)
return alignmentExpr && (alignmentExpr->isValueDependent() || alignmentExpr->isTypeDependent());
else
return alignmentType->getType()->isDependentType();
}
unsigned AlignedAttr::getAlignment(ASTContext &Ctx) const {
assert(!isAlignmentDependent());
if (isalignmentExpr)
return (alignmentExpr ? alignmentExpr->EvaluateKnownConstInt(Ctx).getZExtValue() : 16)* Ctx.getCharWidth();
else
return 0; // FIXME
}
AlignedAttr *AlignedAttr::clone(ASTContext &C) const {
auto *A = new (C) AlignedAttr(getLocation(), C, isalignmentExpr, isalignmentExpr ? static_cast<void*>(alignmentExpr) : alignmentType, getSpellingListIndex());
A->Inherited = Inherited;
A->IsPackExpansion = IsPackExpansion;
A->Implicit = Implicit;
return A;
}
void AlignedAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
break;
case 0 : {
OS << " __attribute__((aligned(";
assert(isalignmentExpr && alignmentExpr != nullptr);
alignmentExpr->printPretty(OS, 0, Policy);
OS << ")))";
break;
}
case 1 : {
OS << " [[gnu::aligned(";
assert(isalignmentExpr && alignmentExpr != nullptr);
alignmentExpr->printPretty(OS, 0, Policy);
OS << ")]]";
break;
}
case 2 : {
OS << " __declspec(align(";
assert(isalignmentExpr && alignmentExpr != nullptr);
alignmentExpr->printPretty(OS, 0, Policy);
OS << "))";
break;
}
case 3 : {
OS << " alignas(";
assert(isalignmentExpr && alignmentExpr != nullptr);
alignmentExpr->printPretty(OS, 0, Policy);
OS << ")";
break;
}
case 4 : {
OS << " _Alignas(";
assert(isalignmentExpr && alignmentExpr != nullptr);
alignmentExpr->printPretty(OS, 0, Policy);
OS << ")";
break;
}
}
}
const char *AlignedAttr::getSpelling() const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
return "(No spelling)";
case 0:
return "aligned";
case 1:
return "aligned";
case 2:
return "align";
case 3:
return "alignas";
case 4:
return "_Alignas";
}
}
AlwaysInlineAttr *AlwaysInlineAttr::clone(ASTContext &C) const {
auto *A = new (C) AlwaysInlineAttr(getLocation(), C, getSpellingListIndex());
A->Inherited = Inherited;
A->IsPackExpansion = IsPackExpansion;
A->Implicit = Implicit;
return A;
}
void AlwaysInlineAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
break;
case 0 : {
OS << " __attribute__((always_inline))";
break;
}
case 1 : {
OS << " [[gnu::always_inline]]";
break;
}
case 2 : {
OS << " __forceinline";
break;
}
}
}
const char *AlwaysInlineAttr::getSpelling() const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
return "(No spelling)";
case 0:
return "always_inline";
case 1:
return "always_inline";
case 2:
return "__forceinline";
}
}
AnalyzerNoReturnAttr *AnalyzerNoReturnAttr::clone(ASTContext &C) const {
auto *A = new (C) AnalyzerNoReturnAttr(getLocation(), C, getSpellingListIndex());
A->Inherited = Inherited;
A->IsPackExpansion = IsPackExpansion;
A->Implicit = Implicit;
return A;
}
void AnalyzerNoReturnAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
break;
case 0 : {
OS << " __attribute__((analyzer_noreturn))";
break;
}
}
}
const char *AnalyzerNoReturnAttr::getSpelling() const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
return "(No spelling)";
case 0:
return "analyzer_noreturn";
}
}
AnnotateAttr *AnnotateAttr::clone(ASTContext &C) const {
auto *A = new (C) AnnotateAttr(getLocation(), C, getAnnotation(), getSpellingListIndex());
A->Inherited = Inherited;
A->IsPackExpansion = IsPackExpansion;
A->Implicit = Implicit;
return A;
}
void AnnotateAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
break;
case 0 : {
OS << " __attribute__((annotate(\"" << getAnnotation() << "\")))";
break;
}
}
}
const char *AnnotateAttr::getSpelling() const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
return "(No spelling)";
case 0:
return "annotate";
}
}
ArcWeakrefUnavailableAttr *ArcWeakrefUnavailableAttr::clone(ASTContext &C) const {
auto *A = new (C) ArcWeakrefUnavailableAttr(getLocation(), C, getSpellingListIndex());
A->Inherited = Inherited;
A->IsPackExpansion = IsPackExpansion;
A->Implicit = Implicit;
return A;
}
void ArcWeakrefUnavailableAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
break;
case 0 : {
OS << " __attribute__((objc_arc_weak_reference_unavailable))";
break;
}
}
}
const char *ArcWeakrefUnavailableAttr::getSpelling() const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
return "(No spelling)";
case 0:
return "objc_arc_weak_reference_unavailable";
}
}
ArgumentWithTypeTagAttr *ArgumentWithTypeTagAttr::clone(ASTContext &C) const {
auto *A = new (C) ArgumentWithTypeTagAttr(getLocation(), C, argumentKind, argumentIdx, typeTagIdx, isPointer, getSpellingListIndex());
A->Inherited = Inherited;
A->IsPackExpansion = IsPackExpansion;
A->Implicit = Implicit;
return A;
}
void ArgumentWithTypeTagAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
break;
case 0 : {
OS << " __attribute__((argument_with_type_tag(" << getArgumentKind()->getName() << ", " << getArgumentIdx() << ", " << getTypeTagIdx() << ", " << getIsPointer() << ")))";
break;
}
case 1 : {
OS << " __attribute__((pointer_with_type_tag(" << getArgumentKind()->getName() << ", " << getArgumentIdx() << ", " << getTypeTagIdx() << ", " << getIsPointer() << ")))";
break;
}
}
}
const char *ArgumentWithTypeTagAttr::getSpelling() const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
return "(No spelling)";
case 0:
return "argument_with_type_tag";
case 1:
return "pointer_with_type_tag";
}
}
AsmLabelAttr *AsmLabelAttr::clone(ASTContext &C) const {
auto *A = new (C) AsmLabelAttr(getLocation(), C, getLabel(), getSpellingListIndex());
A->Inherited = Inherited;
A->IsPackExpansion = IsPackExpansion;
A->Implicit = Implicit;
return A;
}
void AsmLabelAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
break;
case 0 : {
OS << " asm(\"" << getLabel() << "\")";
break;
}
case 1 : {
OS << " __asm__(\"" << getLabel() << "\")";
break;
}
}
}
const char *AsmLabelAttr::getSpelling() const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
return "(No spelling)";
case 0:
return "asm";
case 1:
return "__asm__";
}
}
AssertCapabilityAttr *AssertCapabilityAttr::clone(ASTContext &C) const {
auto *A = new (C) AssertCapabilityAttr(getLocation(), C, expr, getSpellingListIndex());
A->Inherited = Inherited;
A->IsPackExpansion = IsPackExpansion;
A->Implicit = Implicit;
return A;
}
void AssertCapabilityAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
break;
case 0 : {
OS << " __attribute__((assert_capability(" << getExpr() << ")))";
break;
}
case 1 : {
OS << " [[clang::assert_capability(" << getExpr() << ")]]";
break;
}
case 2 : {
OS << " __attribute__((assert_shared_capability(" << getExpr() << ")))";
break;
}
case 3 : {
OS << " [[clang::assert_shared_capability(" << getExpr() << ")]]";
break;
}
}
}
const char *AssertCapabilityAttr::getSpelling() const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
return "(No spelling)";
case 0:
return "assert_capability";
case 1:
return "assert_capability";
case 2:
return "assert_shared_capability";
case 3:
return "assert_shared_capability";
}
}
AssertExclusiveLockAttr *AssertExclusiveLockAttr::clone(ASTContext &C) const {
auto *A = new (C) AssertExclusiveLockAttr(getLocation(), C, args_, args_Size, getSpellingListIndex());
A->Inherited = Inherited;
A->IsPackExpansion = IsPackExpansion;
A->Implicit = Implicit;
return A;
}
void AssertExclusiveLockAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
break;
case 0 : {
OS << " __attribute__((assert_exclusive_lock(";
bool isFirst = true;
for (const auto &Val : args()) {
if (isFirst) isFirst = false;
else OS << ", ";
OS << Val;
}
OS << ")))";
break;
}
}
}
const char *AssertExclusiveLockAttr::getSpelling() const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
return "(No spelling)";
case 0:
return "assert_exclusive_lock";
}
}
AssertSharedLockAttr *AssertSharedLockAttr::clone(ASTContext &C) const {
auto *A = new (C) AssertSharedLockAttr(getLocation(), C, args_, args_Size, getSpellingListIndex());
A->Inherited = Inherited;
A->IsPackExpansion = IsPackExpansion;
A->Implicit = Implicit;
return A;
}
void AssertSharedLockAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
break;
case 0 : {
OS << " __attribute__((assert_shared_lock(";
bool isFirst = true;
for (const auto &Val : args()) {
if (isFirst) isFirst = false;
else OS << ", ";
OS << Val;
}
OS << ")))";
break;
}
}
}
const char *AssertSharedLockAttr::getSpelling() const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
return "(No spelling)";
case 0:
return "assert_shared_lock";
}
}
AvailabilityAttr *AvailabilityAttr::clone(ASTContext &C) const {
auto *A = new (C) AvailabilityAttr(getLocation(), C, platform, getIntroduced(), getDeprecated(), getObsoleted(), unavailable, getMessage(), getSpellingListIndex());
A->Inherited = Inherited;
A->IsPackExpansion = IsPackExpansion;
A->Implicit = Implicit;
return A;
}
void AvailabilityAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
break;
case 0 : {
OS << " __attribute__((availability(" << getPlatform()->getName();
if (!getIntroduced().empty()) OS << ", introduced=" << getIntroduced();
if (!getDeprecated().empty()) OS << ", deprecated=" << getDeprecated();
if (!getObsoleted().empty()) OS << ", obsoleted=" << getObsoleted();
if (getUnavailable()) OS << ", unavailable";
OS << ")))";
break;
}
}
}
const char *AvailabilityAttr::getSpelling() const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
return "(No spelling)";
case 0:
return "availability";
}
}
BlocksAttr *BlocksAttr::clone(ASTContext &C) const {
auto *A = new (C) BlocksAttr(getLocation(), C, type, getSpellingListIndex());
A->Inherited = Inherited;
A->IsPackExpansion = IsPackExpansion;
A->Implicit = Implicit;
return A;
}
void BlocksAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
break;
case 0 : {
OS << " __attribute__((blocks(" << getType() << ")))";
break;
}
}
}
const char *BlocksAttr::getSpelling() const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
return "(No spelling)";
case 0:
return "blocks";
}
}
C11NoReturnAttr *C11NoReturnAttr::clone(ASTContext &C) const {
auto *A = new (C) C11NoReturnAttr(getLocation(), C, getSpellingListIndex());
A->Inherited = Inherited;
A->IsPackExpansion = IsPackExpansion;
A->Implicit = Implicit;
return A;
}
void C11NoReturnAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
break;
case 0 : {
OS << " _Noreturn";
break;
}
}
}
const char *C11NoReturnAttr::getSpelling() const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
return "(No spelling)";
case 0:
return "_Noreturn";
}
}
CDeclAttr *CDeclAttr::clone(ASTContext &C) const {
auto *A = new (C) CDeclAttr(getLocation(), C, getSpellingListIndex());
A->Inherited = Inherited;
A->IsPackExpansion = IsPackExpansion;
A->Implicit = Implicit;
return A;
}
void CDeclAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
break;
case 0 : {
OS << " __attribute__((cdecl))";
break;
}
case 1 : {
OS << " [[gnu::cdecl]]";
break;
}
case 2 : {
OS << " __cdecl";
break;
}
case 3 : {
OS << " _cdecl";
break;
}
}
}
const char *CDeclAttr::getSpelling() const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
return "(No spelling)";
case 0:
return "cdecl";
case 1:
return "cdecl";
case 2:
return "__cdecl";
case 3:
return "_cdecl";
}
}
CFAuditedTransferAttr *CFAuditedTransferAttr::clone(ASTContext &C) const {
auto *A = new (C) CFAuditedTransferAttr(getLocation(), C, getSpellingListIndex());
A->Inherited = Inherited;
A->IsPackExpansion = IsPackExpansion;
A->Implicit = Implicit;
return A;
}
void CFAuditedTransferAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
break;
case 0 : {
OS << " __attribute__((cf_audited_transfer))";
break;
}
}
}
const char *CFAuditedTransferAttr::getSpelling() const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
return "(No spelling)";
case 0:
return "cf_audited_transfer";
}
}
CFConsumedAttr *CFConsumedAttr::clone(ASTContext &C) const {
auto *A = new (C) CFConsumedAttr(getLocation(), C, getSpellingListIndex());
A->Inherited = Inherited;
A->IsPackExpansion = IsPackExpansion;
A->Implicit = Implicit;
return A;
}
void CFConsumedAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
break;
case 0 : {
OS << " __attribute__((cf_consumed))";
break;
}
}
}
const char *CFConsumedAttr::getSpelling() const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
return "(No spelling)";
case 0:
return "cf_consumed";
}
}
CFReturnsNotRetainedAttr *CFReturnsNotRetainedAttr::clone(ASTContext &C) const {
auto *A = new (C) CFReturnsNotRetainedAttr(getLocation(), C, getSpellingListIndex());
A->Inherited = Inherited;
A->IsPackExpansion = IsPackExpansion;
A->Implicit = Implicit;
return A;
}
void CFReturnsNotRetainedAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
break;
case 0 : {
OS << " __attribute__((cf_returns_not_retained))";
break;
}
}
}
const char *CFReturnsNotRetainedAttr::getSpelling() const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
return "(No spelling)";
case 0:
return "cf_returns_not_retained";
}
}
CFReturnsRetainedAttr *CFReturnsRetainedAttr::clone(ASTContext &C) const {
auto *A = new (C) CFReturnsRetainedAttr(getLocation(), C, getSpellingListIndex());
A->Inherited = Inherited;
A->IsPackExpansion = IsPackExpansion;
A->Implicit = Implicit;
return A;
}
void CFReturnsRetainedAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
break;
case 0 : {
OS << " __attribute__((cf_returns_retained))";
break;
}
}
}
const char *CFReturnsRetainedAttr::getSpelling() const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
return "(No spelling)";
case 0:
return "cf_returns_retained";
}
}
CFUnknownTransferAttr *CFUnknownTransferAttr::clone(ASTContext &C) const {
auto *A = new (C) CFUnknownTransferAttr(getLocation(), C, getSpellingListIndex());
A->Inherited = Inherited;
A->IsPackExpansion = IsPackExpansion;
A->Implicit = Implicit;
return A;
}
void CFUnknownTransferAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
break;
case 0 : {
OS << " __attribute__((cf_unknown_transfer))";
break;
}
}
}
const char *CFUnknownTransferAttr::getSpelling() const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
return "(No spelling)";
case 0:
return "cf_unknown_transfer";
}
}
CUDAConstantAttr *CUDAConstantAttr::clone(ASTContext &C) const {
auto *A = new (C) CUDAConstantAttr(getLocation(), C, getSpellingListIndex());
A->Inherited = Inherited;
A->IsPackExpansion = IsPackExpansion;
A->Implicit = Implicit;
return A;
}
void CUDAConstantAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
break;
case 0 : {
OS << " __attribute__((constant))";
break;
}
}
}
const char *CUDAConstantAttr::getSpelling() const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
return "(No spelling)";
case 0:
return "constant";
}
}
CUDADeviceAttr *CUDADeviceAttr::clone(ASTContext &C) const {
auto *A = new (C) CUDADeviceAttr(getLocation(), C, getSpellingListIndex());
A->Inherited = Inherited;
A->IsPackExpansion = IsPackExpansion;
A->Implicit = Implicit;
return A;
}
void CUDADeviceAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
break;
case 0 : {
OS << " __attribute__((device))";
break;
}
}
}
const char *CUDADeviceAttr::getSpelling() const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
return "(No spelling)";
case 0:
return "device";
}
}
CUDAGlobalAttr *CUDAGlobalAttr::clone(ASTContext &C) const {
auto *A = new (C) CUDAGlobalAttr(getLocation(), C, getSpellingListIndex());
A->Inherited = Inherited;
A->IsPackExpansion = IsPackExpansion;
A->Implicit = Implicit;
return A;
}
void CUDAGlobalAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
break;
case 0 : {
OS << " __attribute__((global))";
break;
}
}
}
const char *CUDAGlobalAttr::getSpelling() const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
return "(No spelling)";
case 0:
return "global";
}
}
CUDAHostAttr *CUDAHostAttr::clone(ASTContext &C) const {
auto *A = new (C) CUDAHostAttr(getLocation(), C, getSpellingListIndex());
A->Inherited = Inherited;
A->IsPackExpansion = IsPackExpansion;
A->Implicit = Implicit;
return A;
}
void CUDAHostAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
break;
case 0 : {
OS << " __attribute__((host))";
break;
}
}
}
const char *CUDAHostAttr::getSpelling() const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
return "(No spelling)";
case 0:
return "host";
}
}
CUDALaunchBoundsAttr *CUDALaunchBoundsAttr::clone(ASTContext &C) const {
auto *A = new (C) CUDALaunchBoundsAttr(getLocation(), C, maxThreads, minBlocks, getSpellingListIndex());
A->Inherited = Inherited;
A->IsPackExpansion = IsPackExpansion;
A->Implicit = Implicit;
return A;
}
void CUDALaunchBoundsAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
break;
case 0 : {
OS << " __attribute__((launch_bounds(" << getMaxThreads() << ", " << getMinBlocks() << ")))";
break;
}
}
}
const char *CUDALaunchBoundsAttr::getSpelling() const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
return "(No spelling)";
case 0:
return "launch_bounds";
}
}
CUDASharedAttr *CUDASharedAttr::clone(ASTContext &C) const {
auto *A = new (C) CUDASharedAttr(getLocation(), C, getSpellingListIndex());
A->Inherited = Inherited;
A->IsPackExpansion = IsPackExpansion;
A->Implicit = Implicit;
return A;
}
void CUDASharedAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
break;
case 0 : {
OS << " __attribute__((shared))";
break;
}
}
}
const char *CUDASharedAttr::getSpelling() const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
return "(No spelling)";
case 0:
return "shared";
}
}
CXX11NoReturnAttr *CXX11NoReturnAttr::clone(ASTContext &C) const {
auto *A = new (C) CXX11NoReturnAttr(getLocation(), C, getSpellingListIndex());
A->Inherited = Inherited;
A->IsPackExpansion = IsPackExpansion;
A->Implicit = Implicit;
return A;
}
void CXX11NoReturnAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
break;
case 0 : {
OS << " [[noreturn]]";
break;
}
}
}
const char *CXX11NoReturnAttr::getSpelling() const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
return "(No spelling)";
case 0:
return "noreturn";
}
}
CallableWhenAttr *CallableWhenAttr::clone(ASTContext &C) const {
auto *A = new (C) CallableWhenAttr(getLocation(), C, callableStates_, callableStates_Size, getSpellingListIndex());
A->Inherited = Inherited;
A->IsPackExpansion = IsPackExpansion;
A->Implicit = Implicit;
return A;
}
void CallableWhenAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
break;
case 0 : {
OS << " __attribute__((callable_when(";
bool isFirst = true;
for (const auto &Val : callableStates()) {
if (isFirst) isFirst = false;
else OS << ", ";
OS << Val;
}
OS << ")))";
break;
}
}
}
const char *CallableWhenAttr::getSpelling() const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
return "(No spelling)";
case 0:
return "callable_when";
}
}
CapabilityAttr *CapabilityAttr::clone(ASTContext &C) const {
auto *A = new (C) CapabilityAttr(getLocation(), C, getName(), getSpellingListIndex());
A->Inherited = Inherited;
A->IsPackExpansion = IsPackExpansion;
A->Implicit = Implicit;
return A;
}
void CapabilityAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
break;
case 0 : {
OS << " __attribute__((capability(\"" << getName() << "\")))";
break;
}
case 1 : {
OS << " [[clang::capability(\"" << getName() << "\")]]";
break;
}
case 2 : {
OS << " __attribute__((shared_capability(\"" << getName() << "\")))";
break;
}
case 3 : {
OS << " [[clang::shared_capability(\"" << getName() << "\")]]";
break;
}
}
}
const char *CapabilityAttr::getSpelling() const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
return "(No spelling)";
case 0:
return "capability";
case 1:
return "capability";
case 2:
return "shared_capability";
case 3:
return "shared_capability";
}
}
CarriesDependencyAttr *CarriesDependencyAttr::clone(ASTContext &C) const {
auto *A = new (C) CarriesDependencyAttr(getLocation(), C, getSpellingListIndex());
A->Inherited = Inherited;
A->IsPackExpansion = IsPackExpansion;
A->Implicit = Implicit;
return A;
}
void CarriesDependencyAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
break;
case 0 : {
OS << " __attribute__((carries_dependency))";
break;
}
case 1 : {
OS << " [[carries_dependency]]";
break;
}
}
}
const char *CarriesDependencyAttr::getSpelling() const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
return "(No spelling)";
case 0:
return "carries_dependency";
case 1:
return "carries_dependency";
}
}
CleanupAttr *CleanupAttr::clone(ASTContext &C) const {
auto *A = new (C) CleanupAttr(getLocation(), C, functionDecl, getSpellingListIndex());
A->Inherited = Inherited;
A->IsPackExpansion = IsPackExpansion;
A->Implicit = Implicit;
return A;
}
void CleanupAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
break;
case 0 : {
OS << " __attribute__((cleanup(" << getFunctionDecl()->getNameInfo().getAsString() << ")))";
break;
}
case 1 : {
OS << " [[gnu::cleanup(" << getFunctionDecl()->getNameInfo().getAsString() << ")]]";
break;
}
}
}
const char *CleanupAttr::getSpelling() const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
return "(No spelling)";
case 0:
return "cleanup";
case 1:
return "cleanup";
}
}
ColdAttr *ColdAttr::clone(ASTContext &C) const {
auto *A = new (C) ColdAttr(getLocation(), C, getSpellingListIndex());
A->Inherited = Inherited;
A->IsPackExpansion = IsPackExpansion;
A->Implicit = Implicit;
return A;
}
void ColdAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
break;
case 0 : {
OS << " __attribute__((cold))";
break;
}
case 1 : {
OS << " [[gnu::cold]]";
break;
}
}
}
const char *ColdAttr::getSpelling() const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
return "(No spelling)";
case 0:
return "cold";
case 1:
return "cold";
}
}
CommonAttr *CommonAttr::clone(ASTContext &C) const {
auto *A = new (C) CommonAttr(getLocation(), C, getSpellingListIndex());
A->Inherited = Inherited;
A->IsPackExpansion = IsPackExpansion;
A->Implicit = Implicit;
return A;
}
void CommonAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
break;
case 0 : {
OS << " __attribute__((common))";
break;
}
case 1 : {
OS << " [[gnu::common]]";
break;
}
}
}
const char *CommonAttr::getSpelling() const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
return "(No spelling)";
case 0:
return "common";
case 1:
return "common";
}
}
ConstAttr *ConstAttr::clone(ASTContext &C) const {
auto *A = new (C) ConstAttr(getLocation(), C, getSpellingListIndex());
A->Inherited = Inherited;
A->IsPackExpansion = IsPackExpansion;
A->Implicit = Implicit;
return A;
}
void ConstAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
break;
case 0 : {
OS << " __attribute__((const))";
break;
}
case 1 : {
OS << " [[gnu::const]]";
break;
}
case 2 : {
OS << " __attribute__((__const))";
break;
}
case 3 : {
OS << " [[gnu::__const]]";
break;
}
}
}
const char *ConstAttr::getSpelling() const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
return "(No spelling)";
case 0:
return "const";
case 1:
return "const";
case 2:
return "__const";
case 3:
return "__const";
}
}
ConstructorAttr *ConstructorAttr::clone(ASTContext &C) const {
auto *A = new (C) ConstructorAttr(getLocation(), C, priority, getSpellingListIndex());
A->Inherited = Inherited;
A->IsPackExpansion = IsPackExpansion;
A->Implicit = Implicit;
return A;
}
void ConstructorAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
break;
case 0 : {
OS << " __attribute__((constructor(" << getPriority() << ")))";
break;
}
case 1 : {
OS << " [[gnu::constructor(" << getPriority() << ")]]";
break;
}
}
}
const char *ConstructorAttr::getSpelling() const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
return "(No spelling)";
case 0:
return "constructor";
case 1:
return "constructor";
}
}
ConsumableAttr *ConsumableAttr::clone(ASTContext &C) const {
auto *A = new (C) ConsumableAttr(getLocation(), C, defaultState, getSpellingListIndex());
A->Inherited = Inherited;
A->IsPackExpansion = IsPackExpansion;
A->Implicit = Implicit;
return A;
}
void ConsumableAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
break;
case 0 : {
OS << " __attribute__((consumable(" << getDefaultState() << ")))";
break;
}
}
}
const char *ConsumableAttr::getSpelling() const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
return "(No spelling)";
case 0:
return "consumable";
}
}
ConsumableAutoCastAttr *ConsumableAutoCastAttr::clone(ASTContext &C) const {
auto *A = new (C) ConsumableAutoCastAttr(getLocation(), C, getSpellingListIndex());
A->Inherited = Inherited;
A->IsPackExpansion = IsPackExpansion;
A->Implicit = Implicit;
return A;
}
void ConsumableAutoCastAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
break;
case 0 : {
OS << " __attribute__((consumable_auto_cast_state))";
break;
}
}
}
const char *ConsumableAutoCastAttr::getSpelling() const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
return "(No spelling)";
case 0:
return "consumable_auto_cast_state";
}
}
ConsumableSetOnReadAttr *ConsumableSetOnReadAttr::clone(ASTContext &C) const {
auto *A = new (C) ConsumableSetOnReadAttr(getLocation(), C, getSpellingListIndex());
A->Inherited = Inherited;
A->IsPackExpansion = IsPackExpansion;
A->Implicit = Implicit;
return A;
}
void ConsumableSetOnReadAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
break;
case 0 : {
OS << " __attribute__((consumable_set_state_on_read))";
break;
}
}
}
const char *ConsumableSetOnReadAttr::getSpelling() const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
return "(No spelling)";
case 0:
return "consumable_set_state_on_read";
}
}
DLLExportAttr *DLLExportAttr::clone(ASTContext &C) const {
auto *A = new (C) DLLExportAttr(getLocation(), C, getSpellingListIndex());
A->Inherited = Inherited;
A->IsPackExpansion = IsPackExpansion;
A->Implicit = Implicit;
return A;
}
void DLLExportAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
break;
case 0 : {
OS << " __declspec(dllexport)";
break;
}
case 1 : {
OS << " __attribute__((dllexport))";
break;
}
case 2 : {
OS << " [[gnu::dllexport]]";
break;
}
}
}
const char *DLLExportAttr::getSpelling() const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
return "(No spelling)";
case 0:
return "dllexport";
case 1:
return "dllexport";
case 2:
return "dllexport";
}
}
DLLImportAttr *DLLImportAttr::clone(ASTContext &C) const {
auto *A = new (C) DLLImportAttr(getLocation(), C, getSpellingListIndex());
A->Inherited = Inherited;
A->IsPackExpansion = IsPackExpansion;
A->Implicit = Implicit;
return A;
}
void DLLImportAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
break;
case 0 : {
OS << " __declspec(dllimport)";
break;
}
case 1 : {
OS << " __attribute__((dllimport))";
break;
}
case 2 : {
OS << " [[gnu::dllimport]]";
break;
}
}
}
const char *DLLImportAttr::getSpelling() const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
return "(No spelling)";
case 0:
return "dllimport";
case 1:
return "dllimport";
case 2:
return "dllimport";
}
}
DeprecatedAttr *DeprecatedAttr::clone(ASTContext &C) const {
auto *A = new (C) DeprecatedAttr(getLocation(), C, getMessage(), getSpellingListIndex());
A->Inherited = Inherited;
A->IsPackExpansion = IsPackExpansion;
A->Implicit = Implicit;
return A;
}
void DeprecatedAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
break;
case 0 : {
OS << " __attribute__((deprecated(\"" << getMessage() << "\")))";
break;
}
case 1 : {
OS << " [[gnu::deprecated(\"" << getMessage() << "\")]]";
break;
}
case 2 : {
OS << " __declspec(deprecated(\"" << getMessage() << "\"))";
break;
}
case 3 : {
OS << " [[deprecated(\"" << getMessage() << "\")]]";
break;
}
}
}
const char *DeprecatedAttr::getSpelling() const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
return "(No spelling)";
case 0:
return "deprecated";
case 1:
return "deprecated";
case 2:
return "deprecated";
case 3:
return "deprecated";
}
}
DestructorAttr *DestructorAttr::clone(ASTContext &C) const {
auto *A = new (C) DestructorAttr(getLocation(), C, priority, getSpellingListIndex());
A->Inherited = Inherited;
A->IsPackExpansion = IsPackExpansion;
A->Implicit = Implicit;
return A;
}
void DestructorAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
break;
case 0 : {
OS << " __attribute__((destructor(" << getPriority() << ")))";
break;
}
case 1 : {
OS << " [[gnu::destructor(" << getPriority() << ")]]";
break;
}
}
}
const char *DestructorAttr::getSpelling() const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
return "(No spelling)";
case 0:
return "destructor";
case 1:
return "destructor";
}
}
EnableIfAttr *EnableIfAttr::clone(ASTContext &C) const {
auto *A = new (C) EnableIfAttr(getLocation(), C, cond, getMessage(), getSpellingListIndex());
A->Inherited = Inherited;
A->IsPackExpansion = IsPackExpansion;
A->Implicit = Implicit;
return A;
}
void EnableIfAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
break;
case 0 : {
OS << " __attribute__((enable_if(" << getCond() << ", \"" << getMessage() << "\")))";
break;
}
}
}
const char *EnableIfAttr::getSpelling() const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
return "(No spelling)";
case 0:
return "enable_if";
}
}
ExclusiveTrylockFunctionAttr *ExclusiveTrylockFunctionAttr::clone(ASTContext &C) const {
auto *A = new (C) ExclusiveTrylockFunctionAttr(getLocation(), C, successValue, args_, args_Size, getSpellingListIndex());
A->Inherited = Inherited;
A->IsPackExpansion = IsPackExpansion;
A->Implicit = Implicit;
return A;
}
void ExclusiveTrylockFunctionAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
break;
case 0 : {
OS << " __attribute__((exclusive_trylock_function(" << getSuccessValue() << ", ";
bool isFirst = true;
for (const auto &Val : args()) {
if (isFirst) isFirst = false;
else OS << ", ";
OS << Val;
}
OS << ")))";
break;
}
}
}
const char *ExclusiveTrylockFunctionAttr::getSpelling() const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
return "(No spelling)";
case 0:
return "exclusive_trylock_function";
}
}
FallThroughAttr *FallThroughAttr::clone(ASTContext &C) const {
auto *A = new (C) FallThroughAttr(getLocation(), C, getSpellingListIndex());
A->Inherited = Inherited;
A->IsPackExpansion = IsPackExpansion;
A->Implicit = Implicit;
return A;
}
void FallThroughAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
break;
case 0 : {
OS << " [[clang::fallthrough]]";
break;
}
}
}
const char *FallThroughAttr::getSpelling() const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
return "(No spelling)";
case 0:
return "fallthrough";
}
}
FastCallAttr *FastCallAttr::clone(ASTContext &C) const {
auto *A = new (C) FastCallAttr(getLocation(), C, getSpellingListIndex());
A->Inherited = Inherited;
A->IsPackExpansion = IsPackExpansion;
A->Implicit = Implicit;
return A;
}
void FastCallAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
break;
case 0 : {
OS << " __attribute__((fastcall))";
break;
}
case 1 : {
OS << " [[gnu::fastcall]]";
break;
}
case 2 : {
OS << " __fastcall";
break;
}
case 3 : {
OS << " _fastcall";
break;
}
}
}
const char *FastCallAttr::getSpelling() const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
return "(No spelling)";
case 0:
return "fastcall";
case 1:
return "fastcall";
case 2:
return "__fastcall";
case 3:
return "_fastcall";
}
}
FinalAttr *FinalAttr::clone(ASTContext &C) const {
auto *A = new (C) FinalAttr(getLocation(), C, getSpellingListIndex());
A->Inherited = Inherited;
A->IsPackExpansion = IsPackExpansion;
A->Implicit = Implicit;
return A;
}
void FinalAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
break;
case 0 : {
OS << " final";
break;
}
case 1 : {
OS << " sealed";
break;
}
}
}
const char *FinalAttr::getSpelling() const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
return "(No spelling)";
case 0:
return "final";
case 1:
return "sealed";
}
}
FlattenAttr *FlattenAttr::clone(ASTContext &C) const {
auto *A = new (C) FlattenAttr(getLocation(), C, getSpellingListIndex());
A->Inherited = Inherited;
A->IsPackExpansion = IsPackExpansion;
A->Implicit = Implicit;
return A;
}
void FlattenAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
break;
case 0 : {
OS << " __attribute__((flatten))";
break;
}
case 1 : {
OS << " [[gnu::flatten]]";
break;
}
}
}
const char *FlattenAttr::getSpelling() const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
return "(No spelling)";
case 0:
return "flatten";
case 1:
return "flatten";
}
}
FormatAttr *FormatAttr::clone(ASTContext &C) const {
auto *A = new (C) FormatAttr(getLocation(), C, type, formatIdx, firstArg, getSpellingListIndex());
A->Inherited = Inherited;
A->IsPackExpansion = IsPackExpansion;
A->Implicit = Implicit;
return A;
}
void FormatAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
break;
case 0 : {
OS << " __attribute__((format(" << getType()->getName() << ", " << getFormatIdx() << ", " << getFirstArg() << ")))";
break;
}
case 1 : {
OS << " [[gnu::format(" << getType()->getName() << ", " << getFormatIdx() << ", " << getFirstArg() << ")]]";
break;
}
}
}
const char *FormatAttr::getSpelling() const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
return "(No spelling)";
case 0:
return "format";
case 1:
return "format";
}
}
FormatArgAttr *FormatArgAttr::clone(ASTContext &C) const {
auto *A = new (C) FormatArgAttr(getLocation(), C, formatIdx, getSpellingListIndex());
A->Inherited = Inherited;
A->IsPackExpansion = IsPackExpansion;
A->Implicit = Implicit;
return A;
}
void FormatArgAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
break;
case 0 : {
OS << " __attribute__((format_arg(" << getFormatIdx() << ")))";
break;
}
case 1 : {
OS << " [[gnu::format_arg(" << getFormatIdx() << ")]]";
break;
}
}
}
const char *FormatArgAttr::getSpelling() const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
return "(No spelling)";
case 0:
return "format_arg";
case 1:
return "format_arg";
}
}
GNUInlineAttr *GNUInlineAttr::clone(ASTContext &C) const {
auto *A = new (C) GNUInlineAttr(getLocation(), C, getSpellingListIndex());
A->Inherited = Inherited;
A->IsPackExpansion = IsPackExpansion;
A->Implicit = Implicit;
return A;
}
void GNUInlineAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
break;
case 0 : {
OS << " __attribute__((gnu_inline))";
break;
}
case 1 : {
OS << " [[gnu::gnu_inline]]";
break;
}
}
}
const char *GNUInlineAttr::getSpelling() const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
return "(No spelling)";
case 0:
return "gnu_inline";
case 1:
return "gnu_inline";
}
}
GuardedByAttr *GuardedByAttr::clone(ASTContext &C) const {
auto *A = new (C) GuardedByAttr(getLocation(), C, arg, getSpellingListIndex());
A->Inherited = Inherited;
A->IsPackExpansion = IsPackExpansion;
A->Implicit = Implicit;
return A;
}
void GuardedByAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
break;
case 0 : {
OS << " __attribute__((guarded_by(" << getArg() << ")))";
break;
}
}
}
const char *GuardedByAttr::getSpelling() const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
return "(No spelling)";
case 0:
return "guarded_by";
}
}
GuardedVarAttr *GuardedVarAttr::clone(ASTContext &C) const {
auto *A = new (C) GuardedVarAttr(getLocation(), C, getSpellingListIndex());
A->Inherited = Inherited;
A->IsPackExpansion = IsPackExpansion;
A->Implicit = Implicit;
return A;
}
void GuardedVarAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
break;
case 0 : {
OS << " __attribute__((guarded_var))";
break;
}
}
}
const char *GuardedVarAttr::getSpelling() const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
return "(No spelling)";
case 0:
return "guarded_var";
}
}
HotAttr *HotAttr::clone(ASTContext &C) const {
auto *A = new (C) HotAttr(getLocation(), C, getSpellingListIndex());
A->Inherited = Inherited;
A->IsPackExpansion = IsPackExpansion;
A->Implicit = Implicit;
return A;
}
void HotAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
break;
case 0 : {
OS << " __attribute__((hot))";
break;
}
case 1 : {
OS << " [[gnu::hot]]";
break;
}
}
}
const char *HotAttr::getSpelling() const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
return "(No spelling)";
case 0:
return "hot";
case 1:
return "hot";
}
}
IBActionAttr *IBActionAttr::clone(ASTContext &C) const {
auto *A = new (C) IBActionAttr(getLocation(), C, getSpellingListIndex());
A->Inherited = Inherited;
A->IsPackExpansion = IsPackExpansion;
A->Implicit = Implicit;
return A;
}
void IBActionAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
break;
case 0 : {
OS << " __attribute__((ibaction))";
break;
}
}
}
const char *IBActionAttr::getSpelling() const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
return "(No spelling)";
case 0:
return "ibaction";
}
}
IBOutletAttr *IBOutletAttr::clone(ASTContext &C) const {
auto *A = new (C) IBOutletAttr(getLocation(), C, getSpellingListIndex());
A->Inherited = Inherited;
A->IsPackExpansion = IsPackExpansion;
A->Implicit = Implicit;
return A;
}
void IBOutletAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
break;
case 0 : {
OS << " __attribute__((iboutlet))";
break;
}
}
}
const char *IBOutletAttr::getSpelling() const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
return "(No spelling)";
case 0:
return "iboutlet";
}
}
IBOutletCollectionAttr *IBOutletCollectionAttr::clone(ASTContext &C) const {
auto *A = new (C) IBOutletCollectionAttr(getLocation(), C, interface, getSpellingListIndex());
A->Inherited = Inherited;
A->IsPackExpansion = IsPackExpansion;
A->Implicit = Implicit;
return A;
}
void IBOutletCollectionAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
break;
case 0 : {
OS << " __attribute__((iboutletcollection(" << getInterface().getAsString() << ")))";
break;
}
}
}
const char *IBOutletCollectionAttr::getSpelling() const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
return "(No spelling)";
case 0:
return "iboutletcollection";
}
}
InitPriorityAttr *InitPriorityAttr::clone(ASTContext &C) const {
auto *A = new (C) InitPriorityAttr(getLocation(), C, priority, getSpellingListIndex());
A->Inherited = Inherited;
A->IsPackExpansion = IsPackExpansion;
A->Implicit = Implicit;
return A;
}
void InitPriorityAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
break;
case 0 : {
OS << " __attribute__((init_priority(" << getPriority() << ")))";
break;
}
}
}
const char *InitPriorityAttr::getSpelling() const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
return "(No spelling)";
case 0:
return "init_priority";
}
}
InitSegAttr *InitSegAttr::clone(ASTContext &C) const {
auto *A = new (C) InitSegAttr(getLocation(), C, getSection(), getSpellingListIndex());
A->Inherited = Inherited;
A->IsPackExpansion = IsPackExpansion;
A->Implicit = Implicit;
return A;
}
void InitSegAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
break;
case 0 : {
OS << "#pragma init_seg ";
printPrettyPragma(OS, Policy);
break;
}
}
}
const char *InitSegAttr::getSpelling() const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
return "(No spelling)";
case 0:
return "init_seg";
}
}
IntelOclBiccAttr *IntelOclBiccAttr::clone(ASTContext &C) const {
auto *A = new (C) IntelOclBiccAttr(getLocation(), C, getSpellingListIndex());
A->Inherited = Inherited;
A->IsPackExpansion = IsPackExpansion;
A->Implicit = Implicit;
return A;
}
void IntelOclBiccAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
break;
case 0 : {
OS << " __attribute__((intel_ocl_bicc))";
break;
}
}
}
const char *IntelOclBiccAttr::getSpelling() const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
return "(No spelling)";
case 0:
return "intel_ocl_bicc";
}
}
LockReturnedAttr *LockReturnedAttr::clone(ASTContext &C) const {
auto *A = new (C) LockReturnedAttr(getLocation(), C, arg, getSpellingListIndex());
A->Inherited = Inherited;
A->IsPackExpansion = IsPackExpansion;
A->Implicit = Implicit;
return A;
}
void LockReturnedAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
break;
case 0 : {
OS << " __attribute__((lock_returned(" << getArg() << ")))";
break;
}
}
}
const char *LockReturnedAttr::getSpelling() const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
return "(No spelling)";
case 0:
return "lock_returned";
}
}
LocksExcludedAttr *LocksExcludedAttr::clone(ASTContext &C) const {
auto *A = new (C) LocksExcludedAttr(getLocation(), C, args_, args_Size, getSpellingListIndex());
A->Inherited = Inherited;
A->IsPackExpansion = IsPackExpansion;
A->Implicit = Implicit;
return A;
}
void LocksExcludedAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
break;
case 0 : {
OS << " __attribute__((locks_excluded(";
bool isFirst = true;
for (const auto &Val : args()) {
if (isFirst) isFirst = false;
else OS << ", ";
OS << Val;
}
OS << ")))";
break;
}
}
}
const char *LocksExcludedAttr::getSpelling() const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
return "(No spelling)";
case 0:
return "locks_excluded";
}
}
LoopHintAttr *LoopHintAttr::clone(ASTContext &C) const {
auto *A = new (C) LoopHintAttr(getLocation(), C, option, value, getSpellingListIndex());
A->Inherited = Inherited;
A->IsPackExpansion = IsPackExpansion;
A->Implicit = Implicit;
return A;
}
void LoopHintAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
break;
case 0 : {
OS << "#pragma clang loop ";
printPrettyPragma(OS, Policy);
break;
}
case 1 : {
OS << "#pragma unroll ";
printPrettyPragma(OS, Policy);
break;
}
}
}
const char *LoopHintAttr::getSpelling() const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
return "(No spelling)";
case 0:
return "loop";
case 1:
return "unroll";
}
}
MSABIAttr *MSABIAttr::clone(ASTContext &C) const {
auto *A = new (C) MSABIAttr(getLocation(), C, getSpellingListIndex());
A->Inherited = Inherited;
A->IsPackExpansion = IsPackExpansion;
A->Implicit = Implicit;
return A;
}
void MSABIAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
break;
case 0 : {
OS << " __attribute__((ms_abi))";
break;
}
case 1 : {
OS << " [[gnu::ms_abi]]";
break;
}
}
}
const char *MSABIAttr::getSpelling() const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
return "(No spelling)";
case 0:
return "ms_abi";
case 1:
return "ms_abi";
}
}
MSInheritanceAttr *MSInheritanceAttr::clone(ASTContext &C) const {
auto *A = new (C) MSInheritanceAttr(getLocation(), C, bestCase, getSpellingListIndex());
A->Inherited = Inherited;
A->IsPackExpansion = IsPackExpansion;
A->Implicit = Implicit;
return A;
}
void MSInheritanceAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
break;
case 0 : {
OS << " __single_inheritance(" << getBestCase() << ")";
break;
}
case 1 : {
OS << " __multiple_inheritance(" << getBestCase() << ")";
break;
}
case 2 : {
OS << " __virtual_inheritance(" << getBestCase() << ")";
break;
}
case 3 : {
OS << " __unspecified_inheritance(" << getBestCase() << ")";
break;
}
}
}
const char *MSInheritanceAttr::getSpelling() const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
return "(No spelling)";
case 0:
return "__single_inheritance";
case 1:
return "__multiple_inheritance";
case 2:
return "__virtual_inheritance";
case 3:
return "__unspecified_inheritance";
}
}
MSP430InterruptAttr *MSP430InterruptAttr::clone(ASTContext &C) const {
auto *A = new (C) MSP430InterruptAttr(getLocation(), C, number, getSpellingListIndex());
A->Inherited = Inherited;
A->IsPackExpansion = IsPackExpansion;
A->Implicit = Implicit;
return A;
}
void MSP430InterruptAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
break;
case 0 : {
OS << " __attribute__((interrupt(" << getNumber() << ")))";
break;
}
}
}
const char *MSP430InterruptAttr::getSpelling() const {
switch (SpellingListIndex) {
default:
llvm_unreachable("Unknown attribute spelling!");
return "(No spelling)";
case 0:
return "interrupt";
}
}
MSVtorDispAttr *MSVtorDispAttr::clone(ASTContext &C) const {
auto *A = new (C) MSVtorDispAttr(getLocation(), C, vdm, getSpellingListIndex());
A->Inherited = Inherited;
A->IsPackExpansion = IsPackExpansion;
A->Implicit = Implicit;
return A;
}
void MSVtorDispAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
}
const char *MSVtorDispAttr::getSpelling() const {
return "(No spelling)";
}
MallocAttr *MallocAttr::clone(ASTContext &C) const {
auto *A = new (C) MallocAttr(getLocation(), C, getSpellingListIndex());
A->Inherited = Inherited;
A->IsPackExpansion = IsPackExpansion;
A->Implicit = Implicit;
return A;
}
void MallocAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
switch (SpellingListIndex) {
default: