diff options
Diffstat (limited to 'lib/Lex/MacroArgs.h')
-rw-r--r-- | lib/Lex/MacroArgs.h | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/lib/Lex/MacroArgs.h b/lib/Lex/MacroArgs.h index 4b22fa18aa8b9..8dee5b3bc997b 100644 --- a/lib/Lex/MacroArgs.h +++ b/lib/Lex/MacroArgs.h @@ -20,7 +20,7 @@ namespace clang { class MacroInfo; class Preprocessor; class Token; - + /// MacroArgs - An instance of this class captures information about /// the formal arguments specified to a function-like macro invocation. class MacroArgs { @@ -45,7 +45,7 @@ class MacroArgs { /// if in strict mode and the C99 varargs macro had only a ... argument, this /// is false. bool VarargsElided; - + MacroArgs(unsigned NumToks, bool varargsElided) : NumUnexpArgTokens(NumToks), VarargsElided(varargsElided) {} ~MacroArgs() {} @@ -55,46 +55,46 @@ public: static MacroArgs *create(const MacroInfo *MI, const Token *UnexpArgTokens, unsigned NumArgTokens, bool VarargsElided); - + /// destroy - Destroy and deallocate the memory for this object. /// void destroy(); - + /// ArgNeedsPreexpansion - If we can prove that the argument won't be affected /// by pre-expansion, return false. Otherwise, conservatively return true. bool ArgNeedsPreexpansion(const Token *ArgTok, Preprocessor &PP) const; - + /// getUnexpArgument - Return a pointer to the first token of the unexpanded /// token list for the specified formal. /// const Token *getUnexpArgument(unsigned Arg) const; - + /// getArgLength - Given a pointer to an expanded or unexpanded argument, /// return the number of tokens, not counting the EOF, that make up the /// argument. static unsigned getArgLength(const Token *ArgPtr); - + /// getPreExpArgument - Return the pre-expanded form of the specified /// argument. const std::vector<Token> & - getPreExpArgument(unsigned Arg, Preprocessor &PP); - + getPreExpArgument(unsigned Arg, Preprocessor &PP); + /// getStringifiedArgument - Compute, cache, and return the specified argument /// that has been 'stringified' as required by the # operator. const Token &getStringifiedArgument(unsigned ArgNo, Preprocessor &PP); - + /// getNumArguments - Return the number of arguments passed into this macro /// invocation. unsigned getNumArguments() const { return NumUnexpArgTokens; } - - + + /// isVarargsElidedUse - Return true if this is a C99 style varargs macro /// invocation and there was no argument specified for the "..." argument. If /// the argument was specified (even empty) or this isn't a C99 style varargs /// function, or if in strict mode and the C99 varargs macro had only a ... /// argument, this returns false. bool isVarargsElidedUse() const { return VarargsElided; } - + /// StringifyArgument - Implement C99 6.10.3.2p2, converting a sequence of /// tokens into the literal string token that should be produced by the C # /// preprocessor operator. If Charify is true, then it should be turned into |