Open nmggithub opened 3 years ago
Hi @nmggithub . Thanks for reporting this. I'm able to reproduce the issue with just:
#define MACRO
/* documention */
int foo() MACRO;
int main()
{
foo();
return 0;
}
I was not able to reproduce the issue in VS, so the issue would appear to be specific to the C/C++ Extension's implementation of doc comment parsing.
Hi @nmggithub . Thanks for reporting this. I'm able to reproduce the issue with just:
#define MACRO /* documention */ int foo() MACRO; int main() { foo(); return 0; }
I was not able to reproduce the issue in VS, so the issue would appear to be specific to the C/C++ Extension's implementation of doc comment parsing.
This is interesting to me here because it appears (from my own testing) that the trailing macro __THROW
actually does not cause VSCode to exhibit this behavior. I see what you mean though about trailing macros generally causing this behavior, but __THROW
appears to be an exception. Modifying your code like so causes the correct behavior (the display of the comment text in the hover card):
#define __THROW
/* documention */
int foo() __THROW;
int main()
{
foo();
return 0;
}
I'm not sure what makes this the exception, but I wanted to make sure it was pointed out. It should also be noted that this is using our own __THROW
macro, not the one offered by glibc
. So it appears simply the name is the pertinent part.
Upon additional testing _THROW
with a single underscore causes the correct behavior as well, but THROW
with no underscores does not (and neither does ___THROW
with three underscores). I'm not sure how relevant any of that is, but I thought I'd mention it.
Bug type: Language Service
Describe the bug
Steps to reproduce (note: the examples below reference Linux header files)
unistd.h
fork
function in the code__THROWNL
to__THROW
Expected behavior The comment appears on mouseover even when
__THROWNL
is present.Additional context I am well aware this is likely an issue directly with my version of
glibc
, but I thought I'd bring the issue up here.