Wrapping if and for body with brackets

I want to wrap body of is statement inside a bracket.
Ex if()a=b; ---> if (){a=b}
I am doing with the help of
if(IfStmt *ifStmt = dyn_cast<IfStmt>(st)){
                if(ifStmt->getElse() != NULL){

But it is giving me weird answer like closing bracket missing or on
wrapping when if has single line body. Can someone inform me where I am
doing wrong.