[clang] [clang-tools-extra] [libcxx] [clang] improved preservation of template keyword (PR #133610)
Devon Loehr via cfe-commits
cfe-commits at lists.llvm.org
Mon Apr 7 11:32:55 PDT 2025
DKLoehr wrote:
We're also seeing `class member cannot be redeclared` errors when trying to build chromium:
```
In file included from ../../components/system_cpu/cpu_probe.cc:16:
In file included from ../../components/system_cpu/cpu_probe_linux.h:14:
../../base/threading/sequence_bound.h:281:8: error: class member cannot be redeclared
281 | void PostTaskWithThisObject(
| ^
../../base/threading/sequence_bound.h:264:8: note: previous definition is here
264 | void PostTaskWithThisObject(
| ^
```
The file in question can be viewed [here](https://source.chromium.org/chromium/chromium/src/+/main:base/threading/sequence_bound.h;l=263;drc=72ba73a81b090ee221a9f107333c3e5e964cf750). It seems like the compiler is getting confused between `const UnwrappedT&` and `UnwrappedT*`, where `UnwrappedT` is, ultimately, a templated type. I'm also looking for a reduced repro, though I expect alexfh will produce one that works for both of us.
https://github.com/llvm/llvm-project/pull/133610
More information about the cfe-commits
mailing list