summaryrefslogtreecommitdiff
path: root/elpa/irony-20220110.849/server/cmake/LibClangDiagnosticsChecker.cpp
diff options
context:
space:
mode:
authormattkae <mattkae@protonmail.com>2022-06-07 08:23:47 -0400
committermattkae <mattkae@protonmail.com>2022-06-07 08:23:47 -0400
commitbd18a38c2898548a3664a9ddab9f79c84f2caf4a (patch)
tree95b9933376770381bd8859782ae763be81c2d72b /elpa/irony-20220110.849/server/cmake/LibClangDiagnosticsChecker.cpp
parentb07628dddf418d4f47b858e6c35fd3520fbaeed2 (diff)
parentef160dea332af4b4fe5e2717b962936c67e5fe9e (diff)
Merge conflict
Diffstat (limited to 'elpa/irony-20220110.849/server/cmake/LibClangDiagnosticsChecker.cpp')
-rw-r--r--elpa/irony-20220110.849/server/cmake/LibClangDiagnosticsChecker.cpp47
1 files changed, 0 insertions, 47 deletions
diff --git a/elpa/irony-20220110.849/server/cmake/LibClangDiagnosticsChecker.cpp b/elpa/irony-20220110.849/server/cmake/LibClangDiagnosticsChecker.cpp
deleted file mode 100644
index 64ea7aa..0000000
--- a/elpa/irony-20220110.849/server/cmake/LibClangDiagnosticsChecker.cpp
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- This program takes some forward its command line arguments to libclang and
- returns the number of diagnostics that occured during the parsing.
-
- It is used during CMake generation to adjust the default parameters to
- libclang.
-*/
-
-#include <clang-c/Index.h>
-
-#include <stdio.h>
-
-int main(int argc, const char *argv[]) {
- for (int i = 1; i < argc; ++i) {
- fprintf(stdout, "argv[%d]: %s\n", i, argv[i]);
- }
-
- CXIndex Idx = clang_createIndex(0, 0);
- CXTranslationUnit TU = clang_parseTranslationUnit(
- Idx, NULL, &argv[1], argc - 1, 0, 0, CXTranslationUnit_None);
- int NumDiagnostics;
-
- if (TU == NULL) {
- NumDiagnostics = 1;
- fprintf(stderr, "failed to create translation unit!\n");
- } else {
- int i;
-
- NumDiagnostics = clang_getNumDiagnostics(TU);
-
- for (i = 0; i < NumDiagnostics; ++i) {
- CXDiagnostic Diag = clang_getDiagnostic(TU, i);
- CXString DiagStr =
- clang_formatDiagnostic(Diag, clang_defaultDiagnosticDisplayOptions());
-
- fprintf(stderr, "%s\n", clang_getCString(DiagStr));
-
- clang_disposeString(DiagStr);
- clang_disposeDiagnostic(Diag);
- }
-
- clang_disposeTranslationUnit(TU);
- }
-
- clang_disposeIndex(Idx);
- return NumDiagnostics;
-}