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: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to