From: Chris Lattner Date: Mon, 27 Aug 2007 17:56:57 +0000 (+0000) Subject: constify some stuff X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fb071532de6ebd5685de34d65a5440604ee570bb;p=clang constify some stuff git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41503 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/AST/ASTContext.cpp b/AST/ASTContext.cpp index 1a740b5245..bc737483d2 100644 --- a/AST/ASTContext.cpp +++ b/AST/ASTContext.cpp @@ -314,8 +314,8 @@ const RecordLayout &ASTContext::getRecordLayout(const RecordDecl *D, /// getEnumDeclIntegerType - returns the integer type compatible with the /// given enum type. -QualType ASTContext::getEnumDeclIntegerType(EnumDecl *ED) const { - if (EnumConstantDecl *C = ED->getEnumConstantList()) +QualType ASTContext::getEnumDeclIntegerType(const EnumDecl *ED) const { + if (const EnumConstantDecl *C = ED->getEnumConstantList()) return C->getType(); // If the enum list is empty, it is typed as if it contained a single zero diff --git a/include/clang/AST/ASTContext.h b/include/clang/AST/ASTContext.h index 8973087a52..47a433d689 100644 --- a/include/clang/AST/ASTContext.h +++ b/include/clang/AST/ASTContext.h @@ -149,7 +149,7 @@ public: /// getEnumDeclIntegerType - returns the integer type compatible with the /// given enum type. - QualType getEnumDeclIntegerType(EnumDecl *ED) const; + QualType getEnumDeclIntegerType(const EnumDecl *ED) const; //===--------------------------------------------------------------------===// // Type Operators