[cfe-commits] r108437 - /cfe/trunk/test/SemaCXX/decltype.cpp

Douglas Gregor dgregor at apple.com
Thu Jul 15 11:35:15 PDT 2010


Author: dgregor
Date: Thu Jul 15 13:35:15 2010
New Revision: 108437

URL: http://llvm.org/viewvc/llvm-project?rev=108437&view=rev
Log:
Add test case for PR5290; this bug was fixed with the non-class rvalue
de-cv-qualification fixes.

Added:
    cfe/trunk/test/SemaCXX/decltype.cpp   (with props)

Added: cfe/trunk/test/SemaCXX/decltype.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/decltype.cpp?rev=108437&view=auto
==============================================================================
--- cfe/trunk/test/SemaCXX/decltype.cpp (added)
+++ cfe/trunk/test/SemaCXX/decltype.cpp Thu Jul 15 13:35:15 2010
@@ -0,0 +1,18 @@
+// RUN: %clang_cc1 -std=c++0x -fsyntax-only -verify %s
+
+// PR5290
+int const f0();
+void f0_test() {
+  decltype(0, f0()) i = 0; // expected-warning{{expression result unused}}
+  i = 0;
+}
+
+struct A { int a[1]; A() { } };
+typedef A const AC;
+int &f1(int*);
+float &f2(int const*);
+
+void test_f2() {
+  float &fr = f2(AC().a);
+}
+

Propchange: cfe/trunk/test/SemaCXX/decltype.cpp
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cfe/trunk/test/SemaCXX/decltype.cpp
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: cfe/trunk/test/SemaCXX/decltype.cpp
------------------------------------------------------------------------------
    svn:mime-type = text/plain





More information about the cfe-commits mailing list