std::string GetSomething()
{
return something;
}
std::string GetSomething()
{
return something;
}
if (height < MinHeight) {
//...
}
while (isTrue) {
//...
}
switch (foo) {
//...
}
if (height < MinHeight)
{
//...
}
while (isTrue)
{
//...
}
switch (foo)
{
//...
}
if (height < MinHeight){
//...
}
while (isTrue){
//...
}
switch (foo){
//...
}
const std::string FooBar = "baz";
const std::string FOO_BAR = "baz";
Condition with space
if (true) {
//...
}
while (true) {
//...
}
switch (v) {
//...
}
if(true) {
//...
}
while(true) {
//...
}
switch(v) {
//...
}
void SetName(std::string name) {
// ...
}
if(isTrue) {}
while(isTrue) {}
void SetName( std::string name ) {
// ...
}
if( isTrue ) {}
while( isTrue ) {}
/* width is within 80 characters */
/* width is within 120 characters */
/* width is within 150 characters */
static std::string name;
static std::string s_name;
static std::string g_name;
public:
std::string GetProperty { return property; }
private:
std::string property;
public:
std::string GetProperty { return _property; }
private:
std::string _property;
public:
std::string GetProperty { return property_; }
private:
std::string property_;
public:
std::string GetProperty { return mProperty; }
private:
std::string mProperty;
public:
std::string GetProperty { return m_property; }
private:
std::string m_property;
class MyClass
{
}
class my_class
{
}
class myClass
{
}
public:
void DoSomething()
{}
public:
void do_something()
{}
public:
void doSomething()
{}
private:
void DoSomething()
{}
private:
void do_something()
{}
private:
void doSomething()
{}
http://clang.llvm.org/docs/ClangFormatStyleOptions.html