1// RUN: %check_clang_tidy %s google-readability-namespace-comments %t
2
3namespace n1::n2 {
4namespace /*comment1*/n3/*comment2*/::/*comment3*/inline/*comment4*/n4/*comment5*/ {
5
6// So that namespace is not empty.
7void f();
8
9
10// CHECK-MESSAGES: :[[@LINE+4]]:1: warning: namespace 'n3::inline n4' not terminated with
11// CHECK-MESSAGES: :[[@LINE-7]]:23: note: namespace 'n3::inline n4' starts here
12// CHECK-MESSAGES: :[[@LINE+2]]:2: warning: namespace 'n1::n2' not terminated with a closing comment [google-readability-namespace-comments]
13// CHECK-MESSAGES: :[[@LINE-10]]:11: note: namespace 'n1::n2' starts here
14}}
15// CHECK-FIXES: } // namespace n3::inline n4
16// CHECK-FIXES: } // namespace n1::n2
17
18namespace n7::inline n8 {
19// make namespace above 10 lines
20
21
22
23
24
25
26
27
28
29
30} // namespace n7::inline n8
31
32namespace n9::inline n10 {
33// make namespace above 10 lines
34
35
36
37
38
39
40
41
42
43
44} // namespace n9::n10
45// CHECK-MESSAGES: :[[@LINE-1]]:2: warning: namespace 'n9::inline n10' ends with a comment that refers to a wrong namespace 'n9::n10' [google-readability-namespace-comments]
46

source code of clang-tools-extra/test/clang-tidy/checkers/google/readability-namespace-comments-c++17.cpp