Based on a suggestion from Richard Smith, this switches TypeSystemClang over to Decl*::CreateDeserialized() which is the more appropriate API for its use-case.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
The changes that remove the non-existent module parameter slipped in by mistake I think and the rest LGTM. I didn't verify if all the setX calls are 100% identical to what the constructor would do but *usually* Decl constructor don't any fancy logic so the new code should be equivalent. Maybe dump some module AST before and after this patch and just diff it to see if anything changed.
A bunch of small comments but a few more serious ones as well.
lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp | ||
---|---|---|
1339 | It does not look like func_decl->getLocation() get used at all. | |
1467 | static_cast<TagDecl::TagKind>(kind) | |
1771 | I guess clang::SC_None is the default? | |
7190 | Where does 1 << 1 come from? What does it mean? | |
7913 | Everywhere else we do: if (name && name[0]) Why not for this case? |
static_cast<TagDecl::TagKind>(kind)