From ef3adbfc70bd593e14430c2db31c1426d3834fb4 Mon Sep 17 00:00:00 2001 From: Bruno Ricci Date: Sun, 21 Jun 2020 12:47:18 +0100 Subject: [PATCH] [clang][NFC] Fix typos/wording in the comments of ConstantExpr. It is "trailing objects" and "tail-allocated storage". --- clang/include/clang/AST/Expr.h | 6 +++--- clang/include/clang/AST/Stmt.h | 20 ++++++++++---------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/clang/include/clang/AST/Expr.h b/clang/include/clang/AST/Expr.h index d31f582264b5..f8f104b5580b 100644 --- a/clang/include/clang/AST/Expr.h +++ b/clang/include/clang/AST/Expr.h @@ -988,11 +988,11 @@ class ConstantExpr final : public FullExpr, private llvm::TrailingObjects { static_assert(std::is_same::value, - "this class assumes llvm::APInt::WordType is uint64_t for " - "trail-allocated storage"); + "ConstantExpr assumes that llvm::APInt::WordType is uint64_t " + "for tail-allocated storage"); public: - /// Describes the kind of result that can be trail-allocated. + /// Describes the kind of result that can be tail-allocated. enum ResultStorageKind { RSK_None, RSK_Int64, RSK_APValue }; private: diff --git a/clang/include/clang/AST/Stmt.h b/clang/include/clang/AST/Stmt.h index 5c5c20b3676b..d76d99b65551 100644 --- a/clang/include/clang/AST/Stmt.h +++ b/clang/include/clang/AST/Stmt.h @@ -322,26 +322,26 @@ protected: unsigned : NumExprBits; - /// The kind of result that is trail-allocated. + /// The kind of result that is tail-allocated. unsigned ResultKind : 2; - /// Kind of Result as defined by APValue::Kind + /// The kind of Result as defined by APValue::Kind unsigned APValueKind : 4; - /// When ResultKind == RSK_Int64. whether the trail-allocated integer is - /// signed. + /// When ResultKind == RSK_Int64, true if the tail-allocated integer is + /// unsigned. unsigned IsUnsigned : 1; - /// When ResultKind == RSK_Int64. the BitWidth of the trail-allocated - /// integer. 7 bits because it is the minimal number of bit to represent a - /// value from 0 to 64 (the size of the trail-allocated number). + /// When ResultKind == RSK_Int64. the BitWidth of the tail-allocated + /// integer. 7 bits because it is the minimal number of bits to represent a + /// value from 0 to 64 (the size of the tail-allocated integer). unsigned BitWidth : 7; - /// When ResultKind == RSK_APValue. Wether the ASTContext will cleanup the - /// destructor on the trail-allocated APValue. + /// When ResultKind == RSK_APValue, true if the ASTContext will cleanup the + /// tail-allocated APValue. unsigned HasCleanup : 1; - /// Whether this ConstantExpr was created for immediate invocation. + /// True if this ConstantExpr was created for immediate invocation. unsigned IsImmediateInvocation : 1; };