1) Avoid signed/unsigned comparisons.
2) Add iwyu violation for stdio.h to iwyu_globals.cc. Yes, (2) is ironic. R=wan DELTA=7 (3 added, 0 deleted, 4 changed) Revision created by MOE tool push_codebase. MOE_MIGRATION=1617
This commit is contained in:
parent
1b4a781905
commit
d972172be6
|
@ -13,10 +13,12 @@
|
|||
#include <fnmatch.h>
|
||||
#endif
|
||||
#include <getopt.h>
|
||||
#include <stdio.h>
|
||||
#include <algorithm>
|
||||
#include <map>
|
||||
#include <set>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include "clang/Lex/HeaderSearch.h"
|
||||
#include "iwyu_cache.h"
|
||||
#include "iwyu_include_picker.h"
|
||||
|
@ -27,6 +29,7 @@
|
|||
|
||||
using clang::DirectoryEntry;
|
||||
using clang::DirectoryLookup;
|
||||
using std::make_pair;
|
||||
using std::map;
|
||||
using std::set;
|
||||
using std::string;
|
||||
|
@ -112,11 +115,11 @@ int ParseIwyuCommandlineFlags(int argc, char** argv) {
|
|||
commandline_flags = new CommandlineFlags;
|
||||
const int retval = commandline_flags->ParseArgv(argc, argv);
|
||||
|
||||
if (!commandline_flags.cwd.empty()) {
|
||||
if (!commandline_flags->cwd.empty()) {
|
||||
printf("-p/--cwd not yet implemented\n");
|
||||
exit(1);
|
||||
}
|
||||
if (commandline_flags.howtodebug != CommandlineFlags::kUnspecified) {
|
||||
if (commandline_flags->howtodebug != CommandlineFlags::kUnspecified) {
|
||||
printf("-d/--howtodebug not yet implemented\n");
|
||||
exit(1);
|
||||
}
|
||||
|
|
|
@ -108,7 +108,7 @@ namespace {
|
|||
// tokens than expected, warn if the first one doesn't start "//".
|
||||
bool MatchOneToken(const vector<string>& tokens,
|
||||
const string& token,
|
||||
int num_expected_tokens,
|
||||
size_t num_expected_tokens,
|
||||
SourceLocation loc) {
|
||||
if (tokens.size() < num_expected_tokens) {
|
||||
return false;
|
||||
|
@ -132,7 +132,7 @@ bool MatchOneToken(const vector<string>& tokens,
|
|||
bool MatchTwoTokens(const vector<string>& tokens,
|
||||
const string& token1,
|
||||
const string& token2,
|
||||
int num_expected_tokens,
|
||||
size_t num_expected_tokens,
|
||||
SourceLocation loc) {
|
||||
if (tokens.size() < num_expected_tokens) {
|
||||
return false;
|
||||
|
|
Loading…
Reference in New Issue