[cfe-commits] r90110 - in /cfe/trunk: include/clang/Basic/DiagnosticLexKinds.td include/clang/Lex/Lexer.h include/clang/Lex/Preprocessor.h lib/Frontend/CacheTokens.cpp lib/Frontend/DiagChecker.cpp lib/Frontend/FrontendActions.cpp lib/Frontend/RewriteMacros.cpp lib/Frontend/VerifyDiagnosticsClient.cpp lib/Lex/Lexer.cpp lib/Lex/PPDirectives.cpp lib/Lex/PPLexerChange.cpp lib/Rewrite/HTMLRewrite.cpp lib/Rewrite/TokenRewriter.cpp

Neil Booth neil at daikokuya.co.uk
Mon Nov 30 04:47:37 PST 2009


Chris Lattner wrote:-

> Author: lattner
> Date: Sun Nov 29 22:18:44 2009
> New Revision: 90110
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=90110&view=rev
> Log:
> Fix PR5633 by making the preprocessor handle the case where we can
> stat a file but where mmaping it fails.  In this case, we emit an
> error like:
> t.c:1:10: fatal error: error opening file '../../foo.h'
> 
> instead of "cannot find file".

Thanks Chris.  It's nice to retain errno and use strerror for
these; it's not always obvious what the issue is.  Mine gives
the following in this example.

Neil.

"/tmp/bug.c", line 1: fatal error: cannot read "/tmp/stdio.h":
        Permission denied
#include <stdio.h>
         ^-------- 




More information about the cfe-commits mailing list