You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What is the issue you have?
When running clang-tidy on a minimal example I get the warning Call to virtual function during construction [clang-analyzer-optin.cplusplus.VirtualCall]
Please describe the steps to reproduce the issue. Can you provide a small but working code example?
Clone the repo with tag v3.1.2
Create a cpp file:
#include <nlohmann/json.hpp>
int main()
{
std::ifstream in("a.json");
nlohmann::json j;
in >> j;
}
Run clang-tidy on it: clang-tidy b.cc -- -I.
What is the expected behavior?
No warnings emitted
And what is the actual behavior instead?
One warning emitted by the parsing of the ifstream (full output at the end)
Which compiler and operating system are you using? Is it a supported compiler?
% lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.3 LTS
Release: 16.04
Codename: xenial
This issue will be fixed with #971. There, the skipping of the BOM (this is the code where get_character is called) will be moved into the lexer. I hence mark the issue as "proposed fix".
The reason that the issue is not triggered by calling json::parse(buffer.str()) is that it uses a different input adapter.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
stalebot
added
the
state: stale
the issue has not been updated in a while and will be closed automatically soon unless it is updated
label
May 10, 2018
nlohmann
removed
the
state: stale
the issue has not been updated in a while and will be closed automatically soon unless it is updated
label
May 27, 2018
Bug Report
What is the issue you have?
When running clang-tidy on a minimal example I get the warning
Call to virtual function during construction [clang-analyzer-optin.cplusplus.VirtualCall]
Please describe the steps to reproduce the issue. Can you provide a small but working code example?
v3.1.2
clang-tidy b.cc -- -I.
What is the expected behavior?
No warnings emitted
And what is the actual behavior instead?
One warning emitted by the parsing of the ifstream (full output at the end)
Which compiler and operating system are you using? Is it a supported compiler?
develop
branch?I used tag
v3.1.2
This is the full output:
Maybe related to #94 ?
P.s. the warning is not triggered if I use the
json::parse
explicitely like so:The text was updated successfully, but these errors were encountered: