[PATCH] D147302: [clang][dataflow] Add `create<T>()` methods to `Environment` and `DataflowAnalysisContext`.

Martin Böhme via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 3 07:47:02 PDT 2023


mboehme marked an inline comment as done.
mboehme added inline comments.


================
Comment at: clang/include/clang/Analysis/FlowSensitive/DataflowAnalysisContext.h:215
   /// Creates an atomic boolean value.
-  AtomicBoolValue &createAtomicBoolValue() {
-    return takeOwnership(std::make_unique<AtomicBoolValue>());
-  }
+  AtomicBoolValue &createAtomicBoolValue() { return create<AtomicBoolValue>(); }
 
----------------
ymandel wrote:
> Is there any reason for this function anymore or should we deprecate it (and the Top version below)? Especially in this object which only used internally and not by clients -- the extra two characters don't seem to justify a function.
I had wondered the same thing. I've added `LLVM_DEPRECATED` to both.

(I'm not changing callers in this patch because I'd like to avoid expanding the size of the patch.)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D147302/new/

https://reviews.llvm.org/D147302



More information about the cfe-commits mailing list