aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Support/Threading.cpp
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2021-07-08 13:26:40 -0700
committerDavid Blaikie <dblaikie@gmail.com>2021-07-08 13:37:57 -0700
commite2d30846327c7ec5cc9d2a46aa9bcd9c2c4eff93 (patch)
tree71af82067422bb1ae8fa4736425f773d2d7fcc01 /llvm/lib/Support/Threading.cpp
parent1def2579e10dd84405465f403e8c31acebff0c97 (diff)
downloadllvm-e2d30846327c7ec5cc9d2a46aa9bcd9c2c4eff93.zip
llvm-e2d30846327c7ec5cc9d2a46aa9bcd9c2c4eff93.tar.gz
llvm-e2d30846327c7ec5cc9d2a46aa9bcd9c2c4eff93.tar.bz2
PR51018: Disallow explicit construction of StringRef from SmallString due to ambiguity in C++23
See bug for full details, but basically there's an upcoming ambiguity in the conversion in `StringRef(SomeSmallString)` - either the implicit conversion operator (SmallString::operator StringRef) could be used, or the std::string_view range-based ctor (& then `StringRef(std::string_view)` would be used) To address this, make such a conversion invalid up-front - most uses are more tersely written as `SomeSmallString.str()` anyway, or more clearly written as `StringRef x = y;` rather than `StringRef x(y);` - so if you hit this in out-of-tree code, please update in one of those ways. Hopefully I've fixed everything in tree prior to this patch landing.
Diffstat (limited to 'llvm/lib/Support/Threading.cpp')
0 files changed, 0 insertions, 0 deletions