summaryrefslogtreecommitdiffstats
path: root/test/Sema/types.c
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-02-19 23:45:49 +0000
committerChris Lattner <sabre@nondot.org>2009-02-19 23:45:49 +0000
commitd0344a4a6182ad704881cbbaa21cca14913d2296 (patch)
tree61b23aebb6f09877ef079f9fc32c30ff249da2f5 /test/Sema/types.c
parent58e899b336c63fa25d4cc8986d97a40933cded9b (diff)
Fix a long standard problem with clang retaining "too much" sugar
information about types. We often print diagnostics where we say "foo_t" is bad, but the user doesn't know how foo_t is declared (because it is a typedef). Fix this by expanding sugar when present in a diagnostic (and not one of a few special cases, like vectors). Before: t.m:5:2: error: invalid operands to binary expression ('typeof(P)' and 'typeof(F)') MAX(P, F); ^~~~~~~~~ t.m:1:78: note: instantiated from: #define MAX(A,B) ({ __typeof__(A) __a = (A); __typeof__(B) __b = (B); __a < __b ? __b : __a; }) ^ After: t.m:5:2: error: invalid operands to binary expression ('typeof(P)' (aka 'struct mystruct') and 'typeof(F)' (aka 'float')) MAX(P, F); ^~~~~~~~~ t.m:1:78: note: instantiated from: #define MAX(A,B) ({ __typeof__(A) __a = (A); __typeof__(B) __b = (B); __a < __b ? __b : __a; }) ^ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65081 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Sema/types.c')
-rw-r--r--test/Sema/types.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/Sema/types.c b/test/Sema/types.c
index 208abce3d9..da02588461 100644
--- a/test/Sema/types.c
+++ b/test/Sema/types.c
@@ -5,6 +5,6 @@ typedef int (*T)[2];
restrict T x;
typedef int *S[2];
-restrict S y; // expected-error {{restrict requires a pointer or reference ('S' is invalid)}}
+restrict S y; // expected-error {{restrict requires a pointer or reference ('S' (aka 'int *[2]') is invalid)}}