Skip to content

Conversation

@kazutakahirata
Copy link
Contributor

  • try_emplace(Key) is shorter than insert({Key, nullptr}).
  • try_emplace performs value initialization without value parameters.
  • We overwrite values on successful insertion anyway.

- try_emplace(Key) is shorter than insert({Key, nullptr}).
- try_emplace performs value initialization without value parameters.
- We overwrite values on successful insertion anyway.
@kazutakahirata kazutakahirata requested review from arsenm, shiltian and tgymnich and removed request for cyndyishida June 10, 2025 15:57
@kazutakahirata kazutakahirata merged commit 9bda38f into llvm:main Jun 10, 2025
8 checks passed
@kazutakahirata kazutakahirata deleted the cleanup_20250610_try_emplace_llvm branch June 10, 2025 18:36
tomtor pushed a commit to tomtor/llvm-project that referenced this pull request Jun 14, 2025
- try_emplace(Key) is shorter than insert({Key, nullptr}).
- try_emplace performs value initialization without value parameters.
- We overwrite values on successful insertion anyway.
akuhlens pushed a commit to akuhlens/llvm-project that referenced this pull request Jun 24, 2025
- try_emplace(Key) is shorter than insert({Key, nullptr}).
- try_emplace performs value initialization without value parameters.
- We overwrite values on successful insertion anyway.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants