Commit 83dff048 authored by Francois Ferrand's avatar Francois Ferrand Committed by Erik Verbruggen
Browse files

Highlight macro definitions like other uses.

Change-Id: I5a0852e5c1e154b52d712f1dfcfe2fc04e0eb9fb
Reviewed-by: default avatarErik Verbruggen <>
parent f128a924
......@@ -53,8 +53,18 @@ QFuture<CppHighlightingSupport::Use> CppHighlightingSupportInternal::highlightin
const Document::Ptr &doc,
const Snapshot &snapshot) const
//Get macro uses
QList<CheckSymbols::Use> macroUses;
//Get macro definitions
foreach (const CPlusPlus::Macro& macro, doc->definedMacros()) {
int line, column;
editor()->convertPosition(macro.offset(), &line, &column);
++column; //Highlighting starts at (column-1) --> compensate here
CheckSymbols::Use use(line, column,, SemanticInfo::MacroUse);
//Get macro uses
foreach (Document::MacroUse macro, doc->macroUses()) {
const QString name = QString::fromUtf8(macro.macro().name());
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment