[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)
commit536d2e30721e2b1690ac4018c033e36c096820bb
tree03707003da395d5fa2faa264afe3a18047adf3ee
parentd501a609c408530bbfe4a12fb3e5c1702a5de66a
[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

llvm-svn: 330254
clang/lib/Sema/SemaOverload.cpp
clang/test/SemaCXX/overloaded-builtin-operators-cxx17.cpp [new file with mode: 0644]