[cfe-commits] r89546 - in /cfe/trunk: include/clang/AST/DeclBase.h lib/AST/DeclBase.cpp

Daniel Dunbar daniel at zuster.org
Sat Nov 21 01:05:59 PST 2009


Author: ddunbar
Date: Sat Nov 21 03:05:59 2009
New Revision: 89546

URL: http://llvm.org/viewvc/llvm-project?rev=89546&view=rev
Log:
Add 1+2 consts.

Modified:
    cfe/trunk/include/clang/AST/DeclBase.h
    cfe/trunk/lib/AST/DeclBase.cpp

Modified: cfe/trunk/include/clang/AST/DeclBase.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/DeclBase.h?rev=89546&r1=89545&r2=89546&view=diff

==============================================================================
--- cfe/trunk/include/clang/AST/DeclBase.h (original)
+++ cfe/trunk/include/clang/AST/DeclBase.h Sat Nov 21 03:05:59 2009
@@ -503,12 +503,12 @@
 /// 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) {}
 

Modified: cfe/trunk/lib/AST/DeclBase.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/DeclBase.cpp?rev=89546&r1=89545&r2=89546&view=diff

==============================================================================
--- cfe/trunk/lib/AST/DeclBase.cpp (original)
+++ cfe/trunk/lib/AST/DeclBase.cpp Sat Nov 21 03:05:59 2009
@@ -119,7 +119,7 @@
 
   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';
 }





More information about the cfe-commits mailing list