About Clang Static Analyzer

Hi,

I want to visit CXXRecordDecl in my checker. But I am getting error. But it works for FunctionDecl or VaeDecl.

Following works:

class MyRuleChecker : public clang::ento::Checker <
clang::ento::check::ASTDeclclang::FunctionDecl > {
public:

void checkASTDecl(const FunctionDecl *D,
AnalysisManager &Mgr,
BugReporter &BR) const
{
return;
}

};

But following does not work:

class MyRuleChecker : public clang::ento::Checker <
clang::ento::check::ASTDecl > {
public:

checkASTDecl(const CXXRecordDecl *D,
AnalysisManager &Mgr,
BugReporter &BR) const
{
//return;
}

};

It gives error:

MyRuleChecker.cpp:116:38: required from here
/home/anand/Desktop/static1/llvm/include/llvm/Support/Casting.h:56:28: error: incomplete type ‘clang::CXXRecordDecl’ used in nested name specifier
return To::classof(&Val);
^
/home/anand/Desktop/static1/llvm/include/llvm/Support/Casting.h: In static member function ‘static bool llvm::isa_impl<To, From, Enabler>::doit(const From&) [with To = clang::CXXRecordDecl; From = clang::Decl; Enabler = void]’:
/home/anand/Desktop/static1/llvm/include/llvm/Support/Casting.h:57:3: warning: control reaches end of non-void function [-Wreturn-type]
}
^

Thanks & Regars