diff options
author | Kim Gräsman <kim.grasman@gmail.com> | 2023-04-16 09:39:57 +0200 |
---|---|---|
committer | Kim Gräsman <kim.grasman@gmail.com> | 2023-04-16 10:46:01 +0200 |
commit | 91364a612eeff4bf6c4d0171b8be0974d7f0c67b (patch) | |
tree | a3f68ab38a0f3ece7c9ffd729d7a9797dcf9509e | |
parent | 44832a913f6565fa347a0cf0787badcf52dbf5a8 (diff) |
[doc] Update documentation on test command-line arguments
This was overlooked in bc0ec65ec04b46c73a7d5b2b8b29d7854c615327.
-rw-r--r-- | docs/IWYUStyle.md | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/docs/IWYUStyle.md b/docs/IWYUStyle.md index 5e6b889..b3acce3 100644 --- a/docs/IWYUStyle.md +++ b/docs/IWYUStyle.md @@ -268,16 +268,18 @@ it easier to rename things without throwing Git's content tracking for a loop. ### Command-line arguments ### -If a test needs to pass additional command-line args to IWYU, they are coded -into `run_iwyu_tests.py`. There are three flag mappings: +If a test needs to pass additional command-line args to IWYU or the Clang +front-end, they are coded into the test `.cc` file itself using a directive +comment: -* `flags_map` -- for IWYU flags, e.g. `--no_comments` (automatically prefixed - with `-Xiwyu`) -* `clang_flags_map` -- for Clang flags, e.g. `-std=c++17` -* `include_map` -- additional header search paths, e.g. `subdir/` (automatically - prefixed with `-I`) +``` +// IWYU_ARGS: -I . \ + -std=c++20 \ + -Xiwyu --no_default_mappings +``` -The maps are all keyed by test file basename. +The args are added to the `include-what-you-use` command as-written after line +unwrapping, so IWYU flags must be explicitly prefixed with `-Xiwyu`. [1]: https://google.github.io/styleguide/cppguide.html |