[PATCH] D128372: Clang-Tidy Empty Check
Christopher Di Bella via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jun 22 14:05:00 PDT 2022
cjdb added inline comments.
================
Comment at: clang-tools-extra/clang-tidy/bugprone/StandaloneEmptyCheck.cpp:61
+ "ignoring the result of 'empty()', did you mean 'clear()'? ");
+ Builder << FixItHint::CreateReplacement(ReplacementRange, "clear");
+ }
----------------
I wonder if we should add a fixit hint that suggests `x = T{};` in the event `x.clear()` isn't available (e.g. `std::stack`).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D128372/new/
https://reviews.llvm.org/D128372
More information about the cfe-commits
mailing list