Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[lldb][NFC] Simplify ClangASTContext::GetTranslationUnitDecl
These two functions are just calling their equivalent function in ASTContext and implicitly convert the result to a DeclContext* (a parent class of TranslationUnitDecl). This leads to the absurd situation that we had to cast the result of GetTranslationUnitDecl to a TranslationUnitDecl*. The only reason we did this implicit conversion to the parent class was that the void* conversion for the CompilerDeclContext constructor was sound (which otherwise would receive a Decl* pointer when called with a TranslationUnitDecl*). Now that the CompilerDeclContext constructor is type safe we can properly implement these functions by actually returning the right type. Also deletes the static inconvenience method that was not used anywhere.
- Loading branch information