aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/ExtractAPI/Serialization/SymbolGraphSerializer.cpp
diff options
context:
space:
mode:
authorYuxuan Chen <ych@fb.com>2024-06-06 11:32:19 -0700
committerGitHub <noreply@github.com>2024-06-06 11:32:19 -0700
commitf0785484c8ebf42ae0284cd608ad5f78eae20e95 (patch)
tree535bbefe55360348be63dd594c953e47945fff2e /clang/lib/ExtractAPI/Serialization/SymbolGraphSerializer.cpp
parent649edb8eb25e82e3ac6fce4788f51759636229ec (diff)
downloadllvm-f0785484c8ebf42ae0284cd608ad5f78eae20e95.zip
llvm-f0785484c8ebf42ae0284cd608ad5f78eae20e95.tar.gz
llvm-f0785484c8ebf42ae0284cd608ad5f78eae20e95.tar.bz2
[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.
Diffstat (limited to 'clang/lib/ExtractAPI/Serialization/SymbolGraphSerializer.cpp')
-rw-r--r--clang/lib/ExtractAPI/Serialization/SymbolGraphSerializer.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/clang/lib/ExtractAPI/Serialization/SymbolGraphSerializer.cpp b/clang/lib/ExtractAPI/Serialization/SymbolGraphSerializer.cpp
index 08e711ca..6e56ee5 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(