1 //==- PrettyStackTraceLocationContext.h - show analysis backtrace --*- C++ -*-//
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
7 //===----------------------------------------------------------------------===//
9 #ifndef LLVM_CLANG_LIB_STATICANALYZER_CORE_PRETTYSTACKTRACELOCATIONCONTEXT_H
10 #define LLVM_CLANG_LIB_STATICANALYZER_CORE_PRETTYSTACKTRACELOCATIONCONTEXT_H
12 #include "clang/Analysis/AnalysisDeclContext.h"
17 /// While alive, includes the current analysis stack in a crash trace.
21 /// 0. Program arguments: ...
22 /// 1. <eof> parser at end of file
23 /// 2. While analyzing stack:
26 /// 3. crash-trace.c:6:3: Error evaluating statement
28 class PrettyStackTraceLocationContext
: public llvm::PrettyStackTraceEntry
{
29 const LocationContext
*LCtx
;
31 PrettyStackTraceLocationContext(const LocationContext
*LC
) : LCtx(LC
) {
35 void print(raw_ostream
&Out
) const override
{
36 Out
<< "While analyzing stack: \n";
41 } // end ento namespace
42 } // end clang namespace