absolute and relative header paths aren't resolved to be the same header
When including "#pragma once" header twice, once in absolute path and once in relative paths, simplecpp doesn't resolve the header to be the same, and therefore includes it twice. Example:
test.hh:
test.cc:
#include "test.hh"
#include "{YOUR_CURRENT_DIR_HERE}/test.hh"
gcc -E full output:
# 1 "test.cc" # 1 "<built-in>" # 1 "<command-line>" # 1 "/usr/include/stdc-predef.h" 1 3 4 # 1 "<command-line>" 2 # 1 "test.cc" # 1 "test.hh" 1 9 # 2 "test.cc" 2
simplecpp full output:
#line 3 "test.hh" 9 #line 3 "{YOUR_CURRENT_DIR_HERE}/test.hh" 9
Thread: https://sourceforge.net/p/cppcheck/discussion/general/thread/c01f80556b/