Carlos Galvez
7d2ea6c422
[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
2023-01-14 18:51:39 +00:00
Kazu Hirata
f71ffd3b73
[clang-tools-extra] Use std::optional instead of llvm::Optional (NFC)
...
This patch replaces (llvm::|)Optional< with std::optional<. I'll post
a separate patch to clean up the "using" declarations, #include
"llvm/ADT/Optional.h", etc.
This is part of an effort to migrate from llvm::Optional to
std::optional:
https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716
2023-01-07 20:19:42 -08:00
Kazu Hirata
71f557355d
[clang-tools-extra] Add #include <optional> (NFC)
...
This patch adds #include <optional> to those files containing
llvm::Optional<...> or Optional<...>.
I'll post a separate patch to actually replace llvm::Optional with
std::optional.
This is part of an effort to migrate from llvm::Optional to
std::optional:
https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716
2023-01-07 20:02:20 -08:00
Kazu Hirata
cd8702efe7
[clang-tidy] Use std::nullopt instead of None (NFC)
...
This patch mechanically replaces None with std::nullopt where the
compiler would warn if None were deprecated. The intent is to reduce
the amount of manual work required in migrating from Optional to
std::optional.
This is part of an effort to migrate from llvm::Optional to
std::optional:
https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716
2022-12-03 11:54:48 -08:00
Kazu Hirata
064a08cd95
Don't use Optional::hasValue (NFC)
2022-06-20 20:05:16 -07:00
Jonathan Roelofs
2c9cf9f4dd
[clang-tidy] New check: bugprone-suspicious-include
...
Detects and fixes suspicious code like: `#include "foo.cpp"`.
Inspired by: https://twitter.com/lefticus/status/1228458240364687360?s=20
https://reviews.llvm.org/D74669
2020-03-12 09:59:28 -06:00
Nico Weber
714466bf36
Revert "[clang-tidy] New check: bugprone-suspicious-include"
...
This reverts commit 1e0669bfe05f0f48ee88152c4a1d581f484f8d67
(and follow-ups 698a12712920c214e39bb215fe26fad2e099425b and
52bbdad7d63fd060d102b3591b433d116a982255).
The tests fail fail on Windows, see https://reviews.llvm.org/D74669
2020-03-10 10:28:20 -04:00
Jonathan Roelofs
1e0669bfe0
[clang-tidy] New check: bugprone-suspicious-include
...
Detects and fixes suspicious code like: `#include "foo.cpp"`.
Inspired by: https://twitter.com/lefticus/status/1228458240364687360?s=20
https://reviews.llvm.org/D74669
2020-03-09 15:54:32 -06:00
Jonathan Roelofs
47caa69120
[clang-tidy] Use ; as separator for HeaderFileExtensions
...
... and deprecate use of ',' for the same.
https://reviews.llvm.org/D75621
2020-03-09 11:32:44 -06:00
Jonathan Roelofs
3486cc014b
[clang-tidy] Generalize HeaderFileExtensions.{h,cpp}. NFC
...
https://reviews.llvm.org/D75489
2020-03-09 11:32:44 -06:00