From: Fariborz Jahanian Date: Mon, 9 Nov 2009 18:48:53 +0000 (+0000) Subject: Test case for Sean Hunt's patch which I left out. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8875334f783d046afd9aa8cb7bf54390f70476e4;p=clang Test case for Sean Hunt's patch which I left out. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86573 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/Sema/pointer-conversion.c b/test/Sema/pointer-conversion.c new file mode 100644 index 0000000000..07176e61df --- /dev/null +++ b/test/Sema/pointer-conversion.c @@ -0,0 +1,10 @@ +//RUN: clang-cc -fsyntax-only -verify %s + +char * c; +char const ** c2 = &c; // expected-error {{initializing, 'char const **' and 'char **' have different qualifiers in nested pointer types}} + +typedef char dchar; +dchar *** c3 = &c2; // expected-error {{initializing, 'dchar ***' and 'char const ***' have different qualifiers in nested pointer types}} + +volatile char * c4; +char ** c5 = &c4; // expected-error {{initializing, 'char **' and 'char volatile **' have different qualifiers in nested pointer types}}