[PATCH] D109701: [clang] Emit SARIF Diagnostics: Create `clang::SarifDocumentWriter` interface
Vaibhav Yenamandra via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Sep 14 12:51:09 PDT 2021
vaibhav.y added inline comments.
================
Comment at: clang/lib/Basic/Sarif.cpp:1
+#include "clang/Basic/Sarif.h"
+#include "clang/Basic/LangOptions.h"
----------------
lattner wrote:
> THis nees the standard header boilerplate per the coding standards doc
Ack, didn't grok the "all source files" part.
================
Comment at: clang/lib/Basic/Sarif.cpp:27
+
+StringRef getFileName(const FileEntry &FE) {
+ StringRef Filename = FE.tryGetRealPathName();
----------------
lattner wrote:
> vaibhav.y wrote:
> > A lot of these are copied from [[ https://github.com/llvm/llvm-project/blob/181d18ef53db1e5810bf6b905fbafc91da9b5baa/clang/lib/StaticAnalyzer/Core/SarifDiagnostics.cpp#L64 | SarifDiagnostics.cpp ]]
> Please use static methods instead of anonymous namespaces, per the coding standards doc.
Ack.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D109701/new/
https://reviews.llvm.org/D109701
More information about the cfe-commits
mailing list