forked from qt-creator/qt-creator
Clang: Highlight invalid declarations as text
...instead of the corresponding declaration color. Task-number: QTCREATORBUG-18686 Change-Id: Ice4d84816351af79efa286f49516c392bd80da86 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
This commit is contained in:
@@ -29,6 +29,8 @@
|
||||
#include "sourcelocation.h"
|
||||
#include "sourcerange.h"
|
||||
|
||||
#include "clangbackend_global.h"
|
||||
|
||||
#include <ostream>
|
||||
|
||||
namespace ClangBackEnd {
|
||||
@@ -103,6 +105,15 @@ bool Cursor::isDeclaration() const
|
||||
return clang_isDeclaration(kind());
|
||||
}
|
||||
|
||||
bool Cursor::isInvalidDeclaration() const
|
||||
{
|
||||
#ifdef IS_INVALIDDECL_SUPPORTED
|
||||
return clang_isInvalidDeclaration(cxCursor);
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
bool Cursor::isLocalVariable() const
|
||||
{
|
||||
switch (semanticParent().kind()) {
|
||||
|
||||
Reference in New Issue
Block a user