Open
Description
Sometimes compiler warnings must be disabled in third-party code, but related preprocessor directives are considered by Clang-Format as header group boundary what makes Clang-Format unable to find main header (included after third-party headers).
Code snippet:
#include <Python.h>
#ifdef __GNUC__
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wpedantic"
# pragma GCC diagnostic ignored "-Wshadow"
# pragma GCC diagnostic ignored "-Wsuggest-override"
#endif
#define BOOST_NO_AUTO_PTR
#include <boost/python/import.hpp>
#include <boost/python/object.hpp>
#ifdef __GNUC__
# pragma GCC diagnostic pop
#endif
# include "application_header1.h"
...
# include "application_headerN.h"
I tried 19.1.1 and main
(49d48c3)