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()) { + // 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))