[cfe-commits] r77402 - in /cfe/trunk: include/clang/AST/ASTContext.h lib/AST/ASTContext.cpp lib/Sema/SemaDecl.cpp

Mike Stump mrs at apple.com
Tue Jul 28 16:57:15 PDT 2009


Author: mrs
Date: Tue Jul 28 18:57:15 2009
New Revision: 77402

URL: http://llvm.org/viewvc/llvm-project?rev=77402&view=rev
Log:
Some minor cleanups, thanks Chris.

Modified:
    cfe/trunk/include/clang/AST/ASTContext.h
    cfe/trunk/lib/AST/ASTContext.cpp
    cfe/trunk/lib/Sema/SemaDecl.cpp

Modified: cfe/trunk/include/clang/AST/ASTContext.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/ASTContext.h?rev=77402&r1=77401&r2=77402&view=diff

==============================================================================
--- cfe/trunk/include/clang/AST/ASTContext.h (original)
+++ cfe/trunk/include/clang/AST/ASTContext.h Tue Jul 28 18:57:15 2009
@@ -589,9 +589,8 @@
 
   enum GetBuiltinTypeError {
     GE_None,              //< No error
-    GE_Missing_FILE,      //< Missing the FILE type from <stdio.h>
-    GE_Missing_jmp_buf,   //< Missing the jmp_buf type from <setjmp.h>
-    GE_Missing_sigjmp_buf //< Missing the sigjmp_buf type from <setjmp.h>
+    GE_Missing_stdio,     //< Missing a type from <stdio.h>
+    GE_Missing_setjmp     //< Missing a type from <setjmp.h>
   };
   
   /// GetBuiltinType - Return the type for the specified builtin.

Modified: cfe/trunk/lib/AST/ASTContext.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ASTContext.cpp?rev=77402&r1=77401&r2=77402&view=diff

==============================================================================
--- cfe/trunk/lib/AST/ASTContext.cpp (original)
+++ cfe/trunk/lib/AST/ASTContext.cpp Tue Jul 28 18:57:15 2009
@@ -3976,22 +3976,18 @@
   case 'P':
     Type = Context.getFILEType();
     if (Type.isNull()) {
-      Error = ASTContext::GE_Missing_FILE;
+      Error = ASTContext::GE_Missing_stdio;
       return QualType();
     }
     break;
   case 'J':
-    if (Signed) {
+    if (Signed)
       Type = Context.getsigjmp_bufType();
-      if (Type.isNull()) {
-        Error = ASTContext::GE_Missing_sigjmp_buf;
-        return QualType();
-      }
-      break;
-    }
-    Type = Context.getjmp_bufType();
+    else
+      Type = Context.getjmp_bufType();
+
     if (Type.isNull()) {
-      Error = ASTContext::GE_Missing_jmp_buf;
+      Error = ASTContext::GE_Missing_setjmp;
       return QualType();
     }
     break;

Modified: cfe/trunk/lib/Sema/SemaDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDecl.cpp?rev=77402&r1=77401&r2=77402&view=diff

==============================================================================
--- cfe/trunk/lib/Sema/SemaDecl.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDecl.cpp Tue Jul 28 18:57:15 2009
@@ -448,19 +448,13 @@
     // Okay
     break;
 
-  case ASTContext::GE_Missing_FILE:
+  case ASTContext::GE_Missing_stdio:
     if (ForRedeclaration)
       Diag(Loc, diag::err_implicit_decl_requires_stdio)
         << Context.BuiltinInfo.GetName(BID);
     return 0;
 
-  case ASTContext::GE_Missing_jmp_buf:
-    if (ForRedeclaration)
-      Diag(Loc, diag::err_implicit_decl_requires_setjmp)
-        << Context.BuiltinInfo.GetName(BID);
-    return 0;
-
-  case ASTContext::GE_Missing_sigjmp_buf:
+  case ASTContext::GE_Missing_setjmp:
     if (ForRedeclaration)
       Diag(Loc, diag::err_implicit_decl_requires_setjmp)
         << Context.BuiltinInfo.GetName(BID);





More information about the cfe-commits mailing list