summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/DeclSpec.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Sema/DeclSpec.cpp')
-rw-r--r--clang/lib/Sema/DeclSpec.cpp50
1 files changed, 25 insertions, 25 deletions
diff --git a/clang/lib/Sema/DeclSpec.cpp b/clang/lib/Sema/DeclSpec.cpp
index ccca5d37ea3..b22eea2b364 100644
--- a/clang/lib/Sema/DeclSpec.cpp
+++ b/clang/lib/Sema/DeclSpec.cpp
@@ -44,7 +44,7 @@ void UnqualifiedId::setConstructorTemplateId(TemplateIdAnnotation *TemplateId) {
EndLocation = TemplateId->RAngleLoc;
}
-void CXXScopeSpec::Extend(ASTContext &Context, SourceLocation TemplateKWLoc,
+void CXXScopeSpec::Extend(ASTContext &Context, SourceLocation TemplateKWLoc,
TypeLoc TL, SourceLocation ColonColonLoc) {
Builder.Extend(Context, TemplateKWLoc, TL, ColonColonLoc);
if (Range.getBegin().isInvalid())
@@ -56,23 +56,23 @@ void CXXScopeSpec::Extend(ASTContext &Context, SourceLocation TemplateKWLoc,
}
void CXXScopeSpec::Extend(ASTContext &Context, IdentifierInfo *Identifier,
- SourceLocation IdentifierLoc,
+ SourceLocation IdentifierLoc,
SourceLocation ColonColonLoc) {
Builder.Extend(Context, Identifier, IdentifierLoc, ColonColonLoc);
-
+
if (Range.getBegin().isInvalid())
Range.setBegin(IdentifierLoc);
Range.setEnd(ColonColonLoc);
-
+
assert(Range == Builder.getSourceRange() &&
"NestedNameSpecifierLoc range computation incorrect");
}
void CXXScopeSpec::Extend(ASTContext &Context, NamespaceDecl *Namespace,
- SourceLocation NamespaceLoc,
+ SourceLocation NamespaceLoc,
SourceLocation ColonColonLoc) {
Builder.Extend(Context, Namespace, NamespaceLoc, ColonColonLoc);
-
+
if (Range.getBegin().isInvalid())
Range.setBegin(NamespaceLoc);
Range.setEnd(ColonColonLoc);
@@ -82,10 +82,10 @@ void CXXScopeSpec::Extend(ASTContext &Context, NamespaceDecl *Namespace,
}
void CXXScopeSpec::Extend(ASTContext &Context, NamespaceAliasDecl *Alias,
- SourceLocation AliasLoc,
+ SourceLocation AliasLoc,
SourceLocation ColonColonLoc) {
Builder.Extend(Context, Alias, AliasLoc, ColonColonLoc);
-
+
if (Range.getBegin().isInvalid())
Range.setBegin(AliasLoc);
Range.setEnd(ColonColonLoc);
@@ -94,12 +94,12 @@ void CXXScopeSpec::Extend(ASTContext &Context, NamespaceAliasDecl *Alias,
"NestedNameSpecifierLoc range computation incorrect");
}
-void CXXScopeSpec::MakeGlobal(ASTContext &Context,
+void CXXScopeSpec::MakeGlobal(ASTContext &Context,
SourceLocation ColonColonLoc) {
Builder.MakeGlobal(Context, ColonColonLoc);
-
+
Range = SourceRange(ColonColonLoc);
-
+
assert(Range == Builder.getSourceRange() &&
"NestedNameSpecifierLoc range computation incorrect");
}
@@ -116,7 +116,7 @@ void CXXScopeSpec::MakeSuper(ASTContext &Context, CXXRecordDecl *RD,
"NestedNameSpecifierLoc range computation incorrect");
}
-void CXXScopeSpec::MakeTrivial(ASTContext &Context,
+void CXXScopeSpec::MakeTrivial(ASTContext &Context,
NestedNameSpecifier *Qualifier, SourceRange R) {
Builder.MakeTrivial(Context, Qualifier, R);
Range = R;
@@ -139,11 +139,11 @@ SourceLocation CXXScopeSpec::getLastQualifierNameLoc() const {
return Builder.getTemporary().getLocalBeginLoc();
}
-NestedNameSpecifierLoc
+NestedNameSpecifierLoc
CXXScopeSpec::getWithLocInContext(ASTContext &Context) const {
if (!Builder.getRepresentation())
return NestedNameSpecifierLoc();
-
+
return Builder.getWithLocInContext(Context);
}
@@ -232,7 +232,7 @@ DeclaratorChunk DeclaratorChunk::getFunction(bool hasProto,
I.Fun.DeleteParams = true;
}
for (unsigned i = 0; i < NumParams; i++)
- I.Fun.Params[i] = std::move(Params[i]);
+ I.Fun.Params[i] = std::move(Params[i]);
}
// Check what exception specification information we should actually store.
@@ -323,7 +323,7 @@ bool Declarator::isDeclarationOfFunction() const {
}
llvm_unreachable("Invalid type chunk");
}
-
+
switch (DS.getTypeSpecType()) {
case TST_atomic:
case TST_auto:
@@ -369,20 +369,20 @@ bool Declarator::isDeclarationOfFunction() const {
if (Expr *E = DS.getRepAsExpr())
return E->getType()->isFunctionType();
return false;
-
+
case TST_underlyingType:
case TST_typename:
case TST_typeofType: {
QualType QT = DS.getRepAsType().get();
if (QT.isNull())
return false;
-
+
if (const LocInfoType *LIT = dyn_cast<LocInfoType>(QT))
QT = LIT->getType();
if (QT.isNull())
return false;
-
+
return QT->isFunctionType();
}
}
@@ -438,8 +438,8 @@ template <class T> static bool BadSpecifier(T TNew, T TPrev,
if (TNew != TPrev)
DiagID = diag::err_invalid_decl_spec_combination;
else
- DiagID = IsExtension ? diag::ext_duplicate_declspec :
- diag::warn_duplicate_declspec;
+ DiagID = IsExtension ? diag::ext_duplicate_declspec :
+ diag::warn_duplicate_declspec;
return true;
}
@@ -970,7 +970,7 @@ bool DeclSpec::setModulePrivateSpec(SourceLocation Loc, const char *&PrevSpec,
DiagID = diag::ext_duplicate_declspec;
return true;
}
-
+
ModulePrivateLoc = Loc;
return false;
}
@@ -1300,7 +1300,7 @@ bool DeclSpec::isMissingDeclaratorOk() {
StorageClassSpec != DeclSpec::SCS_typedef;
}
-void UnqualifiedId::setOperatorFunctionId(SourceLocation OperatorLoc,
+void UnqualifiedId::setOperatorFunctionId(SourceLocation OperatorLoc,
OverloadedOperatorKind Op,
SourceLocation SymbolLocations[3]) {
Kind = UnqualifiedIdKind::IK_OperatorFunctionId;
@@ -1309,7 +1309,7 @@ void UnqualifiedId::setOperatorFunctionId(SourceLocation OperatorLoc,
OperatorFunctionId.Operator = Op;
for (unsigned I = 0; I != 3; ++I) {
OperatorFunctionId.SymbolLocations[I] = SymbolLocations[I].getRawEncoding();
-
+
if (SymbolLocations[I].isValid())
EndLocation = SymbolLocations[I];
}
@@ -1321,7 +1321,7 @@ bool VirtSpecifiers::SetSpecifier(Specifier VS, SourceLocation Loc,
FirstLocation = Loc;
LastLocation = Loc;
LastSpecifier = VS;
-
+
if (Specifiers & VS) {
PrevSpec = getSpecifierName(VS);
return true;
OpenPOWER on IntegriCloud