[PATCH] D76939: [AST] Add a Dependence bitmask to use for calculations with multiple node types.

Haojian Wu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 27 15:27:09 PDT 2020


hokein accepted this revision.
hokein added a comment.
This revision is now accepted and ready to land.

nice, thanks!



================
Comment at: clang/include/clang/AST/DependenceFlags.h:120
+
+  Dependence(Bits V) : V(V) {}
+
----------------
nit: this seems to be unused?


================
Comment at: clang/include/clang/AST/DependenceFlags.h:152
+  TypeDependence type() const {
+    return translate(V, UnexpandedPack, TypeDependence::UnexpandedPack) |
+           translate(V, Instantiation, TypeDependence::Instantiation) |
----------------
maybe make `Bits` as scoped enum? I find `translate(V, Bits::UnexpandedPack, TypeDependence::UnexpandedPack)` is clearer.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D76939





More information about the cfe-commits mailing list