diff options
Diffstat (limited to 'clang-tools-extra/clang-doc/JSONGenerator.cpp')
-rw-r--r-- | clang-tools-extra/clang-doc/JSONGenerator.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/clang-tools-extra/clang-doc/JSONGenerator.cpp b/clang-tools-extra/clang-doc/JSONGenerator.cpp index 26794a5..6fba211 100644 --- a/clang-tools-extra/clang-doc/JSONGenerator.cpp +++ b/clang-tools-extra/clang-doc/JSONGenerator.cpp @@ -582,11 +582,10 @@ static SmallString<16> determineFileName(Info *I, SmallString<128> &Path) { if (I->IT == InfoType::IT_record) { auto *RecordSymbolInfo = static_cast<SymbolInfo *>(I); FileName = RecordSymbolInfo->MangledName; - } else if (I->IT == InfoType::IT_namespace && I->Name != "") - // Serialize the global namespace as index.json - FileName = I->Name; + } else if (I->USR == GlobalNamespaceID) + FileName = "index"; else - FileName = I->getFileBaseName(); + FileName = I->Name; sys::path::append(Path, FileName + ".json"); return FileName; } |