[clang] [clang][bytecode][NFC] Implement Reflect::toDiagnosticString() (PR #248852)
via cfe-commits
cfe-commits at lists.llvm.org
Fri Dec 4 02:10:17 PST 2026
llvmorg-github-actions[bot] wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clang
Author: Timm Baeder (tbaederr)
<details>
<summary>Changes</summary>
Currently unused, but needed in a future patch (where it is still unreachable though).
---
Full diff: https://github.com/llvm/llvm-project/pull/248852.diff
1 Files Affected:
- (modified) clang/lib/AST/ByteCode/Reflect.h (+8)
``````````diff
diff --git a/clang/lib/AST/ByteCode/Reflect.h b/clang/lib/AST/ByteCode/Reflect.h
index 4be80f281bb898..8d93b86c01bc71 100644
--- a/clang/lib/AST/ByteCode/Reflect.h
+++ b/clang/lib/AST/ByteCode/Reflect.h
@@ -45,6 +45,14 @@ class Reflect final {
APValue toAPValue(const ASTContext &Ctx) const {
return APValue(Kind, Operand);
}
+
+ std::string toDiagnosticString(const ASTContext &) const {
+ // FIXME: Properly implement.
+ std::string Str;
+ llvm::raw_string_ostream OS(Str);
+ print(OS);
+ return Str;
+ }
};
inline llvm::raw_ostream &operator<<(llvm::raw_ostream &OS, const Reflect &R) {
``````````
</details>
https://github.com/llvm/llvm-project/pull/248852
More information about the cfe-commits
mailing list