clang do not support nested function