[clang-tidy] Adjust location of namespace comment diagnostic
authorIlya Biryukov <ibiryukov@google.com>
Wed, 17 Jul 2019 15:22:14 +0000 (15:22 +0000)
committerIlya Biryukov <ibiryukov@google.com>
Wed, 17 Jul 2019 15:22:14 +0000 (15:22 +0000)
commitf81ee439a409973279244f093dd0264592b74a38
tree8dd46b02baea2fe88e5c0ed1558be80fa9020fcc
parent552c2c09d354a3ad9c1c9647e0a3bb5099c31088
[clang-tidy] Adjust location of namespace comment diagnostic

Summary:
If there is no comment, place it at the closing brace of a namespace
definition. Previously it was placed at the next character after the
closing brace.

The new position produces a better location for highlighting in clangd
and does not seem to make matters worse for clang-tidy.

Reviewers: alexfh, hokein

Reviewed By: alexfh, hokein

Subscribers: xazax.hun, kadircet, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D64861

llvm-svn: 366337
clang-tools-extra/clang-tidy/readability/NamespaceCommentCheck.cpp
clang-tools-extra/test/clang-tidy/google-readability-namespace-comments.cpp
clang-tools-extra/test/clang-tidy/google-readability-nested-namespace-comments.cpp
clang-tools-extra/test/clang-tidy/select-checks.cpp