Commit Graph

7 Commits

Author SHA1 Message Date
Wyatt Hepler
38b6d44589 pw_preprocessor: Macros for disabling warnings
Change-Id: I00e9b00d93b46fa7a30e2cb7e6b83e5a81310585
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/40460
Commit-Queue: Wyatt Hepler <hepler@google.com>
Reviewed-by: Ewout van Bekkum <ewout@google.com>
Reviewed-by: Keir Mierle <keir@google.com>
2021-04-12 17:37:07 +00:00
Wyatt Hepler
63afc007a3 pw_preprocessor: Remove uses of the PW_UNUSED macro
- PW_UNUSED provides no value over the [[maybe_unused]] C++ attribute or
  a simple void cast. Replace uses of it and mark the macro as
  deprecated.
- Add a section to the Embedded C++ Guide about compiler warnings,
  including how to silence -Wunused-* warnings.

Change-Id: I078be670465ed87733f7c6d1f3d327915a0f49f6
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/32122
Commit-Queue: Wyatt Hepler <hepler@google.com>
Reviewed-by: Keir Mierle <keir@google.com>
2021-02-24 21:44:55 +00:00
Wyatt Hepler
f9fb90f299 docs: Make labels consistent; remove boilerplate
- Update labels so they use consistent naming. Instead of the
  copy-and-pasted `chapter` prefix, name labels with a prefix consistent
  with what they point to:
  - "module-" for module
  - "target-" for targets
  - "docs-" for general documentation
- Remove the unnecessary highlight and default-domain directives.
  Neither is necessary since the Pigweed docs always specify the
  language in code snippets and other directives.

Change-Id: I55c34e9ec919f6f4670e5d3d008e0edf5fecf05b
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/19328
Commit-Queue: Wyatt Hepler <hepler@google.com>
Reviewed-by: Keir Mierle <keir@google.com>
2020-10-01 21:47:35 +00:00
Wyatt Hepler
5191f583d4 pw_preprocessor: Rename macro; reorganize header
- Rename PW_ARG_COUNT to PW_MACRO_ARG_COUNT.
- Reorganize the arguments.h header to put the high-level, easier-to-use
  macros first (PW_DELEGATE_BY_ARG_COUNT and PW_COMMA_ARGS).
- Fix the test that demonstrates what happens when PW_COMMA_ARGS is
  used incorrectly.
- Update the documentation for arguments.h.

Change-Id: I741995c02e1f36ca805f4ba15eb113caa98164f8
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/17501
Commit-Queue: Wyatt Hepler <hepler@google.com>
Reviewed-by: Keir Mierle <keir@google.com>
2020-09-14 17:35:08 +00:00
Wyatt Hepler
ee3e02f6cb Expand docs for a few modules
- Add missing README.md for a few modules.
- Start or expand docs.rst.

Change-Id: Ic13c5f71f02259205ba990c93e0403d43f7b44b1
2019-12-09 17:13:47 -08:00
Wyatt Hepler
b82f995f2b pw_docgen: Fix paths, multiple sources
- Fix code for remapping paths into the docgen tree. Some path prefixes
  were being incorrectly trimmed, preventing size report inclusion in
  some cases.
- Make Sphinx warnings errors.
- Allow specifying multiple top-level sources to a pw_doc_gen.
- Move documentation for modules to their own table of contents.
- Rename module documentation to the module names.

Change-Id: Ic475019673ccefdb786a28d241a143886af097ab
2019-11-25 14:55:02 -08:00
Alexei Frolov
c10c81201d Add preprocessor and unit_test modules
This change adds two Pigweed modules: pw_preprocessor and pw_unit_test.
The preprocessor module contains header files providing helpful macros
for the C preprocessor. The unit test module contains a starter
implementation of a unit testing framework for Pigweed.

Change-Id: I46e1a4cae1fd8ce36d7840a2e92f8013fb489cde
2019-11-04 16:07:34 -08:00