================
@@ -406,8 +406,23 @@ void SarifDocumentWriter::appendResult(const SarifResult 
&Result) {
 
   if (!Result.RelatedLocations.empty()) {
     json::Array ReLocs;
-    for (auto &Range : Result.RelatedLocations) {
-      ReLocs.emplace_back(createLocation(createPhysicalLocation(Range)));
+    for (auto &RelatedLocation : Result.RelatedLocations) {
+      if (RelatedLocation.index() == 0) { // variant is a SarifChildResult
----------------
anonymouspc wrote:

Fixed on commit 55d3f3440ccc13443418fae2599cee13a2fd748c.

https://github.com/llvm/llvm-project/pull/174106
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to