[PATCH] D38643: PR13575: Fix USR mangling for fixed-size arrays.

2017-10-09 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL315236: PR13575: Fix USR mangling for fixed-size arrays (authored by jkorous). Changed prior to commit: https://reviews.llvm.org/D38643?vs=118247&id=118257#toc Repository: rL LLVM https://reviews.ll

[PATCH] D38643: PR13575: Fix USR mangling for fixed-size arrays.

2017-10-09 Thread Jan Korous via Phabricator via cfe-commits
jkorous-apple updated this revision to Diff 118247. jkorous-apple added a comment. Single char constants don't need to be c-strings. https://reviews.llvm.org/D38643 Files: lib/Index/USRGeneration.cpp test/Index/USR/array-type.cpp Index: test/Index/USR/array-type.cpp ==

[PATCH] D38643: PR13575: Fix USR mangling for fixed-size arrays.

2017-10-09 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: lib/Index/USRGeneration.cpp:820 +if (const auto *const AT = dyn_cast(T)) { + Out << "{"; + switch (AT->getSizeModifier()) { You might also want to use the character literals for one char strings for effic

[PATCH] D38643: PR13575: Fix USR mangling for fixed-size arrays.

2017-10-09 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman accepted this revision. arphaman added a comment. This revision is now accepted and ready to land. LGTM Comment at: lib/Index/USRGeneration.cpp:819 } +if (const auto *const AT = dyn_cast(T)) { + Out << "{"; Nit: I don't think you really n

[PATCH] D38643: PR13575: Fix USR mangling for fixed-size arrays.

2017-10-09 Thread Jan Korous via Phabricator via cfe-commits
jkorous-apple updated this revision to Diff 118231. jkorous-apple added a comment. clang-format https://reviews.llvm.org/D38643 Files: lib/Index/USRGeneration.cpp test/Index/USR/array-type.cpp Index: test/Index/USR/array-type.cpp ===

[PATCH] D38643: PR13575: Fix USR mangling for fixed-size arrays.

2017-10-06 Thread Jan Korous via Phabricator via cfe-commits
jkorous-apple updated this revision to Diff 118115. jkorous-apple added a comment. Solved issues from CR. https://reviews.llvm.org/D38643 Files: lib/Index/USRGeneration.cpp test/Index/USR/array-type.cpp Index: test/Index/USR/array-type.cpp =

[PATCH] D38643: PR13575: Fix USR mangling for fixed-size arrays.

2017-10-06 Thread Jan Korous via Phabricator via cfe-commits
jkorous-apple added a comment. Replied and going to delete the end delimiter. Comment at: lib/Index/USRGeneration.cpp:819 } +if (const ArrayType *const AT = dyn_cast(T)) { + Out << "{"; arphaman wrote: > You can use `const auto *` here. That's wha

[PATCH] D38643: PR13575: Fix USR mangling for fixed-size arrays.

2017-10-06 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. Thanks, it looks much better! A couple more comments: Comment at: lib/Index/USRGeneration.cpp:819 } +if (const ArrayType *const AT = dyn_cast(T)) { + Out << "{"; You can use `const auto *` here. Comment

[PATCH] D38643: PR13575: Fix USR mangling for fixed-size arrays.

2017-10-06 Thread Jan Korous via Phabricator via cfe-commits
jkorous-apple updated this revision to Diff 118104. jkorous-apple added a comment. Ammenended as suggested. https://reviews.llvm.org/D38643 Files: lib/Index/USRGeneration.cpp test/Index/USR/array-type.cpp Index: test/Index/USR/array-type.cpp ===

[PATCH] D38643: PR13575: Fix USR mangling for fixed-size arrays.

2017-10-06 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: lib/Index/USRGeneration.cpp:820 +if (const ArrayType *const AT = dyn_cast(T)) { + VisitType(AT->getElementType()); + Out << "["; We should probably follow the other types and just set `T = AT->getElementT

[PATCH] D38643: PR13575: Fix USR mangling for fixed-size arrays.

2017-10-06 Thread Jan Korous via Phabricator via cfe-commits
jkorous-apple updated this revision to Diff 118066. jkorous-apple added a comment. Uploaded full diff. https://reviews.llvm.org/D38643 Files: lib/Index/USRGeneration.cpp test/Index/USR/array-type.cpp Index: test/Index/USR/array-type.cpp

[PATCH] D38643: PR13575: Fix USR mangling for fixed-size arrays.

2017-10-06 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. Thanks for working on this! Could you please post the patch with full context (`git diff -U99`)? Comment at: test/Index/USR/array-type.cpp:1 +// RUN: c-index-test core -print-source-symbols -- %s | grep "function(Gen,TS)/C++" | grep foo | cut -s -

[PATCH] D38643: PR13575: Fix USR mangling for fixed-size arrays.

2017-10-06 Thread Jan Korous via Phabricator via cfe-commits
jkorous-apple created this revision. Added array type mangling to USR generation. Included test from bug report. Repository: rL LLVM https://reviews.llvm.org/D38643 Files: lib/Index/USRGeneration.cpp test/Index/USR/array-type.cpp Index: test/Index/USR/array-type.cpp ===