Commit Graph

29 Commits

Author SHA1 Message Date
Kim Gräsman bd305afe7d Support 'IWYU pragma: export' for forward declarations
Covers both begin_export/end_export blocks and single-line export
pragmas.

Like with 'IWYU pragma: keep' marks the forward decl as automatically
desired to avoid removing manually exported but unused decls.

Add a simple testcase and update documentation.
2023-01-22 20:32:32 +01:00
Daniel Hannon cf1624a4e2 Add begin_keep and end_keep pragmas, test and docs
this was a proposed issue in #1095 where one could
make a block of keeps as opposed to marking every
keep with a pragma: keep instruction.

added test to verify and updated documentation
where appropriate.
2022-11-02 19:33:10 +01:00
Kim Gräsman e23a2f9807 [doc] Use sentence-case for headings
The use of title-case feels dated and is harder to get right consistently.

Rewrite all headings to plain sentence-case.
2022-04-24 17:01:53 +02:00
Kim Grasman 30f7a784d5 [docs] Fix misnumbered reference 2019-12-04 21:55:48 +01:00
Kim Grasman 81e6821c45 [docs] Add note on new license header script 2019-12-04 21:48:15 +01:00
Kim Grasman 0d61782c23 Guidelines for IWYU coding style
This covers both coding style and regression testing techniques, to get
new contributors started making good choices up-front.
2019-08-03 11:54:44 +02:00
Kim Grasman ed680d446a Add docs for --no_fwd_decls
It fits naturally in the WhyIWYU document, which has a discussion on
forward declarations.
2019-03-19 20:11:33 +01:00
Scott Ramsby d1babfe532 Add custom markdownlint config and update docs to be markdownlint clean 2018-05-29 22:10:09 +02:00
Scott Ramsby 579007a32e Fix erroneous explanation of MSVC difference 2018-05-26 23:49:01 +02:00
Kim Grasman 4fc7f61b41 Commit first canonical README 2017-07-09 22:37:48 +03:00
Kim Grasman 71e41bf095 Remove docs/InstructionsForDevelopers.md
Now that /CONTRIBUTING.md exists and is linked to everywhere, this can be
removed.
2017-07-09 22:37:27 +03:00
Kristoffer Henriksson a2d8e28250 Allow IWYU pragma: keep on forward declarations as an escape hatch for cases where IWYU incorrectly concludes that a forward declaration is not necessary and recommends its removal. 2017-06-20 21:55:20 -07:00
Kim Grasman b555a58252 Don't lie about symbol regexes in the docs 2017-06-13 16:45:27 +02:00
Kim Grasman 45e1264507 More complete usage instructions
Restructure to make room for more run modes
Add section on new CMake support
Add section on iwyu_tool.py
Regenerate README
2017-06-06 10:39:43 +02:00
Kim Grasman 23253ec2e8 Add pragma to set associated header
Sometimes IWYU's auto-detection of associated headers is insufficient.
Add an IWYU pragma to explicitly set associated header.

This is based on an original patch by Ivan Koster.

I added a test and some documentation.
2017-03-10 21:30:35 +01:00
Kim Grasman 89f8d1e9f8 Fix out-of-tree build for MSVC
We don't build with MSVC out-of-tree regularly, so a number of
compatibility issues with LLVM had snuck in:

- Suppressed warnings in header LLVM files
- Extended object format support (/bigobj)
- Use of noexcept requires sane C++ exception semantics (/EHSc)
- Clang's MSVCToolChain.cpp now uses functions from version.dll, so add it
  to linker deps

While dabbling with this, we also found it was necessary to CMake with
-DCMAKE_BUILD_TYPE=Release to match LLVM's release-built libraries.
Mention this in the user docs.
2017-02-19 12:13:13 +01:00
Wieland Hoffmann f5e3a3e682 How to Run: Redirect stderr to /tmp/iwyu.out
The messages from include-what-you-use are printed on stderr, so redirect that
to the log file.
2017-01-22 16:05:06 +01:00
Kim Grasman 3bd23a641c They're #include directives, not statements 2016-02-13 15:38:46 +01:00
Volodymyr Sapsai f0d04f75a3 Remove Makefile as it's not supported by LLVM+Clang.
Autoconf support was removed in LLVM and Clang in r258861 and r258862
respectively.
2016-02-06 18:14:33 -08:00
Kim Grasman 87c53c392a Fix #216: Allow user to specify IWYU path to test
Add an optional command-line argument to run_iwyu_tests.py, to specify
which IWYU binary to test with. Usage example:

  $ ./run_iwyu_tests.py -- ./include-what-you-use

The '--' delimiter is used to separate args going to Python's unittest
from the new arg used by the test runner.

Update docs to mention new run_iwyu_tests.py features.
2015-10-01 06:11:22 +02:00
Kim Grasman b2887f518d Rename all docs to .md 2015-08-23 21:10:02 +02:00
Kim Grasman f66db79c89 Update WhatIsAUse.
- Don't refer to self as a "wiki page"
- Minor formatting fix, code-quote type name
- Use `std::ostream` instead of `ostream` when talking about the standard
  type.
- Refer to IWYUPragmas.txt instead of source file at code.google.com
2015-08-22 15:10:07 +02:00
Kim Grasman 40cc128fed Update instructions for developers.
- Rewrite section on submitting patches
- Fix formatting in "Debugging"
- Small formatting a content edits in "A quick tour of the codebase"
- iwyu -> IWYU
2015-08-22 15:10:01 +02:00
Kim Grasman 9105e3b0f2 Update instructions for users.
- Describe the Git workflow instead of old SVN one
- Remove instructions on source tarballs, people can probably figure that
  out for themselves if they want to use them
- Remove outdated blurb on MSVC/Windows compatibility problems
- Add a note to "Building out-of-tree" on checking out the right branch
- Clarify section on built-in headers in "How to install"
- Update paragraph describing how IWYU only analyzes source files to also
  mention --check_also
2015-08-22 15:09:54 +02:00
Kim Grasman de21820327 Formatting.
- Start at level 2 headings for individual files, to make it easier to
  merge them into README
- Use code style in a few more places
- Remove manual line wrapping, GitHub doesn't render it nicely
2015-08-22 15:09:47 +02:00
Kim Grasman 361568847d Remove manual line wrapping.
Markdown doesn't handle that nicely, and rendered output looks broken.
2015-08-22 15:09:41 +02:00
Kim Grasman bd5b4d00a8 Spell IWYU consistently. 2015-08-22 15:09:34 +02:00
Kim Grasman 18c1baead7 Convert all pages to Markdown.
Markdown headings.
Markdown code style for filenames.
Markdown code blocks.
Markdown code style for #include directives.
Markdown bold-faced WARNING
Markdown links.

No content changes intended.
2015-08-22 15:09:26 +02:00
Kim Grasman b5d0f153ec Add Google Code Wiki docs. 2015-06-15 21:59:31 +02:00