[cfe-dev] misleading documentation for PPCallbacks::FileSkipped

Vladimir Voskresensky - Oracle vladimir.voskresensky at oracle.com
Fri Apr 3 07:15:09 PDT 2015


Hello,

It looks like the name and documentation of the first parameter is incorrect
   virtual void FileSkipped(const FileEntry &ParentFile,
                            const Token &FilenameTok,
                            SrcMgr::CharacteristicKind FileType) {
   }

passed ParentFile is in fact SkippedFile.

The code from Preprocessor::HandleIncludeDirective which calls FileSkipped:

   // Ask HeaderInfo if we should enter this #include file. If not, #including
   // this file will have no effect.
   if (!HeaderInfo.ShouldEnterIncludeFile(File, isImport)) {
     if (Callbacks)
       Callbacks->FileSkipped(*File, FilenameTok, FileCharacter);
     return;
   }


Thanks,
Vladimir.




More information about the cfe-dev mailing list