From 5cb1abc6db5bd7699ea8f9de9cd85035e04a991a Mon Sep 17 00:00:00 2001 From: Chandler Carruth Date: Thu, 13 May 2010 12:04:17 +0000 Subject: [PATCH] Testcase for r103712. llvm-svn: 103713 --- clang/test/Misc/diag-aka-types.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 clang/test/Misc/diag-aka-types.cpp diff --git a/clang/test/Misc/diag-aka-types.cpp b/clang/test/Misc/diag-aka-types.cpp new file mode 100644 index 000000000000..7233c4e85b49 --- /dev/null +++ b/clang/test/Misc/diag-aka-types.cpp @@ -0,0 +1,10 @@ +// RUN: %clang_cc1 %s -fsyntax-only -verify + +struct X {}; +typedef X foo_t; + +foo_t *ptr; +char c1 = ptr; // expected-error{{'foo_t *' (aka 'X *')}} + +const foo_t &ref = foo_t(); +char c2 = ref; // expected-error{{'foo_t const' (aka 'X const')}}