AST: Internalize functions after D111283
authorFangrui Song <i@maskray.me>
Thu, 24 Nov 2022 06:53:23 +0000 (22:53 -0800)
committerFangrui Song <i@maskray.me>
Thu, 24 Nov 2022 06:53:23 +0000 (22:53 -0800)
clang/lib/AST/ASTContext.cpp

index e887f44..08f5b1a 100644 (file)
@@ -12277,14 +12277,14 @@ static Decl *getCommonDecl(Decl *X, Decl *Y) {
 }
 
 template <class T, std::enable_if_t<std::is_base_of_v<Decl, T>, bool> = true>
-T *getCommonDecl(T *X, T *Y) {
+static T *getCommonDecl(T *X, T *Y) {
   return cast_or_null<T>(
       getCommonDecl(const_cast<Decl *>(cast_or_null<Decl>(X)),
                     const_cast<Decl *>(cast_or_null<Decl>(Y))));
 }
 
 template <class T, std::enable_if_t<std::is_base_of_v<Decl, T>, bool> = true>
-T *getCommonDeclChecked(T *X, T *Y) {
+static T *getCommonDeclChecked(T *X, T *Y) {
   return cast<T>(getCommonDecl(const_cast<Decl *>(cast<Decl>(X)),
                                const_cast<Decl *>(cast<Decl>(Y))));
 }