[CPP-418] Address @geoffw0's review comments.

This commit is contained in:
Ziemowit Laski
2019-09-06 15:03:23 -07:00
committed by Geoffrey White
parent 3fdf84ddb4
commit e328e781b5
2 changed files with 17 additions and 21 deletions

View File

@@ -530,7 +530,7 @@ class IntegralType extends ArithmeticType, IntegralOrEnumType {
/**
* The C/C++ boolean type. See 4.2. This is the C `_Bool` type
* or the C++ `bool` type. For example,
* or the C++ `bool` type. For example:
* ```
* extern bool a, b; // C++
* _Bool c, d; // C
@@ -545,7 +545,7 @@ class BoolType extends IntegralType {
/**
* The C/C++ character types. See 4.3. This includes the `char`,
* `signed char` and `unsigned char` types, all of which are
* distinct from one another. For example,
* distinct from one another. For example:
* ```
* char a, b;
* signed char c, d;
@@ -556,7 +556,7 @@ abstract class CharType extends IntegralType { }
/**
* The C/C++ `char` type (which is distinct from `signed char` and
* `unsigned char`). For example,
* `unsigned char`). For example:
* ```
* char a, b;
* ```
@@ -841,8 +841,10 @@ class Char32Type extends IntegralType {
}
/**
* The (primitive) type of the C++11 `nullptr` constant. It is the
* unspeakable type given by `decltype(nullptr)`.
* The (primitive) type of the C++11 `nullptr` constant. It is a
* distinct type, denoted by `decltype(nullptr)`, that is not itself a pointer
* type or a pointer to member type. The `<cstddef>` header usually defines
* the `std::nullptr_t` type as follows:
* ```
* typedef decltype(nullptr) nullptr_t;
* ```
@@ -857,12 +859,11 @@ class NullPointerType extends BuiltInType {
* A C/C++ derived type.
*
* These are pointer and reference types, array and GNU vector types, and `const` and `volatile` types.
* In all cases, the type is formed from a single base type. For example,
* In all cases, the type is formed from a single base type. For example:
* ```
* int *pi;
* int &ri = *pi;
* const float fa[40];
* decltype(pi) dpi;
* ```
*/
class DerivedType extends Type, @derivedtype {
@@ -908,7 +909,7 @@ class DerivedType extends Type, @derivedtype {
}
/**
* An instance of the C++11 `decltype` operator. For example,
* An instance of the C++11 `decltype` operator. For example:
* ```
* int a;
* decltype(a) b;
@@ -1165,8 +1166,8 @@ class ArrayType extends DerivedType {
* In both Clang and GNU compilers, vector types can be introduced using the
* `__attribute__((vector_size(byte_size)))` syntax. The Clang compiler also
* allows vector types to be introduced using the `ext_vector_type`,
* `neon_vector_type`, and `neon_polyvector_typ`e attributes (all of which take
* an element type rather than a byte size).
* `neon_vector_type`, and `neon_polyvector_type` attributes (all of which take
* an element count rather than a byte size).
* ```
* typedef int v4si __attribute__ (( vector_size(4*sizeof(int)) ));
* v4si v = { 1, 2, 3, 4 };

View File

@@ -610,7 +610,7 @@ class BuiltInOperationIsNothrowAssignable extends BuiltInOperation, @isnothrowas
* The `__is_standard_layout` built-in function (used by some implementations
* of the `<type_traits>` header).
*
* Returns `true` if the type is a primitive type, or a`class`, `struct` or
* Returns `true` if the type is a primitive type, or a `class`, `struct` or
* `union` WITHOUT (1) virtual functions or base classes, (2) reference member
* variable or (3) multiple occurrences of base `class` objects, among other
* restrictions. Please see
@@ -686,8 +686,8 @@ class BuiltInOperationHasTrivialMoveConstructor extends BuiltInOperation,
* (i.e., can be generated by the compiler).
* ```
* template<typename T>
* struct is_trivially_assignable
* : public integral_constant<bool, __is_trivially_assignable(T) >
* struct has_trivial_move_assign
* : public integral_constant<bool, __has_trivial_move_assign(T) >
* { };
* ```
*/
@@ -721,8 +721,8 @@ class BuiltInOperationHasNothrowMoveAssign extends BuiltInOperation, @hasnothrow
* (or none).
* ```
* template<typename T, typename... Args>
* struct is_trivially_constructible
* : public integral_constant<bool, __is_trivially_constructible(T) >
* struct is_constructible
* : public integral_constant<bool, __is_constructible(T) >
* { };
* ```
*/
@@ -851,7 +851,7 @@ class BuiltInOperationIsSealed extends BuiltInOperation, @issealedexpr {
* ref class R {}; // __is_simple_value_class(R) == false
* value struct V {}; // __is_simple_value_class(V) == true
* value struct V2 { // __is_simple_value_class(V2) == false
* R ^ r; // not a simnple value type
* R ^ r; // not a simple value type
* };
* ```
*/
@@ -913,11 +913,6 @@ class BuiltInChooseExpr extends BuiltInOperation, @builtinchooseexpr {
/**
* Fill operation on a vector. This is a GNU extension.
* ```
* typedef float float4 __attribute__((ext_vector_type(4)));
* float4 v4si = (float4){ 1.0, 2.0, 3.0, 4.0 };
*
* ```
*/
class VectorFillOperation extends UnaryOperation, @vec_fill {
override string getOperator() { result = "(vector fill)" }