[llvm-bugs] [Bug 51822] New: False positive#pragma visibility pop with no matching #pragma visibility push
via llvm-bugs
llvm-bugs at lists.llvm.org
Sat Sep 11 04:01:31 PDT 2021
https://bugs.llvm.org/show_bug.cgi?id=51822
Bug ID: 51822
Summary: False positive#pragma visibility pop with no matching
#pragma visibility push
Product: clang-tools-extra
Version: unspecified
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: clangd
Assignee: unassignedclangbugs at nondot.org
Reporter: peter at eisenlohr.org
CC: llvm-bugs at lists.llvm.org
We are receiving false positives from clangd:
#pragma visibility pop with no matching #pragma visibility push
Minimal testcase that reproduces this:
#pragma GCC visibility push(default)
namespace xyz {}
#pragma GCC visibility pop
Instead of the namespace, any other declaration I tried resulted in the same
problem. Only if there is no other C++ code between the push and pop, the
message disappears.
It seems this only happens with clangd. I tried to write a testcase for this by
modifying one of the tests in clang-tools-extra/test/clang-tidy, but the
problem doesn't show there. I'm not sure how to write a clangd-testcase for
this, so I'm here just reporting this.
This happens with pre-build clangd as well as with custom builds of 12.x, 13.x
and main branches.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210911/4df379a5/attachment.html>
More information about the llvm-bugs
mailing list