bugprone-suspicious-include

该检查检测到各种情况下,包含引用了看似实现文件的代码,这往往会导致难以追踪的 ODR 违规。

示例

#include "Dinosaur.hpp"     // OK, .hpp files tend not to have definitions.
#include "Pterodactyl.h"    // OK, .h files tend not to have definitions.
#include "Velociraptor.cpp" // Warning, filename is suspicious.
#include_next <stdio.c>     // Warning, filename is suspicious.