[PATCH] D110392: [clang-format] Left/Right alignment fixer can cause false positive replacements when they don't actually change anything
Björn Schäpers via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Sep 24 13:24:49 PDT 2021
HazardyKnusperkeks added inline comments.
================
Comment at: clang/lib/Format/QualifierAlignmentFixer.cpp:95
+ if (Err)
+ llvm::errs() << "Error removing no op replacements : "
+ << llvm::toString(std::move(Err)) << "\n";
----------------
The message may be confusing, but honestly I don't know what to put in either, since "adding non no op replacements" may be even more confusing.
================
Comment at: clang/unittests/Format/QualifierFixerTest.cpp:818
+ verifyFormat("static const uint32 foo[] = {0, 31};",
+ "static const uint32 foo[] = {0, 31};", Style);
+ EXPECT_EQ(ReplacementCount, 0);
----------------
Doesn't the two argument version suffice?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D110392/new/
https://reviews.llvm.org/D110392
More information about the cfe-commits
mailing list