]> granicus.if.org Git - clang/commitdiff
Rename getInstantiationColumnNumber to getExpansionColumnNumber in both
authorChandler Carruth <chandlerc@gmail.com>
Mon, 25 Jul 2011 20:57:57 +0000 (20:57 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Mon, 25 Jul 2011 20:57:57 +0000 (20:57 +0000)
SourceManager and FullSourceLoc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135965 91177308-0d34-0410-b5e6-96231b3b80d8

12 files changed:
include/clang/Basic/SourceLocation.h
include/clang/Basic/SourceManager.h
lib/ARCMigrate/PlistReporter.cpp
lib/Basic/SourceLocation.cpp
lib/Basic/SourceManager.cpp
lib/Frontend/PrintPreprocessedOutput.cpp
lib/Frontend/TextDiagnosticPrinter.cpp
lib/StaticAnalyzer/Core/BugReporter.cpp
lib/StaticAnalyzer/Core/ExprEngine.cpp
lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp
lib/StaticAnalyzer/Core/PlistDiagnostics.cpp
tools/libclang/CIndex.cpp

index 34620a7ff48e59823058dba852d3cf0b6e8af493..eb8198fcad7628feaf6f1db7aba44a158aed5426 100644 (file)
@@ -278,7 +278,7 @@ public:
   FullSourceLoc getSpellingLoc() const;
 
   unsigned getInstantiationLineNumber(bool *Invalid = 0) const;
-  unsigned getInstantiationColumnNumber(bool *Invalid = 0) const;
+  unsigned getExpansionColumnNumber(bool *Invalid = 0) const;
 
   unsigned getSpellingLineNumber(bool *Invalid = 0) const;
   unsigned getSpellingColumnNumber(bool *Invalid = 0) const;
index 8d8b5ff17c5bdccaff6e7b75c7e0fbeaf772d0ee..de05123ea5c2250986cd5ff7de9a800778ae6638 100644 (file)
@@ -828,7 +828,7 @@ public:
   unsigned getColumnNumber(FileID FID, unsigned FilePos, 
                            bool *Invalid = 0) const;
   unsigned getSpellingColumnNumber(SourceLocation Loc, bool *Invalid = 0) const;
-  unsigned getInstantiationColumnNumber(SourceLocation Loc,
+  unsigned getExpansionColumnNumber(SourceLocation Loc,
                                         bool *Invalid = 0) const;
   unsigned getPresumedColumnNumber(SourceLocation Loc, bool *Invalid = 0) const;
 
index 1b487ce8a01751dcf972867a4eefb82c754b19fa..3aa8da505e5b15b14ec03309e661fba54e6e4157 100644 (file)
@@ -57,7 +57,7 @@ static void EmitLocation(raw_ostream& o, const SourceManager &SM,
   Indent(o, indent) << " <key>line</key><integer>"
                     << Loc.getInstantiationLineNumber() << "</integer>\n";
   Indent(o, indent) << " <key>col</key><integer>"
-                    << Loc.getInstantiationColumnNumber() + offset << "</integer>\n";
+                    << Loc.getExpansionColumnNumber() + offset << "</integer>\n";
   Indent(o, indent) << " <key>file</key><integer>"
                     << GetFID(FM, SM, Loc) << "</integer>\n";
   Indent(o, indent) << "</dict>\n";
index 84f03fb35091e37098fba2a5d3699708ac23e95e..f6c604b9401aff5fcf819d7a7b76cc0d3cc6c722 100644 (file)
@@ -90,9 +90,9 @@ unsigned FullSourceLoc::getInstantiationLineNumber(bool *Invalid) const {
   return SrcMgr->getInstantiationLineNumber(*this, Invalid);
 }
 
-unsigned FullSourceLoc::getInstantiationColumnNumber(bool *Invalid) const {
+unsigned FullSourceLoc::getExpansionColumnNumber(bool *Invalid) const {
   assert(isValid());
-  return SrcMgr->getInstantiationColumnNumber(*this, Invalid);
+  return SrcMgr->getExpansionColumnNumber(*this, Invalid);
 }
 
 unsigned FullSourceLoc::getSpellingLineNumber(bool *Invalid) const {
index ec97defbb62f36bed1bf1d84de6c8d812531b250..293196161824ab2c275c58a750efbc5b62635d48 100644 (file)
@@ -958,8 +958,8 @@ unsigned SourceManager::getSpellingColumnNumber(SourceLocation Loc,
   return getColumnNumber(LocInfo.first, LocInfo.second, Invalid);
 }
 
-unsigned SourceManager::getInstantiationColumnNumber(SourceLocation Loc,
-                                                     bool *Invalid) const {
+unsigned SourceManager::getExpansionColumnNumber(SourceLocation Loc,
+                                                 bool *Invalid) const {
   if (isInvalid(Loc, Invalid)) return 0;
   std::pair<FileID, unsigned> LocInfo = getDecomposedExpansionLoc(Loc);
   return getColumnNumber(LocInfo.first, LocInfo.second, Invalid);
index 0bfb6a27f38b07e6c568b6b8d95001594ef6be18..6f9253d4cd80a051181d01772bfcbe4bb37cf4f4 100644 (file)
@@ -419,7 +419,7 @@ bool PrintPPOutputPPCallbacks::HandleFirstTokOnLine(Token &Tok) {
 
   // Print out space characters so that the first token on a line is
   // indented for easy reading.
-  unsigned ColNo = SM.getInstantiationColumnNumber(Tok.getLocation());
+  unsigned ColNo = SM.getExpansionColumnNumber(Tok.getLocation());
 
   // This hack prevents stuff like:
   // #define HASH #
index e008dda09de9c950983309d44854fe9decbb523b..3ded41c9854644455c6d6db7bf69938e0c496f6b 100644 (file)
@@ -107,14 +107,14 @@ void TextDiagnosticPrinter::HighlightRange(const CharSourceRange &R,
   // Compute the column number of the start.
   unsigned StartColNo = 0;
   if (StartLineNo == LineNo) {
-    StartColNo = SM.getInstantiationColumnNumber(Begin);
+    StartColNo = SM.getExpansionColumnNumber(Begin);
     if (StartColNo) --StartColNo;  // Zero base the col #.
   }
 
   // Compute the column number of the end.
   unsigned EndColNo = CaretLine.size();
   if (EndLineNo == LineNo) {
-    EndColNo = SM.getInstantiationColumnNumber(End);
+    EndColNo = SM.getExpansionColumnNumber(End);
     if (EndColNo) {
       --EndColNo;  // Zero base the col #.
 
index e09519634e21222405b6b84580bf476a015992af..d0fde272b0718a337225064859e8eba8db1d372d 100644 (file)
@@ -990,11 +990,11 @@ bool EdgeBuilder::containsLocation(const PathDiagnosticLocation &Container,
   return (ContainerBegLine <= ContaineeBegLine &&
           ContainerEndLine >= ContaineeEndLine &&
           (ContainerBegLine != ContaineeBegLine ||
-           SM.getInstantiationColumnNumber(ContainerRBeg) <=
-           SM.getInstantiationColumnNumber(ContaineeRBeg)) &&
+           SM.getExpansionColumnNumber(ContainerRBeg) <=
+           SM.getExpansionColumnNumber(ContaineeRBeg)) &&
           (ContainerEndLine != ContaineeEndLine ||
-           SM.getInstantiationColumnNumber(ContainerREnd) >=
-           SM.getInstantiationColumnNumber(ContainerREnd)));
+           SM.getExpansionColumnNumber(ContainerREnd) >=
+           SM.getExpansionColumnNumber(ContainerREnd)));
 }
 
 void EdgeBuilder::rawAddEdge(PathDiagnosticLocation NewLoc) {
index 79a635655256185f659598349f1db766bd9afc1a..a9189f2f0a8a21364c012f722bc7de0bacd1f682 100644 (file)
@@ -3101,7 +3101,7 @@ struct DOTGraphTraits<ExplodedNode*> :
             Out << "\\lline="
               << GraphPrintSourceManager->getInstantiationLineNumber(SLoc)
               << " col="
-              << GraphPrintSourceManager->getInstantiationColumnNumber(SLoc)
+              << GraphPrintSourceManager->getExpansionColumnNumber(SLoc)
               << "\\l";
           }
 
@@ -3154,7 +3154,7 @@ struct DOTGraphTraits<ExplodedNode*> :
             Out << "\\lline="
               << GraphPrintSourceManager->getInstantiationLineNumber(SLoc)
               << " col="
-              << GraphPrintSourceManager->getInstantiationColumnNumber(SLoc);
+              << GraphPrintSourceManager->getExpansionColumnNumber(SLoc);
           }
 
           if (isa<SwitchStmt>(T)) {
index 8cbccc9203dca1c629d8f27003de0368a351fd8c..a3b8a78858f3fd34f60bac3a4f983d44d8cc39a9 100644 (file)
@@ -223,7 +223,7 @@ void HTMLDiagnostics::ReportDiag(const PathDiagnostic& D,
          "<a href=\"#EndPath\">line "
       << (*D.rbegin()).getLocation().asLocation().getInstantiationLineNumber()
       << ", column "
-      << (*D.rbegin()).getLocation().asLocation().getInstantiationColumnNumber()
+      << (*D.rbegin()).getLocation().asLocation().getExpansionColumnNumber()
       << "</a></td></tr>\n"
          "<tr><td class=\"rowname\">Description:</td><td>"
       << D.getDescription() << "</td></tr>\n";
@@ -563,7 +563,7 @@ void HTMLDiagnostics::HighlightRange(Rewriter& R, FileID BugFileID,
     return;
 
   // Compute the column number of the end.
-  unsigned EndColNo = SM.getInstantiationColumnNumber(InstantiationEnd);
+  unsigned EndColNo = SM.getExpansionColumnNumber(InstantiationEnd);
   unsigned OldEndColNo = EndColNo;
 
   if (EndColNo) {
index 673277e950c14a32a25e4f99f55ba763e2c85015..d923f30e37fe6f5d64736d54e62c0b86dcfd13f1 100644 (file)
@@ -144,7 +144,7 @@ static void EmitLocation(raw_ostream& o, const SourceManager &SM,
   Indent(o, indent) << " <key>line</key><integer>"
                     << Loc.getInstantiationLineNumber() << "</integer>\n";
   Indent(o, indent) << " <key>col</key><integer>"
-                    << Loc.getInstantiationColumnNumber() + offset << "</integer>\n";
+                    << Loc.getExpansionColumnNumber() + offset << "</integer>\n";
   Indent(o, indent) << " <key>file</key><integer>"
                     << GetFID(FM, SM, Loc) << "</integer>\n";
   Indent(o, indent) << "</dict>\n";
index 90bb78d1b27b40060ab157a42f6d984d9e2bf6dc..6cab2b19e5c28c6f97678a7c8dcf7e4e6a6e0d58 100644 (file)
@@ -2840,7 +2840,7 @@ void clang_getInstantiationLocation(CXSourceLocation location,
   if (line)
     *line = SM.getInstantiationLineNumber(InstLoc);
   if (column)
-    *column = SM.getInstantiationColumnNumber(InstLoc);
+    *column = SM.getExpansionColumnNumber(InstLoc);
   if (offset)
     *offset = SM.getDecomposedLoc(InstLoc).second;
 }