Revision tags: llvmorg-21-init, llvmorg-19.1.7, llvmorg-19.1.6, llvmorg-19.1.5, llvmorg-19.1.4, llvmorg-19.1.3, llvmorg-19.1.2, llvmorg-19.1.1, llvmorg-19.1.0, llvmorg-19.1.0-rc4, llvmorg-19.1.0-rc3, llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1 |
|
#
ef7d46c7 |
| 23-Jul-2024 |
Braden Helmer <bradenhelmeraus@gmail.com> |
Template Diagnostic Improvements (#99933)
It turns out `SemaTemplate` handles this type of diagnostic already,
however when template gets encountered, it never gets parsed as a
possible statement
Template Diagnostic Improvements (#99933)
It turns out `SemaTemplate` handles this type of diagnostic already,
however when template gets encountered, it never gets parsed as a
possible statement or declaration, only as an expression.
Fixes #17959.
show more ...
|
Revision tags: llvmorg-20-init, 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 |
|
#
0f1c1be1 |
| 28-Aug-2023 |
Aaron Ballman <aaron@aaronballman.com> |
[clang] Remove rdar links; NFC
We have a new policy in place making links to private resources something we try to avoid in source and test files. Normally, we'd organically switch to the new policy
[clang] Remove rdar links; NFC
We have a new policy in place making links to private resources something we try to avoid in source and test files. Normally, we'd organically switch to the new policy rather than make a sweeping change across a project. However, Clang is in a somewhat special circumstance currently: recently, I've had several new contributors run into rdar links around test code which their patch was changing the behavior of. This turns out to be a surprisingly bad experience, especially for newer folks, for a handful of reasons: not understanding what the link is and feeling intimidated by it, wondering whether their changes are actually breaking something important to a downstream in some way, having to hunt down strangers not involved with the patch to impose on them for help, accidental pressure from asking for potentially private IP to be made public, etc. Because folks run into these links entirely by chance (through fixing bugs or working on new features), there's not really a set of problematic links to focus on -- all of the links have basically the same potential for causing these problems. As a result, this is an omnibus patch to remove all such links.
This was not a mechanical change; it was done by manually searching for rdar, radar, radr, and other variants to find all the various problematic links. From there, I tried to retain or reword the surrounding comments so that we would lose as little context as possible. However, because most links were just a plain link with no supporting context, the majority of the changes are simple removals.
Differential Review: https://reviews.llvm.org/D158071
show more ...
|
Revision tags: llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init |
|
#
e0ac46e6 |
| 17-Jul-2023 |
Mehdi Amini <joker.eph@gmail.com> |
Revert "Remove rdar links; NFC"
This reverts commit d618f1c3b12effd0c2bdb7d02108d3551f389d3d. This commit wasn't reviewed ahead of time and significant concerns were raised immediately after it land
Revert "Remove rdar links; NFC"
This reverts commit d618f1c3b12effd0c2bdb7d02108d3551f389d3d. This commit wasn't reviewed ahead of time and significant concerns were raised immediately after it landed. According to our developer policy this warrants immediate revert of the commit.
https://llvm.org/docs/DeveloperPolicy.html#patch-reversion-policy
Differential Revision: https://reviews.llvm.org/D155509
show more ...
|
#
d618f1c3 |
| 07-Jul-2023 |
Aaron Ballman <aaron@aaronballman.com> |
Remove rdar links; NFC
This removes links to rdar, which is an internal bug tracker that the community doesn't have visibility into.
See further discussion at: https://discourse.llvm.org/t/code-rev
Remove rdar links; NFC
This removes links to rdar, which is an internal bug tracker that the community doesn't have visibility into.
See further discussion at: https://discourse.llvm.org/t/code-review-reminder-about-links-in-code-commit-messages/71847
show more ...
|
Revision tags: 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, 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, llvmorg-15.0.0 |
|
#
83ea47ac |
| 04-Sep-2022 |
Fangrui Song <i@maskray.me> |
[test] Make tests pass regardless of gnu++14/gnu++17 default
GCC from 11 onwards defaults to -std=gnu++17 for C++ source files. We want to do the same (https://discourse.llvm.org/t/c-objc-switch-to-
[test] Make tests pass regardless of gnu++14/gnu++17 default
GCC from 11 onwards defaults to -std=gnu++17 for C++ source files. We want to do the same (https://discourse.llvm.org/t/c-objc-switch-to-gnu-17-as-the-default-dialect/64360). Split RUN lines, adjust `-verify`, or add `__cplusplus < 201703L` or `-Wno-dynamic-exception-spec`, so that tests will pass regardless of gnu++14/gnu++17 default.
We have a desire to mark a test compatible with multiple language standards. There are ongoing discussions how to add markers in the long term:
* https://discourse.llvm.org/t/iterating-lit-run-lines/62596 * https://discourse.llvm.org/t/lit-run-a-run-line-multiple-times-with-different-replacements/64932
As a workaround in the short term, add lit substitutions `%std_cxx98-`, `%std_cxx11-14`, etc. They can be used for tests which work across multiple language standards. If a range has `n` standards, run lit multiple times, with `LIT_CLANG_STD_GROUP=0`, `LIT_CLANG_STD_GROUP=1`, etc to cover all `n` standards.
Reviewed By: #clang-language-wg, aaron.ballman
Differential Revision: https://reviews.llvm.org/D131464
show more ...
|
Revision tags: llvmorg-15.0.0-rc3, llvmorg-15.0.0-rc2, llvmorg-15.0.0-rc1, llvmorg-16-init, llvmorg-14.0.6, llvmorg-14.0.5, llvmorg-14.0.4 |
|
#
2cb2cd24 |
| 04-May-2022 |
Aaron Ballman <aaron@aaronballman.com> |
Change the behavior of implicit int diagnostics
C89 allowed a type specifier to be elided with the resulting type being int, aka implicit int behavior. This feature was subsequently removed in C99 w
Change the behavior of implicit int diagnostics
C89 allowed a type specifier to be elided with the resulting type being int, aka implicit int behavior. This feature was subsequently removed in C99 without a deprecation period, so implementations continued to support the feature. Now, as with implicit function declarations, is a good time to reevaluate the need for this support.
This patch allows -Wimplicit-int to issue warnings in C89 mode (off by default), defaults the warning to an error in C99 through C17, and disables support for the feature entirely in C2x. It also removes a warning about missing declaration specifiers that really was just an implicit int warning in disguise and other minor related cleanups.
show more ...
|
Revision tags: llvmorg-14.0.3, llvmorg-14.0.2, llvmorg-14.0.1, llvmorg-14.0.0, llvmorg-14.0.0-rc4, llvmorg-14.0.0-rc3, llvmorg-14.0.0-rc2, llvmorg-14.0.0-rc1, llvmorg-15-init, llvmorg-13.0.1, llvmorg-13.0.1-rc3, llvmorg-13.0.1-rc2, llvmorg-13.0.1-rc1 |
|
#
45e75d93 |
| 27-Sep-2021 |
Erich Keane <erich.keane@intel.com> |
Update the message for template-template param keyword for C++17
C++17 permits using 'typename' or 'class' for a template template parameter, but the error message in the parser only refers to 'clas
Update the message for template-template param keyword for C++17
C++17 permits using 'typename' or 'class' for a template template parameter, but the error message in the parser only refers to 'class'. This patch, in C++17 or newer modes, adds "or 'template'" to the diagnostic.
show more ...
|
Revision tags: llvmorg-13.0.0, llvmorg-13.0.0-rc4, llvmorg-13.0.0-rc3, llvmorg-13.0.0-rc2, llvmorg-13.0.0-rc1, llvmorg-14-init, llvmorg-12.0.1, llvmorg-12.0.1-rc4, llvmorg-12.0.1-rc3, llvmorg-12.0.1-rc2, llvmorg-12.0.1-rc1, llvmorg-12.0.0, llvmorg-12.0.0-rc5, llvmorg-12.0.0-rc4, llvmorg-12.0.0-rc3, llvmorg-12.0.0-rc2, llvmorg-11.1.0, llvmorg-11.1.0-rc3, llvmorg-12.0.0-rc1, llvmorg-13-init, llvmorg-11.1.0-rc2, llvmorg-11.1.0-rc1, llvmorg-11.0.1, llvmorg-11.0.1-rc2, llvmorg-11.0.1-rc1, llvmorg-11.0.0, llvmorg-11.0.0-rc6, llvmorg-11.0.0-rc5, llvmorg-11.0.0-rc4, llvmorg-11.0.0-rc3, llvmorg-11.0.0-rc2 |
|
#
1cbdf932 |
| 29-Jul-2020 |
Richard Smith <richard@metafoo.co.uk> |
PR46231: Promote diagnostic for 'template<...>;' from ExtWarn to Error.
No other compiler accepts this as an extension, not even in permissive mode. We're not doing anyone any favors by allowing thi
PR46231: Promote diagnostic for 'template<...>;' from ExtWarn to Error.
No other compiler accepts this as an extension, not even in permissive mode. We're not doing anyone any favors by allowing this, and it's unlikely to be at all common, even in Clang-only code, in the wild.
show more ...
|
Revision tags: llvmorg-11.0.0-rc1, llvmorg-12-init |
|
#
1d3d9c7b |
| 13-Jul-2020 |
Haojian Wu <hokein.wu@gmail.com> |
[clang] Include type specifiers in typo correction when checking isCXXDeclarationSpecifiers.
- add more tests (the test added in https://github.com/llvm/llvm-project/commit/2f448467e4254ddc3191136c9
[clang] Include type specifiers in typo correction when checking isCXXDeclarationSpecifiers.
- add more tests (the test added in https://github.com/llvm/llvm-project/commit/2f448467e4254ddc3191136c968e6054bc009b88 is weak); - improve the `MyTemplate<type_typo, int>();` case, with this patch, typo correction suggests the type decl, and no regressions found.
Differential Revision: https://reviews.llvm.org/D83025
show more ...
|
Revision tags: llvmorg-10.0.1, llvmorg-10.0.1-rc4, llvmorg-10.0.1-rc3 |
|
#
8c5133f1 |
| 02-Jul-2020 |
Haojian Wu <hokein.wu@gmail.com> |
[clang] Fix a null-NSS-access crash in DependentNameType.
The DependentNameType must have a non-null NSS. This property could be violated during typo correction.
Differential Revision: https://revi
[clang] Fix a null-NSS-access crash in DependentNameType.
The DependentNameType must have a non-null NSS. This property could be violated during typo correction.
Differential Revision: https://reviews.llvm.org/D82738
show more ...
|
Revision tags: llvmorg-10.0.1-rc2, llvmorg-10.0.1-rc1 |
|
#
6163aa96 |
| 06-Apr-2020 |
Richard Smith <richard@metafoo.co.uk> |
PR45239: Don't deallocate TemplateIdAnnotations if they might still be in the token stream.
Previously we deleted all template-id annotations at the end of each top-level declaration. That doesn't w
PR45239: Don't deallocate TemplateIdAnnotations if they might still be in the token stream.
Previously we deleted all template-id annotations at the end of each top-level declaration. That doesn't work: we can do some lookahead and form a template-id annotation, and then roll back that lookahead, parse, and decide that we're missing a semicolon at the end of a top-level declaration, before we reach the annotation token. In that situation, we'd end up parsing the annotation token after deleting its associated data, leading to various forms of badness.
We now only delete template-id annotations if the preprocessor can assure us that there are no annotation tokens left in the token stream (or if we're already at EOF). This lets us delete the annotation tokens earlier in a lot of cases; we now clean them up at the end of each statement and class member, not just after each top-level declaration. This also permitted some simplification of the delay-parsed templates cleanup code.
show more ...
|
#
0c42539d |
| 28-Mar-2020 |
Richard Smith <richard@metafoo.co.uk> |
Improve error recovery from missing '>' in template argument list.
Produce the conventional "to match this '<'" note, so that the user knows why we expected a '>', and properly handle '>>' in C++11
Improve error recovery from missing '>' in template argument list.
Produce the conventional "to match this '<'" note, so that the user knows why we expected a '>', and properly handle '>>' in C++11 onwards.
show more ...
|
#
b3f6e3d6 |
| 28-Mar-2020 |
Richard Smith <richard@metafoo.co.uk> |
Improve recovery from invalid template-ids.
Instead of bailing out of parsing when we encounter an invalid template-name or template arguments in a template-id, produce an annotation token describin
Improve recovery from invalid template-ids.
Instead of bailing out of parsing when we encounter an invalid template-name or template arguments in a template-id, produce an annotation token describing the invalid construct.
This avoids duplicate errors and generally allows us to recover better. In principle we should be able to extend this to store some kinds of invalid template-id in the AST for tooling use, but that isn't handled as part of this change.
show more ...
|
Revision tags: llvmorg-10.0.0, llvmorg-10.0.0-rc6, llvmorg-10.0.0-rc5 |
|
#
bd763e2c |
| 17-Mar-2020 |
Haojian Wu <hokein.wu@gmail.com> |
[clang] Fix crash on visiting null nestedNameSpecifier.
Summary: Fix https://github.com/clangd/clangd/issues/293
Reviewers: sammccall
Subscribers: ilya-biryukov, kadircet, usaxena95, cfe-commits
[clang] Fix crash on visiting null nestedNameSpecifier.
Summary: Fix https://github.com/clangd/clangd/issues/293
Reviewers: sammccall
Subscribers: ilya-biryukov, kadircet, usaxena95, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D76320
show more ...
|
#
44c3a63c |
| 14-Mar-2020 |
Richard Smith <richard@metafoo.co.uk> |
PR45063: Fix crash on invalid processing an elaborated class template-id with an invalid scope specifier.
|
Revision tags: llvmorg-10.0.0-rc4, llvmorg-10.0.0-rc3, llvmorg-10.0.0-rc2, llvmorg-10.0.0-rc1, llvmorg-11-init, llvmorg-9.0.1, llvmorg-9.0.1-rc3 |
|
#
2e48be09 |
| 11-Dec-2019 |
Richard Smith <richard@metafoo.co.uk> |
Fix mishandling of invalid-but-non-empty nested name specifiers in name classification.
We were accidentally treating invalid scope specs as being empty, resulting in our trying to form an ADL-only
Fix mishandling of invalid-but-non-empty nested name specifiers in name classification.
We were accidentally treating invalid scope specs as being empty, resulting in our trying to form an ADL-only call with a qualified callee, which tripped up an assert later on.
show more ...
|
Revision tags: llvmorg-9.0.1-rc2, llvmorg-9.0.1-rc1, llvmorg-9.0.0, llvmorg-9.0.0-rc6, llvmorg-9.0.0-rc5, llvmorg-9.0.0-rc4, llvmorg-9.0.0-rc3, llvmorg-9.0.0-rc2, llvmorg-9.0.0-rc1, llvmorg-10-init, llvmorg-8.0.1, llvmorg-8.0.1-rc4, llvmorg-8.0.1-rc3 |
|
#
da70fc0c |
| 14-Jun-2019 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR42071: Reject weird names for non-type template parameters.
Also reject default arguments appearing in invalid locations.
llvm-svn: 363447
|
Revision tags: llvmorg-8.0.1-rc2, llvmorg-8.0.1-rc1 |
|
#
b23c5e8c |
| 09-May-2019 |
Richard Smith <richard-llvm@metafoo.co.uk> |
[c++20] Implement P0846R0: allow (ADL-only) calls to template-ids whose template name is not visible to unqualified lookup.
In order to support this without a severe degradation in our ability to di
[c++20] Implement P0846R0: allow (ADL-only) calls to template-ids whose template name is not visible to unqualified lookup.
In order to support this without a severe degradation in our ability to diagnose typos in template names, this change significantly restructures the way we handle template-id-shaped syntax for which lookup of the template name finds nothing.
Instead of eagerly diagnosing an undeclared template name, we now form a placeholder template-name representing a name that is known to not find any templates. When the parser sees such a name, it attempts to disambiguate whether we have a less-than comparison or a template-id. Any diagnostics or typo-correction for the name are delayed until its point of use.
The upshot should be a small improvement of our diagostic quality overall: we now take more syntactic context into account when trying to resolve an undeclared identifier on the left hand side of a '<'. In fact, this works well enough that the backwards-compatible portion (for an undeclared identifier rather than a lookup that finds functions but no function templates) is enabled in all language modes.
llvm-svn: 360308
show more ...
|
Revision tags: llvmorg-8.0.0, llvmorg-8.0.0-rc5, llvmorg-8.0.0-rc4, llvmorg-8.0.0-rc3, llvmorg-7.1.0, llvmorg-7.1.0-rc1, llvmorg-8.0.0-rc2, llvmorg-8.0.0-rc1, llvmorg-7.0.1, llvmorg-7.0.1-rc3, llvmorg-7.0.1-rc2, llvmorg-7.0.1-rc1, llvmorg-7.0.0, llvmorg-7.0.0-rc3, llvmorg-7.0.0-rc2, llvmorg-7.0.0-rc1, llvmorg-6.0.1, llvmorg-6.0.1-rc3, llvmorg-6.0.1-rc2, llvmorg-6.0.1-rc1, llvmorg-5.0.2, llvmorg-5.0.2-rc2, llvmorg-5.0.2-rc1, llvmorg-6.0.0, llvmorg-6.0.0-rc3, llvmorg-6.0.0-rc2, llvmorg-6.0.0-rc1, llvmorg-5.0.1, llvmorg-5.0.1-rc3, llvmorg-5.0.1-rc2, llvmorg-5.0.1-rc1, llvmorg-5.0.0, llvmorg-5.0.0-rc5, llvmorg-5.0.0-rc4, llvmorg-5.0.0-rc3, llvmorg-5.0.0-rc2, llvmorg-5.0.0-rc1, llvmorg-4.0.1, llvmorg-4.0.1-rc3, llvmorg-4.0.1-rc2, llvmorg-4.0.1-rc1, llvmorg-4.0.0, llvmorg-4.0.0-rc4, llvmorg-4.0.0-rc3 |
|
#
3af70097 |
| 09-Feb-2017 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Diagnose attempts to explicitly instantiate a template at class scope. Previously Clang would simply ignore the 'template' keyword in this case.
llvm-svn: 294639
|
Revision tags: llvmorg-4.0.0-rc2, llvmorg-4.0.0-rc1, llvmorg-3.9.1, llvmorg-3.9.1-rc3, llvmorg-3.9.1-rc2, llvmorg-3.9.1-rc1, llvmorg-3.9.0, llvmorg-3.9.0-rc3, llvmorg-3.9.0-rc2, llvmorg-3.9.0-rc1, llvmorg-3.8.1, llvmorg-3.8.1-rc1, llvmorg-3.8.0, llvmorg-3.8.0-rc3, llvmorg-3.8.0-rc2, llvmorg-3.8.0-rc1, llvmorg-3.7.1, llvmorg-3.7.1-rc2, llvmorg-3.7.1-rc1, llvmorg-3.7.0, llvmorg-3.7.0-rc4, llvmorg-3.7.0-rc3, studio-1.4, llvmorg-3.7.0-rc2, llvmorg-3.7.0-rc1, llvmorg-3.6.2, llvmorg-3.6.2-rc1, llvmorg-3.6.1, llvmorg-3.6.1-rc1, llvmorg-3.5.2, llvmorg-3.5.2-rc1, llvmorg-3.6.0, llvmorg-3.6.0-rc4, llvmorg-3.6.0-rc3, llvmorg-3.6.0-rc2, llvmorg-3.6.0-rc1, llvmorg-3.5.1, llvmorg-3.5.1-rc2 |
|
#
d61a3110 |
| 15-Dec-2014 |
Reid Kleckner <reid@kleckner.net> |
Diagnose function template definitions inside functions
The parser can only be tricked into parsing a function template definition by inserting a typename keyword before the function template declar
Diagnose function template definitions inside functions
The parser can only be tricked into parsing a function template definition by inserting a typename keyword before the function template declaration. This used to make us crash, and now it's fixed.
While here, remove an unneeded boolean parameter from ParseDeclGroup. This boolean always corresponded to non-typedef declarators at file scope. ParseDeclGroup already has precise diagnostics for the function definition typedef case, so we can let that through.
Fixes PR21839.
llvm-svn: 224287
show more ...
|
Revision tags: llvmorg-3.5.1-rc1 |
|
#
129c44c7 |
| 25-Sep-2014 |
Ismail Pazarbasi <ismail.pazarbasi@gmail.com> |
Suggest fix-it for missing '{' after base-clause
llvm-svn: 218468
|
Revision tags: llvmorg-3.5.0, llvmorg-3.5.0-rc4, llvmorg-3.5.0-rc3, llvmorg-3.5.0-rc2, llvmorg-3.5.0-rc1 |
|
#
78e1ca69 |
| 16-Jun-2014 |
Richard Smith <richard-llvm@metafoo.co.uk> |
[C++1z] Implement N4051: 'typename' is permitted instead of 'class' when declaring a template template parameter.
llvm-svn: 211031
|
Revision tags: llvmorg-3.4.2, llvmorg-3.4.2-rc1, llvmorg-3.4.1, llvmorg-3.4.1-rc2, llvmorg-3.4.1-rc1, llvmorg-3.4.0, llvmorg-3.4.0-rc3 |
|
#
cb7e5df9 |
| 04-Dec-2013 |
Faisal Vali <faisalv@yahoo.com> |
Fix PR17637: incorrect calculation of template parameter depth
In delayed template parsing mode, adjust the template depth counter for each template parameter list associated with an out of line mem
Fix PR17637: incorrect calculation of template parameter depth
In delayed template parsing mode, adjust the template depth counter for each template parameter list associated with an out of line member template specialization.
llvm-svn: 196351
show more ...
|
Revision tags: llvmorg-3.4.0-rc2, llvmorg-3.4.0-rc1 |
|
#
91bc73bf |
| 08-Nov-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Fix name in test.
llvm-svn: 194291
|
#
68b1453c |
| 08-Nov-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Fix %select numbering confusion between diagnostic and Diag call.
llvm-svn: 194281
|