Last active
December 10, 2015 07:38
-
-
Save jspahrsummers/4402020 to your computer and use it in GitHub Desktop.
This simple script will preprocess one or more source files, and try to indent them nicely such that expanded macros are made readable. This is useful for debugging the logic of rampant macros.
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
#!/bin/sh | |
# | |
# Example usage: | |
# ./macroview.sh -IThirdPartyHeadersToInclude file.m | |
clang -E -nostdinc -nobuiltininc "$@" 2>/dev/null | indent -bl -nce -nei |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment