diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-11-06 06:30:47 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-11-06 06:30:47 +0000 |
commit | 3f0b5fd3a55baf1e3e768fe981bcc3ad5e209ec1 (patch) | |
tree | 0a77bb251f5c506471815a437eb9c5d4a0531252 /test/FixIt/fixit-errors.c | |
parent | 27591ff4fc64600fd67c5d81899e3efe5ef41a80 (diff) |
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
Diffstat (limited to 'test/FixIt/fixit-errors.c')
-rw-r--r-- | test/FixIt/fixit-errors.c | 10 |
1 files changed, 10 insertions, 0 deletions
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; +} |