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

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 17 10:44:21 PDT 2020


sammccall added inline comments.


================
Comment at: clang/include/clang/AST/Type.h:1827-1830
+    if (Dependent)
+      Deps |= TypeDependence::Dependent | TypeDependence::Instantiation;
+    if (InstantiationDependent)
+      Deps |= TypeDependence::Instantiation;
----------------
AlexeySachkov wrote:
> @ilya-biryukov, Is this code snippet correct?
> 
> It seems to be, that it should look like:
> ```
>     if (Dependent)
>       Deps |= TypeDependence::Dependent;
>     if (InstantiationDependent)
>       Deps |= TypeDependence::Dependent | TypeDependence::Instantiation;
> ```
I agree that seems clearer, but ISTM they are equivalent because a dependent type is always instantiation-dependent (right?)

Are you seeing related problems?


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