testsuite, Objective-C : Fix two plugin diagnostics tests for Darwin.
authorIain Sandoe <iain@sandoe.co.uk>
Wed, 7 Oct 2020 08:12:36 +0000 (09:12 +0100)
committerIain Sandoe <iain@sandoe.co.uk>
Sun, 11 Oct 2020 14:55:02 +0000 (15:55 +0100)
commit5505a9eab9bc3b170fc9f22e8a7292464efe88f6
tree7a107103ad8cf23fe3eff7246432d5a98503db5a
parentb292746ff7cfe708d3311ea41242c44ccbbe2693
testsuite, Objective-C : Fix two plugin diagnostics tests for Darwin.

The @selector and @protocol keywords produce a var decl without
useful location information. The current diagnostics plugin does not
look at VAR_DECLs (and it would not be helpful if it did in this
case, since a single decl is shared across all the users).

However, ee can, in this case, make expressions that produce useful
information.

gcc/testsuite/ChangeLog:

* objc.dg/plugin/diagnostic-test-expressions-1.m: Use assignment
expressions for @selector and @protocol to obtain a useful
diagnostic range.
gcc/testsuite/objc.dg/plugin/diagnostic-test-expressions-1.m