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



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to