[PATCH] D64562: [clangd] Fixed toHalfOpenFileRange

Shaurya Gupta via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 11 05:57:58 PDT 2019


SureYeaah created this revision.
SureYeaah added reviewers: sammccall, kadircet.
Herald added subscribers: cfe-commits, arphaman, jkorous, MaskRay, ilya-biryukov.
Herald added a project: clang.

- Fixed toHalfOpenFileRange to work for macros as well as template

instantiations

- Added unit tests

Breaking test case for older version of toHalfOpenFileRange:
\# define FOO(X) X++
int a = 1;
int b = FOO(a);
toHalfOpenFileRange for the sourceRange of VarDecl for b returned the
wrong Range.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D64562

Files:
  clang-tools-extra/clangd/SourceCode.cpp
  clang-tools-extra/clangd/SourceCode.h
  clang-tools-extra/clangd/unittests/SourceCodeTests.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D64562.209190.patch
Type: text/x-patch
Size: 8246 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190711/d999e956/attachment-0001.bin>


More information about the cfe-commits mailing list