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.
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;
// 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);