Fwd: parse cpp files imported by #include "*.cpp"
nhaehnle at gmail.com
Sat Nov 23 17:09:37 UTC 2013
On Fri, Nov 22, 2013 at 12:30 PM, black <1537534854 at qq.com> wrote:
> The "#include "*.cpp" " was put into namespaces, classes and functions
> everywhere in some libraries.
> Clang will solve this problem perfectly. However, we have not seen the work
> of making it Clang-based.
This is not true. It is fundamentally impossible to solve this problem
perfectly, because when editing the included file, you do not know
which context it is going to be included in.
This is an inherent limitation of the include-based model of C++.
You could play a game of trying to make some use cases work, e.g. when
a file is only ever included in one single location. But now you've
just introduced a silly corner case that is probably not tested
properly, and breaks the first time somebody decides to include that
file in two separate locations. Really, it's better to just not go
Lerne, wie die Welt wirklich ist,
aber vergiss niemals, wie sie sein sollte.
More information about the KDevelop-devel