diff options
author | Karl-Johan Karlsson <karl-johan.karlsson@ericsson.com> | 2019-12-20 08:07:22 +0100 |
---|---|---|
committer | Karl-Johan Karlsson <karl-johan.karlsson@ericsson.com> | 2019-12-20 09:16:33 +0100 |
commit | e8efac4b15303932581c128dc3976f4359388338 (patch) | |
tree | 54eb78ed9fb4092070250e9b255eddd89e711a3d /clang/test/Frontend | |
parent | 92211bf0f15ba46b5eeb88b7ea580ff539dcdd4e (diff) | |
download | bcm5719-llvm-e8efac4b15303932581c128dc3976f4359388338.tar.gz bcm5719-llvm-e8efac4b15303932581c128dc3976f4359388338.zip |
[clang] Fix the canonicalization of paths in -fdiagnostics-absolute-paths
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
Diffstat (limited to 'clang/test/Frontend')
-rw-r--r-- | clang/test/Frontend/absolute-paths-symlinks.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/clang/test/Frontend/absolute-paths-symlinks.c b/clang/test/Frontend/absolute-paths-symlinks.c new file mode 100644 index 00000000000..e91a96fc092 --- /dev/null +++ b/clang/test/Frontend/absolute-paths-symlinks.c @@ -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 |