[cfe-commits] r160226 - /cfe/trunk/lib/Sema/SemaDecl.cpp
Rafael Espindola
rafael.espindola at gmail.com
Sat Jul 14 18:05:37 PDT 2012
Author: rafael
Date: Sat Jul 14 20:05:36 2012
New Revision: 160226
URL: http://llvm.org/viewvc/llvm-project?rev=160226&view=rev
Log:
Make const the argument of getDefinition.
Modified:
cfe/trunk/lib/Sema/SemaDecl.cpp
Modified: cfe/trunk/lib/Sema/SemaDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDecl.cpp?rev=160226&r1=160225&r2=160226&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDecl.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDecl.cpp Sat Jul 14 20:05:36 2012
@@ -1754,12 +1754,12 @@
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;
More information about the cfe-commits
mailing list