[clang-tools-extra] [llvm] [clang-tidy] Introduced new option --dump-yaml-schema (PR #164412)

via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 21 07:26:10 PDT 2025


================
@@ -0,0 +1,280 @@
+//===- lib/Support/YAMLGenerateSchema.cpp ---------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "llvm/Support/YAMLGenerateSchema.h"
+#include "llvm/Support/JSON.h"
+
+using namespace llvm;
+using namespace yaml;
+
+//===----------------------------------------------------------------------===//
+//  GenerateSchema
+//===----------------------------------------------------------------------===//
+
+GenerateSchema::GenerateSchema(raw_ostream &RO) : RO(RO) {}
+
+IOKind GenerateSchema::getKind() const { return IOKind::GeneratingSchema; }
+
+bool GenerateSchema::outputting() const { return false; }
+
+bool GenerateSchema::mapTag(StringRef, bool) { return false; }
+
+void GenerateSchema::beginMapping() {
+  auto *Top = getTopSchema();
----------------
EugeneZelenko wrote:

Please do not use `auto` unless type is explicitly stated in same statement or iterator. Same in other places.

https://github.com/llvm/llvm-project/pull/164412


More information about the llvm-commits mailing list