summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaTemplate/enum-argument.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-05-24 20:13:53 +0000
committerDouglas Gregor <dgregor@apple.com>2010-05-24 20:13:53 +0000
commite05d3cb770d1b710c15bfdb89a417d48e3226741 (patch)
tree9064e705cf2c0d8020ba9565f4b936138c04c3ff /clang/test/SemaTemplate/enum-argument.cpp
parent722bff2c7dd668fbbaddf7891924474efcbf16e9 (diff)
downloadbcm5719-llvm-e05d3cb770d1b710c15bfdb89a417d48e3226741.tar.gz
bcm5719-llvm-e05d3cb770d1b710c15bfdb89a417d48e3226741.zip
A type- or value-dependent expression cannot use bitfield
promotion. Fixes <rdar://problem/8020920>. llvm-svn: 104545
Diffstat (limited to 'clang/test/SemaTemplate/enum-argument.cpp')
-rw-r--r--clang/test/SemaTemplate/enum-argument.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/clang/test/SemaTemplate/enum-argument.cpp b/clang/test/SemaTemplate/enum-argument.cpp
index de89487bd58..7d237570678 100644
--- a/clang/test/SemaTemplate/enum-argument.cpp
+++ b/clang/test/SemaTemplate/enum-argument.cpp
@@ -21,3 +21,16 @@ struct X0 {
};
X0<int> x0i;
+
+namespace rdar8020920 {
+ template<typename T>
+ struct X {
+ enum { e0 = 32 };
+
+ unsigned long long bitfield : e0;
+
+ void f(int j) {
+ bitfield + j;
+ }
+ };
+}
OpenPOWER on IntegriCloud