diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2012-07-15 01:05:36 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2012-07-15 01:05:36 +0000 |
commit | 4b044c6bc71d1fdce8998af09cf08b026fdd2189 (patch) | |
tree | c75f577aa5ecb4ce6f112bb78c282ef6a268fa55 | |
parent | 2b884a873afac6b766dc7fff26a645b77b97dfcd (diff) |
Make const the argument of getDefinition.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160226 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Sema/SemaDecl.cpp | 8 |
1 files 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<TagDecl>(D)) +static const Decl *getDefinition(const Decl *D) { + if (const TagDecl *TD = dyn_cast<TagDecl>(D)) return TD->getDefinition(); - if (VarDecl *VD = dyn_cast<VarDecl>(D)) + if (const VarDecl *VD = dyn_cast<VarDecl>(D)) return VD->getDefinition(); - if (FunctionDecl *FD = dyn_cast<FunctionDecl>(D)) { + if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(D)) { const FunctionDecl* Def; if (FD->hasBody(Def)) return Def; |