[llvm-bugs] [Bug 31836] New: pp_nonportable_path on absolute paths: broken delimiters

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Feb 1 03:33:46 PST 2017


https://llvm.org/bugs/show_bug.cgi?id=31836

            Bug ID: 31836
           Summary: pp_nonportable_path on absolute paths: broken
                    delimiters
           Product: clang
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: Axel.Naumann at cern.ch
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

Created attachment 17922
  --> https://llvm.org/bugs/attachment.cgi?id=17922&action=edit
Proposed patch - but without test

On macOS I get

$ echo '#include "/Users/Axel/Tmp/T.h"' | clang -cc1 -x c++ -E -
# 1 "<stdin>"
# 1 "<built-in>" 1
# 1 "<built-in>" 3
# 320 "<built-in>" 3
# 1 "<command line>" 1
# 1 "<built-in>" 2
# 1 "<stdin>" 2
<stdin>:1:10: warning: non-portable path to file '"/UUsersAaxelTtmpTT.h"';
specified path differs in case from file name on disk
#include "/Users/Axel/Tmp/T.h"
         ^~~~~~~~~~~~~~~~~~~~~
         "/UUsersAaxelTtmpTT.h"
# 1 "/Users/Axel/Tmp/T.h" 1
# 2 "<stdin>" 2

1 warning generated.

due to an off-by-one error for absolute paths. Attached patch seems to fixe
that.

I'd commit myself but I don't know how to write a test for that :-( Sorry!

Axel.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20170201/cc39f710/attachment.html>


More information about the llvm-bugs mailing list