[PATCH] D137962: [clang][Tooling] Make the filename behaviour consistent

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 14 15:48:01 PST 2022


sammccall accepted this revision.
sammccall added a comment.
This revision is now accepted and ready to land.

Code change LGTM, i think the doc change should be dropped or reshaped though.



================
Comment at: clang/docs/JSONCompilationDatabase.rst:89
    same file, for example if the same source file is compiled with
-   different configurations.
+   different configurations. ``dot`` (./) ``dotdot`` (../) in the path is
+   stripped lexically.
----------------
This doesn't fit with the rest of the spec text: the new text describing tool behavior, while everything else describes the data.

I'm not totally sure about documenting this (it's of pretty limited interest, doesn't cover symlink handling exhaustively, and seems more a limitation of the tools than a feature of the format). If you do want to I'd suggest separating it from the format description into a separate paragraph below (e.g. "Because compilation databases can be large, tools match filenames are matched against entries textually without IO. This means they generally don't understand symlinks.")


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D137962/new/

https://reviews.llvm.org/D137962



More information about the cfe-commits mailing list