Use logical line number for BUGLINE.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49178 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Ted Kremenek 2008-04-03 17:55:57 +00:00
Родитель 1758b07ef7
Коммит 344f7e3759
1 изменённых файлов: 5 добавлений и 7 удалений

Просмотреть файл

@ -74,18 +74,17 @@ void HTMLDiagnostics::HandlePathDiagnostic(const PathDiagnostic& D) {
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 @@ void HTMLDiagnostics::HandlePathDiagnostic(const PathDiagnostic& D) {
{
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());
}