https://bugs.llvm.org/show_bug.cgi?id=38272
Bug ID: 38272
Summary: Include MainRegex not working with <...>
Product: clang
Version: trunk
Hardware: PC
OS: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: Formatter
Assignee: unassignedclangb...@nondot.org
Reporter: gnue...@gmail.com
CC: djas...@google.com, kli...@google.com,
llvm-bugs@lists.llvm.org
Created attachment 20588
--> https://bugs.llvm.org/attachment.cgi?id=20588&action=edit
format settings
Having the following includes in a File "BTest.h" :
#include "StdAfx.h"
#include <BTest.h> /// MAIN INCLUDE
#include <ATest.h>
and the attached clang-format rules: excerpt here:
IncludeCategories:
- Regex: '^[<"]StdAfx'
Priority: -1
- Regex: '^<.*>'
Priority: 2
- Regex: '.*'
Priority: 3
IncludeIsMainRegex: '$'
The output sorts like:
#include "StdAfx.h"
#include <ATest.h>
#include <BTest.h> /// MAIN INCLUDE
which is kind of wrong (even though normall we would use quotes "" instead of
angles <> for the main include).
This only happens with "<BTest.h>" not with with the quotes: '"BTest.h"'.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs