================
@@ -195,6 +210,97 @@ class ErrorReporter {
}
for (const auto &Note : Error.Notes)
reportNote(Note);
+
+ if (SarifWriter)
+ exportSarifResult(Error, Loc);
+ }
+
+ SmallVector<ThreadFlow, 8> createThreadFlows(const ClangTidyError &Error) {
+ SmallVector<ThreadFlow, 8> Flows;
+ if (!StringRef(Error.DiagnosticName).starts_with("clang-analyzer-"))
+ return Flows;
+
+ Flows.reserve(Error.Notes.size());
+ for (const tooling::DiagnosticMessage &Note : Error.Notes) {
+ tooling::FileByteRange FBR;
+ if (Note.Ranges.empty()) {
+ FBR.FilePath = Note.FilePath;
+ FBR.FileOffset = Note.FileOffset;
+ FBR.Length = 1;
+ } else {
+ FBR = Note.Ranges.front();
+ }
+ const CharSourceRange Range = getRange(FBR);
+ Flows.push_back(
+ ThreadFlow::create().setRange(Range).setMessage(Note.Message));
+ }
+ return Flows;
+ }
+
+ static std::string buildClangTidyHelpURI(StringRef Name) {
----------------
matthew-j-code wrote:
Yes, I'll look into if there is a way to distinguish between built-in checks
and those that come from --load, or an experimental flag, but it may just have
to be removed.
https://github.com/llvm/llvm-project/pull/219182
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits