[clang] fixed bugs after Barry's comments