File tree Expand file tree Collapse file tree 2 files changed +529
-109
lines changed Expand file tree Collapse file tree 2 files changed +529
-109
lines changed Original file line number Diff line number Diff line change @@ -543,12 +543,13 @@ CXString clang_scope_getCompleteName(CXScope S) {
543543
544544CXString clang_scope_getQualifiedName (CXScope S) {
545545 auto * D = getDecl (S);
546- if (const auto * ND = llvm::dyn_cast_or_null<clang::NamedDecl>(D))
547- return makeCXString (ND->getQualifiedNameAsString ());
548546
549547 if (llvm::isa_and_nonnull<clang::TranslationUnitDecl>(D))
550548 return makeCXString (" " );
551549
550+ if (const auto * ND = llvm::dyn_cast_or_null<clang::NamedDecl>(D))
551+ return makeCXString (ND->getQualifiedNameAsString ());
552+
552553 return makeCXString (" <unnamed>" );
553554}
554555
@@ -606,12 +607,12 @@ CXScope clang_scope_getGlobalScope(CXInterpreter I) {
606607CXScope clang_scope_getUnderlyingScope (CXScope S) {
607608 const auto * TND = llvm::dyn_cast_or_null<clang::TypedefNameDecl>(getDecl (S));
608609 if (!TND)
609- return makeCXScope ( getMeta (S), nullptr , CXScope_Invalid) ;
610+ return S ;
610611
611612 const clang::QualType QT = TND->getUnderlyingType ();
612613 auto * D = Cpp::GetScopeFromType (QT.getAsOpaquePtr ());
613614 if (!D)
614- return makeCXScope ( getMeta (S), nullptr , CXScope_Invalid) ;
615+ return S ;
615616
616617 return makeCXScope (getMeta (S), static_cast <clang::Decl*>(D));
617618}
You can’t perform that action at this time.
0 commit comments