[clang] [clang]: support std::meta::info for primitive types (PR #190356)
via cfe-commits
cfe-commits at lists.llvm.org
Mon May 4 09:37:04 PDT 2026
================
@@ -0,0 +1,40 @@
+//===--- Reflection.h - Kind of reflection operands ---*- C++ -*-===//
+//
+// 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
+//
+//===----------------------------------------------------------------------===//
+//
+// This file declares the kinds of reflection operands.
+//
+//===----------------------------------------------------------------------===//
+
+
+#ifndef LLVM_CLANG_AST_REFLECTION_H
+#define LLVM_CLANG_AST_REFLECTION_H
+
+#include "llvm/Support/raw_ostream.h"
+
+namespace clang {
+
+// TODO(Reflection): Add support for Template, Namespace and DeclRefExpr.
+enum class ReflectionKind {
+ Null,
+ Type
+};
+
+inline llvm::raw_ostream &operator<<(llvm::raw_ostream &OS, ReflectionKind Kind) {
+ switch(Kind) {
+ case ReflectionKind::Type:
+ OS << "type";
+ case ReflectionKind::Null:
+ OS << "null";
+ }
----------------
Sirraide wrote:
There’s definitely a `break` missing here yes
https://github.com/llvm/llvm-project/pull/190356
More information about the cfe-commits
mailing list