Plug a memory leak in the "this macro expands into a single trivially-

expanded token" case.

llvm-svn: 48637
This commit is contained in:
Sam Bishop 2008-03-21 07:13:02 +00:00
parent 558447416d
commit 27654983dc
1 changed files with 4 additions and 1 deletions

View File

@ -221,7 +221,10 @@ bool Preprocessor::HandleMacroExpandedIdentifier(Token &Identifier,
// Otherwise, if this macro expands into a single trivially-expanded
// token: expand it now. This handles common cases like
// "#define VAL 42".
// No need for arg info.
if (Args) Args->destroy();
// Propagate the isAtStartOfLine/hasLeadingSpace markers of the macro
// identifier to the expanded token.
bool isAtStartOfLine = Identifier.isAtStartOfLine();