Lines Matching refs:json
144 json::Object createMessage(StringRef Text) { in createMessage()
145 return json::Object{{"text", Text.str()}}; in createMessage()
150 static json::Object createTextRegion(const SourceManager &SM, in createTextRegion()
154 json::Object Region{{"startLine", BeginCharLoc.getExpansionLineNumber()}, in createTextRegion()
166 static json::Object createLocation(json::Object &&PhysicalLocation, in createLocation()
168 json::Object Ret{{"physicalLocation", std::move(PhysicalLocation)}}; in createLocation()
201 static json::Object
202 createThreadFlowLocation(json::Object &&Location, in createThreadFlowLocation()
204 return json::Object{{"location", std::move(Location)}, in createThreadFlowLocation()
209 json::Object
238 json::Object ArtifactLocationObject{{"uri", Location.URI}}; in createPhysicalLocation()
241 return json::Object{{{"artifactLocation", std::move(ArtifactLocationObject)}, in createPhysicalLocation()
245 json::Object &SarifDocumentWriter::getCurrentTool() { in getCurrentTool()
273 json::Object &Tool = getCurrentTool(); in endRun()
274 json::Array Rules; in endRun()
276 json::Object Config{ in endRun()
280 json::Object Rule{ in endRun()
283 {"fullDescription", json::Object{{"text", R.Description}}}, in endRun()
289 json::Object &Driver = *Tool.getObject("driver"); in endRun()
293 json::Object &Run = getCurrentRun(); in endRun()
294 json::Array *Artifacts = Run.getArray("artifacts"); in endRun()
300 json::Object Loc{{"uri", A.Location.URI}}; in endRun()
304 json::Object Artifact; in endRun()
309 Artifact["roles"] = json::Array(A.Roles); in endRun()
314 Artifacts->push_back(json::Value(std::move(Artifact))); in endRun()
324 json::Array
326 json::Object Ret{{"locations", json::Array{}}}; in createThreadFlows()
327 json::Array Locs; in createThreadFlows()
329 json::Object PLoc = createPhysicalLocation(ThreadFlow.Range); in createThreadFlows()
330 json::Object Loc = createLocation(std::move(PLoc), ThreadFlow.Message); in createThreadFlows()
335 return json::Array{std::move(Ret)}; in createThreadFlows()
338 json::Object
340 return json::Object{{"threadFlows", createThreadFlows(ThreadFlows)}}; in createCodeFlow()
352 json::Object Tool{ in createRun()
354 json::Object{{"name", ShortToolName}, in createRun()
360 json::Object TheRun{{"tool", std::move(Tool)}, in createRun()
367 json::Object &SarifDocumentWriter::getCurrentRun() { in getCurrentRun()
392 json::Object Ret{{"message", createMessage(Result.DiagnosticMessage)}, in appendResult()
396 json::Array Locs; in appendResult()
403 Ret["codeFlows"] = json::Array{createCodeFlow(Result.ThreadFlows)}; in appendResult()
408 json::Object &Run = getCurrentRun(); in appendResult()
409 json::Array *Results = Run.getArray("results"); in appendResult()
413 json::Object SarifDocumentWriter::createDocument() { in createDocument()
417 json::Object Doc{ in createDocument()
422 Doc["runs"] = json::Array(Runs); in createDocument()