[cfe-commits] r49178 - /cfe/trunk/Driver/HTMLDiagnostics.cpp
Ted Kremenek
kremenek at apple.com
Thu Apr 3 10:55:57 PDT 2008
Author: kremenek
Date: Thu Apr 3 12:55:57 2008
New Revision: 49178
URL: http://llvm.org/viewvc/llvm-project?rev=49178&view=rev
Log:
Use logical line number for BUGLINE.
Modified:
cfe/trunk/Driver/HTMLDiagnostics.cpp
Modified: cfe/trunk/Driver/HTMLDiagnostics.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Driver/HTMLDiagnostics.cpp?rev=49178&r1=49177&r2=49178&view=diff
==============================================================================
--- cfe/trunk/Driver/HTMLDiagnostics.cpp (original)
+++ cfe/trunk/Driver/HTMLDiagnostics.cpp Thu Apr 3 12:55:57 2008
@@ -74,18 +74,17 @@
if (D.empty())
return;
- if (!D.back()->getLocation().isFileID())
- return;
-
// Create the HTML directory if it is missing.
if (!createdDir) {
createdDir = true;
- Directory.createDirectoryOnDisk(true, NULL);
+ std::string ErrorMsg;
+ Directory.createDirectoryOnDisk(true, &ErrorMsg);
if (!Directory.isDirectory()) {
llvm::cerr << "warning: could not create directory '"
- << FilePrefix.toString() << "'\n";
+ << Directory.toString() << "'\n"
+ << "reason: " << ErrorMsg << '\n';
noDir = true;
@@ -154,8 +153,7 @@
{
std::ostringstream os;
- FullSourceLoc L = D.back()->getLocation();
- os << "\n<!-- BUGLINE " << L.getLineNumber()
+ os << "\n<!-- BUGLINE " << D.back()->getLocation().getLogicalLineNumber()
<< " -->\n";
R.InsertStrBefore(SourceLocation::getFileLoc(FileID, 0), os.str());
}
More information about the cfe-commits
mailing list