As I see it, this is a general problem when parsing method definitions inside a struct, and is not specific to code completion. In any case, there's special handling in the parser precisely for this case, which you can find in the ParseCXXInlineMethods.cpp file.
From the comment on Parser::ParseCXXInlineMethodDef()
:
/// ParseCXXInlineMethodDef - We parsed and verified that the specified
/// Declarator is a well formed C++ inline method definition. Now lex its body
/// and store its tokens for parsing after the C++ class is complete.
Parser::DeclPtrTy
Parser::ParseCXXInlineMethodDef(...
And later, code for parsing the method definitions:
/// ParseLexedMethodDefs - We finished parsing the member specification of a top
/// (non-nested) C++ class. Now go over the stack of lexed methods that were
/// collected during its parsing and parse them all.
void Parser::ParseLexedMethodDefs(...
Thus the lexer-generated tokens for the function bodies are only parsed after the rest of the class was parsed.