2015-10-22 19:31:44 +08:00
|
|
|
// RUN: %check_clang_tidy %s google-readability-namespace-comments %t
|
2014-09-22 18:41:39 +08:00
|
|
|
|
|
|
|
namespace n1 {
|
|
|
|
namespace n2 {
|
2014-11-20 23:05:32 +08:00
|
|
|
|
|
|
|
|
2016-10-18 01:25:02 +08:00
|
|
|
void f(); // So that the namespace isn't empty.
|
2014-11-20 23:05:32 +08:00
|
|
|
|
|
|
|
|
2014-11-18 01:32:32 +08:00
|
|
|
// CHECK-MESSAGES: :[[@LINE+4]]:2: warning: namespace 'n2' not terminated with a closing comment [google-readability-namespace-comments]
|
2014-11-20 23:05:32 +08:00
|
|
|
// CHECK-MESSAGES: :[[@LINE-7]]:11: note: namespace 'n2' starts here
|
2015-04-08 20:54:57 +08:00
|
|
|
// CHECK-MESSAGES: :[[@LINE+2]]:3: warning: namespace 'n1' not terminated with
|
2014-11-20 23:05:32 +08:00
|
|
|
// CHECK-MESSAGES: :[[@LINE-10]]:11: note: namespace 'n1' starts here
|
2015-04-08 20:54:57 +08:00
|
|
|
}}
|
2014-09-22 18:41:39 +08:00
|
|
|
// CHECK-FIXES: } // namespace n2
|
|
|
|
// CHECK-FIXES: } // namespace n1
|
|
|
|
|
|
|
|
|
2014-11-20 23:05:32 +08:00
|
|
|
namespace short1 {
|
|
|
|
namespace short2 {
|
|
|
|
// Namespaces covering 10 lines or fewer are exempt from this rule.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
2015-12-16 23:44:42 +08:00
|
|
|
|
|
|
|
namespace n3 {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}; // namespace n3
|