[Lldb-commits] [PATCH] D62797: [Expression] Add PersistentExpressionState::GetCompilerTypeFromPersistentDecl
Jonas Devlieghere via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Tue Jun 11 14:20:50 PDT 2019
JDevlieghere accepted this revision.
JDevlieghere added inline comments.
================
Comment at: source/Plugins/ExpressionParser/Clang/ClangPersistentVariables.cpp:66
+ const_cast<clang::Type *>(tdecl->getTypeForDecl())));
+ return compiler_type;
+ }
----------------
I think there's a matching constructor, which would allow you to get rid of the temporary and do
```
return CompilerType(ClangASTContext::GetASTContext(&tdecl->getASTContext()),reinterpret_cast<lldb::opaque_compiler_type_t>(const_cast<clang::Type *>(tdecl->getTypeForDecl())));
```
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D62797/new/
https://reviews.llvm.org/D62797
More information about the lldb-commits
mailing list