From 3f0b5fd3a55baf1e3e768fe981bcc3ad5e209ec1 Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Fri, 6 Nov 2009 06:30:47 +0000 Subject: Rework the fix-it hint for code like get_origin->x where get_origin is actually a function and the user has forgotten the parentheses. Instead of giving a lame note for the fix-it, give a full-fledge error, early, then build the call expression to try to recover. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86238 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/FixIt/fixit-errors.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'test/FixIt/fixit-errors.c') diff --git a/test/FixIt/fixit-errors.c b/test/FixIt/fixit-errors.c index 9c5258dbcb..996e940f2c 100644 --- a/test/FixIt/fixit-errors.c +++ b/test/FixIt/fixit-errors.c @@ -8,3 +8,13 @@ struct s; // expected-note{{previous use is here}} union s *s1; // expected-error{{use of 's' with tag type that does not match previous declaration}} + +struct Point { + float x, y, z; +}; + +struct Point *get_origin(); + +void test_point() { + (void)get_origin->x; +} -- cgit v1.2.3-18-g5258