[PATCH] D145178: [clang][NFC] reformats the SARIF diagnostic test so it's human readable

Christopher Di Bella via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 2 12:41:13 PST 2023


cjdb added inline comments.


================
Comment at: clang/test/Frontend/sarif-diagnostics.cpp:31
+// RUN: %clang -fsyntax-only -Wall -Wextra -fdiagnostics-format=sarif-stderr %s > %t.txt 2>&1 || true
+// RUN: FileCheck -dump-input=always %s --input-file=%t.txt --check-prefixes=CHECK,COMMON
+
----------------
This was split out for future tests where the `COMMON` stuff isn't written to file. Perhaps I should check it in as `STDERR`?


================
Comment at: clang/test/Frontend/sarif-diagnostics.cpp:43
+// CHECK:             "index":0,
+// CHECK:             "uri":{{"file://[^"]+/clang/test/Frontend/sarif-diagnostics.cpp"}}
+// CHECK:           },
----------------
Aside from the reformatting, the only change to this file is the use of regex for the URIs.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D145178/new/

https://reviews.llvm.org/D145178



More information about the cfe-commits mailing list