[llvm] Inline operator== and operator!= (PR #67958)

via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 2 21:08:20 PDT 2023


dyung wrote:

Hi, we also use gcc internally to build the compiler and were seeing the warnings you are trying to fix here, so I tried applying your fix on our repo and it seems to fail with gcc 9.4.0 as well for the same errors I'm seeing with my Windows build of your fix. Namely this error:
```
/home/dyung/src/git/merge/llvm/include/llvm/ADT/PagedVector.h:220:40: error: ‘size_t llvm::PagedVector<clang::QualType>::Size’ is private within this context
  220 |       assert(LHS.ElementIdx == LHS.PV->Size ||
      |                                ~~~~~~~~^~~~
In file included from /home/dyung/src/git/merge/clang/include/clang/Basic/SourceManager.h:46,
                 from /home/dyung/src/git/merge/clang/lib/Serialization/ASTReader.cpp:61:
/home/dyung/src/git/merge/llvm/include/llvm/ADT/PagedVector.h:46:10: note: declared private here
   46 |   size_t Size = 0;
      |          ^~~~
...
/home/dyung/src/git/merge/llvm/include/llvm/ADT/PagedVector.h:222:23: error: ‘llvm::SmallVector<clang::QualType*, 0> llvm::PagedVector<clang::QualType>::PageToDataPtrs’ is private within this context
  222 |               LHS.PV->PageToDataPtrs[LHS.ElementIdx / PageSize]));
      |               ~~~~~~~~^~~~~~~~~~~~~~
In file included from /home/dyung/src/git/merge/clang/include/clang/Basic/SourceManager.h:46,
                 from /home/dyung/src/git/merge/clang/lib/Serialization/ASTReader.cpp:61:
/home/dyung/src/git/merge/llvm/include/llvm/ADT/PagedVector.h:50:31: note: declared private here
   50 |   mutable SmallVector<T *, 0> PageToDataPtrs;
      |                               ^~~~~~~~~~~~~~
```

https://github.com/llvm/llvm-project/pull/67958


More information about the llvm-commits mailing list