add better support for IWYU and fix things

Remove the "make iwyu" build target. Move the functionality into the
recently introduced lint.fish script. Fix a lot, but not all, of the
include-what-you-use errors. Specifically, it fixes all of the IWYU errors
on my OS X server but only removes some of them on my Ubuntu 14.04 server.

Fixes #2957
This commit is contained in:
Kurtis Rader
2016-04-20 23:00:54 -07:00
parent daa217f533
commit 1f06e5f0b9
104 changed files with 685 additions and 533 deletions

View File

@@ -1,25 +1,37 @@
/** \file builtin_string.cpp
Implementation of the string builtin.
*/
#include "config.h" // IWYU pragma: keep
#include "config.h"
#define PCRE2_CODE_UNIT_WIDTH WCHAR_T_BITS
#ifdef _WIN32
#define PCRE2_STATIC
#endif
#include "pcre2.h"
#include <iterator>
#include <algorithm>
#include <assert.h>
#include <limits.h>
#include <stdarg.h>
#include <stdlib.h>
#include <errno.h>
#include <wchar.h>
#include <wctype.h>
#include <string>
#include <vector>
#include <sys/types.h>
#include <stdbool.h>
#include "pcre2.h"
#include "builtin.h"
#include "common.h"
#include "parser.h"
#include "parse_util.h"
#include "wgetopt.h"
#include "wildcard.h"
#include "wutil.h"
#include <iterator>
#include <algorithm>
#include <unistd.h>
#include "fallback.h" // IWYU pragma: keep
#include "io.h"
#include "wutil.h" // IWYU pragma: keep
class parser_t;
#define MAX_REPLACE_SIZE size_t(1048576) // pcre2_substitute maximum output size in wchar_t
#define STRING_ERR_MISSING _(L"%ls: Expected argument\n")