[clang] [clang][bytecode] Fix a few comment typos (PR #184561)
Timm Baeder via cfe-commits
cfe-commits at lists.llvm.org
Wed Mar 4 00:18:51 PST 2026
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/184561
>From e7de8c9aa1f046178f874607a49d96ff18426127 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Timm=20B=C3=A4der?= <tbaeder at redhat.com>
Date: Wed, 4 Mar 2026 08:52:02 +0100
Subject: [PATCH] typos
---
clang/lib/AST/ByteCode/EvalEmitter.cpp | 4 ++--
clang/lib/AST/ByteCode/Program.cpp | 20 ++++++++++----------
2 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/clang/lib/AST/ByteCode/EvalEmitter.cpp b/clang/lib/AST/ByteCode/EvalEmitter.cpp
index ee168a82d20a2..1bc82b2ecab1a 100644
--- a/clang/lib/AST/ByteCode/EvalEmitter.cpp
+++ b/clang/lib/AST/ByteCode/EvalEmitter.cpp
@@ -106,7 +106,7 @@ EvalEmitter::LabelTy EvalEmitter::getLabel() { return NextLabel++; }
Scope::Local EvalEmitter::createLocal(Descriptor *D) {
// Allocate memory for a local.
auto Memory = std::make_unique<char[]>(sizeof(Block) + D->getAllocSize());
- auto *B = new (Memory.get()) Block(Ctx.getEvalID(), D, /*isStatic=*/false);
+ auto *B = new (Memory.get()) Block(Ctx.getEvalID(), D, /*IsStatic=*/false);
B->invokeCtor();
// Initialize local variable inline descriptor.
@@ -202,7 +202,7 @@ template <> bool EvalEmitter::emitRet<PT_Ptr>(SourceInfo Info) {
if (CheckFullyInitialized && !EvalResult.checkFullyInitialized(S, Ptr))
return false;
- // Function pointers are alway returned as lvalues.
+ // Function pointers are always returned as lvalues.
if (Ptr.isFunctionPointer()) {
EvalResult.takeValue(Ptr.toAPValue(Ctx.getASTContext()));
return true;
diff --git a/clang/lib/AST/ByteCode/Program.cpp b/clang/lib/AST/ByteCode/Program.cpp
index 7364e9405efe2..bf511ff215db9 100644
--- a/clang/lib/AST/ByteCode/Program.cpp
+++ b/clang/lib/AST/ByteCode/Program.cpp
@@ -46,7 +46,7 @@ unsigned Program::createGlobalString(const StringLiteral *S, const Expr *Base) {
// Create a descriptor for the string.
Descriptor *Desc = allocateDescriptor(Base, *CharType, Descriptor::GlobalMD,
StringLength + 1,
- /*isConst=*/true,
+ /*IsConst=*/true,
/*isTemporary=*/false,
/*isMutable=*/false);
@@ -54,8 +54,8 @@ unsigned Program::createGlobalString(const StringLiteral *S, const Expr *Base) {
// The byte length does not include the null terminator.
unsigned GlobalIndex = Globals.size();
unsigned Sz = Desc->getAllocSize();
- auto *G = new (Allocator, Sz) Global(Ctx.getEvalID(), Desc, /*isStatic=*/true,
- /*isExtern=*/false);
+ auto *G = new (Allocator, Sz) Global(Ctx.getEvalID(), Desc, /*IsStatic=*/true,
+ /*IsExtern=*/false);
G->block()->invokeCtor();
new (G->block()->rawData())
@@ -235,8 +235,8 @@ UnsignedOrNone Program::createGlobal(const ValueDecl *VD, const Expr *Init) {
UnsignedOrNone Program::createGlobal(const Expr *E) {
if (auto Idx = getGlobal(E))
return Idx;
- if (auto Idx = createGlobal(E, E->getType(), /*isStatic=*/true,
- /*isExtern=*/false, /*IsWeak=*/false)) {
+ if (auto Idx = createGlobal(E, E->getType(), /*IsStatic=*/true,
+ /*IsExtern=*/false, /*IsWeak=*/false)) {
GlobalIndices[E] = *Idx;
return *Idx;
}
@@ -310,9 +310,9 @@ Record *Program::getOrCreateRecord(const RecordDecl *RD) {
const Record *BR) -> const Descriptor * {
if (!BR)
return nullptr;
- return allocateDescriptor(BD, BR, std::nullopt, /*isConst=*/false,
- /*isTemporary=*/false,
- /*isMutable=*/false, /*IsVolatile=*/false);
+ return allocateDescriptor(BD, BR, std::nullopt, /*IsConst=*/false,
+ /*IsTemporary=*/false,
+ /*IsMutable=*/false, /*IsVolatile=*/false);
};
// Reserve space for base classes.
@@ -374,11 +374,11 @@ Record *Program::getOrCreateRecord(const RecordDecl *RD) {
const Descriptor *Desc;
if (OptPrimType T = Ctx.classify(FT)) {
Desc = createDescriptor(FD, *T, nullptr, std::nullopt, IsConst,
- /*isTemporary=*/false, IsMutable, IsVolatile);
+ /*IsTemporary=*/false, IsMutable, IsVolatile);
HasPtrField = HasPtrField || (T == PT_Ptr);
} else if ((Desc = createDescriptor(
FD, FT.getTypePtr(), std::nullopt, IsConst,
- /*isTemporary=*/false, IsMutable, IsVolatile))) {
+ /*IsTemporary=*/false, IsMutable, IsVolatile))) {
HasPtrField =
HasPtrField ||
(Desc->isPrimitiveArray() && Desc->getPrimType() == PT_Ptr) ||
More information about the cfe-commits
mailing list