https://github.com/benshi001 updated
https://github.com/llvm/llvm-project/pull/71394
>From 3be57e39926bda29b273d5e9e01bff5ec8b2302e Mon Sep 17 00:00:00 2001
From: Ben Shi
Date: Tue, 7 Nov 2023 14:11:37 +0800
Subject: [PATCH] [clang][analyzer][NFC] Remove redundant code in StreamChecker
---
balazske wrote:
With the current code it is a corner case if this change makes the code more
readable. Probably it can be useful if new functions are added to the checker.
But the rule here is that there is one "ensure" function to check one aspect of
the state, and the pre-callbacks call all
@@ -639,12 +644,7 @@ void StreamChecker::preFreadFwrite(const FnDescription
*Desc,
bool IsFread) const {
ProgramStateRef State = C.getState();
SVal StreamVal = getStreamArg(Desc, Call);
- State = ensureStreamNonNull(StreamVal,
https://github.com/balazske edited
https://github.com/llvm/llvm-project/pull/71394
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -342,6 +342,11 @@ class StreamChecker : public Checkerhttps://github.com/llvm/llvm-project/pull/71394
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -639,12 +644,7 @@ void StreamChecker::preFreadFwrite(const FnDescription
*Desc,
bool IsFread) const {
ProgramStateRef State = C.getState();
SVal StreamVal = getStreamArg(Desc, Call);
- State = ensureStreamNonNull(StreamVal,
https://github.com/balazske requested changes to this pull request.
https://github.com/llvm/llvm-project/pull/71394
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/steakhal requested changes to this pull request.
I find this alternative less idiomatic (dissimilar to how we implement checks
in other checkers), thus I find this less readable.
I'm okay with that amount of redundancy as it was present.
https://github.com/benshi001 updated
https://github.com/llvm/llvm-project/pull/71394
>From 56d5604cf0442919d62def08c233e8d48b654885 Mon Sep 17 00:00:00 2001
From: Ben Shi
Date: Mon, 6 Nov 2023 21:49:36 +0800
Subject: [PATCH] [clang][Analyzer][NFC] Simplify
preDefault/preFseek/preFreadFwrite
https://github.com/benshi001 updated
https://github.com/llvm/llvm-project/pull/71394
>From abbca31776cf4223392726d64aadfa5c79b57a69 Mon Sep 17 00:00:00 2001
From: Ben Shi
Date: Mon, 6 Nov 2023 21:49:36 +0800
Subject: [PATCH] [clang][Analyzer][NFC] Simplify
preDefault/preFseek/preFreadFwrite
https://github.com/benshi001 created
https://github.com/llvm/llvm-project/pull/71394
None
>From 965c109cc19187329d5ab2ae324665dfbd7c17ee Mon Sep 17 00:00:00 2001
From: Ben Shi
Date: Mon, 6 Nov 2023 21:49:36 +0800
Subject: [PATCH] [clang][Analyzer][NFC] Simplify
11 matches
Mail list logo