Found files not containing std:: with:
INCL="algorithm|array|list|map|memory|queue|set|string|utility|vector|unordered_map|unordered_set" git ls-files llvm/include/llvm | grep '\.h$' | xargs grep -L std:: | \ xargs grep -El "#include <($INCL)>$" > to_process.txt git ls-files clang/include/clang | grep '\.h$' | xargs grep -L std:: | \ xargs grep -El "#include <($INCL)>$" >> to_process.txt
Then removed these headers from those files with
INCL_ESCAPED="$(echo $INCL|sed 's/|/\\|/g')" cat to_process.txt | xargs sed -i "/^#include <\($INCL_ESCAPED\)>$/d" cat to_process.txt | xargs sed -i '/^$/N;/^\n$/D'
No behavior change.
<functional> appears unnecessary as well.
And while this doesn't require <string> it does require llvm/ADT/StringRef.h.