[PATCH] D101641: [Sema] Preserve invalid CXXCtorInitializers using RecoveryExpr in initializer

Haojian Wu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon May 3 13:32:53 PDT 2021


hokein added a comment.

thanks, this code looks pretty solid, just a question.



================
Comment at: clang/lib/Sema/SemaDeclCXX.cpp:4475
   //   name that denotes that base class type.
-  bool Dependent = BaseType->isDependentType() || Init->isTypeDependent();
+  bool Dependent = CurContext->isDependentContext() &&
+                   (BaseType->isDependentType() || Init->isTypeDependent());
----------------
it is unclear to me why we need a `isDependentContext()` here? looks like this would special-case RecoveryExpr, the following dependent code-path would not be executed for RecoveryExpr case? 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D101641



More information about the cfe-commits mailing list