| 411 | //----------------------------------------------------------------------------- |
| 412 | |
| 413 | static std::string GetScope(const DeclContext* declCtx, |
| 414 | const RemoveCurrentScope removeCurrentScope = RemoveCurrentScope::Yes) |
| 415 | { |
| 416 | std::string name{}; |
| 417 | |
| 418 | if(not declCtx->isTranslationUnit() and not declCtx->isFunctionOrMethod()) { |
| 419 | while(declCtx->isInlineNamespace()) { |
| 420 | declCtx = declCtx->getParent(); |
| 421 | } |
| 422 | |
| 423 | if(not declCtx->isTranslationUnit() and (declCtx->isNamespace() or declCtx->getParent()->isTranslationUnit())) { |
| 424 | if(const auto* namedDecl = dyn_cast_or_null<NamedDecl>(declCtx)) { |
| 425 | name = GetQualifiedName(*namedDecl, removeCurrentScope); |
| 426 | name.append("::"sv); |
| 427 | } |
| 428 | } |
| 429 | } |
| 430 | |
| 431 | return name; |
| 432 | } |
| 433 | //----------------------------------------------------------------------------- |
| 434 | |
| 435 | /// \brief SimpleTypePrinter a partially substitution of Clang's TypePrinter. |
no test coverage detected