Preprocessor: Recover instead of mutating a token in ExpandBuiltinMacro
authorDavid Majnemer <david.majnemer@gmail.com>
Mon, 15 Dec 2014 09:03:58 +0000 (09:03 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Mon, 15 Dec 2014 09:03:58 +0000 (09:03 +0000)
commitd616362fe3dc7074945fd476ba8c43fa82524f87
tree04bf19d9d90684a793c904c010eaf5c9fc310ff5
parent418ad3ff107dfde7f6d7c3e87f810fbbb8515ed4
Preprocessor: Recover instead of mutating a token in ExpandBuiltinMacro

We would CreateString on arbitrary garbage instead of just skipping to
the end of the builtin macro.  Eventually, this would cause us to crash
because we would end up replacing the contents of a character token with
a numeric literal.

This fixes PR21825.

llvm-svn: 224238
clang/lib/Lex/PPMacroExpansion.cpp
clang/test/Preprocessor/feature_tests.c