[cfe-commits] r112391 - in /cfe/trunk: include/clang/Lex/Preprocessor.h lib/Lex/PPMacroExpansion.cpp lib/Lex/Pragma.cpp test/Preprocessor/pragma_microsoft.c
Eli Friedman
eli.friedman at gmail.com
Sat Aug 28 15:46:33 PDT 2010
On Sat, Aug 28, 2010 at 3:34 PM, John McCall <rjmccall at apple.com> 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?
-Eli
More information about the cfe-commits
mailing list