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

option to ensure function body is never on one line #18262

Closed
llvmbot opened this issue Nov 12, 2013 · 2 comments
Closed

option to ensure function body is never on one line #18262

llvmbot opened this issue Nov 12, 2013 · 2 comments
Labels
bugzilla Issues migrated from bugzilla clang-format

Comments

@llvmbot
Copy link
Collaborator

llvmbot commented Nov 12, 2013

Bugzilla Link 17888
Resolution FIXED
Resolved on Nov 20, 2013 10:45
Version trunk
OS Linux
Reporter LLVM Bugzilla Contributor

Extended Description

Given the following content:

TranslationUnitStore::~TranslationUnitStore() {
RemoveAll();
}

std::string TextToInsertInBuffer() {
return original_string_;
}

std::string MainCompletionText() {
return everything_except_return_type_;
}

std::string ExtraMenuInfo() {
return return_type_;
}

std::string DetailedInfoForPreviewWindow() {
return detailed_info_;
}

clang-format will produce this:

TranslationUnitStore::~TranslationUnitStore() { RemoveAll(); }

std::string TextToInsertInBuffer() { return original_string_; }

std::string MainCompletionText() { return everything_except_return_type_; }

std::string ExtraMenuInfo() { return return_type_; }

std::string DetailedInfoForPreviewWindow() { return detailed_info_; }

I see no set of options I can set to prevent clang-format from doing that. In fact, I'd love it if there was an option that would expand such inlined function bodies.

@llvmbot
Copy link
Collaborator Author

llvmbot commented Nov 20, 2013

AllowShortFunctionsOnASingleLine was added in r195256.

@llvmbot
Copy link
Collaborator Author

llvmbot commented Nov 20, 2013

Thank you for the quick fix!

@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

1 participant