clang
3.7.0
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
work
release_test
rc4
llvm.src
tools
clang
include
clang
Sema
PrettyDeclStackTrace.h
Go to the documentation of this file.
1
//===- PrettyDeclStackTrace.h - Stack trace for decl processing -*- C++ -*-===//
2
//
3
// The LLVM Compiler Infrastructure
4
//
5
// This file is distributed under the University of Illinois Open Source
6
// License. See LICENSE.TXT for details.
7
//
8
//===----------------------------------------------------------------------===//
9
//
10
// This file defines an llvm::PrettyStackTraceEntry object for showing
11
// that a particular declaration was being processed when a crash
12
// occurred.
13
//
14
//===----------------------------------------------------------------------===//
15
16
#ifndef LLVM_CLANG_SEMA_PRETTYDECLSTACKTRACE_H
17
#define LLVM_CLANG_SEMA_PRETTYDECLSTACKTRACE_H
18
19
#include "
clang/Basic/SourceLocation.h
"
20
#include "llvm/Support/PrettyStackTrace.h"
21
22
namespace
clang {
23
24
class
Decl;
25
class
Sema;
26
class
SourceManager;
27
28
/// PrettyDeclStackTraceEntry - If a crash occurs in the parser while
29
/// parsing something related to a declaration, include that
30
/// declaration in the stack trace.
31
class
PrettyDeclStackTraceEntry
:
public
llvm::PrettyStackTraceEntry {
32
Sema
&S;
33
Decl
*TheDecl;
34
SourceLocation
Loc;
35
const
char
*Message;
36
37
public
:
38
PrettyDeclStackTraceEntry
(
Sema
&S,
Decl
*D,
SourceLocation
Loc,
39
const
char
*Msg)
40
: S(S), TheDecl(D), Loc(Loc), Message(Msg) {}
41
42
void
print
(raw_ostream &OS)
const override
;
43
};
44
45
}
46
47
#endif
clang::PrettyDeclStackTraceEntry::PrettyDeclStackTraceEntry
PrettyDeclStackTraceEntry(Sema &S, Decl *D, SourceLocation Loc, const char *Msg)
Definition:
PrettyDeclStackTrace.h:38
clang::Decl
Definition:
DeclBase.h:73
clang::Sema
Sema - This implements semantic analysis and AST building for C.
Definition:
Sema.h:258
clang::PrettyDeclStackTraceEntry
Definition:
PrettyDeclStackTrace.h:31
clang::SourceLocation
Encodes a location in the source. The SourceManager can decode this to get at the full include stack...
Definition:
SourceLocation.h:87
clang::PrettyDeclStackTraceEntry::print
void print(raw_ostream &OS) const override
Definition:
Sema.cpp:1247
SourceLocation.h
Defines the clang::SourceLocation class and associated facilities.
Generated on Mon Aug 31 2015 10:45:21 for clang by
1.8.6