forked from qt-creator/qt-creator
Clang: Add clang query
Clang query is mechanism to use AST matcher to search for code. Think about regular expression but in the context of AST. So you get a semantic search tool for C++. Change-Id: I72e882c5b53a0c52f352a3664847c4c3e4f6fc2e Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
@@ -29,6 +29,10 @@
|
||||
|
||||
#include <QtCore/qglobal.h>
|
||||
|
||||
#ifdef UNIT_TESTS
|
||||
#include <gtest/gtest.h>
|
||||
#endif
|
||||
|
||||
#if defined(CLANGBACKENDIPC_BUILD_LIB)
|
||||
# define CMBIPC_EXPORT Q_DECL_EXPORT
|
||||
#elif defined(CLANGBACKENDIPC_BUILD_STATIC_LIB)
|
||||
@@ -41,6 +45,12 @@
|
||||
# define CLANGBACKENDPROCESSPATH ""
|
||||
#endif
|
||||
|
||||
namespace Utils {
|
||||
template<uint Size>
|
||||
class BasicSmallString;
|
||||
using SmallString = BasicSmallString<31>;
|
||||
}
|
||||
|
||||
namespace ClangBackEnd {
|
||||
|
||||
enum class DiagnosticSeverity : quint32 // one to one mapping of the clang enum numbers
|
||||
@@ -109,7 +119,10 @@ enum class MessageType : quint8 {
|
||||
ProjectPartsDoNotExistMessage,
|
||||
|
||||
SourceLocationsForRenamingMessage,
|
||||
RequestSourceLocationsForRenamingMessage
|
||||
RequestSourceLocationsForRenamingMessage,
|
||||
|
||||
RequestSourceRangesAndDiagnosticsForQueryMessage,
|
||||
SourceRangesAndDiagnosticsForQueryMessage
|
||||
};
|
||||
|
||||
template<MessageType messageEnumeration>
|
||||
|
||||
Reference in New Issue
Block a user