* \param source_filename the name of the source file that should be parsed
* to perform code-completion. This source file must be the same as or
* include the filename described by \p complete_filename, or no code-completion
- * results will be produced.
+ * results will be produced. NOTE: One can also specify NULL for this argument if
+ * the source file is included in command_line_args.
*
* \param num_command_line_args the number of command-line arguments stored in
* \p command_line_args.
// Add the source file name (FIXME: later, we'll want to build temporary
// file from the buffer, or just feed the source text via standard input).
- argv.push_back(source_filename);
+ if (source_filename)
+ argv.push_back(source_filename);
// Process the compiler options, stripping off '-o', '-c', '-fsyntax-only'.
for (int i = 0; i < num_command_line_args; ++i)