[LLVMbugs] [Bug 19476] New: [ParentMap - setParent] invalid description
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Fri Apr 18 08:25:06 PDT 2014
http://llvm.org/bugs/show_bug.cgi?id=19476
Bug ID: 19476
Summary: [ParentMap - setParent] invalid description
Product: clang
Version: 3.4
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: Documentation
Assignee: unassignedclangbugs at nondot.org
Reporter: czarekpawlowski at gmail.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
http://clang.llvm.org/doxygen/classclang_1_1ParentMap.html
"ParentMap documentation specifies:
void ParentMap::setParent(const Stmt * S, const Stmt * Parent):
Manually sets the parent of S to Parent.
If S is already in the map, this method will update the mapping."
It is wrong, because ParentMap uses llvm::DenseMap<Stmt*, Stmt*> and operation
map->insert(std::make_pair(const_cast<Stmt *>(S), const_cast<Stmt *>(Parent)));
will not update the mapping as its default behaviour is like in STL
(http://llvm.org/docs/doxygen/html/DenseMap_8h_source.html).
If the key is already in the map, it returns false and doesn't update the
value.
You could change it to update the mapping or remove the description. IMHO the
first option would be better (my intention was to manipulate this map a
little).
Please share some feedback with me.
Thank you.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20140418/7ec225fa/attachment.html>
More information about the llvm-bugs
mailing list