Skip to content

Commit 782f7f1

Browse files
committed
[Frontend] Treat empty diagnostic category as "not present"
Serialized diagnostic stores an `std::string` which means that the category gets marked as present even if its empty, which is incorrect.
1 parent eb01c19 commit 782f7f1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/Frontend/CachedDiagnostics.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -617,7 +617,7 @@ llvm::Error DiagnosticSerializer::deserializeDiagnosticInfo(
617617
Kind,
618618
Info.FormatString,
619619
{},
620-
Info.Category,
620+
Info.Category.empty() ? StringRef() : Info.Category,
621621
*BICD,
622622
ChildDiagPtrs,
623623
Ranges,

0 commit comments

Comments
 (0)