# HG changeset patch # User Kaito Tokumori # Date 1429181362 -32400 # Node ID ae2ab28b985c493260b6feca80499979929b133a # Parent 2ddce554fef0cdeb5553cf8c1aedfafe4fda83ac fix bug: When we check the file is ended or not on SearchCodeSegmentDeclaration, we look up not the current lexer but the current file lexer. diff -r 2ddce554fef0 -r ae2ab28b985c tools/clang/lib/Parse/ParseCbC.cpp --- a/tools/clang/lib/Parse/ParseCbC.cpp Thu Apr 16 17:33:03 2015 +0900 +++ b/tools/clang/lib/Parse/ParseCbC.cpp Thu Apr 16 19:49:22 2015 +0900 @@ -997,7 +997,7 @@ } bool Parser::SkipAnyUntil(tok::TokenKind T, SkipUntilFlags Flags){ - const PreprocessorLexer *L = PP.getCurrentLexer(); + const PreprocessorLexer *L = PP.getCurrentFileLexer(); while(1){ if(Tok.is(T)){ if (HasFlagsSet(Flags, StopBeforeMatch)) { @@ -1007,7 +1007,7 @@ } return true; } - else if(!PP.isCurrentLexer(L)){ + else if(PP.getCurrentFileLexer() != L){ return false; }