<div dir="ltr">Hello,<div><br></div><div>I've recently stumbled upon a bug in one of the clang-related projects: we've been calling clang_parseTranslationUnit() from clang C API there, and we have not been able to pass _both_ saved and unsaved files - apparently commandline we've been passing was not correct.</div><div>After looking into this for a while I've figured out that while clang is OK with accepting just file names (without paths) for real files, it demands _absolute_ paths for the unsaved files.</div><div>So I've got a couple of questions:</div><div>- Is my understanding correct, or I've missed something?</div><div>- What is the motivation for this behaviour, and is there any chance we could work it around by using -I directives or anything else?</div><div>- Could you please elaborate on the following bit from the docs on CXUnsavedFile::Filename: </div><div>"This file must already exist in the file system". Does it mean we have to explicitly create it in virtual FS beforehand? And if so, why does specifying the full path seem to override this requirement?</div><div><br></div><div>I've tried debugging this, but unfortunately, I didn't manage to fully understand the logic behind it :(</div><div><br></div><div>Thank you!</div><div><br></div><div>-- <br></div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Regards,<div>Andrey Pushkar</div></div></div></div>