[clang][index] Fix cast warning

This is a follow-up to D151938 that should fix GCC's -Wcast-qual warning.
This commit is contained in:
Jan Svoboda 2023-06-20 12:21:59 +02:00
parent c7430ff9bf
commit 1c64c414ed

View File

@ -15,7 +15,8 @@
namespace clang {
namespace cxfile {
inline CXFile makeCXFile(OptionalFileEntryRef FE) {
return CXFile(FE ? &FE->getMapEntry() : nullptr);
return CXFile(FE ? const_cast<FileEntryRef::MapEntry *>(&FE->getMapEntry())
: nullptr);
}
inline OptionalFileEntryRef getFileEntryRef(CXFile File) {