Merge IWYU from core

This commit is contained in:
Jesse Beder
2014-03-22 23:08:09 -05:00
35 changed files with 193 additions and 110 deletions

View File

@@ -7,9 +7,15 @@
#pragma once
#endif
#include "yaml-cpp/eventhandler.h"
#include <stack>
#include "yaml-cpp/anchor.h"
#include "yaml-cpp/eventhandler.h"
namespace YAML {
struct Mark;
} // namespace YAML
namespace YAML {
class Emitter;

View File

@@ -7,16 +7,22 @@
#pragma once
#endif
#include "yaml-cpp/dll.h"
#include <memory>
#include <sstream>
#include <string>
#include "yaml-cpp/binary.h"
#include "yaml-cpp/dll.h"
#include "yaml-cpp/emitterdef.h"
#include "yaml-cpp/emittermanip.h"
#include "yaml-cpp/noncopyable.h"
#include "yaml-cpp/null.h"
#include "yaml-cpp/ostream_wrapper.h"
#include <memory>
#include <string>
#include <sstream>
namespace YAML {
class Binary;
struct _Null;
} // namespace YAML
namespace YAML {
class EmitterState;

View File

@@ -7,16 +7,18 @@
#pragma once
#endif
#include "yaml-cpp/dll.h"
#include "yaml-cpp/noncopyable.h"
#include <ios>
#include <memory>
#include "yaml-cpp/dll.h"
#include "yaml-cpp/noncopyable.h"
namespace YAML {
class EventHandler;
class Node;
class Scanner;
struct Directives;
struct Token;
class EventHandler;
class Scanner;
class YAML_CPP_API Parser : private noncopyable {
public:

View File

@@ -1,8 +1,10 @@
#include "yaml-cpp/parser.h"
#include "yaml-cpp/contrib/graphbuilder.h"
#include "graphbuilderadapter.h"
#include "yaml-cpp/parser.h" // IWYU pragma: keep
namespace YAML {
class GraphBuilderInterface;
void* BuildGraphOfNextDocument(Parser& parser,
GraphBuilderInterface& graphBuilder) {
GraphBuilderAdapter eventHandler(graphBuilder);

View File

@@ -1,6 +1,9 @@
#include "graphbuilderadapter.h"
#include "yaml-cpp/contrib/graphbuilder.h"
namespace YAML {
struct Mark;
int GraphBuilderAdapter::ContainerFrame::sequenceMarker;
void GraphBuilderAdapter::OnNull(const Mark &mark, anchor_t anchor) {

View File

@@ -10,9 +10,16 @@
#include <cstdlib>
#include <map>
#include <stack>
#include "yaml-cpp/eventhandler.h"
#include "yaml-cpp/anchor.h"
#include "yaml-cpp/contrib/anchordict.h"
#include "yaml-cpp/contrib/graphbuilder.h"
#include "yaml-cpp/eventhandler.h"
namespace YAML {
class GraphBuilderInterface;
struct Mark;
} // namespace YAML
namespace YAML {
class GraphBuilderAdapter : public EventHandler {

View File

@@ -1,9 +1,15 @@
#include "yaml-cpp/emitfromevents.h"
#include "yaml-cpp/emitter.h"
#include "yaml-cpp/null.h"
#include <cassert>
#include <sstream>
#include "yaml-cpp/emitfromevents.h"
#include "yaml-cpp/emitter.h"
#include "yaml-cpp/emittermanip.h"
#include "yaml-cpp/null.h"
namespace YAML {
struct Mark;
} // namespace YAML
namespace {
std::string ToString(YAML::anchor_t anchor) {
std::stringstream stream;

View File

@@ -1,11 +1,16 @@
#include "yaml-cpp/emitter.h"
#include "emitterstate.h"
#include "emitterutils.h"
#include "indentation.h"
#include "yaml-cpp/exceptions.h"
#include <sstream>
#include "emitterutils.h"
#include "indentation.h" // IWYU pragma: keep
#include "yaml-cpp/emitter.h"
#include "yaml-cpp/emitterdef.h"
#include "yaml-cpp/emittermanip.h"
#include "yaml-cpp/exceptions.h" // IWYU pragma: keep
namespace YAML {
class Binary;
struct _Null;
Emitter::Emitter() : m_pState(new EmitterState) {}
Emitter::Emitter(std::ostream& stream)

View File

@@ -1,7 +1,8 @@
#include "emitterstate.h"
#include "yaml-cpp/exceptions.h"
#include <limits>
#include "emitterstate.h"
#include "yaml-cpp/exceptions.h" // IWYU pragma: keep
namespace YAML {
EmitterState::EmitterState()
: m_isGood(true),

View File

@@ -1,11 +1,14 @@
#include <iomanip>
#include <sstream>
#include "emitterutils.h"
#include "exp.h"
#include "indentation.h"
#include "yaml-cpp/binary.h"
#include "yaml-cpp/exceptions.h"
#include "regex_yaml.h"
#include "regeximpl.h"
#include "stringsource.h"
#include <sstream>
#include <iomanip>
#include "yaml-cpp/binary.h" // IWYU pragma: keep
#include "yaml-cpp/ostream_wrapper.h"
namespace YAML {
namespace Utils {

View File

@@ -7,10 +7,16 @@
#pragma once
#endif
#include "emitterstate.h"
#include "yaml-cpp/ostream_wrapper.h"
#include <string>
#include "emitterstate.h"
#include "yaml-cpp/emittermanip.h"
#include "yaml-cpp/ostream_wrapper.h"
namespace YAML {
class ostream_wrapper;
} // namespace YAML
namespace YAML {
class Binary;

View File

@@ -1,7 +1,13 @@
#include "exp.h"
#include "yaml-cpp/exceptions.h"
#include <sstream>
#include "exp.h"
#include "stream.h"
#include "yaml-cpp/exceptions.h" // IWYU pragma: keep
namespace YAML {
struct Mark;
} // namespace YAML
namespace YAML {
namespace Exp {
unsigned ParseHex(const std::string& str, const Mark& mark) {

View File

@@ -7,9 +7,10 @@
#pragma once
#endif
#include "regex_yaml.h"
#include <string>
#include <ios>
#include <string>
#include "regex_yaml.h"
#include "stream.h"
namespace YAML {

View File

@@ -1,15 +1,16 @@
#include "yaml-cpp/parser.h"
#include "yaml-cpp/eventhandler.h"
#include "yaml-cpp/exceptions.h"
#include "directives.h"
#include "scanner.h"
#include "singledocparser.h"
#include "tag.h"
#include "token.h"
#include <sstream>
#include <cstdio>
#include <sstream>
#include "directives.h" // IWYU pragma: keep
#include "scanner.h" // IWYU pragma: keep
#include "singledocparser.h"
#include "token.h"
#include "yaml-cpp/exceptions.h" // IWYU pragma: keep
#include "yaml-cpp/parser.h"
namespace YAML {
class EventHandler;
Parser::Parser() {}
Parser::Parser(std::istream& in) { Load(in); }

View File

@@ -7,8 +7,8 @@
#pragma once
#endif
#include <vector>
#include <string>
#include <vector>
namespace YAML {
class Stream;

View File

@@ -1,10 +1,11 @@
#include "scanner.h"
#include "token.h"
#include "yaml-cpp/exceptions.h"
#include "exp.h"
#include <cassert>
#include <memory>
#include "exp.h"
#include "scanner.h"
#include "token.h"
#include "yaml-cpp/exceptions.h" // IWYU pragma: keep
namespace YAML {
Scanner::Scanner(std::istream& in)
: INPUT(in),

View File

@@ -8,14 +8,16 @@
#endif
#include <ios>
#include <string>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include "ptr_vector.h"
#include "stream.h"
#include "token.h"
#include "yaml-cpp/mark.h"
namespace YAML {
class Node;

View File

@@ -1,8 +1,8 @@
#include "scanscalar.h"
#include "scanner.h"
#include "exp.h"
#include "yaml-cpp/exceptions.h"
#include "token.h"
#include "regeximpl.h"
#include "scanscalar.h"
#include "stream.h"
#include "yaml-cpp/exceptions.h" // IWYU pragma: keep
namespace YAML {
// ScanScalar

View File

@@ -8,6 +8,7 @@
#endif
#include <string>
#include "regex_yaml.h"
#include "stream.h"

View File

@@ -1,7 +1,9 @@
#include "scanner.h"
#include "regex_yaml.h"
#include "exp.h"
#include "yaml-cpp/exceptions.h"
#include "regex_yaml.h"
#include "regeximpl.h"
#include "stream.h"
#include "yaml-cpp/exceptions.h" // IWYU pragma: keep
#include "yaml-cpp/mark.h"
namespace YAML {
const std::string ScanVerbatimTag(Stream& INPUT) {

View File

@@ -1,12 +1,16 @@
#include "scanner.h"
#include "token.h"
#include "yaml-cpp/exceptions.h"
#include "exp.h"
#include "scanscalar.h"
#include "scantag.h"
#include "tag.h"
#include <sstream>
#include "exp.h"
#include "regex_yaml.h"
#include "regeximpl.h"
#include "scanner.h"
#include "scanscalar.h"
#include "scantag.h" // IWYU pragma: keep
#include "tag.h" // IWYU pragma: keep
#include "token.h"
#include "yaml-cpp/exceptions.h" // IWYU pragma: keep
#include "yaml-cpp/mark.h"
namespace YAML {
///////////////////////////////////////////////////////////////////////
// Specialization for scanning specific tokens

View File

@@ -1,9 +1,9 @@
#include "scanner.h"
#include "token.h"
#include "yaml-cpp/exceptions.h"
#include "exp.h"
namespace YAML {
struct Mark;
Scanner::SimpleKey::SimpleKey(const Mark& mark_, int flowLevel_)
: mark(mark_), flowLevel(flowLevel_), pIndent(0), pMapStart(0), pKey(0) {}

View File

@@ -1,14 +1,15 @@
#include "singledocparser.h"
#include "collectionstack.h"
#include "directives.h"
#include "yaml-cpp/eventhandler.h"
#include "yaml-cpp/exceptions.h"
#include <algorithm>
#include <cstdio>
#include <sstream>
#include "collectionstack.h" // IWYU pragma: keep
#include "scanner.h"
#include "singledocparser.h"
#include "tag.h"
#include "token.h"
#include <sstream>
#include <cstdio>
#include <algorithm>
#include "yaml-cpp/eventhandler.h"
#include "yaml-cpp/exceptions.h" // IWYU pragma: keep
#include "yaml-cpp/mark.h"
namespace YAML {
SingleDocParser::SingleDocParser(Scanner& scanner, const Directives& directives)

View File

@@ -7,20 +7,21 @@
#pragma once
#endif
#include "yaml-cpp/anchor.h"
#include "yaml-cpp/noncopyable.h"
#include <string>
#include <map>
#include <memory>
#include <string>
#include "yaml-cpp/anchor.h"
#include "yaml-cpp/noncopyable.h"
namespace YAML {
struct Directives;
struct Mark;
struct Token;
class CollectionStack;
class EventHandler;
class Node;
class Scanner;
struct Directives;
struct Mark;
struct Token;
class SingleDocParser : private noncopyable {
public:

View File

@@ -1,6 +1,6 @@
#include "stream.h"
#include <iostream>
#include "exp.h"
#include "stream.h"
#ifndef YAML_PREFETCH_SIZE
#define YAML_PREFETCH_SIZE 2048

View File

@@ -1,9 +1,10 @@
#include "tag.h"
#include "directives.h"
#include "token.h"
#include <cassert>
#include <stdexcept>
#include "directives.h" // IWYU pragma: keep
#include "tag.h"
#include "token.h"
namespace YAML {
Tag::Tag(const Token& token) : type(static_cast<TYPE>(token.data)) {
switch (type) {

View File

@@ -10,8 +10,8 @@
#include <string>
namespace YAML {
struct Token;
struct Directives;
struct Token;
struct Tag {
enum TYPE {

View File

@@ -1,8 +1,15 @@
#include "parsertests.h"
#include "handlermacros.h"
#include "yaml-cpp/yaml.h"
#include <iostream>
#include "handlermacros.h"
#include "parsertests.h" // IWYU pragma: keep
#include "teststruct.h"
#include "yaml-cpp/parser.h"
namespace YAML {
class Exception;
class ParserException;
} // namespace YAML
namespace Test {
namespace Parser {
TEST NoEndOfMapFlow() {

View File

@@ -1,9 +1,10 @@
#include "spectests.h"
#include "handlermacros.h"
#include "specexamples.h"
#include "yaml-cpp/yaml.h"
#include <cassert>
#include "handlermacros.h"
#include "specexamples.h" // IWYU pragma: keep
#include "spectests.h" // IWYU pragma: keep
#include "yaml-cpp/yaml.h" // IWYU pragma: keep
namespace Test {
namespace Spec {
// 2.1

View File

@@ -1,8 +1,9 @@
#include "tests.h"
#include "handlermacros.h"
#include "yaml-cpp/yaml.h"
#include <iostream>
#include "teststruct.h"
#include "yaml-cpp/eventhandler.h"
#include "yaml-cpp/yaml.h" // IWYU pragma: keep
namespace Test {
namespace Emitter {
////////////////////////////////////////////////////////////////////////////////////////////////////////

View File

@@ -1,8 +1,8 @@
#include "yaml-cpp/ostream_wrapper.h"
#include <stddef.h>
#include <sstream>
#include "gtest/gtest.h"
#include "yaml-cpp/ostream_wrapper.h"
namespace {
TEST(OstreamWrapperTest, BufferNoWrite) {

View File

@@ -1,7 +1,12 @@
#include "spectests.h"
#include "yaml-cpp/yaml.h"
#include <iostream>
#include "spectests.h"
#include "yaml-cpp/yaml.h" // IWYU pragma: keep
namespace YAML {
class Exception;
} // namespace YAML
namespace Test {
namespace {
void RunSpecTest(TEST (*test)(), const std::string& index,

View File

@@ -1,13 +1,13 @@
#include "tests.h"
#include <fstream>
#include <iostream>
#include <sstream>
#include <vector>
#include "emittertests.h"
#include "nodetests.h"
#include "parsertests.h"
#include "spectests.h"
#include "yaml-cpp/yaml.h"
#include <fstream>
#include <sstream>
#include <vector>
#include <iostream>
#include "tests.h"
namespace Test {
void RunAll() {

View File

@@ -1,7 +1,7 @@
#include "yaml-cpp/yaml.h"
#include "yaml-cpp/eventhandler.h"
#include <iostream>
#include "yaml-cpp/yaml.h" // IWYU pragma: keep
class NullEventHandler : public YAML::EventHandler {
public:
typedef YAML::Mark Mark;

View File

@@ -1,7 +1,8 @@
#include "yaml-cpp/yaml.h"
#include "yaml-cpp/eventhandler.h"
#include <iostream>
#include "yaml-cpp/eventhandler.h"
#include "yaml-cpp/yaml.h" // IWYU pragma: keep
class NullEventHandler : public YAML::EventHandler {
public:
typedef YAML::Mark Mark;