Skip to content

[clang][ExtractAPI] combine typedef records if the underlying type's name is underscored #125964

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 7, 2025

Conversation

QuietMisdreavus
Copy link
Contributor

fixes rdar://137214218

When 'typedef struct' decls are encountered, the records are combined if the underlying type is either anonymous or has the same name as the typedef. Extend this behavior to also combine records when the underlying type has an underscored name that is equivalent to the typedef name when the leading underscores are removed.

fixes rdar://137214218

When 'typedef struct' decls are encountered, the records are combined if
the underlying type is either anonymous or has the same name as the
typedef. Extend this behavior to also combine records when the
underlying type has an underscored name that is equivalent to the
typedef name when the leading underscores are removed.
@llvmbot llvmbot added the clang Clang issues not falling into any other category label Feb 6, 2025
@llvmbot
Copy link
Member

llvmbot commented Feb 6, 2025

@llvm/pr-subscribers-clang

Author: QuietMisdreavus (QuietMisdreavus)

Changes

fixes rdar://137214218

When 'typedef struct' decls are encountered, the records are combined if the underlying type is either anonymous or has the same name as the typedef. Extend this behavior to also combine records when the underlying type has an underscored name that is equivalent to the typedef name when the leading underscores are removed.


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

2 Files Affected:

  • (modified) clang/include/clang/ExtractAPI/ExtractAPIVisitor.h (+25-1)
  • (added) clang/test/ExtractAPI/typedef_underscore.c (+69)
diff --git a/clang/include/clang/ExtractAPI/ExtractAPIVisitor.h b/clang/include/clang/ExtractAPI/ExtractAPIVisitor.h
index aa86e4180671144..6442b234cd929f2 100644
--- a/clang/include/clang/ExtractAPI/ExtractAPIVisitor.h
+++ b/clang/include/clang/ExtractAPI/ExtractAPIVisitor.h
@@ -1146,11 +1146,30 @@ bool ExtractAPIVisitorBase<Derived>::VisitTypedefNameDecl(
 
   StringRef Name = Decl->getName();
 
+  auto nameMatches = [&Name](TagDecl *TagDecl) {
+    StringRef TagName = TagDecl->getName();
+
+    if (TagName == Name)
+      return true;
+
+    // Also check whether the tag decl's name is the same as the typedef name
+    // with prefixed underscores
+    if (TagName.starts_with('_')) {
+      StringRef StrippedName =
+          TagName.drop_while([](char c) { return c == '_'; });
+
+      if (StrippedName == Name)
+        return true;
+    }
+
+    return false;
+  };
+
   // If the underlying type was defined as part of the typedef modify it's
   // fragments directly and pretend the typedef doesn't exist.
   if (auto *TagDecl = Decl->getUnderlyingType()->getAsTagDecl()) {
     if (TagDecl->isEmbeddedInDeclarator() && TagDecl->isCompleteDefinition() &&
-        Decl->getName() == TagDecl->getName()) {
+        nameMatches(TagDecl)) {
       SmallString<128> TagUSR;
       index::generateUSRForDecl(TagDecl, TagUSR);
       if (auto *Record = API.findRecordForUSR(TagUSR)) {
@@ -1164,6 +1183,11 @@ bool ExtractAPIVisitorBase<Derived>::VisitTypedefNameDecl(
             .append(Name, DeclarationFragments::FragmentKind::Identifier)
             .appendSemicolon();
 
+        // Replace the name and subheading in case it's underscored so we can
+        // use the non-underscored version
+        Record->Name = Name;
+        Record->SubHeading = DeclarationFragmentsBuilder::getSubHeading(Decl);
+
         return true;
       }
     }
diff --git a/clang/test/ExtractAPI/typedef_underscore.c b/clang/test/ExtractAPI/typedef_underscore.c
new file mode 100644
index 000000000000000..a42046907b46de8
--- /dev/null
+++ b/clang/test/ExtractAPI/typedef_underscore.c
@@ -0,0 +1,69 @@
+// RUN: rm -rf %t
+// RUN: %clang_cc1 -extract-api --pretty-sgf --emit-sgf-symbol-labels-for-testing \
+// RUN:   --product-name=TypedefChain -triple arm64-apple-macosx -x c-header %s -o %t/typedefchain-c.symbols.json -verify
+// RUN: %clang_cc1 -extract-api --pretty-sgf --emit-sgf-symbol-labels-for-testing \
+// RUN:   --product-name=TypedefChain -triple arm64-apple-macosx -x c++-header %s -o %t/typedefchain-cxx.symbols.json -verify
+
+// RUN: FileCheck %s --input-file %t/typedefchain-c.symbols.json --check-prefix MYSTRUCT
+// RUN: FileCheck %s --input-file %t/typedefchain-cxx.symbols.json --check-prefix MYSTRUCT
+typedef struct _MyStruct { } MyStruct;
+
+// MYSTRUCT-LABEL: "!testLabel": "c:@S@_MyStruct"
+// MYSTRUCT:      "accessLevel": "public",
+// MYSTRUCT:      "declarationFragments": [
+// MYSTRUCT-NEXT:   {
+// MYSTRUCT-NEXT:     "kind": "keyword",
+// MYSTRUCT-NEXT:     "spelling": "typedef"
+// MYSTRUCT-NEXT:   },
+// MYSTRUCT-NEXT:   {
+// MYSTRUCT-NEXT:     "kind": "text",
+// MYSTRUCT-NEXT:     "spelling": " "
+// MYSTRUCT-NEXT:   },
+// MYSTRUCT-NEXT:   {
+// MYSTRUCT-NEXT:     "kind": "keyword",
+// MYSTRUCT-NEXT:     "spelling": "struct"
+// MYSTRUCT-NEXT:   },
+// MYSTRUCT-NEXT:   {
+// MYSTRUCT-NEXT:     "kind": "text",
+// MYSTRUCT-NEXT:     "spelling": " "
+// MYSTRUCT-NEXT:   },
+// MYSTRUCT-NEXT:   {
+// MYSTRUCT-NEXT:     "kind": "identifier",
+// MYSTRUCT-NEXT:     "spelling": "_MyStruct"
+// MYSTRUCT-NEXT:   },
+// MYSTRUCT-NEXT:   {
+// MYSTRUCT-NEXT:     "kind": "text",
+// MYSTRUCT-NEXT:     "spelling": " { ... } "
+// MYSTRUCT-NEXT:   },
+// MYSTRUCT-NEXT:   {
+// MYSTRUCT-NEXT:     "kind": "identifier",
+// MYSTRUCT-NEXT:     "spelling": "MyStruct"
+// MYSTRUCT-NEXT:   },
+// MYSTRUCT-NEXT:   {
+// MYSTRUCT-NEXT:     "kind": "text",
+// MYSTRUCT-NEXT:     "spelling": ";"
+// MYSTRUCT-NEXT:   }
+// MYSTRUCT-NEXT: ],
+// MYSTRUCT:      "kind": {
+// MYSTRUCT-NEXT:   "displayName": "Structure",
+// MYSTRUCT-NEXT:   "identifier": "c{{(\+\+)?}}.struct"
+// MYSTRUCT:           "names": {
+// MYSTRUCT-NEXT:        "navigator": [
+// MYSTRUCT-NEXT:          {
+// MYSTRUCT-NEXT:            "kind": "identifier",
+// MYSTRUCT-NEXT:            "spelling": "MyStruct"
+// MYSTRUCT-NEXT:          }
+// MYSTRUCT-NEXT:        ],
+// MYSTRUCT-NEXT:        "subHeading": [
+// MYSTRUCT-NEXT:          {
+// MYSTRUCT-NEXT:            "kind": "identifier",
+// MYSTRUCT-NEXT:            "spelling": "MyStruct"
+// MYSTRUCT-NEXT:          }
+// MYSTRUCT-NEXT:        ],
+// MYSTRUCT-NEXT:        "title": "MyStruct"
+// MYSTRUCT-NEXT:      },
+// MYSTRUCT:      "pathComponents": [
+// MYSTRUCT-NEXT:    "MyStruct"
+// MYSTRUCT-NEXT:  ]
+
+// expected-no-diagnostics


// Also check whether the tag decl's name is the same as the typedef name
// with prefixed underscores
if (TagName.starts_with('_')) {
Copy link
Contributor

@PortalPete PortalPete Feb 7, 2025

Choose a reason for hiding this comment

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

Is it worth catching a typedef of a typedef that also begins with an underscore?

  • This method could catch daisy-chain types by putting these lines in a loop.
  • To avoid an ∞ loop (albeit, rather unlikely), it could have an arbitrary iteration limit of something reasonable, say 5.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is already limiting itself to underlying types which (1) are "tag decls", i.e. structs/classes/enums/unions, and (2) whose definitions are "embedded in a declarator", which AFAIK means that it's not going to catch typedefs of typedefs to begin with.

Now, I recently implemented logic in the Swift compiler to catch the same situation i mentioned in the PR description, but in that PR i took a more general approach and folded together "public type aliases of types that are being hidden (e.g. underscored)". However, the Swift symbol graph generator didn't have its own notion of "folding decls together" yet, since in the average case the Swift Clang Importer already handles that, whereas here in Clang we were already handling typedef struct unification. (I also didn't go recursive in the Swift PR, but the nondeterministic ordering of AST walking could make that even more complicated! 😵‍💫)

I'm inclined to hold off on going recursive for now, and come back later if we need to handle typedef _HiddenTypedef PublicTypedef in this kind of way. I could see this becoming even more complicated in this kind of situation, to avoid revealing too many implementation details in an ostensibly public symbol graph rendering.

@QuietMisdreavus QuietMisdreavus merged commit 6ef978b into llvm:main Feb 7, 2025
8 checks passed
@QuietMisdreavus QuietMisdreavus deleted the typedef-underscore branch February 7, 2025 20:23
QuietMisdreavus added a commit to swiftlang/llvm-project that referenced this pull request Feb 7, 2025
…name is underscored (llvm#125964)

fixes rdar://137214218

When 'typedef struct' decls are encountered, the records are combined if
the underlying type is either anonymous or has the same name as the
typedef. Extend this behavior to also combine records when the
underlying type has an underscored name that is equivalent to the
typedef name when the leading underscores are removed.
@llvm-ci
Copy link
Collaborator

llvm-ci commented Feb 7, 2025

LLVM Buildbot has detected a new failure on builder llvm-clang-aarch64-darwin running on doug-worker-5 while building clang at step 6 "test-build-unified-tree-check-all".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/190/builds/14302

Here is the relevant piece of the build log for the reference
Step 6 (test-build-unified-tree-check-all) failure: test (failure)
******************** TEST 'Clang :: Driver/offload-Xarch.c' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 1: /Users/buildbot/buildbot-root/aarch64-darwin/build/bin/clang --target=x86_64-unknown-linux-gnu -x cuda /Users/buildbot/buildbot-root/aarch64-darwin/llvm-project/clang/test/Driver/offload-Xarch.c -Xarch_nvptx64 -O3 -S -nogpulib -nogpuinc -### 2>&1 | /Users/buildbot/buildbot-root/aarch64-darwin/build/bin/FileCheck -check-prefix=O3ONCE /Users/buildbot/buildbot-root/aarch64-darwin/llvm-project/clang/test/Driver/offload-Xarch.c
+ /Users/buildbot/buildbot-root/aarch64-darwin/build/bin/FileCheck -check-prefix=O3ONCE /Users/buildbot/buildbot-root/aarch64-darwin/llvm-project/clang/test/Driver/offload-Xarch.c
+ /Users/buildbot/buildbot-root/aarch64-darwin/build/bin/clang --target=x86_64-unknown-linux-gnu -x cuda /Users/buildbot/buildbot-root/aarch64-darwin/llvm-project/clang/test/Driver/offload-Xarch.c -Xarch_nvptx64 -O3 -S -nogpulib -nogpuinc -###
RUN: at line 2: /Users/buildbot/buildbot-root/aarch64-darwin/build/bin/clang -x cuda /Users/buildbot/buildbot-root/aarch64-darwin/llvm-project/clang/test/Driver/offload-Xarch.c -Xarch_device -O3 -S -nogpulib -nogpuinc -### 2>&1 | /Users/buildbot/buildbot-root/aarch64-darwin/build/bin/FileCheck -check-prefix=O3ONCE /Users/buildbot/buildbot-root/aarch64-darwin/llvm-project/clang/test/Driver/offload-Xarch.c
+ /Users/buildbot/buildbot-root/aarch64-darwin/build/bin/FileCheck -check-prefix=O3ONCE /Users/buildbot/buildbot-root/aarch64-darwin/llvm-project/clang/test/Driver/offload-Xarch.c
+ /Users/buildbot/buildbot-root/aarch64-darwin/build/bin/clang -x cuda /Users/buildbot/buildbot-root/aarch64-darwin/llvm-project/clang/test/Driver/offload-Xarch.c -Xarch_device -O3 -S -nogpulib -nogpuinc -###
RUN: at line 3: /Users/buildbot/buildbot-root/aarch64-darwin/build/bin/clang -x hip /Users/buildbot/buildbot-root/aarch64-darwin/llvm-project/clang/test/Driver/offload-Xarch.c -Xarch_amdgcn -O3 -S -nogpulib -nogpuinc -### 2>&1 | /Users/buildbot/buildbot-root/aarch64-darwin/build/bin/FileCheck -check-prefix=O3ONCE /Users/buildbot/buildbot-root/aarch64-darwin/llvm-project/clang/test/Driver/offload-Xarch.c
+ /Users/buildbot/buildbot-root/aarch64-darwin/build/bin/clang -x hip /Users/buildbot/buildbot-root/aarch64-darwin/llvm-project/clang/test/Driver/offload-Xarch.c -Xarch_amdgcn -O3 -S -nogpulib -nogpuinc -###
+ /Users/buildbot/buildbot-root/aarch64-darwin/build/bin/FileCheck -check-prefix=O3ONCE /Users/buildbot/buildbot-root/aarch64-darwin/llvm-project/clang/test/Driver/offload-Xarch.c
RUN: at line 4: /Users/buildbot/buildbot-root/aarch64-darwin/build/bin/clang -fopenmp=libomp -fopenmp-targets=amdgcn-amd-amdhsa -nogpulib -nogpuinc    -Xarch_amdgcn -march=gfx90a -Xarch_amdgcn -O3 -S -### /Users/buildbot/buildbot-root/aarch64-darwin/llvm-project/clang/test/Driver/offload-Xarch.c 2>&1  | /Users/buildbot/buildbot-root/aarch64-darwin/build/bin/FileCheck -check-prefix=O3ONCE /Users/buildbot/buildbot-root/aarch64-darwin/llvm-project/clang/test/Driver/offload-Xarch.c
+ /Users/buildbot/buildbot-root/aarch64-darwin/build/bin/clang -fopenmp=libomp -fopenmp-targets=amdgcn-amd-amdhsa -nogpulib -nogpuinc -Xarch_amdgcn -march=gfx90a -Xarch_amdgcn -O3 -S -### /Users/buildbot/buildbot-root/aarch64-darwin/llvm-project/clang/test/Driver/offload-Xarch.c
+ /Users/buildbot/buildbot-root/aarch64-darwin/build/bin/FileCheck -check-prefix=O3ONCE /Users/buildbot/buildbot-root/aarch64-darwin/llvm-project/clang/test/Driver/offload-Xarch.c
RUN: at line 7: /Users/buildbot/buildbot-root/aarch64-darwin/build/bin/clang -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -nogpulib -nogpuinc    -Xarch_nvptx64 -march=sm_52 -Xarch_nvptx64 -O3 -S -### /Users/buildbot/buildbot-root/aarch64-darwin/llvm-project/clang/test/Driver/offload-Xarch.c 2>&1  | /Users/buildbot/buildbot-root/aarch64-darwin/build/bin/FileCheck -check-prefix=O3ONCE /Users/buildbot/buildbot-root/aarch64-darwin/llvm-project/clang/test/Driver/offload-Xarch.c
+ /Users/buildbot/buildbot-root/aarch64-darwin/build/bin/clang -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -nogpulib -nogpuinc -Xarch_nvptx64 -march=sm_52 -Xarch_nvptx64 -O3 -S -### /Users/buildbot/buildbot-root/aarch64-darwin/llvm-project/clang/test/Driver/offload-Xarch.c
+ /Users/buildbot/buildbot-root/aarch64-darwin/build/bin/FileCheck -check-prefix=O3ONCE /Users/buildbot/buildbot-root/aarch64-darwin/llvm-project/clang/test/Driver/offload-Xarch.c
RUN: at line 13: /Users/buildbot/buildbot-root/aarch64-darwin/build/bin/clang -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda,amdgcn-amd-amdhsa -nogpulib    --target=x86_64-unknown-linux-gnu -Xopenmp-target=nvptx64-nvidia-cuda --offload-arch=sm_52,sm_60 -nogpuinc    -Xopenmp-target=amdgcn-amd-amdhsa --offload-arch=gfx90a,gfx1030 -ccc-print-bindings -### /Users/buildbot/buildbot-root/aarch64-darwin/llvm-project/clang/test/Driver/offload-Xarch.c 2>&1  | /Users/buildbot/buildbot-root/aarch64-darwin/build/bin/FileCheck -check-prefix=OPENMP /Users/buildbot/buildbot-root/aarch64-darwin/llvm-project/clang/test/Driver/offload-Xarch.c
+ /Users/buildbot/buildbot-root/aarch64-darwin/build/bin/clang -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda,amdgcn-amd-amdhsa -nogpulib --target=x86_64-unknown-linux-gnu -Xopenmp-target=nvptx64-nvidia-cuda --offload-arch=sm_52,sm_60 -nogpuinc -Xopenmp-target=amdgcn-amd-amdhsa --offload-arch=gfx90a,gfx1030 -ccc-print-bindings -### /Users/buildbot/buildbot-root/aarch64-darwin/llvm-project/clang/test/Driver/offload-Xarch.c
+ /Users/buildbot/buildbot-root/aarch64-darwin/build/bin/FileCheck -check-prefix=OPENMP /Users/buildbot/buildbot-root/aarch64-darwin/llvm-project/clang/test/Driver/offload-Xarch.c
RUN: at line 29: /Users/buildbot/buildbot-root/aarch64-darwin/build/bin/clang -x cuda /Users/buildbot/buildbot-root/aarch64-darwin/llvm-project/clang/test/Driver/offload-Xarch.c --offload-arch=sm_52,sm_60 -Xarch_sm_52 -O3 -Xarch_sm_60 -O0    --target=x86_64-unknown-linux-gnu -Xarch_host -O3 -S -nogpulib -nogpuinc -### 2>&1  | /Users/buildbot/buildbot-root/aarch64-darwin/build/bin/FileCheck -check-prefix=CUDA /Users/buildbot/buildbot-root/aarch64-darwin/llvm-project/clang/test/Driver/offload-Xarch.c
+ /Users/buildbot/buildbot-root/aarch64-darwin/build/bin/clang -x cuda /Users/buildbot/buildbot-root/aarch64-darwin/llvm-project/clang/test/Driver/offload-Xarch.c --offload-arch=sm_52,sm_60 -Xarch_sm_52 -O3 -Xarch_sm_60 -O0 --target=x86_64-unknown-linux-gnu -Xarch_host -O3 -S -nogpulib -nogpuinc -###
+ /Users/buildbot/buildbot-root/aarch64-darwin/build/bin/FileCheck -check-prefix=CUDA /Users/buildbot/buildbot-root/aarch64-darwin/llvm-project/clang/test/Driver/offload-Xarch.c
RUN: at line 37: /Users/buildbot/buildbot-root/aarch64-darwin/build/bin/clang -fopenmp=libomp --offload-arch=gfx90a -nogpulib -nogpuinc    --target=x86_64-unknown-linux-gnu -Xarch_amdgcn -Wl,-lfoo -### /Users/buildbot/buildbot-root/aarch64-darwin/llvm-project/clang/test/Driver/offload-Xarch.c 2>&1  | /Users/buildbot/buildbot-root/aarch64-darwin/build/bin/FileCheck -check-prefix=LIBS /Users/buildbot/buildbot-root/aarch64-darwin/llvm-project/clang/test/Driver/offload-Xarch.c
+ /Users/buildbot/buildbot-root/aarch64-darwin/build/bin/clang -fopenmp=libomp --offload-arch=gfx90a -nogpulib -nogpuinc --target=x86_64-unknown-linux-gnu -Xarch_amdgcn -Wl,-lfoo -### /Users/buildbot/buildbot-root/aarch64-darwin/llvm-project/clang/test/Driver/offload-Xarch.c
+ /Users/buildbot/buildbot-root/aarch64-darwin/build/bin/FileCheck -check-prefix=LIBS /Users/buildbot/buildbot-root/aarch64-darwin/llvm-project/clang/test/Driver/offload-Xarch.c
�[1m/Users/buildbot/buildbot-root/aarch64-darwin/llvm-project/clang/test/Driver/offload-Xarch.c:43:10: �[0m�[0;1;31merror: �[0m�[1mLIBS: expected string not found in input
�[0m// LIBS: "--device-linker=amdgcn-amd-amdhsa=-lfoo"
�[0;1;32m         ^
�[0m�[1m<stdin>:1:1: �[0m�[0;1;30mnote: �[0m�[1mscanning from here
�[0mclang version 21.0.0git (https://github.com/llvm/llvm-project.git 6ef978b8c41a83378af3de1dceeea434715f80f4)
�[0;1;32m^
�[0m�[1m<stdin>:6:1365: �[0m�[0;1;30mnote: �[0m�[1mpossible intended match here
�[0m "/Users/buildbot/buildbot-root/aarch64-darwin/build/bin/clang-21" "-cc1" "-triple" "x86_64-unknown-linux-gnu" "-emit-llvm-bc" "-emit-llvm-uselists" "-dumpdir" "a-" "-disable-free" "-clear-ast-before-backend" "-main-file-name" "offload-Xarch.c" "-mrelocation-model" "pic" "-pic-level" "2" "-pic-is-pie" "-mframe-pointer=all" "-fmath-errno" "-ffp-contract=on" "-fno-rounding-math" "-mconstructor-aliases" "-funwind-tables=2" "-target-cpu" "x86-64" "-tune-cpu" "generic" "-debugger-tuning=gdb" "-fdebug-compilation-dir=/Users/buildbot/buildbot-root/aarch64-darwin/build/tools/clang/test/Driver" "-target-linker-version" "1053.12" "-fcoverage-compilation-dir=/Users/buildbot/buildbot-root/aarch64-darwin/build/tools/clang/test/Driver" "-resource-dir" "/Users/buildbot/buildbot-root/aarch64-darwin/build/lib/clang/21" "-internal-isystem" "/Users/buildbot/buildbot-root/aarch64-darwin/build/lib/clang/21/include" "-internal-isystem" "/usr/local/include" "-internal-externc-isystem" "/include" "-internal-externc-isystem" "/usr/include" "-internal-isystem" "/Users/buildbot/buildbot-root/aarch64-darwin/build/lib/clang/21/include" "-internal-isystem" "/usr/local/include" "-internal-externc-isystem" "/include" "-internal-externc-isystem" "/usr/include" "-ferror-limit" "19" "-fopenmp" "-nogpulib" "-fgnuc-version=4.2.1" "-fskip-odr-check-in-gmf" "-disable-llvm-passes" "-fopenmp-targets=amdgcn-amd-amdhsa" "-faddrsig" "-D__GCC_HAVE_DWARF2_CFI_ASM=1" "-o" "/var/folders/qg/gb2hp8jx3g969f6phcsc_d_80000gt/T/lit-tmp-g6fk_vnl/offload-Xarch-59cec9.bc" "-x" "c" "/Users/buildbot/buildbot-root/aarch64-darwin/llvm-project/clang/test/Driver/offload-Xarch.c"
�[0;1;32m                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ^
�[0m
Input file: <stdin>
Check file: /Users/buildbot/buildbot-root/aarch64-darwin/llvm-project/clang/test/Driver/offload-Xarch.c

-dump-input=help explains the following input dump.

Input was:
<<<<<<
�[1m�[0m�[0;1;30m            1: �[0m�[1m�[0;1;46mclang version 21.0.0git (https://github.com/llvm/llvm-project.git 6ef978b8c41a83378af3de1dceeea434715f80f4) �[0m
�[0;1;31mcheck:43'0     X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found
�[0m�[0;1;30m            2: �[0m�[1m�[0;1;46mTarget: x86_64-unknown-linux-gnu �[0m
�[0;1;31mcheck:43'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...

@QuietMisdreavus
Copy link
Contributor Author

I don't see how that failure is related to my PR; my change was restricted to ExtractAPI, it shouldn't be affecting the driver invocations.

@dyung
Copy link
Collaborator

dyung commented Feb 7, 2025

I don't see how that failure is related to my PR; my change was restricted to ExtractAPI, it shouldn't be affecting the driver invocations.

You can probably ignore it. I was about to take the machine offline to update it and might have interfered in the run somehow. The other builder did not show the failure when it built the next commit.

Icohedron pushed a commit to Icohedron/llvm-project that referenced this pull request Feb 11, 2025
…name is underscored (llvm#125964)

fixes rdar://137214218

When 'typedef struct' decls are encountered, the records are combined if
the underlying type is either anonymous or has the same name as the
typedef. Extend this behavior to also combine records when the
underlying type has an underscored name that is equivalent to the
typedef name when the leading underscores are removed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang Clang issues not falling into any other category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants