diff options
-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; |