Page MenuHomePhabricator

Fix isInSystemMacro to handle pasted token
Needs ReviewPublic

Authored by serge-sans-paille on Dec 17 2018, 12:00 PM.

Details

Summary

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 is not enough.

This effectively fixes https://bugs.llvm.org/show_bug.cgi?id=35268, but I'm not quite sure about the kind of test case I should add with this patch?

Diff Detail

Repository
rC Clang

Event Timeline

serge-sans-paille retitled this revision from Fix isInSystemMacro to handle pasted toekn to Fix isInSystemMacro to handle pasted token.Dec 17 2018, 12:15 PM

Test case added