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 /include | |
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 'include')
-rw-r--r-- | include/clang/Basic/DiagnosticSemaKinds.td | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/clang/Basic/DiagnosticSemaKinds.td b/include/clang/Basic/DiagnosticSemaKinds.td index 729395a32a..a3cce6c163 100644 --- a/include/clang/Basic/DiagnosticSemaKinds.td +++ b/include/clang/Basic/DiagnosticSemaKinds.td @@ -1447,8 +1447,9 @@ def err_typecheck_member_reference_type : Error< "cannot refer to type member %0 with '%select{.|->}1'">; def err_typecheck_member_reference_unknown : Error< "cannot refer to member %0 with '%select{.|->}1'">; -def note_member_reference_needs_call : Note< - "perhaps you meant to call this function with '()'?">; +def err_member_reference_needs_call : Error< + "base of member reference has function type %0; perhaps you meant to call " + "this function with '()'?">; def warn_subscript_is_char : Warning<"array subscript is of type 'char'">, InGroup<CharSubscript>, DefaultIgnore; |