diff options
| -rw-r--r-- | clang/lib/Sema/SemaChecking.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/clang/lib/Sema/SemaChecking.cpp b/clang/lib/Sema/SemaChecking.cpp index 949e8742f90..c4bf82aded6 100644 --- a/clang/lib/Sema/SemaChecking.cpp +++ b/clang/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) |

