diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-09-04 03:32:19 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-09-04 03:32:19 +0000 |
commit | 8e85e85b8c3dbbc7e9863fe88f0992d825fd0e32 (patch) | |
tree | 6a9096326c64f46ac25c297b802f9e782a858874 /lib/Lex/MacroArgs.cpp | |
parent | 7d100872341f233c81e1d7b72b40457e62c36862 (diff) |
Handle a code-completion token being passed to the macro stringify operator.
Fixes http://llvm.org/PR10826.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139087 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex/MacroArgs.cpp')
-rw-r--r-- | lib/Lex/MacroArgs.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Lex/MacroArgs.cpp b/lib/Lex/MacroArgs.cpp index ccd0b705c8..42aafd8188 100644 --- a/lib/Lex/MacroArgs.cpp +++ b/lib/Lex/MacroArgs.cpp @@ -221,6 +221,8 @@ Token MacroArgs::StringifyArgument(const Token *ArgToks, std::string Str = Lexer::Stringify(TokStr); Result.append(Str.begin(), Str.end()); } + } else if (Tok.is(tok::code_completion)) { + PP.CodeCompleteNaturalLanguage(); } else { // Otherwise, just append the token. Do some gymnastics to get the token // in place and avoid copies where possible. |