Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clang-format doesn't handle preprocessed source files #17409

Closed
labath opened this issue Aug 29, 2013 · 1 comment
Closed

clang-format doesn't handle preprocessed source files #17409

labath opened this issue Aug 29, 2013 · 1 comment
Labels
bugzilla Issues migrated from bugzilla clang-format

Comments

@labath
Copy link
Collaborator

labath commented Aug 29, 2013

Bugzilla Link 17035
Resolution FIXED
Resolved on Oct 13, 2013 19:54
Version trunk
OS Linux

Extended Description

$ cat /tmp/a.c
#​1 "a/file/with/incredibly/long/path/name/that/exceeds/80/characters/and/i/need/to/type/some/more"
int main() { return 0; }

$ clang /tmp/a.c

$ clang-format /tmp/a.c -style=LLVM -i

$ cat /tmp/a.c
#​1 "a/file/with/incredibly/long/path/name/that/exceeds/80/characters/and/i/"
"need/to/type/some/more"
int main() { return 0; }

$ clang /tmp/a.c
/tmp/a.c:2:4: error: invalid flag line marker directive
"need/to/type/some/more"
^
1 error generated.

Not a very common use case, I admit, but I have found it useful to be able to reformat preprocessed files. E.g., when I am hunting for compiler bugs, and I want to reduce the source manually, I would like to reprocess it first, because normal preprocessed output looks quite ugly.

@llvmbot
Copy link
Collaborator

llvmbot commented Oct 14, 2013

Fixed in r192507.

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 9, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla clang-format
Projects
None yet
Development

No branches or pull requests

2 participants