From 4b044c6bc71d1fdce8998af09cf08b026fdd2189 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Sun, 15 Jul 2012 01:05:36 +0000 Subject: [PATCH] Make const the argument of getDefinition. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160226 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Sema/SemaDecl.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp index 11d8931320..ea032ac28e 100644 --- a/lib/Sema/SemaDecl.cpp +++ b/lib/Sema/SemaDecl.cpp @@ -1754,12 +1754,12 @@ bool Sema::mergeDeclAttribute(Decl *D, InheritableAttr *Attr) { return false; } -static const Decl *getDefinition(Decl *D) { - if (TagDecl *TD = dyn_cast(D)) +static const Decl *getDefinition(const Decl *D) { + if (const TagDecl *TD = dyn_cast(D)) return TD->getDefinition(); - if (VarDecl *VD = dyn_cast(D)) + if (const VarDecl *VD = dyn_cast(D)) return VD->getDefinition(); - if (FunctionDecl *FD = dyn_cast(D)) { + if (const FunctionDecl *FD = dyn_cast(D)) { const FunctionDecl* Def; if (FD->hasBody(Def)) return Def; -- 2.40.0