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

Jan Svoboda via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 20 03:22:45 PDT 2023


jansvoboda11 added inline comments.


================
Comment at: clang/tools/libclang/CXFile.h:18
+inline CXFile makeCXFile(OptionalFileEntryRef FE) {
+  return CXFile(FE ? &FE->getMapEntry() : nullptr);
+}
----------------
uabelho wrote:
> 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?
Thanks, should be fixed in 1c64c414.


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