Return proper non-C++ specific includes/defines for non-project files

Authored by mwolff on Dec 21 2017, 11:00 PM.

Description

Return proper non-C++ specific includes/defines for non-project files

When we query the includes/defines for a file outside of any project
we always returned the C++ compiler includes/defines. This was because
we never tried to guess the language type then, since we operated only
on ProjectBaseItems pointers which are obviously nullptr for files
outside of any project. Instead, operate on QString path
representations like elsewhere in the IADM already. This allows us to
guess the language type even for C, ObjC and Cuda files when they are
not part of a project.

No unit test is added, but I found this while working on a separate
feature that has a proper unit test attached.

Details

Committed
mwolffDec 21 2017, 11:16 PM
Differential Revision
D9472: Format comments before setting them on the DUChain
Parents
R32:c31f202700d0: Format comments before setting them on the DUChain
Branches
Unknown
Tags
Unknown