Extend the Trivial setter documentation to support cases where the value is moved into a field using std::move.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Nice, thanks!
clang-tools-extra/clangd/Hover.cpp | ||
---|---|---|
463 | nit: you could skip this check if you like, the other variant isn't going to be on the RHS of an assignment :-) | |
470 | I guess you want !ND->getIdentifier() || ND->getName() != "move" || ... to guard against it being a special name somehow - getName() asserts in that case. |
Updated function doc
Fix potential assertion
clang-tools-extra/clangd/Hover.cpp | ||
---|---|---|
463 | You never know what crazy code people could concoct. It could be argued that this has a performance win by easily filtering out some bad candidates quickly and avoid needing to run the (slightly) more expensive checks on the name later down the line :-) | |
468 | Can you explain the reasoning for moving the comparison to the end? |
clang-tools-extra/clangd/Hover.cpp | ||
---|---|---|
468 | it was to skip a potentialyl expensive string comparison, but now that I look into isInStdNamespace it is also performing a string comparison in the end. so nvm. |
can you also update the docs?