[PATCH] D61729: [docs] Fix example for Allman brace breaking style

2019-06-05 Thread Jan Korous via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL362646: [clang-format][NFC] Fix BS_Allman style example in 
the header docs areā€¦ (authored by jkorous, committed by ).
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Changed prior to commit:
  https://reviews.llvm.org/D61729?vs=202827&id=203243#toc

Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D61729/new/

https://reviews.llvm.org/D61729

Files:
  cfe/trunk/docs/ClangFormatStyleOptions.rst
  cfe/trunk/include/clang/Format/Format.h


Index: cfe/trunk/docs/ClangFormatStyleOptions.rst
===
--- cfe/trunk/docs/ClangFormatStyleOptions.rst
+++ cfe/trunk/docs/ClangFormatStyleOptions.rst
@@ -1059,19 +1059,28 @@
 
 .. code-block:: c++
 
-  try {
+  try
+  {
 foo();
   }
-  catch () {
+  catch ()
+  {
   }
   void foo() { bar(); }
-  class foo {
+  class foo
+  {
   };
-  if (foo()) {
+  if (foo())
+  {
   }
-  else {
+  else
+  {
   }
-  enum X : int { A, B };
+  enum X : int
+  {
+A,
+B
+  };
 
   * ``BS_GNU`` (in configuration: ``GNU``)
 Always break before braces and add an extra level of indentation to
Index: cfe/trunk/include/clang/Format/Format.h
===
--- cfe/trunk/include/clang/Format/Format.h
+++ cfe/trunk/include/clang/Format/Format.h
@@ -642,19 +642,28 @@
 BS_Stroustrup,
 /// Always break before braces.
 /// \code
-///   try {
+///   try
+///   {
 /// foo();
 ///   }
-///   catch () {
+///   catch ()
+///   {
 ///   }
 ///   void foo() { bar(); }
-///   class foo {
+///   class foo
+///   {
 ///   };
-///   if (foo()) {
+///   if (foo())
+///   {
 ///   }
-///   else {
+///   else
+///   {
 ///   }
-///   enum X : int { A, B };
+///   enum X : int
+///   {
+/// A,
+/// B
+///   };
 /// \endcode
 BS_Allman,
 /// Always break before braces and add an extra level of indentation to


Index: cfe/trunk/docs/ClangFormatStyleOptions.rst
===
--- cfe/trunk/docs/ClangFormatStyleOptions.rst
+++ cfe/trunk/docs/ClangFormatStyleOptions.rst
@@ -1059,19 +1059,28 @@
 
 .. code-block:: c++
 
-  try {
+  try
+  {
 foo();
   }
-  catch () {
+  catch ()
+  {
   }
   void foo() { bar(); }
-  class foo {
+  class foo
+  {
   };
-  if (foo()) {
+  if (foo())
+  {
   }
-  else {
+  else
+  {
   }
-  enum X : int { A, B };
+  enum X : int
+  {
+A,
+B
+  };
 
   * ``BS_GNU`` (in configuration: ``GNU``)
 Always break before braces and add an extra level of indentation to
Index: cfe/trunk/include/clang/Format/Format.h
===
--- cfe/trunk/include/clang/Format/Format.h
+++ cfe/trunk/include/clang/Format/Format.h
@@ -642,19 +642,28 @@
 BS_Stroustrup,
 /// Always break before braces.
 /// \code
-///   try {
+///   try
+///   {
 /// foo();
 ///   }
-///   catch () {
+///   catch ()
+///   {
 ///   }
 ///   void foo() { bar(); }
-///   class foo {
+///   class foo
+///   {
 ///   };
-///   if (foo()) {
+///   if (foo())
+///   {
 ///   }
-///   else {
+///   else
+///   {
 ///   }
-///   enum X : int { A, B };
+///   enum X : int
+///   {
+/// A,
+/// B
+///   };
 /// \endcode
 BS_Allman,
 /// Always break before braces and add an extra level of indentation to
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D61729: [docs] Fix example for Allman brace breaking style

2019-06-05 Thread Owen Pan via Phabricator via cfe-commits
owenpan accepted this revision.
owenpan added a comment.
This revision is now accepted and ready to land.

LGTM


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D61729/new/

https://reviews.llvm.org/D61729



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D61729: [docs] Fix example for Allman brace breaking style

2019-06-03 Thread Jan Korous via Phabricator via cfe-commits
jkorous added a comment.

Thanks, I didn't know it's generated.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D61729/new/

https://reviews.llvm.org/D61729



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D61729: [docs] Fix example for Allman brace breaking style

2019-06-03 Thread Jan Korous via Phabricator via cfe-commits
jkorous updated this revision to Diff 202827.
jkorous added a comment.

Fix in the header file from which the documentation is actually generated.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D61729/new/

https://reviews.llvm.org/D61729

Files:
  clang/docs/ClangFormatStyleOptions.rst
  clang/include/clang/Format/Format.h


Index: clang/include/clang/Format/Format.h
===
--- clang/include/clang/Format/Format.h
+++ clang/include/clang/Format/Format.h
@@ -642,19 +642,28 @@
 BS_Stroustrup,
 /// Always break before braces.
 /// \code
-///   try {
+///   try
+///   {
 /// foo();
 ///   }
-///   catch () {
+///   catch ()
+///   {
 ///   }
 ///   void foo() { bar(); }
-///   class foo {
+///   class foo
+///   {
 ///   };
-///   if (foo()) {
+///   if (foo())
+///   {
 ///   }
-///   else {
+///   else
+///   {
 ///   }
-///   enum X : int { A, B };
+///   enum X : int
+///   {
+/// A,
+/// B
+///   };
 /// \endcode
 BS_Allman,
 /// Always break before braces and add an extra level of indentation to
Index: clang/docs/ClangFormatStyleOptions.rst
===
--- clang/docs/ClangFormatStyleOptions.rst
+++ clang/docs/ClangFormatStyleOptions.rst
@@ -1059,19 +1059,28 @@
 
 .. code-block:: c++
 
-  try {
+  try
+  {
 foo();
   }
-  catch () {
+  catch ()
+  {
   }
   void foo() { bar(); }
-  class foo {
+  class foo
+  {
   };
-  if (foo()) {
+  if (foo())
+  {
   }
-  else {
+  else
+  {
   }
-  enum X : int { A, B };
+  enum X : int
+  {
+A,
+B
+  };
 
   * ``BS_GNU`` (in configuration: ``GNU``)
 Always break before braces and add an extra level of indentation to


Index: clang/include/clang/Format/Format.h
===
--- clang/include/clang/Format/Format.h
+++ clang/include/clang/Format/Format.h
@@ -642,19 +642,28 @@
 BS_Stroustrup,
 /// Always break before braces.
 /// \code
-///   try {
+///   try
+///   {
 /// foo();
 ///   }
-///   catch () {
+///   catch ()
+///   {
 ///   }
 ///   void foo() { bar(); }
-///   class foo {
+///   class foo
+///   {
 ///   };
-///   if (foo()) {
+///   if (foo())
+///   {
 ///   }
-///   else {
+///   else
+///   {
 ///   }
-///   enum X : int { A, B };
+///   enum X : int
+///   {
+/// A,
+/// B
+///   };
 /// \endcode
 BS_Allman,
 /// Always break before braces and add an extra level of indentation to
Index: clang/docs/ClangFormatStyleOptions.rst
===
--- clang/docs/ClangFormatStyleOptions.rst
+++ clang/docs/ClangFormatStyleOptions.rst
@@ -1059,19 +1059,28 @@
 
 .. code-block:: c++
 
-  try {
+  try
+  {
 foo();
   }
-  catch () {
+  catch ()
+  {
   }
   void foo() { bar(); }
-  class foo {
+  class foo
+  {
   };
-  if (foo()) {
+  if (foo())
+  {
   }
-  else {
+  else
+  {
   }
-  enum X : int { A, B };
+  enum X : int
+  {
+A,
+B
+  };
 
   * ``BS_GNU`` (in configuration: ``GNU``)
 Always break before braces and add an extra level of indentation to
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D61729: [docs] Fix example for Allman brace breaking style

2019-06-01 Thread Owen Pan via Phabricator via cfe-commits
owenpan added a comment.

This file is generated from the `clang/include/clang/Format/Format.h` header 
file by the `clang/docs/tools/dump_format_style.py` script. Please update the 
header file and rerun the script.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D61729/new/

https://reviews.llvm.org/D61729



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D61729: [docs] Fix example for Allman brace breaking style

2019-05-31 Thread Jan Korous via Phabricator via cfe-commits
jkorous edited reviewers, added: owenpan; removed: llvm-commits.
jkorous added a subscriber: owenpan.
jkorous added a comment.

You're right, thanks for letting me know.

It was changed in 806d5741aa7f 
.

@owenpan was that intended?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D61729/new/

https://reviews.llvm.org/D61729



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D61729: [docs] Fix example for Allman brace breaking style

2019-05-09 Thread Gerriet Backer via Phabricator via cfe-commits
gerriet created this revision.
gerriet added reviewers: jkorous, llvm-commits.
Herald added subscribers: cfe-commits, dexonsmith.
Herald added a project: clang.

Commit 3fd4a968ad80 
 by 
@jkorous was wrongfully rolled back. Opening braces need to be on separate 
lines for Allman style.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D61729

Files:
  clang/docs/ClangFormatStyleOptions.rst


Index: clang/docs/ClangFormatStyleOptions.rst
===
--- clang/docs/ClangFormatStyleOptions.rst
+++ clang/docs/ClangFormatStyleOptions.rst
@@ -1059,19 +1059,28 @@
 
 .. code-block:: c++
 
-  try {
+  try 
+  {
 foo();
   }
-  catch () {
+  catch () 
+  {
   }
   void foo() { bar(); }
-  class foo {
+  class foo 
+  {
   };
-  if (foo()) {
+  if (foo()) 
+  {
   }
-  else {
+  else 
+  {
   }
-  enum X : int { A, B };
+  enum X : int 
+  { 
+A, 
+B 
+  };
 
   * ``BS_GNU`` (in configuration: ``GNU``)
 Always break before braces and add an extra level of indentation to


Index: clang/docs/ClangFormatStyleOptions.rst
===
--- clang/docs/ClangFormatStyleOptions.rst
+++ clang/docs/ClangFormatStyleOptions.rst
@@ -1059,19 +1059,28 @@
 
 .. code-block:: c++
 
-  try {
+  try 
+  {
 foo();
   }
-  catch () {
+  catch () 
+  {
   }
   void foo() { bar(); }
-  class foo {
+  class foo 
+  {
   };
-  if (foo()) {
+  if (foo()) 
+  {
   }
-  else {
+  else 
+  {
   }
-  enum X : int { A, B };
+  enum X : int 
+  { 
+A, 
+B 
+  };
 
   * ``BS_GNU`` (in configuration: ``GNU``)
 Always break before braces and add an extra level of indentation to
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits