Skip to content

Commit a49bcee

Browse files
committed
Convert a clang::Module to non-const to account for a clang API change
An upstream clang changed ASTSourceDescriptor to not have a const Module pointer. const_cast here to make this agree.
1 parent 815912f commit a49bcee

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/ClangImporter/ClangImporter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3305,7 +3305,7 @@ ClangModuleUnit::ClangModuleUnit(ModuleDecl &M,
33053305
clangModule(clangModule) {
33063306
// Capture the file metadata before it goes away.
33073307
if (clangModule)
3308-
ASTSourceDescriptor = {*clangModule};
3308+
ASTSourceDescriptor = {*const_cast<clang::Module *>(clangModule)};
33093309
}
33103310

33113311
StringRef ClangModuleUnit::getModuleDefiningPath() const {

0 commit comments

Comments
 (0)