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

Yitzhak Mandelbaum via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 3 06:44:56 PDT 2023


ymandel accepted this revision.
ymandel added a comment.

Thanks!



================
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>(); }
 
----------------
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.


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