[PATCH] D138564: Format changes with clang-format
Viktoriia Bakalova via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 23 04:30:50 PST 2022
VitaNuo created this revision.
Herald added a project: All.
VitaNuo requested review of this revision.
Herald added a project: clang-tools-extra.
Herald added a subscriber: cfe-commits.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D138564
Files:
clang-tools-extra/include-cleaner/lib/Record.cpp
clang-tools-extra/include-cleaner/unittests/RecordTest.cpp
Index: clang-tools-extra/include-cleaner/unittests/RecordTest.cpp
===================================================================
--- clang-tools-extra/include-cleaner/unittests/RecordTest.cpp
+++ clang-tools-extra/include-cleaner/unittests/RecordTest.cpp
@@ -232,7 +232,8 @@
ASSERT_THAT(Recorded.MacroReferences, Not(IsEmpty()));
SourceManager &SM = AST.sourceManager();
- SourceLocation Def = SM.getComposedLoc(SM.getMainFileID(), MainFile.point("def"));
+ SourceLocation Def =
+ SM.getComposedLoc(SM.getMainFileID(), MainFile.point("def"));
SymbolReference XRef = Recorded.MacroReferences.front();
EXPECT_EQ(XRef.RT, RefType::Ambiguous);
Index: clang-tools-extra/include-cleaner/lib/Record.cpp
===================================================================
--- clang-tools-extra/include-cleaner/lib/Record.cpp
+++ clang-tools-extra/include-cleaner/lib/Record.cpp
@@ -84,7 +84,7 @@
}
void Ifdef(SourceLocation Loc, const Token &MacroNameTok,
- const MacroDefinition &MD) override {
+ const MacroDefinition &MD) override {
if (!Active)
return;
if (const auto *MI = MD.getMacroInfo())
@@ -95,10 +95,9 @@
void recordMacroRef(const Token &Tok, const MacroInfo &MI, RefType RT) {
if (MI.isBuiltinMacro())
return; // __FILE__ is not a reference.
- Recorded.MacroReferences.push_back(
- SymbolReference{Tok.getLocation(),
- Macro{Tok.getIdentifierInfo(), MI.getDefinitionLoc()},
- RT});
+ Recorded.MacroReferences.push_back(SymbolReference{
+ Tok.getLocation(),
+ Macro{Tok.getIdentifierInfo(), MI.getDefinitionLoc()}, RT});
}
bool Active = false;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D138564.477455.patch
Type: text/x-patch
Size: 1728 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20221123/6a93f7bc/attachment-0001.bin>
More information about the cfe-commits
mailing list