aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CreateInvocationFromCommandLine.cpp
diff options
context:
space:
mode:
authorSam McCall <sam.mccall@gmail.com>2021-08-07 17:36:26 +0200
committerSam McCall <sam.mccall@gmail.com>2021-08-12 23:49:10 +0200
commitece4e920852185b332c2f7ba027e0c4a2972855a (patch)
tree7218f9b46468b3ffe46d95194c569091461c23d7 /clang/lib/Frontend/CreateInvocationFromCommandLine.cpp
parent3b99acbff2504d9f056c6bb76974286322e60382 (diff)
downloadllvm-ece4e920852185b332c2f7ba027e0c4a2972855a.zip
llvm-ece4e920852185b332c2f7ba027e0c4a2972855a.tar.gz
llvm-ece4e920852185b332c2f7ba027e0c4a2972855a.tar.bz2
[CodeComplete] Basic code completion for attribute names.
Only the bare name is completed, with no args. For args to be useful we need arg names. These *are* in the tablegen but not currently emitted in usable form, so left this as future work. C++11, C2x, GNU, declspec, MS syntax is supported, with the appropriate spellings of attributes suggested. `#pragma clang attribute` is supported but not terribly useful as we only reach completion if parens are balanced (i.e. the line is not truncated) There's no filtering of which attributes might make sense in this grammatical context (e.g. attached to a function). In code-completion context this is hard to do, and will only work in few cases :-( There's also no filtering by langopts: this is because currently the only way of checking is to try to produce diagnostics, which requires a valid ParsedAttr which is hard to get. This should be fairly simple to fix but requires some tablegen changes to expose the logic without the side-effect. Differential Revision: https://reviews.llvm.org/D107696
Diffstat (limited to 'clang/lib/Frontend/CreateInvocationFromCommandLine.cpp')
0 files changed, 0 insertions, 0 deletions