-
Notifications
You must be signed in to change notification settings - Fork 12.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
wip: example for generate-in-place macro expansion
Does: - Make it relatively easy to add new permutations and test cases - Document what the macro soup boils down to after it's expanded Does not: - Make the test cases easy to read; this is apparently hard to do without additional post-processing (per https://stackoverflow.com/questions/2271078/how-to-make-g-preprocessor-output-a-newline-in-a-macro/2567304#2567304 ) - Make it easy to understand how to update the test; the `diff -u` output can be piped directly into `patch(1)` for a low-effort update, but getting the `diff -u` output itself is kind of a mess, especially across platforms. It's also using diff & sed instead of more common LLVM test tools (like FileCheck), and that probably has consequences outside the scope of a quick demo too.
- Loading branch information
Showing
1 changed file
with
51 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters