================
@@ -1065,13 +1061,12 @@ const VarRegion *MemRegionManager::getVarRegion(const 
VarDecl *D,
     if (CallSite) {
       const Decl *CalleeDecl = SF->getDecl();
       bool CurrentParam = true;
-      if (const auto *FD = dyn_cast<FunctionDecl>(CalleeDecl)) {
+      if (const auto *FD = dyn_cast<FunctionDecl>(CalleeDecl))
         CurrentParam =
             (Index < FD->param_size() && FD->getParamDecl(Index) == PVD);
-      } else if (const auto *BD = dyn_cast<BlockDecl>(CalleeDecl)) {
+      else if (const auto *BD = dyn_cast<BlockDecl>(CalleeDecl))
----------------
steakhal wrote:

This without braces IMO reads worse. My rule of thumb is use braces if any of 
the sub-expression locations wrap into a different lines. Here. The 
`CurrentParam` is on one line, and the semicolon in the end is on a different 
line.

https://github.com/llvm/llvm-project/pull/218860
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to