#
ae45d0a4 |
| 02-Oct-2018 |
Kadir Cetinkaya <kadircet@google.com> |
[clang] Implement Override Suggestions in Sema.
Summary: In clangd we had a new type of completion suggestions for cpp class/struct/unions that will show override signatures for virtual methods in b
[clang] Implement Override Suggestions in Sema.
Summary: In clangd we had a new type of completion suggestions for cpp class/struct/unions that will show override signatures for virtual methods in base classes. This patch implements it in sema because it is hard to deduce more info about completion token outside of Sema and handle itchy cases.
See the patch D50898 for more info on the functionality.
In addition to above patch this one also converts the suggestion into a CK_Pattern with whole insertion text as the name of the suggestion and factors out CodeCompletionString generation for declerations so that it can be re-used by others.
Reviewers: ioeric, ilya-biryukov
Reviewed By: ioeric
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D52225
llvm-svn: 343568
show more ...
|
#
3e4f5eb3 |
| 01-Oct-2018 |
Sam McCall <sam.mccall@gmail.com> |
[CodeComplete] #include completion treats -I as non-system (require header-like extension).
llvm-svn: 343457
|
#
88de9f65 |
| 19-Sep-2018 |
Eric Liu <ioeric@google.com> |
[Sema] Do not load macros from preamble when LoadExternal is false.
Reviewers: ilya-biryukov
Reviewed By: ilya-biryukov
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D5
[Sema] Do not load macros from preamble when LoadExternal is false.
Reviewers: ilya-biryukov
Reviewed By: ilya-biryukov
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D52079
llvm-svn: 342528
show more ...
|
#
3d8051ab |
| 18-Sep-2018 |
Sam McCall <sam.mccall@gmail.com> |
[CodeComplete] Add completions for filenames in #include directives.
Summary: The dir component ("somedir" in #include <somedir/fo...>) is considered fixed. We append "foo" to each directory on the
[CodeComplete] Add completions for filenames in #include directives.
Summary: The dir component ("somedir" in #include <somedir/fo...>) is considered fixed. We append "foo" to each directory on the include path, and then list its files.
Completions are of the forms: #include <somedir/fo^ foo.h> fox/
The filter is set to the filename part ("fo"), so fuzzy matching can be applied to the filename only.
No fancy scoring/priorities are set, and no information is added to CodeCompleteResult to make smart scoring possible. Could be in future.
Reviewers: ilya-biryukov
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D52076
llvm-svn: 342449
show more ...
|
Revision tags: llvmorg-7.0.0 |
|
#
84774c3a |
| 11-Sep-2018 |
Kadir Cetinkaya <kadircet@google.com> |
[CodeCompletion] Enable signature help when initializing class/struct/union members.
Summary: Factors out member decleration gathering and uses it in parsing to call signature help. Doesn't support
[CodeCompletion] Enable signature help when initializing class/struct/union members.
Summary: Factors out member decleration gathering and uses it in parsing to call signature help. Doesn't support signature help for base class constructors, the code was too coupled with diagnostic handling, but still can be factored out but just needs more afford.
Reviewers: sammccall, ilya-biryukov, ioeric
Reviewed By: ilya-biryukov
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D51917
llvm-svn: 341949
show more ...
|
Revision tags: llvmorg-7.0.0-rc3 |
|
#
832c4afe |
| 07-Sep-2018 |
Ilya Biryukov <ibiryukov@google.com> |
[CodeComplete] Clearly distinguish signature help and code completion.
Summary: Code completion in clang is actually a mix of two features: - Code completion is a familiar feature. Results are expos
[CodeComplete] Clearly distinguish signature help and code completion.
Summary: Code completion in clang is actually a mix of two features: - Code completion is a familiar feature. Results are exposed via the CodeCompleteConsumer::ProcessCodeCompleteResults callback. - Signature help figures out if the current expression is an argument of some function call and shows corresponding signatures if so. Results are exposed via CodeCompleteConsumer::ProcessOverloadCandidates.
This patch refactors the implementation to untangle those two from each other and makes some naming tweaks to avoid confusion when reading the code.
The refactoring is required for signature help fixes, see D51038.
The only intended behavior change is the order of callbacks. ProcessOverloadCandidates is now called before ProcessCodeCompleteResults.
Reviewers: sammccall, kadircet
Reviewed By: sammccall
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D51782
llvm-svn: 341660
show more ...
|
#
d485df17 |
| 05-Sep-2018 |
Eric Liu <ioeric@google.com> |
[Sema] Store MacroInfo in CodeCompletionResult for macro results.
Summary: This provides information about the macro definition. For example, it can be used to compute macro USRs.
Reviewers: sammcc
[Sema] Store MacroInfo in CodeCompletionResult for macro results.
Summary: This provides information about the macro definition. For example, it can be used to compute macro USRs.
Reviewers: sammccall
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D51675
llvm-svn: 341476
show more ...
|
#
2fab2353 |
| 30-Aug-2018 |
Ilya Biryukov <ibiryukov@google.com> |
[CodeComplete] Report location of opening parens for signature help
Summary: Used in clangd.
Reviewers: sammccall
Reviewed By: sammccall
Subscribers: ioeric, kadircet, cfe-commits
Differential R
[CodeComplete] Report location of opening parens for signature help
Summary: Used in clangd.
Reviewers: sammccall
Reviewed By: sammccall
Subscribers: ioeric, kadircet, cfe-commits
Differential Revision: https://reviews.llvm.org/D51436
llvm-svn: 341063
show more ...
|
Revision tags: llvmorg-7.0.0-rc2, llvmorg-7.0.0-rc1 |
|
#
55b1b157 |
| 30-Jul-2018 |
Ilya Biryukov <ibiryukov@google.com> |
[CodeComplete] Fix the crash in code completion on access checking
Started crashing in r337453. See the added test case for the crash repro.
The fix reverts part of r337453 that causes the crash an
[CodeComplete] Fix the crash in code completion on access checking
Started crashing in r337453. See the added test case for the crash repro.
The fix reverts part of r337453 that causes the crash and does not actually break anything when reverted.
llvm-svn: 338255
show more ...
|
#
ef6c43dc |
| 26-Jul-2018 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Refactor checking of switch conditions and case values.
Check each case value in turn while parsing it, performing the conversion to the switch type within the context of the expression itself. This
Refactor checking of switch conditions and case values.
Check each case value in turn while parsing it, performing the conversion to the switch type within the context of the expression itself. This will become necessary in order to properly handle cleanups for temporaries created as part of the case label (in an upcoming patch). For now it's just good hygiene.
This necessitates moving the checking for the switch condition itself to earlier, so that the destination type is available when checking the case labels.
As a nice side-effect, we get slightly improved diagnostic quality and error recovery by separating the case expression checking from the case statement checking and from tracking whether there are discarded case labels.
llvm-svn: 338056
show more ...
|
#
18b404a5 |
| 19-Jul-2018 |
Eric Liu <ioeric@google.com> |
[CodeComplete] Fix accessibilty of protected members from base class.
Summary: Currently, protected members from base classes are marked as inaccessible when completing in derived class. This patch
[CodeComplete] Fix accessibilty of protected members from base class.
Summary: Currently, protected members from base classes are marked as inaccessible when completing in derived class. This patch fixes the problem by setting the naming class correctly when looking up results in base class according to [11.2.p5].
Reviewers: aaron.ballman, sammccall, rsmith
Reviewed By: aaron.ballman
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D49421
llvm-svn: 337453
show more ...
|
#
47d7f52d |
| 11-Jul-2018 |
Kirill Bobyrev <omtcyfz@gmail.com> |
[clangd] Uprank delcarations when "using q::name" is present in the main file
Having `using qualified::name;` for some symbol is an important signal for clangd code completion as the user is more li
[clangd] Uprank delcarations when "using q::name" is present in the main file
Having `using qualified::name;` for some symbol is an important signal for clangd code completion as the user is more likely to use such symbol. This patch helps to uprank the relevant symbols by saving UsingShadowDecl in the new field of CodeCompletionResult and checking whether the corresponding UsingShadowDecl is located in the main file later in ClangD code completion routine. While the relative importance of such signal is a subject to change in the future, this patch simply bumps DeclProximity score to the value of 1.0 which should be enough for now.
The patch was tested using
`$ ninja check-clang check-clang-tools`
No unexpected failures were noticed after running the relevant testsets.
Reviewers: sammccall, ioeric
Subscribers: MaskRay, jkorous, cfe-commits
Differential Revision: https://reviews.llvm.org/D49012
llvm-svn: 336810
show more ...
|
#
00f43c95 |
| 06-Jul-2018 |
Eric Liu <ioeric@google.com> |
[SemaCodeComplete] Expose a method to create CodeCompletionString for macros.
Summary: The method only takes PPreprocessor and don't require structures that might not be available (e.g. Sema and AST
[SemaCodeComplete] Expose a method to create CodeCompletionString for macros.
Summary: The method only takes PPreprocessor and don't require structures that might not be available (e.g. Sema and ASTContext) when CodeCompletionString needs to be generated for macros.
Reviewers: sammccall
Reviewed By: sammccall
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D48973
llvm-svn: 336427
show more ...
|
#
7cf29bc0 |
| 05-Jul-2018 |
Kirill Bobyrev <omtcyfz@gmail.com> |
[NFS] Wipe trailing whitespaces
This patch is a preparation for another one containing meaningful changes. This patch simply removes trailing whitespaces in few files affected by the upcoming patch
[NFS] Wipe trailing whitespaces
This patch is a preparation for another one containing meaningful changes. This patch simply removes trailing whitespaces in few files affected by the upcoming patch and reformats
llvm-svn: 336330
show more ...
|
#
f5ba09f7 |
| 04-Jul-2018 |
Eric Liu <ioeric@google.com> |
[SemaCodeComplete] Make sure visited contexts are passed to completion results handler.
Reviewers: ilya-biryukov
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D48917
ll
[SemaCodeComplete] Make sure visited contexts are passed to completion results handler.
Reviewers: ilya-biryukov
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D48917
llvm-svn: 336255
show more ...
|
Revision tags: llvmorg-6.0.1, llvmorg-6.0.1-rc3, llvmorg-6.0.1-rc2 |
|
#
b4670fc7 |
| 25-May-2018 |
Ivan Donchevskii <ivan.donchevskii@qt.io> |
Optionally add code completion results for arrow instead of dot
Currently getting such completions requires source correction, reparsing and calling completion again. And if it shows no results and
Optionally add code completion results for arrow instead of dot
Currently getting such completions requires source correction, reparsing and calling completion again. And if it shows no results and rollback is required then it costs one more reparse.
With this change it's possible to get all results which can be later filtered to split changes which require correction.
Differential Revision: https://reviews.llvm.org/D41537
llvm-svn: 333272
show more ...
|
#
7b301e24 |
| 24-May-2018 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Switch a couple of users of LangOpts::GNUMode to the more appropriate LangOpts::GNUKeywords.
llvm-svn: 333233
|
#
a3f955bd |
| 16-May-2018 |
Ilya Biryukov <ibiryukov@google.com> |
[CodeComplete] Expose helpers to get RawComment of completion result.
Summary: Used in clangd, see D45999.
Reviewers: sammccall, hokein, ioeric, arphaman
Reviewed By: sammccall
Subscribers: arpha
[CodeComplete] Expose helpers to get RawComment of completion result.
Summary: Used in clangd, see D45999.
Reviewers: sammccall, hokein, ioeric, arphaman
Reviewed By: sammccall
Subscribers: arphaman, cfe-commits
Differential Revision: https://reviews.llvm.org/D46001
llvm-svn: 332457
show more ...
|
#
fb9dde70 |
| 14-May-2018 |
Ilya Biryukov <ibiryukov@google.com> |
[CodeComplete] Provide completion in decls even for incomplete types
Summary: This change fixes lack of completions in the following case ('^'designates completion points) :
void f(^); stru
[CodeComplete] Provide completion in decls even for incomplete types
Summary: This change fixes lack of completions in the following case ('^'designates completion points) :
void f(^); struct Incomplete; Incomplete g(^);
Reviewers: bkramer, aaron.ballman, sammccall
Reviewed By: aaron.ballman
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D46639
llvm-svn: 332244
show more ...
|
#
9fc8faf9 |
| 09-May-2018 |
Adrian Prantl <aprantl@apple.com> |
Remove \brief commands from doxygen comments.
This is similar to the LLVM change https://reviews.llvm.org/D46290.
We've been running doxygen with the autobrief option for a couple of years now. Thi
Remove \brief commands from doxygen comments.
This is similar to the LLVM change https://reviews.llvm.org/D46290.
We've been running doxygen with the autobrief option for a couple of years now. This makes the \brief markers into our comments redundant. Since they are a visual distraction and we don't want to encourage more \brief markers in new code either, this patch removes them all.
Patch produced by
for i in $(git grep -l '\@brief'); do perl -pi -e 's/\@brief //g' $i & done for i in $(git grep -l '\\brief'); do perl -pi -e 's/\\brief //g' $i & done
Differential Revision: https://reviews.llvm.org/D46320
llvm-svn: 331834
show more ...
|
Revision tags: llvmorg-6.0.1-rc1 |
|
#
2a8c18d9 |
| 06-Apr-2018 |
Alexander Kornienko <alexfh@google.com> |
Fix typos in clang
Found via codespell -q 3 -I ../clang-whitelist.txt Where whitelist consists of:
archtype cas classs checkk compres definit frome iff inteval ith lod metho
Fix typos in clang
Found via codespell -q 3 -I ../clang-whitelist.txt Where whitelist consists of:
archtype cas classs checkk compres definit frome iff inteval ith lod methode nd optin ot pres statics te thru
Patch by luzpaz! (This is a subset of D44188 that applies cleanly with a few files that have dubious fixes reverted.)
Differential revision: https://reviews.llvm.org/D44188
llvm-svn: 329399
show more ...
|
Revision tags: llvmorg-5.0.2, llvmorg-5.0.2-rc2, llvmorg-5.0.2-rc1, llvmorg-6.0.0 |
|
#
00f70bd9 |
| 01-Mar-2018 |
George Burgess IV <george.burgess.iv@gmail.com> |
Remove redundant casts. NFC
So I wrote a clang-tidy check to lint out redundant `isa`, `cast`, and `dyn_cast`s for fun. This is a portion of what it found for clang; I plan to do similar cleanups in
Remove redundant casts. NFC
So I wrote a clang-tidy check to lint out redundant `isa`, `cast`, and `dyn_cast`s for fun. This is a portion of what it found for clang; I plan to do similar cleanups in LLVM and other subprojects when I find time.
Because of the volume of changes, I explicitly avoided making any change that wasn't highly local and obviously correct to me (e.g. we still have a number of foo(cast<Bar>(baz)) that I didn't touch, since overloading is a thing and the cast<Bar> did actually change the type -- just up the class hierarchy).
I also tried to leave the types we were cast<>ing to somewhere nearby, in cases where it wasn't locally obvious what we were dealing with before.
llvm-svn: 326416
show more ...
|
Revision tags: llvmorg-6.0.0-rc3, llvmorg-6.0.0-rc2 |
|
#
63c59720 |
| 22-Jan-2018 |
Sam McCall <sam.mccall@gmail.com> |
[CodeComplete] Omit templated constructors from member list too.
Also avoid printing a 'void' return type for constructor expressions.
llvm-svn: 323148
|
Revision tags: llvmorg-6.0.0-rc1 |
|
#
10d95c53 |
| 17-Jan-2018 |
Haojian Wu <hokein@google.com> |
[Sema] Add visited contexts to CodeCompleteContext
Summary: This would allow code completion clients to know which context is visited during Sema code completion.
Also some changes: * add `Entered
[Sema] Add visited contexts to CodeCompleteContext
Summary: This would allow code completion clients to know which context is visited during Sema code completion.
Also some changes: * add `EnteredContext` callback in VisibleDeclConsumer. * add a simple unittest for sema code completion (only for visited contexts at the moment).
Reviewers: ilya-biryukov
Reviewed By: ilya-biryukov
Subscribers: mgorny, bkramer, cfe-commits
Differential Revision: https://reviews.llvm.org/D42071
llvm-svn: 322661
show more ...
|
#
bb2cf63b |
| 12-Jan-2018 |
Sam McCall <sam.mccall@gmail.com> |
[CodeComplete] Add an option to omit results from the preamble.
Summary: Enumerating the contents of a namespace or global scope will omit any decls that aren't already loaded, instead of deserializ
[CodeComplete] Add an option to omit results from the preamble.
Summary: Enumerating the contents of a namespace or global scope will omit any decls that aren't already loaded, instead of deserializing them from the PCH.
This allows a fast hybrid code completion where symbols from headers are provided by an external index. (Sema already exposes the information needed to do a reasonabl job of filtering them). Clangd plans to implement this hybrid.
This option is just a hint - callers still need to postfilter results if they want to *avoid* completing decls outside the main file.
Reviewers: bkramer, ilya-biryukov
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D41989
llvm-svn: 322371
show more ...
|