Skip to content

Conversation

@aka76bm
Copy link

@aka76bm aka76bm commented Sep 25, 2025

No description provided.

@github-actions
Copy link

Thank you for submitting a Pull Request (PR) to the LLVM Project!

This PR will be automatically labeled and the relevant teams will be notified.

If you wish to, you can add reviewers by using the "Reviewers" section on this page.

If this is not working for you, it is probably because you do not have write permissions for the repository. In which case you can instead tag reviewers by name in a comment by using @ followed by their GitHub username.

If you have received no comments on your PR for a week, you can request a review by "ping"ing the PR by adding a comment “Ping”. The common courtesy "ping" rate is once a week. Please remember that you are asking for valuable time from other developers.

If you have further questions, they may be answered by the LLVM GitHub User Guide.

You can also ask questions in a comment on this PR, on the LLVM Discord or on the forums.

@llvmbot llvmbot added clang Clang issues not falling into any other category libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi. clang:frontend Language frontend issues, e.g. anything involving "Sema" github:workflow labels Sep 25, 2025
@llvmbot
Copy link
Member

llvmbot commented Sep 25, 2025

@llvm/pr-subscribers-github-workflow
@llvm/pr-subscribers-libcxx

@llvm/pr-subscribers-clang

Author: MUSTAPHA BARKI (aka76bm)

Changes

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

3 Files Affected:

  • (modified) .github/workflows/gha-codeql.yml (+5-1)
  • (modified) .github/workflows/libcxx-run-benchmarks.yml (+6-2)
  • (modified) clang/lib/AST/Decl.cpp (+9-4)
diff --git a/.github/workflows/gha-codeql.yml b/.github/workflows/gha-codeql.yml
index efb8143877c4e..179e5b75c5fee 100644
--- a/.github/workflows/gha-codeql.yml
+++ b/.github/workflows/gha-codeql.yml
@@ -31,7 +31,11 @@ jobs:
       - name: Initialize CodeQL
         uses: github/codeql-action/init@192325c86100d080feab897ff886c34abd4c83a3 # v3.30.3
         with:
-          languages: actions
+          languages: actions, swift
           queries: security-extended
+      - name: Build Swift code
+        run: |
+          swiftc llvm/test/tools/opt-viewer/Inputs/suppress/s.swift
+          swiftc llvm/test/tools/opt-viewer/Inputs/unicode-function-name/s.swift
       - name: Perform CodeQL Analysis
         uses: github/codeql-action/analyze@192325c86100d080feab897ff886c34abd4c83a3 # v3.30.3
diff --git a/.github/workflows/libcxx-run-benchmarks.yml b/.github/workflows/libcxx-run-benchmarks.yml
index 17a97df029ba5..35037683efed2 100644
--- a/.github/workflows/libcxx-run-benchmarks.yml
+++ b/.github/workflows/libcxx-run-benchmarks.yml
@@ -64,17 +64,21 @@ jobs:
           path: repo # Avoid nuking the workspace, where we have the Python virtualenv
 
       - name: Run baseline
+        env:
+          BENCHMARKS: ${{ steps.vars.outputs.benchmarks }}
         run: |
           source .venv/bin/activate && cd repo
           python -m pip install -r libcxx/utils/requirements.txt
           baseline_commit=$(git merge-base ${{ steps.vars.outputs.pr_base }} ${{ steps.vars.outputs.pr_head }})
-          ./libcxx/utils/test-at-commit --commit ${baseline_commit} -B build/baseline -- -sv -j1 --param optimization=speed ${{ steps.vars.outputs.benchmarks }}
+          ./libcxx/utils/test-at-commit --commit ${baseline_commit} -B build/baseline -- -sv -j1 --param optimization=speed $BENCHMARKS
           ./libcxx/utils/consolidate-benchmarks build/baseline | tee baseline.lnt
 
       - name: Run candidate
+        env:
+          BENCHMARKS: ${{ steps.vars.outputs.benchmarks }}
         run: |
           source .venv/bin/activate && cd repo
-          ./libcxx/utils/test-at-commit --commit ${{ steps.vars.outputs.pr_head }} -B build/candidate -- -sv -j1 --param optimization=speed ${{ steps.vars.outputs.benchmarks }}
+          ./libcxx/utils/test-at-commit --commit ${{ steps.vars.outputs.pr_head }} -B build/candidate -- -sv -j1 --param optimization=speed $BENCHMARKS
           ./libcxx/utils/consolidate-benchmarks build/candidate | tee candidate.lnt
 
       - name: Compare baseline and candidate runs
diff --git a/clang/lib/AST/Decl.cpp b/clang/lib/AST/Decl.cpp
index cd8e495e82c80..2969cb6d5fdfe 100644
--- a/clang/lib/AST/Decl.cpp
+++ b/clang/lib/AST/Decl.cpp
@@ -4024,12 +4024,17 @@ bool FunctionDecl::isInlineDefinitionExternallyVisible() const {
   ASTContext &Context = getASTContext();
 
   if (Context.getLangOpts().GNUInline || hasAttr<GNUInlineAttr>()) {
+    // GNU inline semantics:
+    //
+    // A function defined 'inline' is externally visible.
+    // A function defined 'extern inline' is not externally visible.
+    //
+    // If any declaration is 'inline' but not 'extern', the definition is
+    // externally visible. This is the only case that matters for a function
+    // defined 'extern inline'.
+    //
     // Note: If you change the logic here, please change
     // doesDeclarationForceExternallyVisibleDefinition as well.
-    //
-    // If it's not the case that both 'inline' and 'extern' are
-    // specified on the definition, then this inline definition is
-    // externally visible.
     if (Context.getLangOpts().CPlusPlus)
       return false;
     if (!(isInlineSpecified() && getStorageClass() == SC_Extern))

Copy link
Contributor

@boomanaiden154 boomanaiden154 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks AI generated and very low quality.

We do not even have any swift in the repository and the change in Decl.cpp is completely unrelated.

@erichkeane
Copy link
Collaborator

Both the title and commit message are irrelevant/empty here. As it is, this looks like a spam PR at best. If this is not the case, please feel free to re-open with better commit message/justification as to what you're trying to do and/or fix.

@erichkeane erichkeane closed this Sep 25, 2025
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 github:workflow libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants