[PATCH] D12379: Fix the bugs in the mapDiagnosticRanges (Still in progress)
Zhengkai Wu via cfe-commits
cfe-commits at lists.llvm.org
Wed Sep 23 14:08:14 PDT 2015
zhengkai added inline comments.
================
Comment at: lib/Frontend/DiagnosticRenderer.cpp:323
@@ +322,3 @@
+ else
+ Backup = SM->getImmediateSpellingLoc(Backup);
+
----------------
rtrieu wrote:
> You did not add that here.
The getImmediateMacroCallerLoc is implemented as following:
SourceLocation getImmediateMacroCallerLoc(SourceLocation Loc) const {
if (!Loc.isMacroID()) return Loc;
if (isMacroArgExpansion(Loc))
return getImmediateSpellingLoc(Loc);
return getImmediateExpansionRange(Loc).first;
}
================
Comment at: lib/Frontend/DiagnosticRenderer.cpp:471
@@ -422,1 +470,3 @@
+ const SourceManager &SM,
+ SourceLocation &Loc) {
SourceLocation BegLoc = Range.getBegin(), EndLoc = Range.getEnd();
----------------
rtrieu wrote:
> What is this SourceLocation? Why is it passed by reference?
Changed
http://reviews.llvm.org/D12379
More information about the cfe-commits
mailing list