Skip to content

Commit df575be

Browse files
committed
[clang][NFC] Add const qualifier in Sema::isIncompatibleTypedef
1 parent 112eadd commit df575be

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

clang/include/clang/Sema/Sema.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3309,7 +3309,7 @@ class Sema final : public SemaBase {
33093309
/// Subroutines of ActOnDeclarator().
33103310
TypedefDecl *ParseTypedefDecl(Scope *S, Declarator &D, QualType T,
33113311
TypeSourceInfo *TInfo);
3312-
bool isIncompatibleTypedef(TypeDecl *Old, TypedefNameDecl *New);
3312+
bool isIncompatibleTypedef(const TypeDecl *Old, TypedefNameDecl *New);
33133313

33143314
/// Describes the kind of merge to perform for availability
33153315
/// attributes (including "deprecated", "unavailable", and "availability").

clang/lib/Sema/SemaDecl.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2465,9 +2465,9 @@ NamedDecl *Sema::LazilyCreateBuiltin(IdentifierInfo *II, unsigned ID,
24652465
/// entity if their types are the same.
24662466
/// FIXME: This is notionally doing the same thing as ASTReaderDecl's
24672467
/// isSameEntity.
2468-
static void filterNonConflictingPreviousTypedefDecls(Sema &S,
2469-
TypedefNameDecl *Decl,
2470-
LookupResult &Previous) {
2468+
static void
2469+
filterNonConflictingPreviousTypedefDecls(Sema &S, const TypedefNameDecl *Decl,
2470+
LookupResult &Previous) {
24712471
// This is only interesting when modules are enabled.
24722472
if (!S.getLangOpts().Modules && !S.getLangOpts().ModulesLocalVisibility)
24732473
return;
@@ -2504,9 +2504,9 @@ static void filterNonConflictingPreviousTypedefDecls(Sema &S,
25042504
Filter.done();
25052505
}
25062506

2507-
bool Sema::isIncompatibleTypedef(TypeDecl *Old, TypedefNameDecl *New) {
2507+
bool Sema::isIncompatibleTypedef(const TypeDecl *Old, TypedefNameDecl *New) {
25082508
QualType OldType;
2509-
if (TypedefNameDecl *OldTypedef = dyn_cast<TypedefNameDecl>(Old))
2509+
if (const TypedefNameDecl *OldTypedef = dyn_cast<TypedefNameDecl>(Old))
25102510
OldType = OldTypedef->getUnderlyingType();
25112511
else
25122512
OldType = Context.getTypeDeclType(Old);

0 commit comments

Comments
 (0)