diff options
Diffstat (limited to 'test/Misc/diag-aka-types.cpp')
-rw-r--r-- | test/Misc/diag-aka-types.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/Misc/diag-aka-types.cpp b/test/Misc/diag-aka-types.cpp new file mode 100644 index 0000000..7233c4e --- /dev/null +++ b/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')}} |