summaryrefslogtreecommitdiffstats
path: root/test/SemaCXX/overloaded-builtin-operators.cpp
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2012-08-15 20:02:54 +0000
committerdim <dim@FreeBSD.org>2012-08-15 20:02:54 +0000
commit554bcb69c2d785a011a30e7db87a36a87fe7db10 (patch)
tree9abb1a658a297776086f4e0dfa6ca533de02104e /test/SemaCXX/overloaded-builtin-operators.cpp
parentbb67ca86b31f67faee50bd10c3b036d65751745a (diff)
downloadFreeBSD-src-554bcb69c2d785a011a30e7db87a36a87fe7db10.zip
FreeBSD-src-554bcb69c2d785a011a30e7db87a36a87fe7db10.tar.gz
Vendor import of clang trunk r161861:
http://llvm.org/svn/llvm-project/cfe/trunk@161861
Diffstat (limited to 'test/SemaCXX/overloaded-builtin-operators.cpp')
-rw-r--r--test/SemaCXX/overloaded-builtin-operators.cpp33
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;
+}
OpenPOWER on IntegriCloud