Skip to content
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

[Bug]: Symbol table lookup for incomplete RecordDecl might return TypeDef #608

Open
1 task done
Jezurko opened this issue Jun 3, 2024 · 0 comments
Open
1 task done
Assignees
Labels

Comments

@Jezurko
Copy link
Collaborator

Jezurko commented Jun 3, 2024

Prerequisites

  • I have read the documentation and the proposed feature is not implemented.

Description

Looking up symbol using the default_symbol_mangler::symbol() method to find a decl missing a body might return typedef op. This is troublesome, as we expect it to be an incomplete RecordDecl and we try to add the body to the typedef.
Example reproducer (based on LLVM SingleSource TS: SingleSource/Regression/C/gcc-c-torture/execute/20040703-1.c)

typedef unsigned int cpp_num_part;
typedef struct cpp_num cpp_num;
struct cpp_num
{
   cpp_num_part high;
   cpp_num_part low;
   int unsignedp;
   int overflow; 
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants