]> granicus.if.org Git - clang/commit
[Sema] Disable built-in increment operator for bool in overload resolution in C++17
authorJan Korous <jkorous@apple.com>
Wed, 18 Apr 2018 13:38:39 +0000 (13:38 +0000)
committerJan Korous <jkorous@apple.com>
Wed, 18 Apr 2018 13:38:39 +0000 (13:38 +0000)
commitd71677b5d5a4dfc9470e7cbdc8600af530644968
tree7b3e392a166668a22ff572b998c1ded429a585bb
parent66eac88b490fd893bf0ec63f70505a7603e7aaca
[Sema] Disable built-in increment operator for bool in overload resolution in C++17

Following: https://llvm.org/svn/llvm-project/cfe/trunk@329804

For C++17 the wording of [over.built] p4 excluded bool:

For every pair (T , vq), where T is an arithmetic type other than bool, there exist
candidate operator functions of the form
  vq T & operator++(vq T &);
  T operator++(vq T &, int);

Differential Revision: https://reviews.llvm.org/D45569

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@330254 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Sema/SemaOverload.cpp
test/SemaCXX/overloaded-builtin-operators-cxx17.cpp [new file with mode: 0644]