Revision tags: llvmorg-18.1.8 |
|
#
3f9e2e17 |
| 13-Jun-2024 |
Congcong Cai <congcongcai0907@163.com> |
[NFC][clang-tidy] fix typo in readability-else-after-return
|
Revision tags: llvmorg-18.1.7, llvmorg-18.1.6 |
|
#
2a114d17 |
| 13-May-2024 |
Jover <joverzh@gmail.com> |
[clang-tidy] Ignore `if consteval` in else-after-return (#91588)
|
Revision tags: 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 |
|
#
7d2ea6c4 |
| 14-Jan-2023 |
Carlos Galvez <carlosgalvezp@gmail.com> |
[clang-tidy][NFC] Use C++17 nested namespaces in the clang-tidy folder
Fix applied by running:
run-clang-tidy.py -checks=-*,modernize-concat-nested-namespaces
Differential Revision: https://review
[clang-tidy][NFC] Use C++17 nested namespaces in the clang-tidy folder
Fix applied by running:
run-clang-tidy.py -checks=-*,modernize-concat-nested-namespaces
Differential Revision: https://reviews.llvm.org/D141770
show more ...
|
Revision tags: 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, llvmorg-15.0.0-rc3, llvmorg-15.0.0-rc2, llvmorg-15.0.0-rc1, llvmorg-16-init |
|
#
934d6038 |
| 22-Jul-2022 |
Zhouyi Zhou <zhouzhouyi@gmail.com> |
[clang-tidy][NFC] Add preposition "of" to code annotation of ElseAfterReturnCheck
Reviewed By: njames93
Differential Revision: https://reviews.llvm.org/D129953
|
Revision tags: llvmorg-14.0.6, llvmorg-14.0.5, llvmorg-14.0.4, 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, 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 |
|
#
ea2225a1 |
| 09-Mar-2021 |
Stephen Kelly <steveire@gmail.com> |
[clang-tidy] Simplify readability checks to not need ignoring* matchers
Differential Revision: https://reviews.llvm.org/D98296
|
Revision tags: 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 |
|
#
f15b7869 |
| 29-Nov-2020 |
Nathan Ridge <zeratul976@hotmail.com> |
[clang-tidy] [clangd] Avoid multi-line diagnostic range for else-after-return diagnostic
Fixes https://bugs.llvm.org/show_bug.cgi?id=47809
Differential Revision: https://reviews.llvm.org/D92272
|
Revision tags: llvmorg-11.0.1-rc1 |
|
#
617e8e5e |
| 19-Nov-2020 |
Nathan James <n.james93@hotmail.co.uk> |
[clang-tidy] ElseAfterReturn check wont suggest fixes if preprocessor branches are involved
Consider this code: ``` if (Cond) { #ifdef X_SUPPORTED X(); #else return; #endif } else { Y(); } Z()
[clang-tidy] ElseAfterReturn check wont suggest fixes if preprocessor branches are involved
Consider this code: ``` if (Cond) { #ifdef X_SUPPORTED X(); #else return; #endif } else { Y(); } Z();```
In this example, if `X_SUPPORTED` is not defined, currently we'll get a warning from the else-after-return check. However If we apply that fix, and then the code is recompiled with `X_SUPPORTED` defined, we have inadvertently changed the behaviour of the if statement due to the else being removed. Code flow when `Cond` is `true` will be: ``` X(); Y(); Z();``` where as before the fix it was: ``` X(); Z();```
This patch adds checks that guard against `#endif` directives appearing between the control flow interrupter and the else and not applying the fix if they are detected.
Reviewed By: aaron.ballman
Differential Revision: https://reviews.llvm.org/D91485
show more ...
|
Revision tags: 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, llvmorg-11.0.0-rc1, llvmorg-12-init, llvmorg-10.0.1, llvmorg-10.0.1-rc4, llvmorg-10.0.1-rc3 |
|
#
e8158bf0 |
| 05-Jul-2020 |
Nathan James <n.james93@hotmail.co.uk> |
[NFC] Clean up braces and anon namespace
|
#
a06a5ed9 |
| 30-Jun-2020 |
Nathan James <n.james93@hotmail.co.uk> |
[clang-tidy] Added option to readability-else-after-return
Added a 'RefactorConditionVariables' option to control how the check handles condition variables
Reviewed By: aaron.ballman
Differential
[clang-tidy] Added option to readability-else-after-return
Added a 'RefactorConditionVariables' option to control how the check handles condition variables
Reviewed By: aaron.ballman
Differential Revision: https://reviews.llvm.org/D82824
show more ...
|
#
860aefd0 |
| 29-Jun-2020 |
Nathan James <n.james93@hotmail.co.uk> |
[clang-tidy][NFC] Remove unnecessary includes throughout clang-tidy header files
Reviewed By: aaron.ballman
Differential Revision: https://reviews.llvm.org/D82661
|
Revision tags: llvmorg-10.0.1-rc2 |
|
#
740575dc |
| 16-Jun-2020 |
njames93 <n.james93@hotmail.co.uk> |
[clangd] Fix readability-else-after-return 'Adding a note without main diagnostic' crash
Fix a crash in clangd caused by an (admittidly incorrect) Remark diagnositic being emitted from readability-e
[clangd] Fix readability-else-after-return 'Adding a note without main diagnostic' crash
Fix a crash in clangd caused by an (admittidly incorrect) Remark diagnositic being emitted from readability-else-after-return. This crash doesn't occur in clang-tidy so there are no tests there for this.
Reviewed By: hokein
Differential Revision: https://reviews.llvm.org/D81785
show more ...
|
Revision tags: llvmorg-10.0.1-rc1, llvmorg-10.0.0, llvmorg-10.0.0-rc6, llvmorg-10.0.0-rc5, llvmorg-10.0.0-rc4, llvmorg-10.0.0-rc3, llvmorg-10.0.0-rc2 |
|
#
d591bdce |
| 02-Feb-2020 |
Nathan James <n.james93@hotmail.co.uk> |
[clang-tidy] Fixed crash 44745 in readability-else-after-return
Summary: Fixes [[ https://bugs.llvm.org/show_bug.cgi?id=44745 | readability-else-after-return crashes ]]
Reviewers: aaron.ballman, al
[clang-tidy] Fixed crash 44745 in readability-else-after-return
Summary: Fixes [[ https://bugs.llvm.org/show_bug.cgi?id=44745 | readability-else-after-return crashes ]]
Reviewers: aaron.ballman, alexfh, hokein, JonasToth, gribozavr2
Reviewed By: alexfh
Subscribers: merge_guards_bot, xazax.hun, cfe-commits
Tags: #clang, #clang-tools-extra
Differential Revision: https://reviews.llvm.org/D73841
show more ...
|
Revision tags: llvmorg-10.0.0-rc1, llvmorg-11-init |
|
#
ec3d8e61 |
| 02-Jan-2020 |
Nathan James <n.james93@hotmail.co.uk> |
Handle init statements in readability-else-after-return
Adds a new ASTMatcher condition called 'hasInitStatement()' that matches if, switch and range-for statements with an initializer. Reworked cla
Handle init statements in readability-else-after-return
Adds a new ASTMatcher condition called 'hasInitStatement()' that matches if, switch and range-for statements with an initializer. Reworked clang-tidy readability-else-after-return to handle variables in the if condition or init statements in c++17 ifs. Also checks if removing the else would affect object lifetimes in the else branch.
Fixes PR44364.
show more ...
|
Revision tags: llvmorg-9.0.1, llvmorg-9.0.1-rc3, 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, llvmorg-8.0.1-rc2, llvmorg-8.0.1-rc1, 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 |
|
#
efde822c |
| 21-Jan-2019 |
Alexander Kornienko <alexfh@google.com> |
[clang-tidy] Work around http://llvm.org/PR40392
The readability-else-after-return check should be smarter about cases where the variable defined in the condition is used in the `else` branch. This
[clang-tidy] Work around http://llvm.org/PR40392
The readability-else-after-return check should be smarter about cases where the variable defined in the condition is used in the `else` branch. This patch makes it just ignore such cases, but alternative solutions may be better (added a FIXME).
llvm-svn: 351751
show more ...
|
#
2946cd70 |
| 19-Jan-2019 |
Chandler Carruth <chandlerc@gmail.com> |
Update the file headers across all of the LLVM projects in the monorepo to reflect the new license.
We understand that people may be surprised that we're moving the header entirely to discuss the ne
Update the file headers across all of the LLVM projects in the monorepo to reflect the new license.
We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach.
Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository.
llvm-svn: 351636
show more ...
|
#
4a50956c |
| 19-Jan-2019 |
Chandler Carruth <chandlerc@gmail.com> |
Convert two more files that were using Windows line endings and remove a stray single '\r' from one file. These are the last line ending issues I can find in the files containing parts of LLVM's file
Convert two more files that were using Windows line endings and remove a stray single '\r' from one file. These are the last line ending issues I can find in the files containing parts of LLVM's file headers.
llvm-svn: 351634
show more ...
|
Revision tags: llvmorg-7.0.1, llvmorg-7.0.1-rc3, llvmorg-7.0.1-rc2, llvmorg-7.0.1-rc1 |
|
#
bc76dc3c |
| 19-Oct-2018 |
Marek Kurdej <marek.kurdej@gmail.com> |
[clang-tidy] Resolve readability-else-after-return false positive for constexpr if.
Summary: It fixes the false positive when using constexpr if and where else cannot be removed:
Example: ``` if
[clang-tidy] Resolve readability-else-after-return false positive for constexpr if.
Summary: It fixes the false positive when using constexpr if and where else cannot be removed:
Example: ``` if constexpr (sizeof(int) > 4) // ... return /* ... */; else // This else cannot be removed. // ... return /* ... */; ```
Reviewers: alexfh, aaron.ballman
Reviewed By: aaron.ballman
Subscribers: lebedev.ri, xazax.hun, cfe-commits
Differential Revision: https://reviews.llvm.org/D53372
llvm-svn: 344785
show more ...
|
Revision tags: 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 |
|
#
91e2c2ad |
| 28-Nov-2017 |
Malcolm Parsons <malcolm.parsons@gmail.com> |
[clang-tidy] Ignore ExprWithCleanups when looking for else-after-throw
Summary: The readability-else-after-return check was not warning about an else after a throw of an exception that had arguments
[clang-tidy] Ignore ExprWithCleanups when looking for else-after-throw
Summary: The readability-else-after-return check was not warning about an else after a throw of an exception that had arguments that needed to be cleaned up.
Reviewers: aaron.ballman, alexfh, djasper
Reviewed By: aaron.ballman
Subscribers: lebedev.ri, klimek, xazax.hun, cfe-commits
Differential Revision: https://reviews.llvm.org/D40505
llvm-svn: 319174
show more ...
|
Revision tags: 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, 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 |
|
#
c35be369 |
| 04-Nov-2016 |
Malcolm Parsons <malcolm.parsons@gmail.com> |
[clang-tidy] Fixed readability-else-after-return for cascade statements
Summary: Fix generated by this check changed program semantics in the case where 'if' was a part (direct child) of other state
[clang-tidy] Fixed readability-else-after-return for cascade statements
Summary: Fix generated by this check changed program semantics in the case where 'if' was a part (direct child) of other statement.
Fixes PR30652.
Patch by Paweł Żukowski.
Reviewers: malcolm.parsons, alexfh, djasper
Subscribers: mgehre, omtcyfz, cfe-commits
Differential Revision: https://reviews.llvm.org/D26125
llvm-svn: 285999
show more ...
|
Revision tags: llvmorg-3.9.0, llvmorg-3.9.0-rc3, llvmorg-3.9.0-rc2 |
|
#
34789edb |
| 10-Aug-2016 |
Kirill Bobyrev <omtcyfz@gmail.com> |
[clang-tidy] enhance readability-else-after-return
`readability-else-after-return` only warns about `return` calls, but LLVM Coding Standars stat that `throw`, `continue`, `goto`, etc after `return`
[clang-tidy] enhance readability-else-after-return
`readability-else-after-return` only warns about `return` calls, but LLVM Coding Standars stat that `throw`, `continue`, `goto`, etc after `return` calls are bad, too.
Reviwers: alexfh, aaron.ballman
Differential Revision: https://reviews.llvm.org/D23265
llvm-svn: 278257
show more ...
|
Revision tags: llvmorg-3.9.0-rc1, llvmorg-3.8.1, llvmorg-3.8.1-rc1 |
|
#
8311c446 |
| 11-May-2016 |
Etienne Bergeron <etienneb@google.com> |
[clang-tidy] Refactoring of FixHintUtils
Summary: Refactor some checkers to use the tooling re-writing API. see: http://reviews.llvm.org/D19941
Reviewers: klimek, alexfh
Subscribers: cfe-commits
[clang-tidy] Refactoring of FixHintUtils
Summary: Refactor some checkers to use the tooling re-writing API. see: http://reviews.llvm.org/D19941
Reviewers: klimek, alexfh
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D19807
llvm-svn: 269210
show more ...
|
Revision tags: 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 |
|
#
a73aed0c |
| 27-Apr-2015 |
Daniel Jasper <djasper@google.com> |
clang-tidy: [readability-else-after-return] Fix false positive. This might be a little too strict now, but better be too strict than do the wrong thing.
llvm-svn: 235932
|
Revision tags: llvmorg-3.5.2, llvmorg-3.5.2-rc1 |
|
#
8384d491 |
| 02-Mar-2015 |
Alexander Kornienko <alexfh@google.com> |
[clang-tidy] Refactor: Move readability checks to namespace clang::tidy::readability
clang-tidy checks are organized into modules. This refactoring moves the readability module checks into the names
[clang-tidy] Refactor: Move readability checks to namespace clang::tidy::readability
clang-tidy checks are organized into modules. This refactoring moves the readability module checks into the namespace clang::tidy::readability
http://reviews.llvm.org/D7997
Patch by Richard Thomson!
llvm-svn: 230946
show more ...
|
Revision tags: llvmorg-3.6.0, llvmorg-3.6.0-rc4, llvmorg-3.6.0-rc3, llvmorg-3.6.0-rc2, llvmorg-3.6.0-rc1 |
|
#
3b6018b9 |
| 14-Jan-2015 |
Daniel Jasper <djasper@google.com> |
clang-tidy: Add initial check for "Don't use else after return".
As per the LLVM coding standards: http://llvm.org/docs/CodingStandards.html#don-t-use-else-after-a-return
Initial version, probably
clang-tidy: Add initial check for "Don't use else after return".
As per the LLVM coding standards: http://llvm.org/docs/CodingStandards.html#don-t-use-else-after-a-return
Initial version, probably still quite a bit to do until this is really useful.
Review: http://reviews.llvm.org/D6927 llvm-svn: 226025
show more ...
|