KDevelop background parser does not recognize include guards

Zlatan Stanojevic z.stanojevic at globaltcad.com
Fri Jul 12 11:42:27 BST 2019


To whom it may concern

KDevelop 5.3.2, KDE Frameworks 5.58.0, Qt 5.11.3
Fedora package: kdevelop-5.3.2-1.fc29.src.rpm

The KDevelop background parser does not recognize include guards in a couple 
of my project files, such as the following:

vsppst_base.hh:
#ifndef VSPPST_BASE_HH_
#define VSPPST_BASE_HH_

...{includes, other defines, namespaces, class definitions}...

#endif /* VSPPST_BASE_HH_ */

The following explanation is given by KDevelop:

"{path_cut}/include/vsppst_base.hh:1:1: Header is not guarded against multiple 
inclusions
The given header is not guarded against multiple inclusions, either with the 
conventional #ifndef/#define/#endif macro guards or with #pragma once."

Clearly, the file _is_ guarded.

The contents of the header file are then completely ignored by the background 
parser making any declarations therein inaccessible to code navigation and 
causing a flood of errors in any other file that includes this one.

Can someone please explain to me how the part of the background parser works 
that checks include guards, and what can be done do to avoid this error?

Kind regards
Zlatan


Dr. Zlatan Stanojevic, CTO
Global TCAD Solutions GmbH
Bösendorferstraße 1/12, 1010 Wien
Phone: +43 -1 -9255049-250
Mobile: +43 - 699 - 10774821
E-Mail: z.stanojevic at globaltcad.com
Web: http://www.globaltcad.com

Registered office: 1010 Vienna (FN 366660g / HG Wien)





More information about the KDevelop-devel mailing list