1 //==- PrettyStackTraceLocationContext.h - show analysis backtrace --*- C++ -*-//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef LLVM_CLANG_STATICANALYZER_PRETTYSTACKTRACELOCATIONCONTEXT_H
11 #define LLVM_CLANG_STATICANALYZER_PRETTYSTACKTRACELOCATIONCONTEXT_H
13 #include "clang/Analysis/AnalysisContext.h"
18 /// While alive, includes the current analysis stack in a crash trace.
22 /// 0. Program arguments: ...
23 /// 1. <eof> parser at end of file
24 /// 2. While analyzing stack:
27 /// 3. crash-trace.c:6:3: Error evaluating statement
29 class PrettyStackTraceLocationContext : public llvm::PrettyStackTraceEntry {
30 const LocationContext *LCtx;
32 PrettyStackTraceLocationContext(const LocationContext *LC) : LCtx(LC) {
36 virtual void print(raw_ostream &OS) const {
37 OS << "While analyzing stack: \n";
38 LCtx->dumpStack(OS, "\t");
42 } // end ento namespace
43 } // end clang namespace