[PATCH] D62954: [Syntax] Add a helper to find expansion by its first spelled token

2019-06-18 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL363698: [Syntax] Add a helper to find expansion by its first spelled token (authored by ibiryukov, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to c

[PATCH] D62954: [Syntax] Add a helper to find expansion by its first spelled token

2019-06-18 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 205374. ilya-biryukov marked an inline comment as done. ilya-biryukov added a comment. - Added a message to the assertion Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62954/new/ https://reviews.llvm.org/

[PATCH] D62954: [Syntax] Add a helper to find expansion by its first spelled token

2019-06-18 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added inline comments. This revision is now accepted and ready to land. Comment at: clang/lib/Tooling/Syntax/Tokens.cpp:207 + auto FileIt = Files.find(SourceMgr->getFileID(Spelled->location())); + assert(FileIt != Files.end()); +

[PATCH] D62954: [Syntax] Add a helper to find expansion by its first spelled token

2019-06-18 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clang/include/clang/Tooling/Syntax/Tokens.h:209 + ///#define FOO 1 2 3 // Expansion from "#define FOO 1" to an empty range. + ///FOO // Expansion from "FOO" to "1 2 3". + struct Expansion {

[PATCH] D62954: [Syntax] Add a helper to find expansion by its first spelled token

2019-06-18 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 205352. ilya-biryukov marked 7 inline comments as done. ilya-biryukov added a comment. - Address comments. - s/findExpansion/expansionStartingAt. - Add tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D

[PATCH] D62954: [Syntax] Add a helper to find expansion by its first spelled token

2019-06-18 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. LG but needs tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62954/new/ https://reviews.llvm.org/D62954 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://li

[PATCH] D62954: [Syntax] Add a helper to find expansion by its first spelled token

2019-06-18 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clang/include/clang/Tooling/Syntax/Tokens.h:204 + /// An expansion produced by the preprocessor, includes macro expansions and + /// macro directives. Preprocessor always maps a non-empty range of spelled + /// tokens to a (possibly

[PATCH] D62954: [Syntax] Add a helper to find expansion by its first spelled token

2019-06-06 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov created this revision. ilya-biryukov added a reviewer: sammccall. Herald added a subscriber: kadircet. Herald added a project: clang. Used in clangd for a code tweak that expands a macro. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D62954 Files: clang/include