Skip to content

Commit ca0c84d

Browse files
authored
[NFC] [clang] make isFlexibleArrayMemberLike Ctx const (#126656)
it is not used mutably
1 parent 7b89c41 commit ca0c84d

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

clang/include/clang/AST/DeclBase.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -492,7 +492,7 @@ class alignas(8) Decl {
492492
/// perform non-Decl specific checks based on the object's type and strict
493493
/// flex array level.
494494
static bool isFlexibleArrayMemberLike(
495-
ASTContext &Context, const Decl *D, QualType Ty,
495+
const ASTContext &Context, const Decl *D, QualType Ty,
496496
LangOptions::StrictFlexArraysLevelKind StrictFlexArraysLevel,
497497
bool IgnoreTemplateOrMacroSubstitution);
498498

clang/include/clang/AST/Expr.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -542,7 +542,7 @@ class Expr : public ValueStmt {
542542
/// When IgnoreTemplateOrMacroSubstitution is set, it doesn't consider sizes
543543
/// resulting from the substitution of a macro or a template as special sizes.
544544
bool isFlexibleArrayMemberLike(
545-
ASTContext &Context,
545+
const ASTContext &Context,
546546
LangOptions::StrictFlexArraysLevelKind StrictFlexArraysLevel,
547547
bool IgnoreTemplateOrMacroSubstitution = false) const;
548548

clang/lib/AST/DeclBase.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,7 @@ bool Decl::isFileContextDecl() const {
438438
}
439439

440440
bool Decl::isFlexibleArrayMemberLike(
441-
ASTContext &Ctx, const Decl *D, QualType Ty,
441+
const ASTContext &Ctx, const Decl *D, QualType Ty,
442442
LangOptions::StrictFlexArraysLevelKind StrictFlexArraysLevel,
443443
bool IgnoreTemplateOrMacroSubstitution) {
444444
// For compatibility with existing code, we treat arrays of length 0 or

clang/lib/AST/Expr.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ bool Expr::isKnownToHaveBooleanValue(bool Semantic) const {
203203
}
204204

205205
bool Expr::isFlexibleArrayMemberLike(
206-
ASTContext &Ctx,
206+
const ASTContext &Ctx,
207207
LangOptions::StrictFlexArraysLevelKind StrictFlexArraysLevel,
208208
bool IgnoreTemplateOrMacroSubstitution) const {
209209
const Expr *E = IgnoreParens();

0 commit comments

Comments
 (0)