[PATCH] D103231: [clang][AST] Set correct DeclContext in ASTImporter lookup table for ParmVarDecl.

Gabor Marton via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 3 05:45:37 PDT 2021


martong added a comment.

In D103231#2795794 <https://reviews.llvm.org/D103231#2795794>, @balazske wrote:

> Added `contains` for correct check of `ASTImporterLookupTable` content.

Okay, that looks good, but I just realized we should not have "bare" assertions. Could you please add some explanatory textual description for the new assertions?



================
Comment at: clang/lib/AST/ASTImporterLookupTable.cpp:121
+void ASTImporterLookupTable::update(NamedDecl *ND, DeclContext *OldDC) {
+  assert(OldDC != ND->getDeclContext());
+  if (contains(ND->getDeclContext(), ND)) {
----------------
Could you please add some explanatory textual description for the new `assert`ions?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D103231



More information about the cfe-commits mailing list