*** This commit represents a complete reformatting of the LLDB source code
*** to conform to clang-format’s LLVM style. This kind of mass change has
*** two obvious implications:
Firstly, merging this particular commit into a downstream fork may be a huge
effort. Alternatively, it may be worth merging all changes up to this commit,
performing the same reformatting operation locally, and then discarding the
merge for this particular commit. The commands used to accomplish this
reformatting were as follows (with current working directory as the root of
the repository):
find . \( -iname "*.c" -or -iname "*.cpp" -or -iname "*.h" -or -iname "*.mm" \) -exec clang-format -i {} +
find . -iname "*.py" -exec autopep8 --in-place --aggressive --aggressive {} + ;
The version of clang-format used was 3.9.0, and autopep8 was 1.2.4.
Secondly, “blame” style tools will generally point to this commit instead of
a meaningful prior commit. There are alternatives available that will attempt
to look through this change and find the appropriate prior commit. YMMV.
llvm-svn: 280751
diff --git a/lldb/unittests/SymbolFile/PDB/Inputs/test-dwarf.cpp b/lldb/unittests/SymbolFile/PDB/Inputs/test-dwarf.cpp
index f86ff3d..a987e6a 100644
--- a/lldb/unittests/SymbolFile/PDB/Inputs/test-dwarf.cpp
+++ b/lldb/unittests/SymbolFile/PDB/Inputs/test-dwarf.cpp
@@ -1,14 +1,6 @@
// Compile with "cl /c /Zi /GR- test.cpp"
// Link with "link test.obj /debug /nodefaultlib /entry:main /out:test.exe"
-int __cdecl _purecall(void)
-{
- return 0;
-}
+int __cdecl _purecall(void) { return 0; }
-int
-main(int argc, char **argv)
-{
-
- return 0;
-}
+int main(int argc, char **argv) { return 0; }
diff --git a/lldb/unittests/SymbolFile/PDB/Inputs/test-pdb-alt.cpp b/lldb/unittests/SymbolFile/PDB/Inputs/test-pdb-alt.cpp
index d36f15e..33d7df0 100644
--- a/lldb/unittests/SymbolFile/PDB/Inputs/test-pdb-alt.cpp
+++ b/lldb/unittests/SymbolFile/PDB/Inputs/test-pdb-alt.cpp
@@ -1,9 +1,7 @@
// Compile with "cl /c /Zi /GR- test-pdb-alt.cpp"
-// Link with "link test-pdb.obj test-pdb-alt.obj /debug /nodefaultlib /entry:main /out:test-pdb.exe"
+// Link with "link test-pdb.obj test-pdb-alt.obj /debug /nodefaultlib
+// /entry:main /out:test-pdb.exe"
#include "test-pdb.h"
-int bar(int n)
-{
- return n-1;
-}
+int bar(int n) { return n - 1; }
diff --git a/lldb/unittests/SymbolFile/PDB/Inputs/test-pdb-nested.h b/lldb/unittests/SymbolFile/PDB/Inputs/test-pdb-nested.h
index fc63b50..d0a93d8 100644
--- a/lldb/unittests/SymbolFile/PDB/Inputs/test-pdb-nested.h
+++ b/lldb/unittests/SymbolFile/PDB/Inputs/test-pdb-nested.h
@@ -1,9 +1,6 @@
#ifndef TEST_PDB_NESTED_H
#define TEST_PDB_NESTED_H
-inline int baz(int n)
-{
- return n+1;
-}
+inline int baz(int n) { return n + 1; }
#endif
\ No newline at end of file
diff --git a/lldb/unittests/SymbolFile/PDB/Inputs/test-pdb-types.cpp b/lldb/unittests/SymbolFile/PDB/Inputs/test-pdb-types.cpp
index 9639a3f..89d69c1 100644
--- a/lldb/unittests/SymbolFile/PDB/Inputs/test-pdb-types.cpp
+++ b/lldb/unittests/SymbolFile/PDB/Inputs/test-pdb-types.cpp
@@ -1,5 +1,6 @@
// Compile with "cl /c /Zi /GR- /EHsc test-pdb-types.cpp"
-// Link with "link test-pdb-types.obj /debug /nodefaultlib /entry:main /out:test-pdb-types.exe"
+// Link with "link test-pdb-types.obj /debug /nodefaultlib /entry:main
+// /out:test-pdb-types.exe"
using namespace std;
@@ -21,42 +22,29 @@
static const int sizeof_bool = sizeof(bool);
static const int sizeof_wchar = sizeof(wchar_t);
-enum Enum
-{
- EValue1 = 1,
- EValue2 = 2,
+enum Enum {
+ EValue1 = 1,
+ EValue2 = 2,
};
-enum ShortEnum : short
-{
- ESValue1 = 1,
- ESValue2 = 2
-};
+enum ShortEnum : short { ESValue1 = 1, ESValue2 = 2 };
-namespace NS
-{
-class NSClass
-{
- float f;
- double d;
+namespace NS {
+class NSClass {
+ float f;
+ double d;
};
}
-class Class
-{
+class Class {
public:
- class NestedClass
- {
- Enum e;
- };
- ShortEnum se;
+ class NestedClass {
+ Enum e;
+ };
+ ShortEnum se;
};
-int
-test_func(int a, int b)
-{
- return a + b;
-}
+int test_func(int a, int b) { return a + b; }
typedef Class ClassTypedef;
typedef NS::NSClass NSClassTypedef;
@@ -71,16 +59,14 @@
static const int sizeof_NSClassTypedef = sizeof(NSClassTypedef);
static const int sizeof_GlobalArray = sizeof(GlobalArray);
-int
-main(int argc, char **argv)
-{
- ShortEnum e1;
- Enum e2;
- Class c1;
- Class::NestedClass c2;
- NS::NSClass c3;
+int main(int argc, char **argv) {
+ ShortEnum e1;
+ Enum e2;
+ Class c1;
+ Class::NestedClass c2;
+ NS::NSClass c3;
- ClassTypedef t1;
- NSClassTypedef t2;
- return test_func(1, 2);
+ ClassTypedef t1;
+ NSClassTypedef t2;
+ return test_func(1, 2);
}
diff --git a/lldb/unittests/SymbolFile/PDB/Inputs/test-pdb.cpp b/lldb/unittests/SymbolFile/PDB/Inputs/test-pdb.cpp
index c9bf057..77956ac 100644
--- a/lldb/unittests/SymbolFile/PDB/Inputs/test-pdb.cpp
+++ b/lldb/unittests/SymbolFile/PDB/Inputs/test-pdb.cpp
@@ -1,15 +1,9 @@
// Compile with "cl /c /Zi /GR- test-pdb.cpp"
-// Link with "link test-pdb.obj /debug /nodefaultlib /entry:main /out:test-pdb.exe"
+// Link with "link test-pdb.obj /debug /nodefaultlib /entry:main
+// /out:test-pdb.exe"
#include "test-pdb.h"
-int __cdecl _purecall(void)
-{
- return 0;
-}
+int __cdecl _purecall(void) { return 0; }
-int
-main(int argc, char **argv)
-{
- return foo(argc) + bar(argc);
-}
+int main(int argc, char **argv) { return foo(argc) + bar(argc); }
diff --git a/lldb/unittests/SymbolFile/PDB/Inputs/test-pdb.h b/lldb/unittests/SymbolFile/PDB/Inputs/test-pdb.h
index 273343b..077d9d6 100644
--- a/lldb/unittests/SymbolFile/PDB/Inputs/test-pdb.h
+++ b/lldb/unittests/SymbolFile/PDB/Inputs/test-pdb.h
@@ -5,9 +5,6 @@
int bar(int n);
-inline int foo(int n)
-{
- return baz(n)+1;
-}
+inline int foo(int n) { return baz(n) + 1; }
#endif
\ No newline at end of file