[docs] Add LICENSE.txt to the root of the mono-repo
[llvm-project.git] / clang / test / SemaCXX / overloaded-builtin-operators-cxx17.cpp
blob05f85f88ccd85c2b93965a41f015bf156d469d8e
1 // RUN: %clang_cc1 -fsyntax-only -fshow-overloads=best -verify -triple x86_64-linux-gnu -std=c++17 %s
3 struct BoolRef {
4 operator bool&();
5 };
7 void foo(BoolRef br) {
8 // C++ [over.built]p3: Increment for bool was removed in C++17.
9 bool b = br++; // expected-error{{cannot increment value of type 'BoolRef'}}