[clang] [clang][analyzer][NFC] Add more information to CallDescriptions in StreamChecker (PR #70540)

Ben Shi via cfe-commits cfe-commits at lists.llvm.org
Sat Oct 28 00:04:40 PDT 2023


https://github.com/benshi001 created https://github.com/llvm/llvm-project/pull/70540

'tmpfile' has only one form that it has no argument.

>From 043fbf02975dcc1adb894ae87f6c21dfd5f8479d Mon Sep 17 00:00:00 2001
From: Ben Shi <bennshi at tencent.com>
Date: Sat, 28 Oct 2023 14:57:44 +0800
Subject: [PATCH] [clang][analyzer][NFC] Add more information to
 CallDescriptions in StreamChecker

'tmpfile' has only one form that it has no argument.
---
 clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp
index 4b7103c20557cc4..34df62f073e9a8c 100644
--- a/clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp
@@ -241,7 +241,7 @@ class StreamChecker : public Checker<check::PreCall, eval::Call,
       {{{"fopen"}}, {nullptr, &StreamChecker::evalFopen, ArgNone}},
       {{{"freopen"}, 3},
        {&StreamChecker::preFreopen, &StreamChecker::evalFreopen, 2}},
-      {{{"tmpfile"}}, {nullptr, &StreamChecker::evalFopen, ArgNone}},
+      {{{"tmpfile"}, 0}, {nullptr, &StreamChecker::evalFopen, ArgNone}},
       {{{"fclose"}, 1},
        {&StreamChecker::preDefault, &StreamChecker::evalFclose, 0}},
       {{{"fread"}, 4},



More information about the cfe-commits mailing list