]> granicus.if.org Git - clang/commit
Simplify some implementations of get*Decl.
authorRafael Espindola <rafael.espindola@gmail.com>
Sat, 19 Oct 2013 16:55:03 +0000 (16:55 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Sat, 19 Oct 2013 16:55:03 +0000 (16:55 +0000)
commit87bcee88d9b49de8214aa23d07c96f7bec3198e0
tree9881213fce950b290c585c965a5dc5665487a311
parente6ddd7f610cf6caf3b5691b0f3d60e00e8c95741
Simplify some implementations of get*Decl.

* NamedDecl and CXXMethodDecl were missing getMostRecentDecl.
* The const version can just forward to the non const.
* getMostRecentDecl can use cast instead of cast_or_null.

This then removes some casts from the callers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193039 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/AST/Decl.h
include/clang/AST/DeclCXX.h
include/clang/AST/DeclTemplate.h
lib/AST/Decl.cpp
lib/Analysis/ThreadSafety.cpp
lib/Sema/SemaDecl.cpp
lib/Serialization/ASTReader.cpp