Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SetVector iterators aren't really mutable #1466

Closed
nlewycky opened this issue Jan 8, 2007 · 3 comments
Closed

SetVector iterators aren't really mutable #1466

nlewycky opened this issue Jan 8, 2007 · 3 comments
Labels
bugzilla Issues migrated from bugzilla code-cleanup llvm:core

Comments

@nlewycky
Copy link
Contributor

nlewycky commented Jan 8, 2007

Bugzilla Link 1094
Resolution FIXED
Resolved on Feb 22, 2010 12:44
Version trunk
OS All

Extended Description

Currently the implementation of SetVector::begin and end return iterators from
the contained vector. If someone used that iterator to modify the interior of
the vector (ala. "*MySetVector.begin() = value") then the SetVector's internal
set would be out of sync making further inserts fail or permit the insertion of
duplicates.

@lattner
Copy link
Collaborator

lattner commented Jan 8, 2007

Changing them to be const_iterator's makes sense. Go for it!

@llvmbot
Copy link
Collaborator

llvmbot commented Jan 17, 2007

@llvmbot
Copy link
Collaborator

llvmbot commented Jan 17, 2007

Patch applied. Thanks, Gordon.

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 3, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla code-cleanup llvm:core
Projects
None yet
Development

No branches or pull requests

3 participants