loplugin compat with clang 3.4
Change-Id: I264fe688519b8b2173d5cccd8a453847a7fb89d9
This commit is contained in:
@@ -128,20 +128,35 @@ inline clang::QualType getReturnType(clang::FunctionDecl const & decl) {
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#if CLANG_VERSION >= 30900
|
#if CLANG_VERSION >= 30900
|
||||||
inline clang::ArrayRef<clang::ParmVarDecl *> parameters(
|
inline clang::ArrayRef<clang::ParmVarDecl *> parameters(
|
||||||
clang::FunctionDecl const & decl)
|
clang::FunctionDecl const & decl)
|
||||||
{
|
{
|
||||||
return decl.parameters();
|
return decl.parameters();
|
||||||
}
|
}
|
||||||
#else
|
#elif CLANG_VERSION >= 30500
|
||||||
inline clang::FunctionDecl::param_const_range parameters(
|
inline clang::FunctionDecl::param_const_range parameters(
|
||||||
clang::FunctionDecl const & decl)
|
clang::FunctionDecl const & decl)
|
||||||
{
|
{
|
||||||
return decl.params();
|
return decl.params();
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
struct FunctionDeclParamsWrapper
|
||||||
|
{
|
||||||
|
clang::FunctionDecl const & decl;
|
||||||
|
FunctionDeclParamsWrapper(clang::FunctionDecl const & _decl) : decl(_decl) {}
|
||||||
|
clang::FunctionDecl::param_const_iterator begin() const { return decl.param_begin(); }
|
||||||
|
clang::FunctionDecl::param_const_iterator end() const { return decl.param_end(); }
|
||||||
|
};
|
||||||
|
inline FunctionDeclParamsWrapper parameters(
|
||||||
|
clang::FunctionDecl const & decl)
|
||||||
|
{
|
||||||
|
return FunctionDeclParamsWrapper(decl);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
inline clang::QualType getReturnType(clang::FunctionProtoType const & type) {
|
inline clang::QualType getReturnType(clang::FunctionProtoType const & type) {
|
||||||
#if CLANG_VERSION >= 30500
|
#if CLANG_VERSION >= 30500
|
||||||
return type.getReturnType();
|
return type.getReturnType();
|
||||||
|
Reference in New Issue
Block a user