On Aug 28, 2010, at 3:46 PM, Eli Friedman wrote:

> On Sat, Aug 28, 2010 at 3:34 PM, John McCall <[email protected]> wrote:
>> +  // Get the tokens enclosed within the __pragma().
>> +  llvm::SmallVector<Token, 32> PragmaToks;
>> +  int NumParens = 0;
>> +  Lex(Tok);
>> +  while (Tok.isNot(tok::eof)) {
>> +    if (Tok.is(tok::l_paren))
>> +      NumParens++;
>> +    else if (Tok.is(tok::r_paren) && NumParens-- == 0)
>> +      break;
>> +    PragmaToks.push_back(Tok);
>> +    Lex(Tok);
>> +  }
> 
> Should we give an error for an unclosed __pragma?

Good point.  r112392.

John.
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to