aboutsummaryrefslogtreecommitdiffstats
path: root/src/libs/3rdparty/yaml-cpp/src/node.cpp
diff options
context:
space:
mode:
authorNikolai Kosjar <nikolai.kosjar@qt.io>2019-07-30 15:26:31 +0200
committerNikolai Kosjar <nikolai.kosjar@qt.io>2019-08-30 08:42:22 +0000
commit0ba729e527da37f7c5d7fbc59247971df3da7d8a (patch)
treef6397a18ab4a7850b656f7b6e7a68f3d8a4e49ae /src/libs/3rdparty/yaml-cpp/src/node.cpp
parentd663b8e406c89585f123207d6e07832d1818e53b (diff)
Import YAML-Parser yaml-cpp
Version: tags/yaml-cpp-0.6.2 License: MIT yaml-cpp requires c++11 and since yaml-cpp 0.6 there is no dependency on boost anymore. A YAML parser is needed for the ClangTools plugin to parse exported diagnostics from clang-tidy/clazy: $ clang-tidy -export-fixes=/tmp/tidy.yaml source.cpp The imported source is stripped of unneeded files as documented with src/libs/3rdparty/yaml-cpp/patches/0001-yaml-cpp-Strip-unneeded-sources.patch (generated with "git format-patch -D") Change-Id: Ib0a521b5aff4b1cd058eb480bfb99fde4b320dc7 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Diffstat (limited to 'src/libs/3rdparty/yaml-cpp/src/node.cpp')
-rw-r--r--src/libs/3rdparty/yaml-cpp/src/node.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/libs/3rdparty/yaml-cpp/src/node.cpp b/src/libs/3rdparty/yaml-cpp/src/node.cpp
new file mode 100644
index 00000000000..2088e13c9ae
--- /dev/null
+++ b/src/libs/3rdparty/yaml-cpp/src/node.cpp
@@ -0,0 +1,12 @@
+#include "yaml-cpp/node/node.h"
+#include "nodebuilder.h"
+#include "nodeevents.h"
+
+namespace YAML {
+Node Clone(const Node& node) {
+ NodeEvents events(node);
+ NodeBuilder builder;
+ events.Emit(builder);
+ return builder.Root();
+}
+}