[all-commits] [llvm/llvm-project] fba88a: [Sema] Always perform ADL when searching for trans...

Ilya Biryukov via All-commits all-commits at lists.llvm.org
Fri Aug 12 07:14:56 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: fba88adc8961fc8b8d7dece7bfecbfc31c652aff
      https://github.com/llvm/llvm-project/commit/fba88adc8961fc8b8d7dece7bfecbfc31c652aff
  Author: Ilya Biryukov <ibiryukov at google.com>
  Date:   2022-08-12 (Fri, 12 Aug 2022)

  Changed paths:
    M clang/lib/Sema/SemaOverload.cpp

  Log Message:
  -----------
  [Sema] Always perform ADL when searching for transormed operators in C++20

This fixes compilation errors in the following code with
latest libc++ and libstdc++:
```cpp

int main() {
  std::tuple<std::string> s;
  std::tuple<std::string_view> sv;
  s < sv;
}
```

See https://gcc.godbolt.org/z/vGvEhxWvh for the error.

This used to happen because repeated template instantiations during
C++20 constraint satisfaction will cause a call to `RebuildCXXRewrittenBinaryOperator`
with `PerformADL` set to false, see https://github.com/llvm/llvm-project/blob/59351fe340f20a605bae53260ed30a8e0fd95cb6/clang/lib/Sema/TreeTransform.h#L2737

Committing urgently to unbreak breakages we see in our configurations.
The change seems relatively safe and the right thing to do.

However, I will follow-up with tests and investigation on whether we
need to do this extra semantic checking in the first place next week.




More information about the All-commits mailing list