Bug 360509 - KDevelop doesn't highlight friend class members
Summary: KDevelop doesn't highlight friend class members
Status: RESOLVED UPSTREAM
Alias: None
Product: kdevelop
Classification: Applications
Component: Language Support: CPP (Clang-based) (show other bugs)
Version: git master
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-03-14 09:46 UTC by Pedro Ferreira
Modified: 2016-11-16 22:12 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pedro Ferreira 2016-03-14 09:46:08 UTC
The source was reduced by Milian to:

class LockableHolder
{
    friend void swap(LockableHolder a, LockableHolder b)
    {
        a = b;
    }
};
 

Execution of clang-parser yields:
 
clang-parser -a /tmp/test.cpp
AST tree successfully generated
ClassDecl (4) | type: "LockableHolder" (105) | display: "LockableHolder" | loc: /tmp/test.cpp@[(1,1),(7,2)] | isDecl
  UnexposedDecl (1) | loc: /tmp/test.cpp@[(3,5),(6,6)] | isDecl
no problems encountered during parsing

Reproducible: Always




This is likely an upstream issue.
Comment 1 Olivier Goffart 2016-11-03 17:38:12 UTC
Fix: https://reviews.llvm.org/D26285
Comment 2 Kevin Funk 2016-11-16 22:12:06 UTC
Just tested, works. You rock, Olivier! Way to go.

Using libclang 4.0 will fix this issue.