diff options
| author | 2019-01-27 16:42:12 +0000 | |
|---|---|---|
| committer | 2019-01-27 16:42:12 +0000 | |
| commit | b773203fb58f3ef282fb69c832d8710cab5bc82d (patch) | |
| tree | e75913f147570fbd75169647b144df85b88a038c /gnu/llvm/tools/clang/lib/AST/DeclarationName.cpp | |
| parent | tweak errno in previous (diff) | |
| download | wireguard-openbsd-b773203fb58f3ef282fb69c832d8710cab5bc82d.tar.xz wireguard-openbsd-b773203fb58f3ef282fb69c832d8710cab5bc82d.zip | |
Import LLVM 7.0.1 release including clang, lld and lldb.
Diffstat (limited to 'gnu/llvm/tools/clang/lib/AST/DeclarationName.cpp')
| -rw-r--r-- | gnu/llvm/tools/clang/lib/AST/DeclarationName.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/gnu/llvm/tools/clang/lib/AST/DeclarationName.cpp b/gnu/llvm/tools/clang/lib/AST/DeclarationName.cpp index 31bae93c3cb..9866d92f61e 100644 --- a/gnu/llvm/tools/clang/lib/AST/DeclarationName.cpp +++ b/gnu/llvm/tools/clang/lib/AST/DeclarationName.cpp @@ -114,14 +114,14 @@ static int compareInt(unsigned A, unsigned B) { int DeclarationName::compare(DeclarationName LHS, DeclarationName RHS) { if (LHS.getNameKind() != RHS.getNameKind()) return (LHS.getNameKind() < RHS.getNameKind() ? -1 : 1); - + switch (LHS.getNameKind()) { case DeclarationName::Identifier: { IdentifierInfo *LII = LHS.getAsIdentifierInfo(); IdentifierInfo *RII = RHS.getAsIdentifierInfo(); if (!LII) return RII ? -1 : 0; if (!RII) return 1; - + return LII->getName().compare(RII->getName()); } @@ -148,7 +148,7 @@ int DeclarationName::compare(DeclarationName LHS, DeclarationName RHS) { return compareInt(LN, RN); } - + case DeclarationName::CXXConstructorName: case DeclarationName::CXXDestructorName: case DeclarationName::CXXConversionFunctionName: @@ -171,7 +171,7 @@ int DeclarationName::compare(DeclarationName LHS, DeclarationName RHS) { case DeclarationName::CXXLiteralOperatorName: return LHS.getCXXLiteralIdentifier()->getName().compare( RHS.getCXXLiteralIdentifier()->getName()); - + case DeclarationName::CXXUsingDirective: return 0; } @@ -565,7 +565,7 @@ DeclarationNameTable::getCXXLiteralOperatorName(IdentifierInfo *II) { if (CXXLiteralOperatorIdName *Name = LiteralNames->FindNodeOrInsertPos(ID, InsertPos)) return DeclarationName (Name); - + CXXLiteralOperatorIdName *LiteralName = new (Ctx) CXXLiteralOperatorIdName; LiteralName->ExtraKindOrNumArgs = DeclarationNameExtra::CXXLiteralOperator; LiteralName->ID = II; @@ -636,13 +636,13 @@ bool DeclarationNameInfo::isInstantiationDependent() const { case DeclarationName::CXXUsingDirective: case DeclarationName::CXXDeductionGuideName: return false; - + case DeclarationName::CXXConstructorName: case DeclarationName::CXXDestructorName: case DeclarationName::CXXConversionFunctionName: if (TypeSourceInfo *TInfo = LocInfo.NamedType.TInfo) return TInfo->getType()->isInstantiationDependentType(); - + return Name.getCXXNameType()->isInstantiationDependentType(); } llvm_unreachable("All name kinds handled."); @@ -689,7 +689,7 @@ void DeclarationNameInfo::printName(raw_ostream &OS) const { llvm_unreachable("Unexpected declaration name kind"); } -SourceLocation DeclarationNameInfo::getEndLoc() const { +SourceLocation DeclarationNameInfo::getEndLocPrivate() const { switch (Name.getNameKind()) { case DeclarationName::Identifier: case DeclarationName::CXXDeductionGuideName: |
