[PATCH] D62953: [Syntax] Do not glue multiple empty PP expansions to a single mapping

Ilya Biryukov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 6 07:23:16 PDT 2019


ilya-biryukov created this revision.
ilya-biryukov added a reviewer: sammccall.
Herald added a project: clang.

This change makes sure we have a single mapping for each macro expansion,
even if the result of expansion was empty.

To achieve that, we take information from PPCallbacks::MacroExpands into
account. Previously we relied only on source locations of expanded tokens.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D62953

Files:
  clang/include/clang/Tooling/Syntax/Tokens.h
  clang/lib/Tooling/Syntax/Tokens.cpp
  clang/unittests/Tooling/Syntax/TokensTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D62953.203355.patch
Type: text/x-patch
Size: 10859 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190606/6a135d8c/attachment-0001.bin>


More information about the cfe-commits mailing list