forked from OSchip/llvm-project
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:
parent
afe603fa7d
commit
2acdac4200
|
@ -82,6 +82,13 @@ public:
|
||||||
delete FormalArgs;
|
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; }
|
MacroInfo &getMacro() const { return Macro; }
|
||||||
|
|
||||||
/// Lex - Lex and return a token from this macro stream.
|
/// Lex - Lex and return a token from this macro stream.
|
||||||
|
|
|
@ -467,6 +467,11 @@ private:
|
||||||
/// the macro should not be expanded return true, otherwise return false.
|
/// the macro should not be expanded return true, otherwise return false.
|
||||||
bool HandleMacroExpandedIdentifier(LexerToken &Tok, MacroInfo *MI);
|
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
|
/// ReadFunctionLikeMacroFormalArgs - After reading "MACRO(", this method is
|
||||||
/// invoked to read all of the formal arguments specified for the macro
|
/// invoked to read all of the formal arguments specified for the macro
|
||||||
/// invocation. This returns null on error.
|
/// invocation. This returns null on error.
|
||||||
|
|
Loading…
Reference in New Issue