aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordmasloff <dmasloff@yandex-team.com>2024-09-05 23:49:28 +0300
committerdmasloff <dmasloff@yandex-team.com>2024-09-05 23:59:20 +0300
commit91749d44a7f9502232f7c4470f6d62c3b391b1dc (patch)
tree424c87fa5708116a7f2526255e75d67c2fa950f3
parentc6547c4b4f05821c35928bc0d50883ab625a30b0 (diff)
downloadydb-91749d44a7f9502232f7c4470f6d62c3b391b1dc.tar.gz
Enable clang-format FixNamespaceComments option
Enable clang-format FixNamespaceComments option 8ffd1b7f4787cdf4e80a92b08f07634abe416854
-rw-r--r--build/config/tests/cpp_style/config.clang-format2
-rw-r--r--contrib/libs/clang16/lib/Format/NamespaceEndCommentsFixer.cpp1
-rw-r--r--util/folder/pathsplit_ut.cpp4
3 files changed, 4 insertions, 3 deletions
diff --git a/build/config/tests/cpp_style/config.clang-format b/build/config/tests/cpp_style/config.clang-format
index 9b762202f5..18077255ba 100644
--- a/build/config/tests/cpp_style/config.clang-format
+++ b/build/config/tests/cpp_style/config.clang-format
@@ -27,6 +27,8 @@ IndentFunctionDeclarationAfterType: false
MaxEmptyLinesToKeep: 1
KeepEmptyLinesAtTheStartOfBlocks: false
NamespaceIndentation: All
+FixNamespaceComments: true
+ShortNamespaceLines: 0
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: true
PackConstructorInitializers: Never
diff --git a/contrib/libs/clang16/lib/Format/NamespaceEndCommentsFixer.cpp b/contrib/libs/clang16/lib/Format/NamespaceEndCommentsFixer.cpp
index 4bbbd17843..2615a499f7 100644
--- a/contrib/libs/clang16/lib/Format/NamespaceEndCommentsFixer.cpp
+++ b/contrib/libs/clang16/lib/Format/NamespaceEndCommentsFixer.cpp
@@ -142,7 +142,6 @@ std::string computeName(const FormatToken *NamespaceTok) {
std::string computeEndCommentText(StringRef NamespaceName, bool AddNewline,
const FormatToken *NamespaceTok,
unsigned SpacesToAdd) {
- return "";
std::string text = "//";
text.append(SpacesToAdd, ' ');
text += NamespaceTok->TokenText;
diff --git a/util/folder/pathsplit_ut.cpp b/util/folder/pathsplit_ut.cpp
index 1310ba15d0..b028a61876 100644
--- a/util/folder/pathsplit_ut.cpp
+++ b/util/folder/pathsplit_ut.cpp
@@ -437,7 +437,7 @@ Y_UNIT_TEST_SUITE(PSUF(PathSplit)) {
UNIT_ASSERT_STRINGS_EQUAL(ps.Reconstruct(), "../path");
#endif
}
-}
+} // Y_UNIT_TEST_SUITE(PSUF(PathSplit)
Y_UNIT_TEST_SUITE(PSUF(PathSplitTraits)) {
Y_UNIT_TEST(IsPathSep) {
@@ -475,7 +475,7 @@ Y_UNIT_TEST_SUITE(PSUF(PathSplitTraits)) {
UNIT_ASSERT_EQUAL(PSUF_LOCAL(TPathSplitTraits)::IsAbsolutePath("#:\\somepath"), false);
UNIT_ASSERT_EQUAL(PSUF_LOCAL(TPathSplitTraits)::IsAbsolutePath("#:/somepath"), false);
}
-}
+} // Y_UNIT_TEST_SUITE(PSUF(PathSplitTraits)
#undef TRUE_ONLY_WIN