From 0da7e409e0cb09ea955d9751d2601449244cc53f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Timm=20B=C3=A4der?= Date: Mon, 29 Aug 2022 20:29:19 +0200 Subject: [PATCH] [clang][Interp][NFC] Context::classify() can be const --- clang/lib/AST/Interp/Context.cpp | 2 +- clang/lib/AST/Interp/Context.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/clang/lib/AST/Interp/Context.cpp b/clang/lib/AST/Interp/Context.cpp index 3bfcdfc..9f3f554 100644 --- a/clang/lib/AST/Interp/Context.cpp +++ b/clang/lib/AST/Interp/Context.cpp @@ -59,7 +59,7 @@ bool Context::evaluateAsInitializer(State &Parent, const VarDecl *VD, const LangOptions &Context::getLangOpts() const { return Ctx.getLangOpts(); } -llvm::Optional Context::classify(QualType T) { +llvm::Optional Context::classify(QualType T) const { if (T->isReferenceType() || T->isPointerType()) { return PT_Ptr; } diff --git a/clang/lib/AST/Interp/Context.h b/clang/lib/AST/Interp/Context.h index 0627d9f..fbd7810 100644 --- a/clang/lib/AST/Interp/Context.h +++ b/clang/lib/AST/Interp/Context.h @@ -60,7 +60,7 @@ public: unsigned getCharBit() const; /// Classifies an expression. - llvm::Optional classify(QualType T); + llvm::Optional classify(QualType T) const; private: /// Runs a function. -- 2.7.4