Skip to content

Conversation

kazutakahirata
Copy link
Contributor

We don't need const on a return type.

We don't need const on a return type.
@llvmbot llvmbot added clang Clang issues not falling into any other category clang:frontend Language frontend issues, e.g. anything involving "Sema" labels Jun 30, 2025
@llvmbot
Copy link
Member

llvmbot commented Jun 30, 2025

@llvm/pr-subscribers-clang

Author: Kazu Hirata (kazutakahirata)

Changes

We don't need const on a return type.


Full diff: https://github.com/llvm/llvm-project/pull/146382.diff

1 Files Affected:

  • (modified) clang/include/clang/Basic/TargetInfo.h (+1-1)
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>();

@kazutakahirata kazutakahirata merged commit 0494f93 into llvm:main Jun 30, 2025
10 checks passed
@kazutakahirata kazutakahirata deleted the cleanup_20250630_drop_const branch June 30, 2025 17:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang:frontend Language frontend issues, e.g. anything involving "Sema" clang Clang issues not falling into any other category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants