[PATCH] D48955: [libc++] Improve diagnostics for non-const comparators and hashers in associative containers
Louis Dionne via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 4 14:55:25 PDT 2018
ldionne created this revision.
ldionne added reviewers: EricWF, mclow.lists.
Herald added subscribers: llvm-commits, dexonsmith, christof.
When providing a non-const-callable comparator in a map or set, the
warning diagnostic does not include the point of instantiation of
the container that triggered the warning, which makes it difficult
to track down the problem. This commit improves the diagnostic by
placing it directly in the body of the associative container.
The same change is applied to unordered associative containers, which
had a similar problem.
Finally, this commit cleans up the forward declarations of several
map and unordered_map helpers, which are not needed anymore.
rdar://problem/41370747
Repository:
rL LLVM
https://reviews.llvm.org/D48955
Files:
libcxx/docs/UsingLibcxx.rst
libcxx/include/__hash_table
libcxx/include/__tree
libcxx/include/map
libcxx/include/set
libcxx/include/unordered_map
libcxx/include/unordered_set
libcxx/test/libcxx/containers/associative/non_const_comparator.fail.cpp
libcxx/test/libcxx/containers/unord/non_const_comparator.fail.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D48955.154155.patch
Type: text/x-patch
Size: 13868 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180704/8b97ace9/attachment.bin>
More information about the llvm-commits
mailing list