llvm-project/clang/unittests
Vaibhav Yenamandra 7b6fe711b2 Refactor StaticAnalyzer to use `clang::SarifDocumentWriter`
Refactor StaticAnalyzer to use clang::SarifDocumentWriter for
serializing sarif diagnostics.

Uses clang::SarifDocumentWriter to generate SARIF output in the
StaticAnalyzer.

Various bugfixes are also made to clang::SarifDocumentWriter.

Summary of changes:

clang/lib/Basic/Sarif.cpp:
  * Fix bug in adjustColumnPos introduced from prev move, it now uses
    FullSourceLoc::getDecomposedExpansionLoc which provides the correct
    location (in the presence of macros) instead of
    FullSourceLoc::getDecomposedLoc.
  * Fix createTextRegion so that it handles caret ranges correctly,
    this should bring it to parity with the previous implementation.

clang/test/Analysis/diagnostics/Inputs/expected-sarif:
  * Update the schema URL to the offical website
  * Add the emitted defaultConfiguration sections to all rules
  * Annotate results with the "level" property

clang/lib/StaticAnalyzer/Core/SarifDiagnostics.cpp:
  * Update SarifDiagnostics class to hold a clang::SarifDocumentWriter
    that it uses to convert diagnostics to SARIF.
2022-11-17 14:47:02 -05:00
..
AST [C++20] [Modules] Attach implicitly declared allocation funcitons to 2022-11-15 17:21:48 +08:00
ASTMatchers Revert "[clang] Pass FoundDecl to DeclRefExpr creator for operator overloads" 2022-08-04 12:14:43 +02:00
Analysis Fix duplicate word typos; NFC 2022-11-08 07:21:23 -05:00
Basic Refactor StaticAnalyzer to use `clang::SarifDocumentWriter` 2022-11-17 14:47:02 -05:00
CodeGen [CGDebugInfo] Access the current working directory from the `VFS` 2022-07-26 13:48:39 -07:00
CrossTU [analyzer][ctu] Fix wrong 'multiple definitions' errors caused by space characters in lookup names when parsing the ctu index file 2022-03-22 10:28:42 +08:00
DirectoryWatcher [clang] Use value instead of getValue (NFC) 2022-07-13 23:39:33 -07:00
Driver [Driver] Enable nested configuration files 2022-11-16 13:32:27 +07:00
Format [clang-format] Remove special case for kw_operator when aligning decls 2022-11-17 11:38:28 +02:00
Frontend Remove redundant option -menable-unsafe-fp-math. 2022-10-14 10:55:29 -04:00
Index [clang] Visit enum base specifiers in libIndex 2021-10-25 13:16:14 +02:00
Interpreter [clang-repl] Disable building when LLVM_STATIC_LINK_CXX_STDLIB is ON. 2022-07-31 05:42:57 +09:00
Introspection [clang] Implement ElaboratedType sugaring for types written bare 2022-07-27 11:10:54 +02:00
Lex [clang][NFC] Use c++17 style variable type traits 2022-11-07 18:25:48 +00:00
Rename Bump googletest to 1.10.0 2021-05-14 19:16:31 +02:00
Rewrite
Sema [clangd] Add heuristic for dropping snippet when completing member function pointer 2022-11-17 00:37:16 +01:00
Serialization [Serialization] Add missing includes for CHAR_BIT 2022-05-19 10:04:25 +02:00
StaticAnalyzer [clang] Implement ElaboratedType sugaring for types written bare 2022-07-27 11:10:54 +02:00
Support [clang] Fix time profile in "isIntegerConstantExpr" 2022-10-23 23:17:56 +00:00
Tooling [clang][Tooling] Sort filenames in test 2022-11-15 13:31:40 +01:00
libclang [libclang] CIndex: Visit UsingTypeLoc as TypeRef 2022-10-11 15:01:31 +02:00
CMakeLists.txt [clang] Add time profile for constant evaluation 2022-10-21 23:24:44 +00:00