[llvm-bugs] [Bug 27211] New: clang-format adding spaces inside filename in __has_include(<FILENAME>)

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Apr 5 02:58:08 PDT 2016


            Bug ID: 27211
           Summary: clang-format adding spaces inside filename in
           Product: clang
           Version: 3.8
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Formatter
          Assignee: unassignedclangbugs at nondot.org
          Reporter: akotulski at fb.com
                CC: djasper at google.com, klimek at google.com,
                    llvm-bugs at lists.llvm.org
    Classification: Unclassified

__has_include(<FILENAME>) may change the FILENAME (by adding spaces) if it
includes certain symbols. It will change meaning of the program. Small example:

> cat has_inc.cpp 

#if __has_include(<test/c++config.h>)

> clang-format has_inc.cpp 

#if __has_include(<test / c++ config.h>)

Real life example that triggered this problem:

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/20160405/00a89aec/attachment.html>

More information about the llvm-bugs mailing list