[PATCH] D151938: [clang][index] NFCI: Make `CXFile` a `FileEntryRef`

Mikael Holmén via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 19 06:06:11 PDT 2023


uabelho added inline comments.


================
Comment at: clang/tools/libclang/CXFile.h:18
+inline CXFile makeCXFile(OptionalFileEntryRef FE) {
+  return CXFile(FE ? &FE->getMapEntry() : nullptr);
+}
----------------
Gcc warns here:
```
../../clang/tools/libclang/CXFile.h:18:50: warning: cast from type 'const MapEntry*' {aka 'const llvm::StringMapEntry<llvm::ErrorOr<clang::FileEntryRef::MapValue> >*'} to type 'CXFile' {aka 'void*'} casts away qualifiers [-Wcast-qual]
```
Anything that should be fixed?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D151938/new/

https://reviews.llvm.org/D151938



More information about the cfe-commits mailing list