https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/146382
We don't need const on a return type. >From a43c0a81e99d409f8e7beb4c13be86accb57b3b6 Mon Sep 17 00:00:00 2001 From: Kazu Hirata <k...@google.com> Date: Sun, 29 Jun 2025 19:28:38 -0700 Subject: [PATCH] [Basic] Drop const from a return type (NFC) We don't need const on a return type. --- clang/include/clang/Basic/TargetInfo.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clang/include/clang/Basic/TargetInfo.h b/clang/include/clang/Basic/TargetInfo.h index c3bce6e807f34..5c9031cc69dbb 100644 --- a/clang/include/clang/Basic/TargetInfo.h +++ b/clang/include/clang/Basic/TargetInfo.h @@ -1851,7 +1851,7 @@ class TargetInfo : public TransferrableTargetInfo, /// Returns the version of the darwin target variant SDK which was used during /// the compilation if one was specified, or an empty version otherwise. - const std::optional<VersionTuple> getDarwinTargetVariantSDKVersion() const { + std::optional<VersionTuple> getDarwinTargetVariantSDKVersion() const { return !getTargetOpts().DarwinTargetVariantSDKVersion.empty() ? getTargetOpts().DarwinTargetVariantSDKVersion : std::optional<VersionTuple>(); _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits