https://bugs.llvm.org/show_bug.cgi?id=41187
Bug ID: 41187
Summary: clang-format moves Java import statements to the wrong
location if code contains statements that start with
the word import
Product: clang
Version: 8.0
Hardware: All
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: Formatter
Assignee: unassignedclangb...@nondot.org
Reporter: fhan...@nevelex.com
CC: djas...@google.com, kli...@google.com,
llvm-bugs@lists.llvm.org
Created attachment 21642
--> https://bugs.llvm.org/attachment.cgi?id=21642&action=edit
Test file that reproduces the problem
Running 'clang-format -style=LLVM' on
import X;
class C {
void m() {
importFile();
}
}
produces
class C {
void m() {
importFile();
import X;
}
}
It appears that the fact there is a statement that starts with the word import,
in this case importFile, makes clang-format move import statements to
immediately after that statement.
This is a regression in 8.0.0.
Test file attached.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs