summaryrefslogtreecommitdiffstats
path: root/gnu/llvm/tools/clang/lib/Sema/DeclSpec.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/llvm/tools/clang/lib/Sema/DeclSpec.cpp')
-rw-r--r--gnu/llvm/tools/clang/lib/Sema/DeclSpec.cpp28
1 files changed, 9 insertions, 19 deletions
diff --git a/gnu/llvm/tools/clang/lib/Sema/DeclSpec.cpp b/gnu/llvm/tools/clang/lib/Sema/DeclSpec.cpp
index e4e84fcec95..2fad5a18ba6 100644
--- a/gnu/llvm/tools/clang/lib/Sema/DeclSpec.cpp
+++ b/gnu/llvm/tools/clang/lib/Sema/DeclSpec.cpp
@@ -30,7 +30,7 @@ using namespace clang;
void UnqualifiedId::setTemplateId(TemplateIdAnnotation *TemplateId) {
assert(TemplateId && "NULL template-id annotation?");
- Kind = IK_TemplateId;
+ Kind = UnqualifiedIdKind::IK_TemplateId;
this->TemplateId = TemplateId;
StartLocation = TemplateId->TemplateNameLoc;
EndLocation = TemplateId->RAngleLoc;
@@ -38,7 +38,7 @@ void UnqualifiedId::setTemplateId(TemplateIdAnnotation *TemplateId) {
void UnqualifiedId::setConstructorTemplateId(TemplateIdAnnotation *TemplateId) {
assert(TemplateId && "NULL template-id annotation?");
- Kind = IK_ConstructorTemplateId;
+ Kind = UnqualifiedIdKind::IK_ConstructorTemplateId;
this->TemplateId = TemplateId;
StartLocation = TemplateId->TemplateNameLoc;
EndLocation = TemplateId->RAngleLoc;
@@ -336,6 +336,7 @@ bool Declarator::isDeclarationOfFunction() const {
case TST_decimal32:
case TST_decimal64:
case TST_double:
+ case TST_Float16:
case TST_float128:
case TST_enum:
case TST_error:
@@ -386,16 +387,16 @@ bool Declarator::isDeclarationOfFunction() const {
}
bool Declarator::isStaticMember() {
- assert(getContext() == MemberContext);
+ assert(getContext() == DeclaratorContext::MemberContext);
return getDeclSpec().getStorageClassSpec() == DeclSpec::SCS_static ||
- (getName().Kind == UnqualifiedId::IK_OperatorFunctionId &&
+ (getName().Kind == UnqualifiedIdKind::IK_OperatorFunctionId &&
CXXMethodDecl::isStaticOverloadedOperator(
getName().OperatorFunctionId.Operator));
}
bool Declarator::isCtorOrDtor() {
- return (getName().getKind() == UnqualifiedId::IK_ConstructorName) ||
- (getName().getKind() == UnqualifiedId::IK_DestructorName);
+ return (getName().getKind() == UnqualifiedIdKind::IK_ConstructorName) ||
+ (getName().getKind() == UnqualifiedIdKind::IK_DestructorName);
}
bool DeclSpec::hasTagDefinition() const {
@@ -505,6 +506,7 @@ const char *DeclSpec::getSpecifierName(DeclSpec::TST T,
case DeclSpec::TST_half: return "half";
case DeclSpec::TST_float: return "float";
case DeclSpec::TST_double: return "double";
+ case DeclSpec::TST_float16: return "_Float16";
case DeclSpec::TST_float128: return "__float128";
case DeclSpec::TST_bool: return Policy.Bool ? "bool" : "_Bool";
case DeclSpec::TST_decimal32: return "_Decimal32";
@@ -967,18 +969,6 @@ bool DeclSpec::SetConstexprSpec(SourceLocation Loc, const char *&PrevSpec,
return false;
}
-bool DeclSpec::SetConceptSpec(SourceLocation Loc, const char *&PrevSpec,
- unsigned &DiagID) {
- if (Concept_specified) {
- DiagID = diag::ext_duplicate_declspec;
- PrevSpec = "concept";
- return true;
- }
- Concept_specified = true;
- ConceptLoc = Loc;
- return false;
-}
-
void DeclSpec::SaveWrittenBuiltinSpecs() {
writtenBS.Sign = getTypeSpecSign();
writtenBS.Width = getTypeSpecWidth();
@@ -1291,7 +1281,7 @@ bool DeclSpec::isMissingDeclaratorOk() {
void UnqualifiedId::setOperatorFunctionId(SourceLocation OperatorLoc,
OverloadedOperatorKind Op,
SourceLocation SymbolLocations[3]) {
- Kind = IK_OperatorFunctionId;
+ Kind = UnqualifiedIdKind::IK_OperatorFunctionId;
StartLocation = OperatorLoc;
EndLocation = OperatorLoc;
OperatorFunctionId.Operator = Op;