[llvm-branch-commits] [clang] [Serialization] Code cleanups and polish 83233 (PR #83237)

Alexander Kornienko via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Wed Jul 31 13:05:50 PDT 2024


alexfh wrote:

I'm getting this error when trying to bootstrap Clang:
```
In file included from clang/lib/Serialization/ASTReaderDecl.cpp:15:
clang/lib/Serialization/ASTReaderInternals.h:160:19: error: ISO C++20 considers use of overloaded operator '==' (with operand types 'clang::serialization::reader::LazySpecializationInfo' and 'LazySpecializationInfo') to be ambiguous despite there being a unique best viable function [-Werror,-Wambiguous-reversed-operator]
  160 |             if (I == Info)
      |                 ~ ^  ~~~~
clang/lib/Serialization/ASTReaderInternals.h:128:8: note: ambiguity is between a regular call to this operator and a call with the argument order reversed
  128 |   bool operator==(const LazySpecializationInfo &Other) {
      |        ^
clang/lib/Serialization/ASTReaderInternals.h:128:8: note: mark 'operator==' as const or add a matching 'operator!=' to resolve the ambiguity
```

I can mute it for testing, but this also needs to be fixed.

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


More information about the llvm-branch-commits mailing list