[clang] [analyzer][NFC] Clean up `MemRegion.cpp` and align with llvm coding style (PR #218860)

Balázs Benics via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 26 03:31:21 PDT 2026


================
@@ -1111,11 +1109,10 @@ const VarRegion *MemRegionManager::getVarRegion(const VarDecl *D,
       // so they are placed in the global internal space, which is not
       // invalidated by calls to functions declared in system headers.
       if (Ctx.getSourceManager().isInSystemHeader(D->getLocation()) &&
-          !isStdStreamVar(D)) {
+          !isStdStreamVar(D))
----------------
steakhal wrote:

This is also kinda harmful. The condition also doesn't fit a single line.
The brace omission clause in the llvm style is meant to elide braces that are objectively obvious. It it's a judgement call, then probably keeping the braces is the right call.

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


More information about the cfe-commits mailing list