[PATCH] D131975: [clang][dataflow] Use llvm::is_contained()
Dmitri Gribenko via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Aug 16 10:59:35 PDT 2022
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG941959d69de7: [clang][dataflow] Use llvm::is_contained() (authored by gribozavr).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D131975/new/
https://reviews.llvm.org/D131975
Files:
clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp
Index: clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp
===================================================================
--- clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp
+++ clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp
@@ -20,6 +20,7 @@
#include "clang/Analysis/FlowSensitive/Value.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/DenseSet.h"
+#include "llvm/ADT/STLExtras.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/ErrorHandling.h"
#include <cassert>
@@ -207,9 +208,7 @@
bool Environment::canDescend(unsigned MaxDepth,
const DeclContext *Callee) const {
- return CallStack.size() <= MaxDepth &&
- std::find(CallStack.begin(), CallStack.end(), Callee) ==
- CallStack.end();
+ return CallStack.size() <= MaxDepth && !llvm::is_contained(CallStack, Callee);
}
Environment Environment::pushCall(const CallExpr *Call) const {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D131975.453072.patch
Type: text/x-patch
Size: 942 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220816/2d0812b6/attachment.bin>
More information about the cfe-commits
mailing list