[PATCH] D121927: [Clang] Work with multiple pragmas weak before definition

Hubert Tong via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 18 13:02:12 PDT 2022


hubert.reinterpretcast marked an inline comment as done.
hubert.reinterpretcast added inline comments.


================
Comment at: clang/include/clang/Sema/Weak.h:35
   inline SourceLocation getLocation() const { return loc; }
-  void setUsed(bool Used=true) { used = Used; }
-  inline bool getUsed() { return used; }
-  bool operator==(WeakInfo RHS) const {
-    return alias == RHS.getAlias() && loc == RHS.getLocation();
-  }
-  bool operator!=(WeakInfo RHS) const { return !(*this == RHS); }
+  void setUsed(bool Used = true) = delete;
+  inline bool getUsed() const = delete;
----------------
cebowleratibm wrote:
> For my selfish education: what is the purpose of marking this deleted rather than actually deleting it?
Removing this should be fine (I will make the change). Didn't want to `delete` the `operator` functions (immediately) though: downstream consumers might end up calling a different function, which warrants some scrutiny.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D121927



More information about the cfe-commits mailing list