[clang] f078548 - [clang][NFC] fix name lookup for llvm::json::Value in SymbolGraphSerializer (#94511)
via cfe-commits
cfe-commits at lists.llvm.org
Thu Jun 6 11:32:24 PDT 2024
Author: Yuxuan Chen
Date: 2024-06-06T11:32:19-07:00
New Revision: f0785484c8ebf42ae0284cd608ad5f78eae20e95
URL: https://github.com/llvm/llvm-project/commit/f0785484c8ebf42ae0284cd608ad5f78eae20e95
DIFF: https://github.com/llvm/llvm-project/commit/f0785484c8ebf42ae0284cd608ad5f78eae20e95.diff
LOG: [clang][NFC] fix name lookup for llvm::json::Value in SymbolGraphSerializer (#94511)
This code uses namespaces `llvm` and `llvm::json`. However, we have both
`llvm::Value` and `llvm::json::Value`. Whenever any of the headers
declare or include `llvm::Value`, the lookup becomes ambiguous.
Fixing this by qualifying the `Value` type.
Added:
Modified:
clang/lib/ExtractAPI/Serialization/SymbolGraphSerializer.cpp
Removed:
################################################################################
diff --git a/clang/lib/ExtractAPI/Serialization/SymbolGraphSerializer.cpp b/clang/lib/ExtractAPI/Serialization/SymbolGraphSerializer.cpp
index 08e711cafae28..6e56ee5b573f6 100644
--- a/clang/lib/ExtractAPI/Serialization/SymbolGraphSerializer.cpp
+++ b/clang/lib/ExtractAPI/Serialization/SymbolGraphSerializer.cpp
@@ -31,7 +31,6 @@
using namespace clang;
using namespace clang::extractapi;
using namespace llvm;
-using namespace llvm::json;
namespace {
@@ -1036,9 +1035,9 @@ void SymbolGraphSerializer::serializeGraphToStream(
ExtendedModule &&EM) {
Object Root = serializeGraph(ModuleName, std::move(EM));
if (Options.Compact)
- OS << formatv("{0}", Value(std::move(Root))) << "\n";
+ OS << formatv("{0}", json::Value(std::move(Root))) << "\n";
else
- OS << formatv("{0:2}", Value(std::move(Root))) << "\n";
+ OS << formatv("{0:2}", json::Value(std::move(Root))) << "\n";
}
void SymbolGraphSerializer::serializeMainSymbolGraph(
More information about the cfe-commits
mailing list