Shorten code. Make it more readable.

This commit is contained in:
Vassil Vassilev 2014-08-05 21:53:58 +02:00 committed by sftnight
parent ee6ed354b1
commit 737a2c7f39

View File

@ -135,12 +135,10 @@ namespace cling {
void AutoloadCallback::HandleClassTemplate(ClassTemplateDecl* CT) {
CXXRecordDecl* cxxr = CT->getTemplatedDecl();
if(cxxr->hasAttr<AnnotateAttr>())
InsertIntoAutoloadingState(CT,cxxr->getAttr<AnnotateAttr>()->getAnnotation());
InsertIntoAutoloadingState(CT,cxxr->getAttr<AnnotateAttr>()->getAnnotation());
}
void AutoloadCallback::HandleFunction(FunctionDecl *F) {
if(F->hasAttr<AnnotateAttr>())
InsertIntoAutoloadingState(F,F->getAttr<AnnotateAttr>()->getAnnotation());
InsertIntoAutoloadingState(F,F->getAttr<AnnotateAttr>()->getAnnotation());
}
void AutoloadCallback::HandleDeclVector(std::vector<clang::Decl*> Decls) {
@ -160,6 +158,8 @@ namespace cling {
if (DCI.m_Call != Transaction::kCCIHandleTopLevelDecl)
continue;
if (DCI.m_DGR.isNull() || (*DCI.m_DGR.begin())->hasAttr<AnnotateAttr>())
continue;
std::vector<clang::Decl*> decls;
for (DeclGroupRef::iterator J = DCI.m_DGR.begin(),