[clang] [clang][analyzer] Add C standard streams to the internal memory space (PR #147766)
Balazs Benics via cfe-commits
cfe-commits at lists.llvm.org
Sun Jul 13 00:57:59 PDT 2025
=?utf-8?q?Balázs_Kéri?= <balazs.keri at ericsson.com>,
=?utf-8?q?Balázs_Kéri?= <balazs.keri at ericsson.com>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/147766 at github.com>
================
@@ -1022,6 +1022,23 @@ getStackOrCaptureRegionForDeclContext(const LocationContext *LC,
return (const StackFrameContext *)nullptr;
}
+static bool isStdStreamVar(const VarDecl *D) {
+ const auto *ND = dyn_cast<NamedDecl>(D);
+ if (!ND)
+ return false;
+ DeclarationName DeclN = ND->getDeclName();
+ if (!DeclN.isIdentifier())
+ return false;
----------------
steakhal wrote:
I think a NamedDecl has the memfn `getIdentifier` which either returns the II or NULL.
Consequently, this code could be further simplified.
https://github.com/llvm/llvm-project/pull/147766
More information about the cfe-commits
mailing list