mirror of
https://github.com/github/codeql.git
synced 2026-04-30 11:15:13 +02:00
CPP: Brace placement.
This commit is contained in:
@@ -4,8 +4,7 @@ private import semmle.code.cpp.internal.ResolveClass
|
||||
/**
|
||||
* A C/C++ enum [N4140 7.2]. For example, the type `MyEnum` in:
|
||||
* ```
|
||||
* enum MyEnum
|
||||
* {
|
||||
* enum MyEnum {
|
||||
* MyEnumConstant
|
||||
* };
|
||||
* ```
|
||||
@@ -56,10 +55,8 @@ class Enum extends UserType, IntegralOrEnumType {
|
||||
* A C/C++ enum that is directly enclosed by a function. For example, the type
|
||||
* `MyLocalEnum` in:
|
||||
* ```
|
||||
* void myFunction()
|
||||
* {
|
||||
* enum MyLocalEnum
|
||||
* {
|
||||
* void myFunction() {
|
||||
* enum MyLocalEnum {
|
||||
* MyLocalEnumConstant
|
||||
* };
|
||||
* }
|
||||
@@ -77,11 +74,9 @@ class LocalEnum extends Enum {
|
||||
* A C/C++ enum that is declared within a class/struct. For example, the type
|
||||
* `MyNestedEnum` in:
|
||||
* ```
|
||||
* class MyClass
|
||||
* {
|
||||
* class MyClass {
|
||||
* public:
|
||||
* enum MyNestedEnum
|
||||
* {
|
||||
* enum MyNestedEnum {
|
||||
* MyNestedEnumConstant
|
||||
* };
|
||||
* };
|
||||
@@ -110,8 +105,7 @@ class NestedEnum extends Enum {
|
||||
* A C++ scoped enum, that is, an enum whose constants must be qualified with
|
||||
* the name of the enum. For example, the type `Color` in:
|
||||
* ```
|
||||
* enum class Color
|
||||
* {
|
||||
* enum class Color {
|
||||
* red,
|
||||
* blue
|
||||
* }
|
||||
@@ -130,8 +124,7 @@ class ScopedEnum extends Enum {
|
||||
*
|
||||
* For example the enumeration constant `green` in:
|
||||
* ```
|
||||
* enum
|
||||
* {
|
||||
* enum {
|
||||
* red,
|
||||
* green,
|
||||
* blue
|
||||
|
||||
Reference in New Issue
Block a user