r196729 - Fix a test that hasn't worked since 2007

Alp Toker alp at nuanti.com
Sun Dec 8 10:49:05 PST 2013


Author: alp
Date: Sun Dec  8 12:49:05 2013
New Revision: 196729

URL: http://llvm.org/viewvc/llvm-project?rev=196729&view=rev
Log:
Fix a test that hasn't worked since 2007

Due to a missing -verify, 2007-10-01-BuildArrayRef.c was a no-op.

The message was changed 5 years ago so also update the test to reflect the new wording.

Modified:
    cfe/trunk/test/Sema/2007-10-01-BuildArrayRef.c

Modified: cfe/trunk/test/Sema/2007-10-01-BuildArrayRef.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/2007-10-01-BuildArrayRef.c?rev=196729&r1=196728&r2=196729&view=diff
==============================================================================
--- cfe/trunk/test/Sema/2007-10-01-BuildArrayRef.c (original)
+++ cfe/trunk/test/Sema/2007-10-01-BuildArrayRef.c Sun Dec  8 12:49:05 2013
@@ -1,9 +1,9 @@
-// RUN: not %clang_cc1_only -c %s -o - > /dev/null
+// RUN: %clang_cc1 -fsyntax-only -verify %s
 // PR 1603
 void func()
 {
    const int *arr;
-   arr[0] = 1;  // expected-error {{assignment of read-only location}}
+   arr[0] = 1;  // expected-error {{read-only variable is not assignable}}
 }
 
 struct foo {
@@ -15,6 +15,6 @@ int func2()
 {
   const struct foo *fp;
   fp = &sfoo;
-  fp[0].bar = 1;  // expected-error {{ assignment of read-only member}}
+  fp[0].bar = 1;  // expected-error {{read-only variable is not assignable}}
   return sfoo.bar;
 }





More information about the cfe-commits mailing list