Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[clang] Fix the canonicalization of paths in -fdiagnostics-absolute-p…
…aths In the current implementation of clang the canonicalization of paths in diagnostic messages (when using -fdiagnostics-absolute-paths) only works if the symbolic link is in the directory part of the filename, not if the file itself is a symbolic link to another file. This patch adds support to canonicalize the complete path including the file. Reviewers: rsmith, hans, rnk, ikudrin Reviewed By: rnk Differential Revision: https://reviews.llvm.org/D70527
- Loading branch information
Showing
4 changed files
with
55 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// RUN: rm -rf %t | ||
// RUN: mkdir %t | ||
// RUN: cd %t | ||
// RUN: cp "%s" "test.c" | ||
// RUN: ln -sf "test.c" "link.c" | ||
// RUN: not %clang_cc1 -fsyntax-only -fdiagnostics-absolute-paths "link.c" 2>&1|FileCheck %s | ||
|
||
// Verify that -fdiagnostics-absolute-paths resolve symbolic links in | ||
// diagnostics messages. | ||
|
||
// CHECK: test.c | ||
// CHECK-SAME: error: unknown type name | ||
This do not compile | ||
|
||
// REQUIRES: shell |