diff --git a/clang/AST/Decl.cpp b/clang/AST/Decl.cpp index ee5b073918a044492e8881173448014a60ff4451..d45780043fb0a80ecb924bf3d53f587ada73903b 100644 --- a/clang/AST/Decl.cpp +++ b/clang/AST/Decl.cpp @@ -33,7 +33,7 @@ static unsigned nIvarDecls = 0; static bool StatSwitch = false; -const char *Decl::getDeclKindName() { +const char *Decl::getDeclKindName() const { switch (DeclKind) { default: assert(0 && "Unknown decl kind!"); case Typedef: diff --git a/clang/include/clang/AST/Decl.h b/clang/include/clang/AST/Decl.h index 4e064675b7fa7ef168a92e2e22d94737a948e69f..96c6657a75faa479333a6d985cea711153d09156 100644 --- a/clang/include/clang/AST/Decl.h +++ b/clang/include/clang/AST/Decl.h @@ -69,7 +69,7 @@ protected: public: Kind getKind() const { return DeclKind; } - const char *getDeclKindName(); + const char *getDeclKindName() const; /// setInvalidDecl - Indicates the Decl had a semantic error. This /// allows for graceful error recovery.