Revision tags: llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3, llvmorg-18.1.2, llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init, llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4, llvmorg-17.0.3, llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init, llvmorg-16.0.6, llvmorg-16.0.5, llvmorg-16.0.4, llvmorg-16.0.3, llvmorg-16.0.2, llvmorg-16.0.1, llvmorg-16.0.0, llvmorg-16.0.0-rc4, llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7 |
|
#
cf9b25e0 |
| 16-Dec-2022 |
Sam McCall <sam.mccall@gmail.com> |
[lit] Script to automate use of %(line-n). Use in CodeComplete tests.
Tests where the RUN-lines/CHECK-ed output refer to line numbers in the test file are a maintenance burden, as inserting text in
[lit] Script to automate use of %(line-n). Use in CodeComplete tests.
Tests where the RUN-lines/CHECK-ed output refer to line numbers in the test file are a maintenance burden, as inserting text in the appropriate place invalidates all the subsequent line numbers.
Lit supports %(line+n) for this, and FileCheck supports [[@LINE+N]]. But many existing tests don't make use of it and still need to be modified.
This commit adds a script that can find line numbers in tests according to a regex and replace them with the appropriate relative-line reference. It contains some options to avoid inappropriately rewriting tests where absolute numbers are appropriate: a "nearby" threshold and a refusal by default to replace only some matched line numbers.
I've applied it to CodeComplete tests, this proves the concept but also are the single worst group of tests I've seen in this respect. These changes are likely to hit merge conflicts, but can be regenerated with:
``` find ../clang/test/CodeCompletion/ -type f | grep -v /Inputs/ | xargs ../llvm/utils/relative_lines.py --verbose --near=20 --pattern='-code-completion-at[ =]%s:(\\d+):' --pattern='requires fix-it: {(\d+):\d+-(\d+):\d+}' ````
As requested in https://reviews.llvm.org/D140044
Fixes https://github.com/llvm/llvm-project/issues/59553
Differential Revision: https://reviews.llvm.org/D140217
show more ...
|
Revision tags: llvmorg-15.0.6, llvmorg-15.0.5, llvmorg-15.0.4, llvmorg-15.0.3, working, llvmorg-15.0.2, llvmorg-15.0.1 |
|
#
3d208068 |
| 14-Sep-2022 |
Nathan Sidwell <nathan@acm.org> |
[clang][DR2621] using enum NAME lookup fix
Although using-enum's grammar is 'using elaborated-enum-specifier', the lookup for the enum is ordinary lookup (and not the tagged-type lookup that normall
[clang][DR2621] using enum NAME lookup fix
Although using-enum's grammar is 'using elaborated-enum-specifier', the lookup for the enum is ordinary lookup (and not the tagged-type lookup that normally occurs wth an tagged-type specifier). Thus (a) we can find typedefs and (b) do not find enum tags hidden by a non-tag name (the struct stat thing).
This reimplements that part of using-enum handling, to address DR2621, where clang's behaviour does not match std intent (and other compilers).
Reviewed By: aaron.ballman
Differential Revision: https://reviews.llvm.org/D134283
show more ...
|
#
30b676ac |
| 19-Sep-2022 |
Sam McCall <sam.mccall@gmail.com> |
Don't crash when code completing `using enum ^Foo`.
Fixes https://github.com/clangd/clangd/issues/1281
Differential Revision: https://reviews.llvm.org/D134243
|