Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/llvm/llvm-project.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-11-04[Test] Fix CHECK typo.Zequan Wu
Differential Revision: https://reviews.llvm.org/D137287
2022-11-02[clangd] Add scoped enum constants to all-scopes-completionTom Praschan
This was originally part of https://reviews.llvm.org/D136925, but we decided to move it to a separate patch. In case it turns out to be controversial, it can be reverted more easily. Differential Revision: https://reviews.llvm.org/D137104
2022-11-02[clangd] Index unscoped enums in class scope for code completionTom Praschan
Fixes https://github.com/clangd/clangd/issues/1082 Differential Revision: https://reviews.llvm.org/D136925
2022-10-31Revert "[clang] ASTImporter: Fix importing of va_list types and declarations"Matheus Izvekov
This reverts commit 5f820c0f55cd9d4f4520cc92eae0a1c4afe05a54. Apparently it breaks aarch64 buildbots. https://lab.llvm.org/buildbot#builders/188/builds/21591
2022-10-31[clang] Instantiate alias templates with sugar Matheus Izvekov
This makes use of the changes introduced in D134604, in order to instantiate alias templates witn a final sugared substitution. This comes at no additional relevant cost. Since we don't track / unique them in specializations, we wouldn't be able to resugar them later anyway. Signed-off-by: Matheus Izvekov <mizvekov@gmail.com> Differential Revision: https://reviews.llvm.org/D136565
2022-10-31[clang] ASTImporter: Fix importing of va_list types and declarationsMatheus Izvekov
This fixes a problem where __va_list_tag was not correctly imported, possibly leading to multiple definitions with different types. This adds __va_list_tag to it's proper scope, so that the ASTImporter can find it. Signed-off-by: Matheus Izvekov <mizvekov@gmail.com> Differential Revision: https://reviews.llvm.org/D136886
2022-10-31[include-cleaner] Add a data-structure to capture IWYU pragmas.Haojian Wu
PragmaIncludes captures the pragma-based header-mapping information, it is used in the "Location => Header" step to determine the final spelling header for a symbol (rather than the header directive). The structure is by design to be used inside the include-cleaner library and clangd. Differential Revision: https://reviews.llvm.org/D136071
2022-10-31[clangd] Run semantic highligting in clangd check.Haojian Wu
Allowing us to test this feature (context: a recent crash in semantic highlighting.) Differential Revision: https://reviews.llvm.org/D137063
2022-10-31[clangd] Populate ranges and symbol origin for paramname completionsKadir Cetinkaya
Differential Revision: https://reviews.llvm.org/D136951
2022-10-31[clangd] Fix a semantic-highlighting crash.Haojian Wu
Differential Revision: https://reviews.llvm.org/D137064
2022-10-30[clang-tools-extra] Use llvm::find (NFC)Kazu Hirata
2022-10-28Revert "[clang] Instantiate NTTPs and template default arguments with sugar"Haojian Wu
This patch reverts - commit d4b1964f0554046b1e64908e5c1cd701b25f4c9e - commit 59f0827e2cf3755834620e7e0b6d946832440f80([clang] Instantiate alias templates with sugar) As it makes clang fail to pass some code it used to compile. See comments: https://reviews.llvm.org/D136564#3891065
2022-10-28[clang-tidy] Skip template ctors in modernize-use-equals-defaultAlexander Shaposhnikov
Skip template ctors in modernize-use-equals-default, such constructors may be enabled/disabled via SFINAE, it is not safe to make them "= default". Test plan: ninja check-all Differential revision: https://reviews.llvm.org/D136797
2022-10-27[clang] Instantiate alias templates with sugar Matheus Izvekov
This makes use of the changes introduced in D134604, in order to instantiate alias templates witn a final sugared substitution. This comes at no additional relevant cost. Since we don't track / unique them in specializations, we wouldn't be able to resugar them later anyway. Signed-off-by: Matheus Izvekov <mizvekov@gmail.com> Differential Revision: https://reviews.llvm.org/D136565
2022-10-26[clangd] Hover: Only drop UsingDecl instead of BaseUsingDeclTom Praschan
Since https://reviews.llvm.org/D135506 it's sufficient to only drop UsingDecl here Differential Revision: https://reviews.llvm.org/D135536
2022-10-26Revert "[clang] Instantiate alias templates with sugar"Matheus Izvekov
This reverts commit 4c44c91ad980304c5cca3792115349e68cfafd2b.
2022-10-26[clang] Instantiate alias templates with sugar Matheus Izvekov
This makes use of the changes introduced in D134604, in order to instantiate alias templates witn a final sugared substitution. This comes at no additional relevant cost. Since we don't track / unique them in specializations, we wouldn't be able to resugar them later anyway. Signed-off-by: Matheus Izvekov <mizvekov@gmail.com> Differential Revision: https://reviews.llvm.org/D136565
2022-10-26[include-cleaner] Fix header guard. NFCSam McCall
2022-10-25[clang-doc] Fix typedef/using output.Brett Wilson
Provides an initializer for the TypedefInfo.IsUsing member. Previously this member was uninitialized and would produce random output. Adds the Description (code comments) to the bitcode reader/writer. Previously the typedef/using descriptions were lost during the bitcode round-trip. Adds a test for this. Differential Revision: https://reviews.llvm.org/D136638
2022-10-25[include-cleaner] Move vocabulary types into separate header for layering. NFCSam McCall
2022-10-25[IncludeCleaner] Handle more C++ constructsKadir Cetinkaya
Summary: This brings IncludeCleaner's reference discovery from AST to the parity with current implementation in clangd. Some highlights: - Handling of MemberExprs, only the member declaration is marked as referenced and not the container, unlike clangd. - Constructor calls, only the constructor and not the container, unlike clangd. - All the possible candidates for unresolved overloads, same as clangd. - All the shadow decls for using-decls, same as clangd. - Declarations for definitions of enums with an underlying type and functions, same as clangd. - Using typelocs, using templatenames and typedefs only reference the found decl, same as clangd. - Template specializations only reference the primary template, not the explicit specializations, to be fixed. - Expr types aren't marked as used, unlike clangd. Going forward, we can consider having signals to indicate type of a reference (e.g. `implicit` signal for type of an expr) so that the applications can perform a filtering based on their needs. At the moment the biggest discrepancy is around type of exprs, i.e. not marking containers for member/constructor accesses. I believe this is the right model since the declaration of the member and the container should be available in a single file (modulo macros). Reviewers: sammccall Subscribers: Differential Revision: https://reviews.llvm.org/D132110
2022-10-25NFC: [clang] Template argument cleanups.Matheus Izvekov
Removes a bunch of obsolete methods in favor of a single one returning an ArrayRef of TemplateArgument. Signed-off-by: Matheus Izvekov <mizvekov@gmail.com> Differential Revision: https://reviews.llvm.org/D136602
2022-10-24[IncludeCleaner] Add public APIKadir Cetinkaya
Introduces walkUsed, a very simple version of the public API to enable incremental development on rest of the pieces. Differential Revision: https://reviews.llvm.org/D136293
2022-10-22Ensure newlines at the end of files (NFC)Kazu Hirata
2022-10-22[clangd] Make file limit for textDocument/rename configurableChristian Kandeler
Without this, clients are unable to rename often-used symbols in larger projects. Reviewed By: kadircet Differential Revision: https://reviews.llvm.org/D136454
2022-10-22[clang-tidy] Avoid adding unnecessary semicolon in modernize-use-equals-defaultAlexander Shaposhnikov
Adjust the automatic fixit to avoid adding superfluous semicolon. Test plan: ninja check-all Differential revision: https://reviews.llvm.org/D136399
2022-10-21[clangd] Add highlighting modifier "constructorOrDestructor"Christian Kandeler
This is useful for clients that want to highlight constructors and destructors different from classes, e.g. like functions. Reviewed By: sammccall Differential Revision: https://reviews.llvm.org/D134728
2022-10-21Update links to googletest documentationSylvestre Ledru
Update links to googletest documentation No automatic tests, but local manual test: i click it, it opens the googletest documentation. Reviewed By: sylvestre.ledru Differential Revision: https://reviews.llvm.org/D136424
2022-10-21[clang-tidy] Skip private default ctors in modernize-use-equals-defaultAlexander Shaposhnikov
For c++17 (i.e. before c++20) making a private default ctor explicitly defaulted might expose the previously intentionally disallowed initializations, e.g. class Tag { Tag() {} friend class Widget; }; is not equivalent to class Tag { Tag() = default; friend class Widget; }; since in the latter case Tag is treated as an aggregate despite having a declaration of the default constructor. This diff makes modernize-use-equals-default skip in-class empty nonpublic default ctors to avoid code breakages. Test plan: ninja check-all Differential revision: https://reviews.llvm.org/D136224
2022-10-19[clangd] consider ~^foo() to target the destructor, not the typeSam McCall
This behavior was once deliberate, but i've yet to find someone who likes it. The reference behavior is unchanged: the `foo` within ~foo is still considered a reference to the type. This means rename etc still works. fixes https://github.com/clangd/clangd/issues/179 Differential Revision: https://reviews.llvm.org/D136212
2022-10-19[include-cleaner] Fix link errors when -DBUILD_SHARED_LIBS=ONKai Luo
Fixed ppc buildbot https://lab.llvm.org/buildbot/#/builders/121/builds/24273 which is using `-DBUILD_SHARED_LIBS=ON`. Reviewed By: sammccall Differential Revision: https://reviews.llvm.org/D136229
2022-10-19[include-cleaner] Add line numbers to HTML outputSam McCall
2022-10-18[include-cleaner] Add include-cleaner tool, with initial HTML reportSam McCall
The immediate goal is to start producing an HTML report to debug and explain include-cleaner recommendations. For now, this includes only the lowest-level piece: a list of the references found in the source code. How this fits into future ideas: - under refs we can also show the headers providing the symbol, which includes match those headers etc - we can also annotate the #include lines with which symbols they cover, and add whichever includes we're suggesting too - the include-cleaner tool will likely have modes where it emits diagnostics and/or applies edits, so the HTML report is behind a flag Differential Revision: https://reviews.llvm.org/D135956
2022-10-18[clangd] Update 'using enum' semantic highlighting testcase to use the ↵Nathan Ridge
'definition' modifier
2022-10-18[clangd] Update testcase for issue 1222 to use the 'definition' modifierNathan Ridge
2022-10-18[clangd] Implement semantic token modifier "definition"Christian Kandeler
Reviewed By: sammccall Differential Revision: https://reviews.llvm.org/D127403
2022-10-16[clangd] Use std::decay_t (NFC)Kazu Hirata
2022-10-15[clang] Track the templated entity in type substitution.Matheus Izvekov
This is a change to how we represent type subsitution in the AST. Instead of only storing the replaced type, we track the templated entity we are substituting, plus an index. We modify MLTAL to track the templated entity at each level. Otherwise, it's much more expensive to go from the template parameter back to the templated entity, and not possible to do in some cases, as when we instantiate outer templates, parameters might still reference the original entity. This also allows us to very cheaply lookup the templated entity we saw in the naming context and find the corresponding argument it was replaced from, such as for implementing template specialization resugaring. Signed-off-by: Matheus Izvekov <mizvekov@gmail.com> Differential Revision: https://reviews.llvm.org/D131858
2022-10-15[clang-doc] Add typedef/using information.Brett Wilson
Read typedef and "using" type alias declarations and serialize into the internal structures. Emit this information in the YAML output. The HTML and MD generators are unchanged. Separate out the logic to create the parent namespace or record object and insert the newly created child into it. This logic was previously duplicated for every "info" type and is now shared. To help this, a struct containing the child vectors was separated out so children can be added generically and without having too many templates. A small change was made to populateParentNamespaces() to allow using types that aren't themselves DeclContexts (typedefs are the first example of this). Differential Revision: https://reviews.llvm.org/D134371
2022-10-14[clang-tidy] Use std::underlying_type_t (NFC)Kazu Hirata
2022-10-14Properly print unnamed TagDecl objects in diagnosticsAaron Ballman
The diagnostics engine is very smart about being passed a NamedDecl to print as part of a diagnostic; it gets the "right" form of the name, quotes it properly, etc. However, the result of using an unnamed tag declaration was to print '' instead of anything useful. This patch causes us to print the same information we'd have gotten if we had printed the type of the declaration rather than the name of it, as that's the most relevant information we can display. Differential Revision: https://reviews.llvm.org/D134813
2022-10-13[clangd] Add missing readonly modifier for const generic parametersTom Praschan
Fixes https://github.com/clangd/clangd/issues/1222. As discussed there, we saw no reason to keep this check. Differential Revision: https://reviews.llvm.org/D135892
2022-10-13[pseudo] Document disambiguation design progressSam McCall
Need to take a break from this, so write down where we got to. Differential Revision: https://reviews.llvm.org/D135696
2022-10-13[clangd] Block clang-tidy misc-const-correctness checkSam McCall
This check performs an extremely large amount of work (for each variable, it runs very many full matcher-driven traversals of the whole scope the variable is defined in). When (inadvertently) enabled for Fuchsia, it regressed BuildAST times by >10x (400ms -> 7s on my machine). Differential Revision: https://reviews.llvm.org/D135829
2022-10-13[clangd] Fix a crash in ExtractFunction tweak.Haojian Wu
Differential Revision: https://reviews.llvm.org/D135857
2022-10-13[CMake] Fix FindGRPC cmake module to allow different layeringSteven Wu
Take the library target out of `generate_protos` function so the caller can decide where to layer the library using the source generated from the function. Fixes: https://github.com/llvm/llvm-project/issues/58075 Reviewed By: sammccall Differential Revision: https://reviews.llvm.org/D135712
2022-10-12[AST] Preserve more structure in UsingEnumDecl node.Sam McCall
- store NestedNameSpecifier & Loc for the qualifiers This information was entirely missing from the AST. - expose the location information for qualifier/identifier/typedefs as typeloc This allows many traversals/astmatchers etc to handle these generically along with other references. The decl vs type split can help preserve typedef sugar when https://github.com/llvm/llvm-project/issues/57659 is resolved. - fix the SourceRange of UsingEnumDecl to include 'using'. Fixes https://github.com/clangd/clangd/issues/1283 Differential Revision: https://reviews.llvm.org/D134303
2022-10-12[clang-tidy] Dump effective diagnostics level in YAML outputDmitry Polukhin
Before this patch YAML output had default diagnostic level instead of effective level reported to the user on stdout. Wrapper scripts for clang-tidy usually use YAML output and they pick wrong diagnostics level without this patch. Test Plan: check-clang-tools Differential Revision: https://reviews.llvm.org/D135367
2022-10-10Fix clang-tools-extra Sphinx buildAaron Ballman
This should address the issues found in: https://lab.llvm.org/buildbot/#/builders/115/builds/35504
2022-10-10[clang-tidy] Add cppcoreguidelines-avoid-do-while checkCarlos Galvez
Implements rule ES.75 of C++ Core Guidelines. Differential Revision: https://reviews.llvm.org/D132461