summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/constructor-initializer.cpp
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
commit810d330cd3d33eb9867cb813326b8bdd7b7fcb19 (patch)
treedafa9d01d29c0c1c538770383d9f23af883ac874 /clang/test/SemaCXX/constructor-initializer.cpp
parent513f0b147e1ac64064a04992aa287e68d8c24efc (diff)
downloadbcm5719-llvm-810d330cd3d33eb9867cb813326b8bdd7b7fcb19.tar.gz
bcm5719-llvm-810d330cd3d33eb9867cb813326b8bdd7b7fcb19.zip
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; }) ^ llvm-svn: 65081
Diffstat (limited to 'clang/test/SemaCXX/constructor-initializer.cpp')
-rw-r--r--clang/test/SemaCXX/constructor-initializer.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/test/SemaCXX/constructor-initializer.cpp b/clang/test/SemaCXX/constructor-initializer.cpp
index a79b6caac98..ded90107495 100644
--- a/clang/test/SemaCXX/constructor-initializer.cpp
+++ b/clang/test/SemaCXX/constructor-initializer.cpp
@@ -37,7 +37,7 @@ public:
F() : B(17),
m(17), // expected-error{{member initializer 'm' does not name a non-static data member or base class}}
- INT(17) // expected-error{{constructor initializer 'INT' does not name a class}}
+ INT(17) // expected-error{{constructor initializer 'INT' (aka 'int') does not name a class}}
{
}
};
OpenPOWER on IntegriCloud