summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/Sema')
-rw-r--r--clang/test/Sema/deref.c7
-rw-r--r--clang/test/Sema/varargs.c2
2 files changed, 5 insertions, 4 deletions
diff --git a/clang/test/Sema/deref.c b/clang/test/Sema/deref.c
index fad56430a07..965940e26d5 100644
--- a/clang/test/Sema/deref.c
+++ b/clang/test/Sema/deref.c
@@ -1,4 +1,5 @@
-// RUN: clang-cc -fsyntax-only -verify -std=c90 %s
+/* RUN: clang-cc -fsyntax-only -verify -std=c90 -pedantic %s
+ */
void
foo (void)
{
@@ -17,7 +18,7 @@ void foo2 (void)
void foo3 (void)
{
void* x = 0;
- void* y = &*x; // expected-error{{address expression must be an lvalue or a function designator}}
+ void* y = &*x; /* expected-warning{{address of an expression of type 'void'}} */
}
extern const void cv1;
@@ -30,7 +31,7 @@ const void *foo4 (void)
extern void cv2;
void *foo5 (void)
{
- return &cv2; // expected-error{{address expression must be an lvalue or a function designator}}
+ return &cv2; /* expected-warning{{address of an expression of type 'void'}} */
}
typedef const void CVT;
diff --git a/clang/test/Sema/varargs.c b/clang/test/Sema/varargs.c
index d5b4aac6f7d..8d2f0b1fa83 100644
--- a/clang/test/Sema/varargs.c
+++ b/clang/test/Sema/varargs.c
@@ -56,7 +56,7 @@ void f7(int a, ...) {
__builtin_va_list ap;
__builtin_va_start(ap, a);
// FIXME: This error message is sub-par.
- __builtin_va_arg(ap, int) = 1; // expected-error {{non-object type 'int' is not assignable}}
+ __builtin_va_arg(ap, int) = 1; // expected-error {{expression is not assignable}}
int *x = &__builtin_va_arg(ap, int); // expected-error {{address expression must be an lvalue or a function designator}}
__builtin_va_end(ap);
}
OpenPOWER on IntegriCloud