diff options
Diffstat (limited to 'clang')
-rw-r--r-- | clang/include/clang/AST/DeclBase.h | 4 | ||||
-rw-r--r-- | clang/lib/AST/DeclBase.cpp | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/clang/include/clang/AST/DeclBase.h b/clang/include/clang/AST/DeclBase.h index 79f76635613..e1f948fdd55 100644 --- a/clang/include/clang/AST/DeclBase.h +++ b/clang/include/clang/AST/DeclBase.h @@ -503,12 +503,12 @@ private: /// PrettyStackTraceDecl - If a crash occurs, indicate that it happened when /// doing something to a specific decl. class PrettyStackTraceDecl : public llvm::PrettyStackTraceEntry { - Decl *TheDecl; + const Decl *TheDecl; SourceLocation Loc; SourceManager &SM; const char *Message; public: - PrettyStackTraceDecl(Decl *theDecl, SourceLocation L, + PrettyStackTraceDecl(const Decl *theDecl, SourceLocation L, SourceManager &sm, const char *Msg) : TheDecl(theDecl), Loc(L), SM(sm), Message(Msg) {} diff --git a/clang/lib/AST/DeclBase.cpp b/clang/lib/AST/DeclBase.cpp index 831f552489f..f0eb011332c 100644 --- a/clang/lib/AST/DeclBase.cpp +++ b/clang/lib/AST/DeclBase.cpp @@ -119,7 +119,7 @@ void PrettyStackTraceDecl::print(llvm::raw_ostream &OS) const { OS << Message; - if (NamedDecl *DN = dyn_cast_or_null<NamedDecl>(TheDecl)) + if (const NamedDecl *DN = dyn_cast_or_null<NamedDecl>(TheDecl)) OS << " '" << DN->getQualifiedNameAsString() << '\''; OS << '\n'; } |