https://bugs.kde.org/show_bug.cgi?id=496985

            Bug ID: 496985
           Summary: Symbol Browsing broken with macros
    Classification: Applications
           Product: kdevelop
           Version: unspecified
          Platform: Other
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: Language Support: CPP (Clang-based)
          Assignee: kdevelop-bugs-n...@kde.org
          Reporter: smuel...@chronox.de
  Target Milestone: ---

Starting with version 24.08, the symbol browsing (clicking on a symbol to go to
its implementation or declaration) is broken when using macros. The example
code is found in github.com/smuellerDD/leancrypto.

The code uses return code checkers defined like:

#define CKINT(x)                                                              
\
        {                                                                     
\
                ret = x;                                                      
\
                if (ret < 0)                                                  
\
                        goto out;                                             
\
        }

A function invocation is like:

CKINT(asn1_ber_decoder(&x509_decoder, &pctx, data, datalen));

Now, when hovering over "asn1_ber_encoder", the browsing mode tries to lead me
to the "out" goto symbol that is defined by the "CKINT" macro instead of the
actual function declaration / implementation.

STEPS TO REPRODUCE
1. load and open https://gitnub.com/smuellerDD/leancrypto with kdevelop
2. take any file in there, e.g. asn1/src/x509_cert_generator.c and search for
"CKINT" - e.g. line 1324.
3. Click on the symbol there, e.g. "asn1_ber_decoder" 


OBSERVED RESULT

After clicking on the symbol, you see kdevelop will lead you to the out goto
target instead of the symbol.


EXPECTED RESULT

After clicking on the symbol, the browser should jump to the symbol
implementation or declaration.

SOFTWARE/OS VERSIONS

Linux/KDE Plasma: OpenSUSE tumbleweed current version
KDE Plasma Version: 6.2.4
KDE Frameworks Version: 6.8.0
Kdevelop version: 24.08.3
Qt Version: 6.8.0

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to