File tree Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -185,11 +185,9 @@ void Prescanner::Statement() {
185185 // a comment marker or directive sentinel. If so, disable line
186186 // continuation, so that NextToken() won't consume anything from
187187 // following lines.
188- if (IsLegalIdentifierStart (*at_)) {
189- CHECK (NextToken (tokens));
190- CHECK (tokens.SizeInTokens () == 1 );
191- CharBlock id{tokens.TokenAt (0 )};
192- if (preprocessor_.IsNameDefined (id) &&
188+ if (IsLegalIdentifierStart (*at_) && NextToken (tokens) &&
189+ tokens.SizeInTokens () > 0 ) {
190+ if (CharBlock id{tokens.TokenAt (0 )}; preprocessor_.IsNameDefined (id) &&
193191 !preprocessor_.IsFunctionLikeDefinition (id)) {
194192 if (auto replaced{preprocessor_.MacroReplacement (tokens, *this )}) {
195193 auto newLineClass{ClassifyLine (*replaced, GetCurrentProvenance ())};
Original file line number Diff line number Diff line change 1+ ! RUN: %flang -E %s 2>&1 | FileCheck --strict-whitespace %s
2+ ! CHECK: print *, 666
3+ pr&
4+ &i&
5+ &nt * , 666
6+ end
You can’t perform that action at this time.
0 commit comments