diff options
author | rdivacky <rdivacky@FreeBSD.org> | 2010-01-23 11:10:26 +0000 |
---|---|---|
committer | rdivacky <rdivacky@FreeBSD.org> | 2010-01-23 11:10:26 +0000 |
commit | 2fce988e86bc01829142e4362d4eff1af0925147 (patch) | |
tree | c69d3f4f13d508570bb5257a6aea735f88bdf09c /lib/Lex/PPDirectives.cpp | |
parent | a3fa5c7f1b5e2ba4d6ec033dc0e2376326b05824 (diff) | |
download | FreeBSD-src-2fce988e86bc01829142e4362d4eff1af0925147.zip FreeBSD-src-2fce988e86bc01829142e4362d4eff1af0925147.tar.gz |
Update clang to r94309.
Diffstat (limited to 'lib/Lex/PPDirectives.cpp')
-rw-r--r-- | lib/Lex/PPDirectives.cpp | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/lib/Lex/PPDirectives.cpp b/lib/Lex/PPDirectives.cpp index aa807f8..b0e784b 100644 --- a/lib/Lex/PPDirectives.cpp +++ b/lib/Lex/PPDirectives.cpp @@ -160,10 +160,7 @@ void Preprocessor::SkipExcludedConditionalBlock(SourceLocation IfTokenLoc, CurPPLexer->LexingRawMode = true; Token Tok; while (1) { - if (CurLexer) - CurLexer->Lex(Tok); - else - CurPTHLexer->Lex(Tok); + CurLexer->Lex(Tok); // If this is the end of the buffer, we have an error. if (Tok.is(tok::eof)) { @@ -405,7 +402,6 @@ void Preprocessor::PTHSkipExcludedConditionalBlock() { /// return null on failure. isAngled indicates whether the file reference is /// for system #include's or not (i.e. using <> instead of ""). const FileEntry *Preprocessor::LookupFile(llvm::StringRef Filename, - SourceLocation FilenameTokLoc, bool isAngled, const DirectoryLookup *FromDir, const DirectoryLookup *&CurDir) { @@ -432,16 +428,7 @@ const FileEntry *Preprocessor::LookupFile(llvm::StringRef Filename, CurDir = CurDirLookup; const FileEntry *FE = HeaderInfo.LookupFile(Filename, isAngled, FromDir, CurDir, CurFileEnt); - if (FE) { - // Warn about normal quoted #include from framework headers. Since - // framework headers are published (both public and private ones) they - // should not do relative searches, they should do an include with the - // framework path included. - if (!isAngled && CurDir && FilenameTokLoc.isValid() && - CurDir->isFramework() && CurDir == CurDirLookup) - Diag(FilenameTokLoc, diag::warn_pp_relative_include_from_framework); - return FE; - } + if (FE) return FE; // Otherwise, see if this is a subframework header. If so, this is relative // to one of the headers on the #include stack. Walk the list of the current @@ -1082,8 +1069,7 @@ void Preprocessor::HandleIncludeDirective(Token &IncludeTok, // Search include directories. const DirectoryLookup *CurDir; - const FileEntry *File = LookupFile(Filename, FilenameTok.getLocation(), - isAngled, LookupFrom, CurDir); + const FileEntry *File = LookupFile(Filename, isAngled, LookupFrom, CurDir); if (File == 0) { Diag(FilenameTok, diag::err_pp_file_not_found) << Filename; return; |