Skip to content

Commit 739e764

Browse files
committed
[Tooling][Inclusions][NFC] Reformat C++ code
1 parent 9ed8816 commit 739e764

File tree

4 files changed

+7
-8
lines changed

4 files changed

+7
-8
lines changed

clang/docs/ClangFormatStyleOptions.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4201,8 +4201,8 @@ the configuration (without a prefix: ``Auto``).
42014201
* ``""`` means "arbitrary suffix"
42024202
* ``"$"`` means "no suffix"
42034203

4204-
For example, if configured to ``"(_test)?$"``, then a header a.h would be seen
4205-
as the "main" include in both a.cc and a_test.cc.
4204+
For example, if configured to ``"(_test)?$"``, then a header a.h would be
4205+
seen as the "main" include in both a.cc and a_test.cc.
42064206

42074207
.. _IncludeIsMainSourceRegex:
42084208

clang/include/clang/Tooling/Inclusions/IncludeStyle.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,8 @@ struct IncludeStyle {
126126
/// * ``""`` means "arbitrary suffix"
127127
/// * ``"$"`` means "no suffix"
128128
///
129-
/// For example, if configured to ``"(_test)?$"``, then a header a.h would be seen
130-
/// as the "main" include in both a.cc and a_test.cc.
129+
/// For example, if configured to ``"(_test)?$"``, then a header a.h would be
130+
/// seen as the "main" include in both a.cc and a_test.cc.
131131
/// \version 3.9
132132
std::string IncludeIsMainRegex;
133133

clang/lib/Tooling/Inclusions/HeaderIncludes.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,8 +285,7 @@ HeaderIncludes::HeaderIncludes(StringRef FileName, StringRef Code,
285285
MaxInsertOffset(MinInsertOffset +
286286
getMaxHeaderInsertionOffset(
287287
FileName, Code.drop_front(MinInsertOffset), Style)),
288-
MainIncludeFound(false),
289-
Categories(Style, FileName) {
288+
MainIncludeFound(false), Categories(Style, FileName) {
290289
// Add 0 for main header and INT_MAX for headers that are not in any
291290
// category.
292291
Priorities = {0, INT_MAX};

clang/lib/Tooling/Inclusions/Stdlib/StandardLibrary.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ static int initialize(Lang Language) {
131131
Mapping->SymbolNames[SymIndex] = {
132132
QName.data(), NSLen, static_cast<unsigned int>(QName.size() - NSLen)};
133133
if (!HeaderName.empty())
134-
Mapping->SymbolHeaderIDs[SymIndex].push_back(AddHeader(HeaderName));
134+
Mapping->SymbolHeaderIDs[SymIndex].push_back(AddHeader(HeaderName));
135135

136136
NSSymbolMap &NSSymbols = AddNS(QName.take_front(NSLen));
137137
NSSymbols.try_emplace(QName.drop_front(NSLen), SymIndex);
@@ -236,7 +236,7 @@ std::optional<Symbol> Symbol::named(llvm::StringRef Scope, llvm::StringRef Name,
236236
return std::nullopt;
237237
}
238238
std::optional<Header> Symbol::header() const {
239-
const auto& Headers = getMappingPerLang(Language)->SymbolHeaderIDs[ID];
239+
const auto &Headers = getMappingPerLang(Language)->SymbolHeaderIDs[ID];
240240
if (Headers.empty())
241241
return std::nullopt;
242242
return Header(Headers.front(), Language);

0 commit comments

Comments
 (0)