[cfe-commits] r39579 - /cfe/cfe/trunk/test/Parser/cxx-reference.cpp

bwendlin at cs.uiuc.edu bwendlin at cs.uiuc.edu
Wed Jul 11 09:45:50 PDT 2007


Author: bwendlin
Date: Wed Jul 11 11:45:50 2007
New Revision: 39579

URL: http://llvm.org/viewvc/llvm-project?rev=39579&view=rev
Log:
Add const/volatile badness

Modified:
    cfe/cfe/trunk/test/Parser/cxx-reference.cpp

Modified: cfe/cfe/trunk/test/Parser/cxx-reference.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/cfe/trunk/test/Parser/cxx-reference.cpp?rev=39579&r1=39578&r2=39579&view=diff

==============================================================================
--- cfe/cfe/trunk/test/Parser/cxx-reference.cpp (original)
+++ cfe/cfe/trunk/test/Parser/cxx-reference.cpp Wed Jul 11 11:45:50 2007
@@ -1,6 +1,19 @@
-// RUN: clang -fsyntax-only %s
+// RUN: clang -fsyntax-only %s &&
+// RUN: clang -fsyntax-only %s 2>&1 | grep "error: 'const' qualifier may not be applied to a reference" &&
+// RUN: clang -fsyntax-only %s 2>&1 | grep "error: 'volatile' qualifier may not be applied to a reference"
+
 extern char *bork;
 char *& bar = bork;
 
 void foo(int &a) {
 }
+
+typedef int & A;
+
+void g(const A aref) {
+}
+
+int & const X;
+int & volatile Y;
+int & const volatile Z;
+





More information about the cfe-commits mailing list