summaryrefslogtreecommitdiff
path: root/lib/Format/NamespaceEndCommentsFixer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Format/NamespaceEndCommentsFixer.cpp')
-rw-r--r--lib/Format/NamespaceEndCommentsFixer.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/lib/Format/NamespaceEndCommentsFixer.cpp b/lib/Format/NamespaceEndCommentsFixer.cpp
index 995b3219a1f4a..dd364866d1ceb 100644
--- a/lib/Format/NamespaceEndCommentsFixer.cpp
+++ b/lib/Format/NamespaceEndCommentsFixer.cpp
@@ -125,12 +125,7 @@ getNamespaceToken(const AnnotatedLine *Line,
if (StartLineIndex > 0)
NamespaceTok = AnnotatedLines[StartLineIndex - 1]->First;
}
- // Detect "(inline)? namespace" in the beginning of a line.
- if (NamespaceTok->is(tok::kw_inline))
- NamespaceTok = NamespaceTok->getNextNonComment();
- if (!NamespaceTok || NamespaceTok->isNot(tok::kw_namespace))
- return nullptr;
- return NamespaceTok;
+ return NamespaceTok->getNamespaceToken();
}
NamespaceEndCommentsFixer::NamespaceEndCommentsFixer(const Environment &Env,