Skip to content

Commit f078548

Browse files
[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.
1 parent 649edb8 commit f078548

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

clang/lib/ExtractAPI/Serialization/SymbolGraphSerializer.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
using namespace clang;
3232
using namespace clang::extractapi;
3333
using namespace llvm;
34-
using namespace llvm::json;
3534

3635
namespace {
3736

@@ -1036,9 +1035,9 @@ void SymbolGraphSerializer::serializeGraphToStream(
10361035
ExtendedModule &&EM) {
10371036
Object Root = serializeGraph(ModuleName, std::move(EM));
10381037
if (Options.Compact)
1039-
OS << formatv("{0}", Value(std::move(Root))) << "\n";
1038+
OS << formatv("{0}", json::Value(std::move(Root))) << "\n";
10401039
else
1041-
OS << formatv("{0:2}", Value(std::move(Root))) << "\n";
1040+
OS << formatv("{0:2}", json::Value(std::move(Root))) << "\n";
10421041
}
10431042

10441043
void SymbolGraphSerializer::serializeMainSymbolGraph(

0 commit comments

Comments
 (0)