In C++, set the type of each of the enumerators in an enumeration to
the type of the enumeration once the enumeration has been defined.
Fix the overloading test-case to properly create enums that promote
the way we want them to.
Implement C++0x promotions from enumeration types to long
long/unsigned long long. We're using these promotions in Carbon.h
(since long long is a common extension).
Fixes PR clang/2954: http://llvm.org/bugs/show_bug.cgi?id=2954
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60917 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/SemaCXX/overload-call.cpp b/test/SemaCXX/overload-call.cpp
index 5460521..eed8223 100644
--- a/test/SemaCXX/overload-call.cpp
+++ b/test/SemaCXX/overload-call.cpp
@@ -1,4 +1,4 @@
-// RUN: clang -fsyntax-only -pedantic -verify %s
+// RUN: clang -fsyntax-only -pedantic -verify %s
int* f(int) { return 0; }
float* f(float) { return 0; }
void f();
@@ -88,11 +88,11 @@
}
enum PromotesToInt {
- PromotesToIntValue = 1
+ PromotesToIntValue = -1
};
enum PromotesToUnsignedInt {
- PromotesToUnsignedIntValue = (unsigned int)-1
+ PromotesToUnsignedIntValue = 1u
};
int* o(int);