From: Craig Topper Date: Wed, 23 Dec 2015 05:44:46 +0000 (+0000) Subject: [Sema] Make an enum local to the only method that uses it. NFC X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0153e108389849ebdd99a4f4af42828def32d6a5;p=clang [Sema] Make an enum local to the only method that uses it. NFC git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@256319 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Sema/SemaChecking.cpp b/lib/Sema/SemaChecking.cpp index 949e8742f9..c4bf82aded 100644 --- a/lib/Sema/SemaChecking.cpp +++ b/lib/Sema/SemaChecking.cpp @@ -7570,12 +7570,6 @@ void AnalyzeImplicitConversions(Sema &S, Expr *OrigE, SourceLocation CC) { } // end anonymous namespace -enum { - AddressOf, - FunctionPointer, - ArrayPointer -}; - // Helper function for Sema::DiagnoseAlwaysNonNullPointer. // Returns true when emitting a warning about taking the address of a reference. static bool CheckForReference(Sema &SemaRef, const Expr *E, @@ -7757,7 +7751,11 @@ void Sema::DiagnoseAlwaysNonNullPointer(Expr *E, unsigned DiagID = IsCompare ? diag::warn_null_pointer_compare : diag::warn_impcast_pointer_to_bool; - unsigned DiagType; + enum { + AddressOf, + FunctionPointer, + ArrayPointer + } DiagType; if (IsAddressOf) DiagType = AddressOf; else if (IsFunction)