On Thu, Mar 20, 2014 at 6:11 AM, Timur Iskhodzhanov <[email protected]> wrote: > > 2014-03-20 0:23 GMT+04:00 Ben Langmuir <[email protected]>: > >> bool HeaderSearch::loadModuleMapFile(const FileEntry *File, bool >> IsSystem) { >> + switch (loadModuleMapFileImpl(File, IsSystem)) { >> + case LMM_AlreadyLoaded: >> + case LMM_NewlyLoaded: >> + return false; >> + case LMM_NoDirectory: >> + case LMM_InvalidModuleMap: >> + return true; >> + } >> +} > > > FYI > gcc-4.8.2 doesn't like it: > ../tools/clang/lib/Lex/HeaderSearch.cpp: In member function 'bool > clang::HeaderSearch::loadModuleMapFile(const clang::FileEntry*, bool)': > ../tools/clang/lib/Lex/HeaderSearch.cpp:1159:1: warning: control reaches end > of non-void function [-Wreturn-type] > } > ^
Ben - usually we put an llvm_unreachable at the end of such switches to tell GCC that it's not actually a problem. _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
