-
Notifications
You must be signed in to change notification settings - Fork 15.3k
Closed
Labels
clang-formatquestionA question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead!A question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead!
Description
Does the IncludeIsMainRegex option in the Clang format file only search for the suffix in the header stem? Is there an option to check the header prefix to identify it as "not a main file"? For example, consider the following code:
// file: a.cc
#include "b.h"
#include "../a.h"
// some codeWhen formatting this, a.h is prioritized as 0 (default) and always appears first. However, I want it to be placed last. Does Clang-Format support any option in the .clang-format file to address this, or would I need to use clang-off for the include section?
Note: The include must retain the relative path. Alternate approaches are not feasible. Could such an option be introduced in the future?"
Metadata
Metadata
Assignees
Labels
clang-formatquestionA question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead!A question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead!