Remove building with NOCRYPTO option
[minix.git] / external / bsd / llvm / dist / clang / utils / find-unused-diagnostics.sh
blobcd48e6920fb8ae16153123b5bef78ed50d85972b
1 #!/usr/bin/env bash
3 # This script produces a list of all diagnostics that are defined
4 # in Diagnostic*.td files but not used in sources.
7 # Gather all diagnostic identifiers from the .td files.
8 ALL_DIAGS=$(grep -E --only-matching --no-filename '(err_|warn_|ext_|note_)[a-z_]+' ./include/clang/Basic/Diagnostic*.td)
10 # Now look for all potential identifiers in the source files.
11 ALL_SOURCES=$(find lib include tools -name \*.cpp -or -name \*.h)
12 DIAGS_IN_SOURCES=$(grep -E --only-matching --no-filename '(err_|warn_|ext_|note_)[a-z_]+' $ALL_SOURCES)
14 # Print all diags that occur in the .td files but not in the source.
15 comm -23 <(sort -u <<< "$ALL_DIAGS") <(sort -u <<< "$DIAGS_IN_SOURCES")