]> granicus.if.org Git - clang/commit
P0962R1: only use the member form of 'begin' and 'end' in a range-based
authorRichard Smith <richard-llvm@metafoo.co.uk>
Mon, 24 Sep 2018 23:17:44 +0000 (23:17 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Mon, 24 Sep 2018 23:17:44 +0000 (23:17 +0000)
commit1a2d5c6f5a7fb4f5b88fbc821c39e7e4485464c7
treea73805064fa4fa1e4ca415b18fd1cf4a5f1d2cd1
parent252ecba16a1694e520ca44a2cb065e7899786fbf
P0962R1: only use the member form of 'begin' and 'end' in a range-based
for loop if both members exist.

This resolves a DR whereby an errant 'begin' or 'end' member in a base
class could result in a derived class not being usable as a range with
non-member 'begin' and 'end'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@342925 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Basic/DiagnosticSemaKinds.td
lib/Sema/SemaStmt.cpp
test/CXX/stmt.stmt/stmt.iter/stmt.ranged/p1.cpp
test/SemaCXX/for-range-dereference.cpp