Implement scanning-for-( more correctly. This implements

test/Preprocessor/macro_fn_lparen_scan.c, but is not yet complete.

llvm-svn: 38695
This commit is contained in:
Chris Lattner 2006-07-11 04:02:48 +00:00
parent afe603fa7d
commit 2acdac4200
2 changed files with 12 additions and 0 deletions

View File

@ -82,6 +82,13 @@ public:
delete FormalArgs;
}
/// NextTokenIsKnownNotLParen - If the next token lexed will pop this macro
/// off the expansion stack, return false and set RanOffEnd to true.
/// Otherwise, return true if we know for sure that the next token returned
/// will not be a '(' token. Return false if it is a '(' token or if we are
/// not sure.
bool NextTokenIsKnownNotLParen(bool &RanOffEnd) const;
MacroInfo &getMacro() const { return Macro; }
/// Lex - Lex and return a token from this macro stream.

View File

@ -467,6 +467,11 @@ private:
/// the macro should not be expanded return true, otherwise return false.
bool HandleMacroExpandedIdentifier(LexerToken &Tok, MacroInfo *MI);
/// isNextPPTokenLParen - Determine whether the next preprocessor token to be
/// lexed is a '('. If so, consume the token and return true, if not, this
/// method should have no observable side-effect on the lexed tokens.
bool isNextPPTokenLParen();
/// ReadFunctionLikeMacroFormalArgs - After reading "MACRO(", this method is
/// invoked to read all of the formal arguments specified for the macro
/// invocation. This returns null on error.