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

Define with parenthesis not parsed #107

Closed
FloSim82 opened this issue Feb 21, 2022 · 1 comment
Closed

Define with parenthesis not parsed #107

FloSim82 opened this issue Feb 21, 2022 · 1 comment
Assignees
Labels
bug Confirmed bug

Comments

@FloSim82
Copy link

FloSim82 commented Feb 21, 2022

Under Ubuntu 18.04, when adding parenthesis to a define in Header file, it is not parsed with clang2py.

File lib1.h is the following :

#ifndef DEF_H
#define DEF_H

#define OS_DEF_SET      -1
#define OS_DEF_CHECK   0

#define CPU_DEF_SET   (-1)
#define CPU_DEF_CHECK  (0)

#endif

When launching the parsing with command clang2py -k emstu lib1.h, we got the following output :

# -*- coding: utf-8 -*-
(....)
DEF_H = True # macro
OS_DEF_SET = -1 # macro
OS_DEF_CHECK = 0 # macro
# def CPU_DEF_SET(-1):  # macro
#    return   
# def CPU_DEF_CHECK(0):  # macro
#    return   
__all__ = \
    ['DEF_H', 'OS_DEF_CHECK', 'OS_DEF_SET']

How could we parse defines CPU_DEF_SET and CPU_DEF_CHECK without removing the parenthesis ?

@trolldbois
Copy link
Owner

fixed in release 2.3.4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed bug
Projects
None yet
Development

No branches or pull requests

2 participants