[cfe-commits] r172420 - /cfe/trunk/utils/find-unused-diagnostics.sh
Benjamin Kramer
benny.kra at googlemail.com
Mon Jan 14 07:00:49 PST 2013
Author: d0k
Date: Mon Jan 14 09:00:48 2013
New Revision: 172420
URL: http://llvm.org/viewvc/llvm-project?rev=172420&view=rev
Log:
Turns out there is a simpler way of getting a set difference in bash than parsing diff output.
Modified:
cfe/trunk/utils/find-unused-diagnostics.sh
Modified: cfe/trunk/utils/find-unused-diagnostics.sh
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/find-unused-diagnostics.sh?rev=172420&r1=172419&r2=172420&view=diff
==============================================================================
--- cfe/trunk/utils/find-unused-diagnostics.sh (original)
+++ cfe/trunk/utils/find-unused-diagnostics.sh Mon Jan 14 09:00:48 2013
@@ -12,4 +12,4 @@
DIAGS_IN_SOURCES=$(grep -E --only-matching --no-filename '(err_|warn_|ext_|note_)[a-z_]+' $ALL_SOURCES)
# Print all diags that occur in the .td files but not in the source.
-diff -u <(sort -u <<< "$ALL_DIAGS") <(sort -u <<< "$DIAGS_IN_SOURCES") | sed -En 's/^-([a-z_]+)/\1/p'
+comm -23 <(sort -u <<< "$ALL_DIAGS") <(sort -u <<< "$DIAGS_IN_SOURCES")
More information about the cfe-commits
mailing list