[PATCH] D103792: [clang][AST] Set correct DeclContext in ASTImporter lookup table for template params.
Gabor Marton via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jun 14 05:17:47 PDT 2021
martong added inline comments.
================
Comment at: clang/lib/AST/ASTImporter.cpp:5961-5962
if (Error Err = ImportDeclParts(D, DC, LexicalDC, Name, ToD, Loc))
return std::move(Err);
----------------
Do you think that the alternative approach that is used with `TypedefNameDecl` could work here?
```
// Do not import the DeclContext, we will import it once the TypedefNameDecl
// is created.
if (Error Err = ImportDeclParts(D, Name, ToD, Loc))
return std::move(Err);
```
With that perhaps we could avoid the hassle with the `update`. Could you please investigate that?
================
Comment at: clang/lib/AST/ASTImporter.cpp:6011
+ // FunctionTemplateDecl is created, but was set already when the class
+ // template was created. So here is is not the TU (default value) any more.
+ // FIXME: The DeclContext of the parameters is now set finally to the
----------------
typo: `is is` -> `it is`
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D103792/new/
https://reviews.llvm.org/D103792
More information about the cfe-commits
mailing list