PiotrZSL added inline comments.

================
Comment at: clang-tools-extra/clang-tidy/modernize/LoopConvertCheck.cpp:871
+        return false;
+    } else if (Nodes.getNodeAs<CallExpr>(EndCallName)) {
+      return true;
----------------
ccotter wrote:
> PiotrZSL wrote:
> > ``else return Nodes.getNodeAs<CallExpr>(EndCallName) != nullptr;``
> Is this in the style guide? NotNullTerminatedResultCheck.cpp, 
> SignedCharMisuseCheck.cpp, UnconventionalAssignOperatorCheck.cpp have 
> equivalent conditionals that do not check against `nullptr`.
its not about checking for nullptr, its about simplifying if else if else, you 
dont need to explicitly compare to nullptr, I'm just used to it.
You can easily depend on implicit bool conversion here, its fine.
Simply you got if something return true else return false, you can write just 
return something.



Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D140760/new/

https://reviews.llvm.org/D140760

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to