clang 23.0.0git
PrettyStackTraceStackFrame.h
Go to the documentation of this file.
1//===- PrettyStackTraceStackFrame.h - show analysis backtrace --*- 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 LLVM_CLANG_LIB_STATICANALYZER_CORE_PRETTYSTACKTRACELOCATIONCONTEXT_H
10#define LLVM_CLANG_LIB_STATICANALYZER_CORE_PRETTYSTACKTRACELOCATIONCONTEXT_H
11
13
14namespace clang {
15namespace ento {
16
17/// While alive, includes the current analysis stack in a crash trace.
18///
19/// Example:
20/// \code
21/// 0. Program arguments: ...
22/// 1. <eof> parser at end of file
23/// 2. While analyzing stack:
24/// #0 void inlined()
25/// #1 void test()
26/// 3. crash-trace.c:6:3: Error evaluating statement
27/// \endcode
28class PrettyStackTraceStackFrame : public llvm::PrettyStackTraceEntry {
29 const StackFrame *SF;
30
31public:
32 PrettyStackTraceStackFrame(const StackFrame *SF) : SF(SF) { assert(SF); }
33
34 void print(raw_ostream &Out) const override {
35 Out << "While analyzing stack: \n";
36 SF->dumpStack(Out);
37 }
38};
39
40} // namespace ento
41} // namespace clang
42
43#endif
This file defines AnalysisDeclContext, a class that manages the analysis context data for context sen...
It represents a stack frame of the call stack.
void print(raw_ostream &Out) const override
The JSON file list parser is used to communicate input to InstallAPI.