CPP: Brace placement.

This commit is contained in:
Geoffrey White
2019-08-09 17:44:55 +01:00
parent 5bdaefd504
commit 11d17b891e
2 changed files with 8 additions and 16 deletions

View File

@@ -5,13 +5,11 @@ import semmle.code.cpp.Class
* A C/C++ structure or union. For example, the types `MyStruct` and `MyUnion`
* in:
* ```
* struct MyStruct
* {
* struct MyStruct {
* int x, y, z;
* };
*
* union MyUnion
* {
* union MyUnion {
* int i;
* float f;
* };
@@ -32,10 +30,8 @@ class Struct extends Class {
* A C/C++ struct that is directly enclosed by a function. For example, the type
* `MyLocalStruct` in:
* ```
* void myFunction()
* {
* struct MyLocalStruct
* {
* void myFunction() {
* struct MyLocalStruct {
* int x, y, z;
* };
* }
@@ -53,11 +49,9 @@ class LocalStruct extends Struct {
/**
* A C/C++ nested struct. See 11.12. For example, the type `MyNestedStruct` in:
* ```
* class MyClass
* {
* class MyClass {
* public:
* struct MyNestedStruct
* {
* struct MyNestedStruct {
* int x, y, z;
* };
* };

View File

@@ -26,8 +26,7 @@ class Union extends Struct {
* A C/C++ union that is directly enclosed by a function. For example, the type
* `MyLocalUnion` in:
* ```
* void myFunction()
* {
* void myFunction() {
* union MyLocalUnion {
* int i;
* float f;
@@ -46,8 +45,7 @@ class LocalUnion extends Union {
/**
* A C/C++ nested union. For example, the type `MyNestedUnion` in:
* ```
* class MyClass
* {
* class MyClass {
* public:
* union MyNestedUnion {
* int i;