This patch kit removes the dependency on "tree" from diagnostic paths, renaming tree-diagnostic-path.cc to diagnostic-path.cc.
I have an updated prototype of libdiagnostics that uses this to support execution paths. Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Successful run of analyzer integration tests on x86_64-pc-linux-gnu. Pushed to trunk as r15-1410-gf89f9c7ae7190c through r15-1416-g524cdf4dab610e. David Malcolm (7): diagnostics: move simple_diagnostic_{path,thread,event} to their own .h/cc diagnostics: eliminate "tree" from diagnostic_{event,path} diagnostics: remove tree usage from tree-diagnostic-path.cc diagnostics: eliminate diagnostic_context::m_make_json_for_path diagnostics: introduce diagnostic-macro-unwinding.h/cc diagnostics: eliminate diagnostic_context::m_print_path callback diagnostics: rename tree-diagnostic-path.cc to diagnostic-path.cc gcc/Makefile.in | 6 +- gcc/analyzer/checker-event.h | 2 +- gcc/analyzer/checker-path.cc | 8 + gcc/analyzer/checker-path.h | 5 + gcc/c-family/c-opts.cc | 2 +- gcc/diagnostic-format-json.cc | 41 ++- gcc/diagnostic-format-sarif.cc | 4 +- gcc/diagnostic-macro-unwinding.cc | 221 ++++++++++++ gcc/diagnostic-macro-unwinding.h | 29 ++ ...-diagnostic-path.cc => diagnostic-path.cc} | 317 ++++++------------ gcc/diagnostic-path.h | 114 +------ gcc/diagnostic.cc | 199 +++-------- gcc/diagnostic.h | 6 +- gcc/logical-location.h | 10 +- gcc/selftest-diagnostic-path.cc | 233 +++++++++++++ gcc/selftest-diagnostic-path.h | 163 +++++++++ gcc/selftest-logical-location.cc | 71 ++++ gcc/selftest-logical-location.h | 58 ++++ gcc/selftest-run-tests.cc | 3 +- gcc/selftest.h | 3 +- gcc/simple-diagnostic-path.cc | 237 +++++++++++++ gcc/simple-diagnostic-path.h | 139 ++++++++ .../plugin/diagnostic_plugin_test_paths.c | 1 + gcc/tree-diagnostic.cc | 197 ----------- gcc/tree-diagnostic.h | 10 - gcc/tree-logical-location.cc | 25 ++ gcc/tree-logical-location.h | 3 + 27 files changed, 1410 insertions(+), 697 deletions(-) create mode 100644 gcc/diagnostic-macro-unwinding.cc create mode 100644 gcc/diagnostic-macro-unwinding.h rename gcc/{tree-diagnostic-path.cc => diagnostic-path.cc} (89%) create mode 100644 gcc/selftest-diagnostic-path.cc create mode 100644 gcc/selftest-diagnostic-path.h create mode 100644 gcc/selftest-logical-location.cc create mode 100644 gcc/selftest-logical-location.h create mode 100644 gcc/simple-diagnostic-path.cc create mode 100644 gcc/simple-diagnostic-path.h -- 2.26.3