[cfe-commits] r77291 - in /cfe/trunk: include/clang/AST/ASTContext.h include/clang/Basic/Builtins.def include/clang/Basic/DiagnosticSemaKinds.td include/clang/Frontend/PCHBitCodes.h lib/AST/ASTContext.cpp lib/Frontend/PCHReader.cpp lib/Frontend/PCHWriter.cpp lib/Sema/SemaDecl.cpp
Chris Lattner
clattner at apple.com
Tue Jul 28 15:42:13 PDT 2009
On Jul 27, 2009, at 7:25 PM, Mike Stump wrote:
> URL: http://llvm.org/viewvc/llvm-project?rev=77291&view=rev
> Log:
> Make longjmp a real builtin.
Ok.
> @@ -499,6 +505,28 @@
> return getTypeDeclType(FILEDecl);
> return QualType();
> }
> +
> + /// \brief Set the type for the C jmp_buf type.
> + void setjmp_bufDecl(TypeDecl *jmp_bufDecl)
> + { this->jmp_bufDecl = jmp_bufDecl; }
Please follow the predominate style in clang, which is:
void getsetjmp_bufDecl(TypeDecl *D) {
jmp_bufDecl = D;
}
> + /// \brief Set the type for the C sigjmp_buf type.
> + void setsigjmp_bufDecl(TypeDecl *sigjmp_bufDecl)
> + { this->sigjmp_bufDecl = sigjmp_bufDecl; }
Likewise.
> }
> + case 'J': {
> + if (Signed) {
> + Type = Context.getsigjmp_bufType();
> + if (Type.isNull()) {
> + Error = ASTContext::GE_Missing_sigjmp_buf;
> + return QualType();
> + } else {
No need for "else" after return.
> + break;
> + }
> + } else {
or break.
> + Type = Context.getjmp_bufType();
> + if (Type.isNull()) {
> + Error = ASTContext::GE_Missing_jmp_buf;
> + return QualType();
> + } else {
> + break;
likewise.
-Chris
More information about the cfe-commits
mailing list