HomePhabricator

Fix isInSystemMacro to handle pasted macros

Authored by serge-sans-paille on Jan 31 2019, 10:11 PM.

Description

Fix isInSystemMacro to handle pasted macros

Token pasted by the preprocessor (through ##) have a Spelling pointing to scratch buffer.
As a result they are not recognized at system macro, even though the pasting happened in
a system macro. Fix that by looking into the parent macro if the original lookup finds a
scratch buffer.

Differential Revision: https://reviews.llvm.org/D55782

This effectively fixes https://bugs.llvm.org/show_bug.cgi?id=35268,

llvm-svn: 352838

Details

Committed
serge-sans-pailleJan 31 2019, 10:11 PM
Differential Revision
D55782: Fix isInSystemMacro to handle pasted token
Parents
rG8a32f3b7a0f6: [clangd] Fix crash in applyTweak, remove TweakID alias.
Branches
Unknown
Tags
Unknown