[roll] Roll fuchsia [fidlc] Allow implicit conversions for diagnostic arguments

This CL makes error reporting more ergonomic by allowing implicit
conversions for diagnostic arguments. It also makes it more efficient by
ensuring arguments are always passed by const reference.

Without implicit conversions, you had to explicitly cast:

    Foo*        -> const Foo*
    Derived*    -> Base*
    std::string -> std::string_view
    const char* -> std::string_view
    0           -> size_t(0)

Because of this, error arguments used inconsistent types to minimize
casting at call sites. Refactoring code led to churn in these types in
diagnostics.h. These problems are now fixed, and unnecessary casts have
been removed. See the comment in tools/fidl/fidlc/include/fidl/utils.h
for an explanation of how this works.

An alternative would be to sidestep the deduction issue by providing the
DiagnosticDef and its argument in different calls. For example, we could
have an operator() on ErrorDef/WarningDef that takes the arguments.
However, this isn't obviously better and would cause a huge diff.

Test: fx test fidl-compiler
Original-Fixed: 90046
Original-Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/615624
Original-Revision: b467e6a4053654a5f43a30ae12afcec846b66ee8
GitOrigin-RevId: 2944e0ab0ceb229411c849cc6625195ddb18f171
Change-Id: I61a1a22d005aa7e71247694f394a4af48d2dbff6
1 file changed
tree: 4db25f6483997196ae7edcc720753e6eacddfd3a
  1. infra/
  2. third_party/
  3. cts
  4. firmware
  5. flower
  6. jiri.lock
  7. minimal
  8. prebuilts
  9. README.md
  10. stem
  11. test_durations
README.md

Integration

This repository contains Fuchsia's Global Integration manifest files.

Making changes

All changes should be made to the internal version of this repository. Our infrastructure automatically updates this version when the internal one changes.

Currently all changes must be made by a Google employee. Non-Google employees wishing to make a change can ask for assistance via the IRC channel #fuchsia on Freenode.

Obtaining the source

First install Jiri.

Next run:

$ jiri init
$ jiri import minimal https://fuchsia.googlesource.com/integration
$ jiri update

Third party

Third party projects should have their own subdirectory in ./third_party.