From kde-commits Mon Mar 31 22:18:18 2008 From: David Nolden Date: Mon, 31 Mar 2008 22:18:18 +0000 To: kde-commits Subject: KDE/kdevelop/languages/cpp/parser/rpp Message-Id: <1207001898.072594.7913.nullmailer () svn ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=120700192122596 SVN commit 792374 by zwabel: Finally fix a hard to debug, annoying bug: Always correctly initialize the local location-table when resolving macro-arguments. This fixes a problem where all the ranges in complete files were completely useless, and thus the whole completion/navigation was also. Example: languages/cpp/parser/parser.cpp in KDevelop-4 source. M +2 -0 pp-macro-expander.cpp --- trunk/KDE/kdevelop/languages/cpp/parser/rpp/pp-macro-expander.cpp #792373:792374 @@ -332,6 +332,7 @@ as.setOriginalInputPosition(input.originalInputPosition());///@todo What does originalInputPosition mean? rpp::LocationTable table; + table.anchor(0, actualStart); Stream nas(&newActualText, actualStart, &table); expand_actual(as, nas); @@ -365,6 +366,7 @@ QByteArray actualText; rpp::LocationTable table; + table.anchor(0, actualStart); Stream nas(&newActualText, actualStart, &table); expand_actual(as, nas);