[PATCH] D71920: [AST] Refactor propagation of dependency bits. NFC

Mark de Wever via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Dec 28 07:14:52 PST 2019


Mordante added a comment.

I like the goal of this patch and the simplifications it does. I don't feel qualified to do a full review.



================
Comment at: clang/include/clang/AST/Expr.h:126
+    if (TD)
+      D = D | DependencyFlags::Type;
+    if (VD)
----------------
Just curious why do you prefer `D = D | DependencyFlags::Type;` over `D |= DependencyFlags::Type;` ? The latter seems to be more common.


================
Comment at: clang/include/clang/AST/Stmt.h:323
   };
   enum { NumExprBits = NumStmtBits + 9 };
 
----------------
Please use `enum { NumExprBits = NumStmtBits + 5 +  DependencyFlagsBits };` to avoid bugs when the size changes.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D71920





More information about the cfe-commits mailing list