diff options
Diffstat (limited to 'test/SemaCXX/overloaded-builtin-operators.cpp')
-rw-r--r-- | test/SemaCXX/overloaded-builtin-operators.cpp | 33 |
1 files changed, 32 insertions, 1 deletions
diff --git a/test/SemaCXX/overloaded-builtin-operators.cpp b/test/SemaCXX/overloaded-builtin-operators.cpp index b3c0808..ac110a3 100644 --- a/test/SemaCXX/overloaded-builtin-operators.cpp +++ b/test/SemaCXX/overloaded-builtin-operators.cpp @@ -174,7 +174,7 @@ void test_dr425(A a) { // FIXME: lots of candidates here! (void)(1.0f * a); // expected-error{{ambiguous}} \ // expected-note 4{{candidate}} \ - // expected-note {{remaining 77 candidates omitted; pass -fshow-overloads=all to show them}} + // expected-note {{remaining 117 candidates omitted; pass -fshow-overloads=all to show them}} } // pr5432 @@ -237,3 +237,34 @@ namespace PR7851 { (void)(x - x); } } + +namespace PR12854 { + enum { size = 1 }; + void plus_equals() { + int* __restrict py; + py += size; + } + + struct RestrictInt { + operator int* __restrict &(); + }; + + void user_conversions(RestrictInt ri) { + ++ri; + --ri; + ri++; + ri--; + } +} + +namespace PR12964 { + struct X { operator __int128() const; } x; + bool a = x == __int128(0); + bool b = x == 0; + + struct Y { operator unsigned __int128() const; } y; + bool c = y == __int128(0); + bool d = y == 0; + + bool e = x == y; +} |