Skip to content

Commit

Permalink
Merge pull request #510 from NKID00/fix-509
Browse files Browse the repository at this point in the history
Fixed #509: `inline namespace` in global scope
  • Loading branch information
andreasfertig authored Nov 10, 2022
2 parents 8a5173a + 576abd9 commit 81fe4e1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion InsightsHelpers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ static std::string GetScope(const DeclContext* declCtx,
declCtx = declCtx->getParent();
}

if(declCtx->isNamespace() or declCtx->getParent()->isTranslationUnit()) {
if(not declCtx->isTranslationUnit() and (declCtx->isNamespace() or declCtx->getParent()->isTranslationUnit())) {
if(const auto* namedDecl = dyn_cast_or_null<NamedDecl>(declCtx)) {
name = GetQualifiedName(*namedDecl, removeCurrentScope);
name.append("::"sv);
Expand Down

0 comments on commit 81fe4e1

Please sign in to comment.