| 1 | //===- AnalysisResults.h - Shared analysis result types ---------*- C++ -*-===// |
|---|---|
| 2 | // |
| 3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
| 4 | // See https://llvm.org/LICENSE.txt for license information. |
| 5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| 6 | // |
| 7 | //===----------------------------------------------------------------------===// |
| 8 | |
| 9 | #ifndef EXAMPLE_PLUGIN_ANALYSIS_RESULTS_H |
| 10 | #define EXAMPLE_PLUGIN_ANALYSIS_RESULTS_H |
| 11 | |
| 12 | #include "clang/ScalableStaticAnalysis/Core/Model/EntityId.h" |
| 13 | #include "clang/ScalableStaticAnalysis/Core/WholeProgramAnalysis/AnalysisName.h" |
| 14 | #include "clang/ScalableStaticAnalysis/Core/WholeProgramAnalysis/AnalysisResult.h" |
| 15 | #include <string> |
| 16 | #include <utility> |
| 17 | #include <vector> |
| 18 | |
| 19 | namespace example_plugin { |
| 20 | |
| 21 | struct TagsAnalysisResult final : clang::ssaf::AnalysisResult { |
| 22 | static clang::ssaf::AnalysisName analysisName() { |
| 23 | return clang::ssaf::AnalysisName("TagsAnalysisResult"); |
| 24 | } |
| 25 | |
| 26 | std::vector<std::string> Tags; |
| 27 | }; |
| 28 | |
| 29 | struct PairsAnalysisResult final : clang::ssaf::AnalysisResult { |
| 30 | static clang::ssaf::AnalysisName analysisName() { |
| 31 | return clang::ssaf::AnalysisName("PairsAnalysisResult"); |
| 32 | } |
| 33 | |
| 34 | std::vector<std::pair<clang::ssaf::EntityId, int>> PairCounts; |
| 35 | }; |
| 36 | |
| 37 | } // namespace example_plugin |
| 38 | |
| 39 | #endif // EXAMPLE_PLUGIN_ANALYSIS_RESULTS_H |
| 40 |