flycheck-irony
flycheck-irony copied to clipboard
Error in included files should be reported on the checked buffer
See discussion https://github.com/flycheck/flycheck/issues/548#issuecomment-77845737
Errors that appears in the included file and not in the main file is common in C++, for example (not tested but shows the idea):
foo.h
template <class T>
void blah()
{
static_assert(std::is_copy_constructible<T>::value, "blah error"); // ERROR here
}
foo.cpp
#include "foo.h"
#include <ffstream>
void foo()
{
blah<std::ifstream>(); // No error here, static assertion is in header file
}