[llvm-commits] [test-suite] r114458 - /test-suite/trunk/SingleSource/UnitTests/conditional-gnu-ext.cpp
Fariborz Jahanian
fjahanian at apple.com
Tue Sep 21 11:33:39 PDT 2010
Author: fjahanian
Date: Tue Sep 21 13:33:39 2010
New Revision: 114458
URL: http://llvm.org/viewvc/llvm-project?rev=114458&view=rev
Log:
Test updated for clang's implmentation of
gnu extension's missing LHS (when it was
meant to be an lvalue).
Modified:
test-suite/trunk/SingleSource/UnitTests/conditional-gnu-ext.cpp
Modified: test-suite/trunk/SingleSource/UnitTests/conditional-gnu-ext.cpp
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/UnitTests/conditional-gnu-ext.cpp?rev=114458&r1=114457&r2=114458&view=diff
==============================================================================
--- test-suite/trunk/SingleSource/UnitTests/conditional-gnu-ext.cpp (original)
+++ test-suite/trunk/SingleSource/UnitTests/conditional-gnu-ext.cpp Tue Sep 21 13:33:39 2010
@@ -8,15 +8,29 @@
return val;
}
-_Complex int doo() {
+_Complex int cmplx_test() {
_Complex int cond;
_Complex int rhs;
return getComplex(1+2i) ? : rhs;
}
-int main() {
- doo();
- return 0;
+// lvalue test
+int global = 1;
+void foo (int& lv) {
+ ++lv;
}
+int &cond() {
+ static int count;
+ if (count++)
+ abort();
+ return global;
+}
+
+int main() {
+ cmplx_test();
+ int rhs = 10;
+ foo (cond()? : rhs);
+ return global-2;
+}
More information about the llvm-commits
mailing list