[llvm-bugs] [Bug 34739] New: clang-format's include sorter treats 't' as whitespace

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Sep 26 13:55:26 PDT 2017


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

            Bug ID: 34739
           Summary: clang-format's include sorter treats 't' as whitespace
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Formatter
          Assignee: unassignedclangbugs at nondot.org
          Reporter: nicolasweber at gmx.de
                CC: djasper at google.com, klimek at google.com,
                    llvm-bugs at lists.llvm.org

Format.cpp contains:

const char IncludeRegexPattern[] =
    R"(^[\t\ ]*#[\t\ ]*(import|include)[^"<]*(["<][^">]*[">]))";


However, it looks like llvm's regex library doesn't support "\t", so all these
"\t"s actually end up matching literal t characters.

clang-format will sort

#include "ContinuationIndenter.h"
#tttinclude "NamespaceEndCommentsFixer.h"
#include "FormatTokenLexer.h"

(but it doesn't work with any letters except 't').

-- 
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/20170926/45aca452/attachment.html>


More information about the llvm-bugs mailing list