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

Incorrect return type #1206

Open
DonggeLiu opened this issue Aug 24, 2023 · 2 comments
Open

Incorrect return type #1206

DonggeLiu opened this issue Aug 24, 2023 · 2 comments

Comments

@DonggeLiu
Copy link

The return type of function std::string CEscape(absl::string_view src); was incorrect in the report.
It should be std::string, but the report records void.

@DavidKorczynski
Copy link
Contributor

Some other oddities are happening in the same file. When I look at the .yaml produced by the LLVM frontend I get e.g.

    - functionName:    _ZN4absl12_GLOBAL__N_115CEscapeInternalENS_11string_viewEbb
      functionSourceFile: '/proc/self/cwd/external/com_google_absl/absl/strings/escaping.cc'
      linkageType:     InternalLinkage
      functionLinenumber: 320
      functionDepth:   0
      returnType:      void
      argCount:        5
      argTypes:
        - 'class.std::__1::basic_string *'
        - 'char *'
        - size_t
        - bool
        - bool
      constantsTouched: []
      argNames:
        - src
        - use_hex
        - utf8_safe
        - ''
        - ''

For the following function: https://github.com/abseil/abseil-cpp/blob/8ebad34c3fa54a9ad2f46ca8cab98e75c4f750bf/absl/strings/escaping.cc#L319C1-L321

The right arguments are there, but more arguments are added.

@DavidKorczynski
Copy link
Contributor

Following my above comment, the addition of arguments is related to std::string_view view, which for some reason LLVM translates into a two arguments of char * and size_t types.

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

No branches or pull requests

2 participants