diff options
Diffstat (limited to 'clang/lib/Sema/SemaLookup.cpp')
| -rw-r--r-- | clang/lib/Sema/SemaLookup.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/clang/lib/Sema/SemaLookup.cpp b/clang/lib/Sema/SemaLookup.cpp index aa7191d2814f..8bde18f64f80 100644 --- a/clang/lib/Sema/SemaLookup.cpp +++ b/clang/lib/Sema/SemaLookup.cpp @@ -22,6 +22,7 @@ #include "clang/AST/ExprCXX.h" #include "clang/Basic/Builtins.h" #include "clang/Basic/LangOptions.h" +#include "clang/Basic/TargetInfo.h" #include "clang/Lex/HeaderSearch.h" #include "clang/Lex/ModuleLoader.h" #include "clang/Lex/Preprocessor.h" @@ -777,7 +778,7 @@ static void GetOpenCLBuiltinFctOverloads( std::vector<QualType> &FunctionList, SmallVector<QualType, 1> &RetTypes, SmallVector<SmallVector<QualType, 1>, 5> &ArgTypes) { FunctionProtoType::ExtProtoInfo PI( - Context.getDefaultCallingConvention(false, false, true)); + Context.getTargetInfo().getDefaultCallingConv()); PI.Variadic = false; // Do not attempt to create any FunctionTypes if there are no return types, @@ -4559,15 +4560,14 @@ static void getNestedNameSpecifierIdentifiers( II = NNS->getAsIdentifier(); break; - case NestedNameSpecifier::Namespace: - if (NNS->getAsNamespace()->isAnonymousNamespace()) + case NestedNameSpecifier::Namespace: { + const NamespaceBaseDecl *Namespace = NNS->getAsNamespace(); + if (const auto *NS = dyn_cast<NamespaceDecl>(Namespace); + NS && NS->isAnonymousNamespace()) return; - II = NNS->getAsNamespace()->getIdentifier(); - break; - - case NestedNameSpecifier::NamespaceAlias: - II = NNS->getAsNamespaceAlias()->getIdentifier(); + II = Namespace->getIdentifier(); break; + } case NestedNameSpecifier::TypeSpec: II = QualType(NNS->getAsType(), 0).getBaseTypeIdentifier(); |
