[clang-tools-extra] [clang-tidy] Add fix-its to `avoid-return-with-void-value` check (PR #81420)

Piotr Zegar via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 20 08:14:22 PST 2024


================
@@ -40,12 +42,35 @@ void AvoidReturnWithVoidValueCheck::registerMatchers(MatchFinder *Finder) {
 void AvoidReturnWithVoidValueCheck::check(
     const MatchFinder::MatchResult &Result) {
   const auto *VoidReturn = Result.Nodes.getNodeAs<ReturnStmt>("void_return");
-  if (IgnoreMacros && VoidReturn->getBeginLoc().isMacroID())
+  if (IgnoreMacros && VoidReturn->getBeginLoc().isMacroID()) {
----------------
PiotrZSL wrote:

GENERAL: no need for {} for single statements.

https://github.com/llvm/llvm-project/pull/81420


More information about the cfe-commits mailing list