After compiling the latest clang with clang-tools-extra, I tried using clang-tidy to check the examples from: CppCon 2015: Herb Sutter "Writing Good C++14 But it failed to get any errors. This is the command I used: clang-tidy main.cpp -checks=-*,cppcoreguidelines-* -header-filter=.* -p ./build And this is the sample code I tried ot check against:
#include <iostream>
#include <memory>
using namespace std;
void f(int*) {};
shared_ptr<int> gsp = make_shared<int>();
int main()
{
f(gsp.get());
}
Aucun commentaire:
Enregistrer un commentaire