diff --git a/clang/include/clang/CConv/RewriteUtils.h b/clang/include/clang/CConv/RewriteUtils.h index dd2e9c03ce8c..8050fb56a99a 100644 --- a/clang/include/clang/CConv/RewriteUtils.h +++ b/clang/include/clang/CConv/RewriteUtils.h @@ -28,7 +28,7 @@ class DeclReplacement { std::string getReplacement() const { return Replacement; } - virtual SourceRange getSourceRange(SourceManager &SR) const { + virtual SourceRange getSourceRange() const { return getDecl()->getSourceRange(); } @@ -85,24 +85,56 @@ class FunctionDeclReplacement : public DeclReplacementTempl { public: - explicit FunctionDeclReplacement(FunctionDecl *D, std::string R, bool Full) - : DeclReplacementTempl(D, nullptr, R), FullDecl(Full) {} - - SourceRange getSourceRange(SourceManager &SM) const override { - if (FullDecl) { - SourceRange Range = Decl->getSourceRange(); - Range.setEnd(getFunctionDeclarationEnd(Decl, SM)); - return Range; - } else - return Decl->getReturnTypeSourceRange(); + explicit FunctionDeclReplacement(FunctionDecl *D, std::string R, bool Return, + bool Params) + : DeclReplacementTempl(D, nullptr, R), RewriteReturn(Return), + RewriteParams(Params) { + assert("Doesn't make sense to rewrite nothing!" + && (RewriteReturn || RewriteParams)); } - bool isFullDecl() const { - return FullDecl; + SourceRange getSourceRange() const override { + FunctionTypeLoc TypeLoc = + Decl->getTypeSourceInfo()->getTypeLoc().getAs(); + + // Function pointer are funky, and require special handling to rewrite the + // return type. + if (Decl->getReturnType()->isFunctionPointerType()){ + if (RewriteParams && RewriteReturn) { + SourceLocation End = TypeLoc.getReturnLoc().getNextTypeLoc() + .getAs().getInnerLoc() + .getAs() + .getRParenLoc(); + return SourceRange(Decl->getBeginLoc(), End); + } + assert("RewriteReturn implies RewriteParams for function pointer return." + && !RewriteReturn); + // Fall through to standard handling when only rewriting param decls + } + + // If rewriting the return, then the range starts at the begining of the + // decl. Otherwise, skip to the left parenthesis of parameters. + SourceLocation Begin = RewriteReturn ? + Decl->getBeginLoc() : + TypeLoc.getLParenLoc(); + + // If rewriting Parameters, stop at the right parenthesis of the parameters. + // Otherwise, stop after the return type. + SourceLocation End = RewriteParams ? + TypeLoc.getRParenLoc() : + Decl->getReturnTypeSourceRange().getEnd(); + + assert("Invalid FunctionDeclReplacement SourceRange!" + && Begin.isValid() && End.isValid()); + + return SourceRange(Begin, End); } + private: // This determines if the full declaration or the return will be replaced. - bool FullDecl; + bool RewriteReturn; + + bool RewriteParams; }; // Compare two DeclReplacement values. The algorithm for comparing them relates diff --git a/clang/include/clang/CConv/Utils.h b/clang/include/clang/CConv/Utils.h index bd5a744d53c9..bb428620d26b 100644 --- a/clang/include/clang/CConv/Utils.h +++ b/clang/include/clang/CConv/Utils.h @@ -162,7 +162,7 @@ bool evaluateToInt(clang::Expr *E, const clang::ASTContext &C, int &Result); // can be treated as pointers. bool isZeroBoundsExpr(clang::BoundsExpr *BE, const clang::ASTContext &C); -// Get the FileIdD for the file containing the given source location. This is -// used to maintain a set of FileIDs which have been modified by the rewriter. -clang::FileID getFileID(clang::SourceLocation L, clang::ASTContext &C); +// Find the range in the source code for the base type of a type location. +// The base type is the type after removing all +clang::TypeLoc getBaseTypeLoc(clang::TypeLoc T); #endif diff --git a/clang/lib/CConv/ConstraintVariables.cpp b/clang/lib/CConv/ConstraintVariables.cpp index b97713b7b6fc..df1a70bbe7fd 100644 --- a/clang/lib/CConv/ConstraintVariables.cpp +++ b/clang/lib/CConv/ConstraintVariables.cpp @@ -150,7 +150,7 @@ PointerVariableConstraint::PointerVariableConstraint(const QualType &QT, ArrPresent = false; - bool isDeclTy = false; + bool IsDeclTy = false; if (D != nullptr) { auto &ABInfo = I.getABoundsInfo(); if (ABInfo.tryGetVariable(D, BKey)) { @@ -174,14 +174,14 @@ PointerVariableConstraint::PointerVariableConstraint(const QualType &QT, } } - isDeclTy = D->getType() == QT; // If false, then QT may be D's return type + IsDeclTy = D->getType() == QT; // If false, then QT may be D's return type if (InteropTypeExpr *ITE = D->getInteropTypeExpr()) { // External variables can also have itype. // Check if the provided declaration is an external // variable. // For functions, check to see that if we are analyzing // function return types. - bool AnalyzeITypeExpr = isDeclTy; + bool AnalyzeITypeExpr = IsDeclTy; if (!AnalyzeITypeExpr) { const Type *OrigType = Ty; if (isa(D)) { @@ -343,10 +343,33 @@ PointerVariableConstraint::PointerVariableConstraint(const QualType &QT, // tn fname = ..., // where tn is the typedef'ed type name. // There is possibly something more elegant to do in the code here. - FV = new FVConstraint(Ty, isDeclTy ? D : nullptr, - (IsTypedef ? "" : N), I, C); - - BaseType = tyToStr(Ty); + FV = new FVConstraint(Ty, IsDeclTy ? D : nullptr, IsTypedef ? "" : N, I, C); + + // Get a string representing the type without pointer and array indirection. + bool FoundMatchingType = false; + if (!IsTypedef && D && D->getTypeSourceInfo()) { + // Try to extract the type from original source to preserve defines + TypeLoc TL = D->getTypeSourceInfo()->getTypeLoc(); + if (isa(D)) { + FoundMatchingType = D->getAsFunction()->getReturnType() == QT; + TL = TL.getAs().getReturnLoc(); + } else { + FoundMatchingType = D->getType() == QT; + } + // Only use this type if the type passed as a parameter to this constructor + // agrees with the actual type of the declaration. + if (FoundMatchingType) { + BaseType = getSourceText(getBaseTypeLoc(TL).getSourceRange(), C); + + // getSourceText returns the empty string when there's a pointer level + // inside a macro. Not sure how to handle this, so fall back to tyToStr. + if (BaseType.empty()) + FoundMatchingType = false; + } + } + // Fall back to rebuilding the base type based on type passed to constructor + if (!FoundMatchingType) + BaseType = tyToStr(Ty); bool IsWild = !IsGeneric && (isVarArgType(BaseType) || isTypeHasVoid(QT)); if (IsWild) { diff --git a/clang/lib/CConv/DeclRewriter.cpp b/clang/lib/CConv/DeclRewriter.cpp index 292ac9973eab..92fcec1df147 100644 --- a/clang/lib/CConv/DeclRewriter.cpp +++ b/clang/lib/CConv/DeclRewriter.cpp @@ -103,7 +103,8 @@ void DeclRewriter::rewriteDecls(ASTContext &Context, ProgramInfo &Info, // If this function already has a modified signature? and it is not // visited by our cast placement visitor then rewrite it. std::string NewSig = NewFuncSig[FV->getName()]; - RewriteThese.insert(new FunctionDeclReplacement(FD, NewSig, true)); + RewriteThese.insert(new FunctionDeclReplacement(FD, NewSig, true, + true)); } } } @@ -217,13 +218,12 @@ void DeclRewriter::rewriteMultiDecl(DeclReplacementTempl *N, // maybe there is still something we can do because Decl refers // to a non-macro line. + SourceRange Possible(R.getSourceMgr().getExpansionLoc(TR.getBegin()), - D->getLocation()); + D->getEndLoc()); if (canRewrite(R, Possible)) { R.ReplaceText(Possible, SRewrite); - std::string NewStr = " " + D->getName().str(); - R.InsertTextAfter(D->getLocation(), NewStr); } else { if (Verbose) { errs() << "Still don't know how to re-write VarDecl\n"; @@ -337,9 +337,23 @@ void DeclRewriter::rewriteFunctionDecl(FunctionDeclReplacement *N) { // Additionally, a source range can be (mis) identified as // spanning multiple files. We don't know how to re-write that, // so don't. - SourceRange SR = N->getSourceRange(A.getSourceManager()); - if (canRewrite(R, SR)) + SourceRange SR = N->getSourceRange(); + if (canRewrite(R, SR)) { R.ReplaceText(SR, N->getReplacement()); + } else { + SourceRange Possible(R.getSourceMgr().getExpansionLoc(SR.getBegin()), + SR.getEnd()); + if (canRewrite(R, Possible)) { + R.ReplaceText(Possible, N->getReplacement()); + } else if (Verbose) { + errs() << "Don't know how to re-write FunctionDecl\n"; + N->getDecl()->dump(); + errs() << "at\n"; + if (N->getStatement()) + N->getStatement()->dump(); + errs() << "with " << N->getReplacement() << "\n"; + } + } } bool DeclRewriter::areDeclarationsOnSameLine(DeclReplacement *N1, @@ -459,21 +473,22 @@ bool FunctionDeclBuilder::VisitFunctionDecl(FunctionDecl *FD) { if (!Defnc->hasBody()) return true; - // DidAny tracks if we have made any changes to this function declaration. - // If no changes are made, then there is no need to rewrite anything, and the - // declaration is not added to RewriteThese. - bool DidAny = false; + // DidAnyParams tracks if we have made any changes to the parameters for this + // declarations. If no changes are made, then there is no need to rewrite the + // parameter declarations. + bool DidAnyParams = false; // Get rewritten parameter variable declarations std::vector ParmStrs; - for (unsigned i = 0; i < Defnc->numParams(); ++i) { - auto *Defn = dyn_cast(Defnc->getParamVar(i)); + for (unsigned I = 0; I < Defnc->numParams(); ++I) { + auto *Defn = dyn_cast(Defnc->getParamVar(I)); assert(Defn); + ParmVarDecl *PVDecl = Definition->getParamDecl(I); if (isAValidPVConstraint(Defn) && Defn->anyChanges(CS.getVariables())) { // This means Defn has a checked type, so we should rewrite to use this // type with an itype if applicable. - DidAny = true; + DidAnyParams = true; if (Defn->hasItype() || !Defn->anyArgumentIsWild(CS.getVariables())) { // If the definition already has itype or there are no WILD arguments. @@ -482,7 +497,7 @@ bool FunctionDeclBuilder::VisitFunctionDecl(FunctionDecl *FD) { std::string PtypeS = Defn->mkString(Info.getConstraints().getVariables()); PtypeS = PtypeS + getExistingIType(Defn) + - ABRewriter.getBoundsString(Defn, Definition->getParamDecl(i)); + ABRewriter.getBoundsString(Defn, PVDecl); ParmStrs.push_back(PtypeS); } else { // Here, definition is checked type but at least one of the arguments @@ -492,31 +507,38 @@ bool FunctionDeclBuilder::VisitFunctionDecl(FunctionDecl *FD) { Defn->mkString(Info.getConstraints().getVariables(), false, true); std::string Bi = Defn->getRewritableOriginalTy() + Defn->getName() + " : itype(" + - PtypeS + ")" + - ABRewriter.getBoundsString(Defn, - Definition->getParamDecl(i), true); + PtypeS + ")" + ABRewriter.getBoundsString(Defn, PVDecl, true); ParmStrs.push_back(Bi); } } else { - // If the parameter isn't checked, we can just dump the original - // declaration. - std::string Scratch = ""; - raw_string_ostream DeclText(Scratch); - Definition->getParamDecl(i)->print(DeclText); - ParmStrs.push_back(DeclText.str()); + // When parameter isn't checked, we just dump the original declaration. + ParmStrs.push_back(getSourceText(PVDecl->getSourceRange(), *Context)); } } + + if (Defnc->numParams() == 0) { + ParmStrs.push_back("void"); + QualType ReturnTy = FD->getReturnType(); + QualType Ty = FD->getType(); + if (!Ty->isFunctionProtoType() && ReturnTy->isPointerType()) + DidAnyParams = true; + } + // Get rewritten return variable auto *Defn = dyn_cast(Defnc->getReturnVar()); std::string ReturnVar = ""; std::string ItypeStr = ""; + // Does the same job as DidAnyParams, but with respect to the return value. If + // the return does not change, there is no need to rewrite it. + bool DidAnyReturn = false; + // Insert a bounds safe interface for the return. if (isAValidPVConstraint(Defn) && Defn->anyChanges(CS.getVariables())) { // This means we can infer that the return type is a checked type. - DidAny = true; + DidAnyReturn = true; // If the definition has itype or there is no argument which is WILD? if (Defn->hasItype() || !Defn->anyArgumentIsWild(CS.getVariables())) { // Just get the checked itype @@ -528,6 +550,10 @@ bool FunctionDeclBuilder::VisitFunctionDecl(FunctionDecl *FD) { Defn->mkString(Info.getConstraints().getVariables(), false, true); ReturnVar = Defn->getRewritableOriginalTy(); ItypeStr = " : itype(" + Itype + ")"; + + // A small hack here. The inserted itype comes after param declarations, + // so we have to rewrite the parameters if we want to insert an itype. + DidAnyParams = true; } } else { // This means inside the function, the return value is WILD so the return @@ -537,37 +563,43 @@ bool FunctionDeclBuilder::VisitFunctionDecl(FunctionDecl *FD) { ItypeStr = getExistingIType(Defn); } + // If the return is a function pointer, we need to rewrite the whole + // declaration even if no actual changes were made to the parameters. It could + // probably be done better, but getting the correct source locations is + // painful. + if (FD->getReturnType()->isFunctionPointerType() && DidAnyReturn) + DidAnyParams = true; + // Combine parameter and return variables rewritings into a single rewriting // for the entire function declaration. - std::string NewSig = - getStorageQualifierString(Definition) + ReturnVar + Defnc->getName() - + "("; - if (!ParmStrs.empty()) { + std::string NewSig = ""; + if (DidAnyReturn) + NewSig = getStorageQualifierString(Definition) + ReturnVar; + + if (DidAnyReturn && DidAnyParams) + NewSig += Defnc->getName(); + + if (DidAnyParams && !ParmStrs.empty()) { // Gather individual parameter strings into a single buffer std::ostringstream ConcatParamStr; copy(ParmStrs.begin(), ParmStrs.end() - 1, std::ostream_iterator(ConcatParamStr, ", ")); ConcatParamStr << ParmStrs.back(); - NewSig = NewSig + ConcatParamStr.str(); + NewSig += "(" + ConcatParamStr.str(); // Add varargs. if (functionHasVarArgs(Definition)) - NewSig = NewSig + ", ..."; - NewSig = NewSig + ")"; - } else { - NewSig = NewSig + "void)"; - QualType ReturnTy = FD->getReturnType(); - QualType Ty = FD->getType(); - if (!Ty->isFunctionProtoType() && ReturnTy->isPointerType()) - DidAny = true; + NewSig += ", ..."; + NewSig += ")"; } if (!ItypeStr.empty()) NewSig = NewSig + ItypeStr; // Add new declarations to RewriteThese if it has changed - if (DidAny) { + if (DidAnyReturn || DidAnyParams) { for (auto *const RD : Definition->redecls()) - RewriteThese.insert(new FunctionDeclReplacement(RD, NewSig, true)); + RewriteThese.insert(new FunctionDeclReplacement(RD, NewSig, DidAnyReturn, + DidAnyParams)); // Save the modified function signature. if(FD->isStatic()) { auto FileName = PersistentSourceLoc::mkPSL(FD, *Context).getFileName(); diff --git a/clang/lib/CConv/RewriteUtils.cpp b/clang/lib/CConv/RewriteUtils.cpp index af33157bf5a3..d41130fb3a7e 100644 --- a/clang/lib/CConv/RewriteUtils.cpp +++ b/clang/lib/CConv/RewriteUtils.cpp @@ -31,7 +31,7 @@ SourceLocation DComp::getDeclBegin(DeclReplacement *D) const { } SourceRange DComp::getReplacementSourceRange(DeclReplacement *D) const { - SourceRange Range = D->getSourceRange(SM); + SourceRange Range = D->getSourceRange(); // Also take into account whether or not there is a multi-statement // decl, because the generated ranges will overlap. diff --git a/clang/lib/CConv/Utils.cpp b/clang/lib/CConv/Utils.cpp index 26e9d149fe6d..222c808a0f30 100644 --- a/clang/lib/CConv/Utils.cpp +++ b/clang/lib/CConv/Utils.cpp @@ -409,4 +409,11 @@ bool isZeroBoundsExpr(BoundsExpr *BE, const ASTContext &C) { // size zero bounds, but checking this would be considerably more complicated // and it seems unlikely to show up in real code. return false; +} + +TypeLoc getBaseTypeLoc(TypeLoc T) { + while (!T.getNextTypeLoc().isNull() + && (T.getTypePtr()->isPointerType() || T.getTypePtr()->isArrayType())) + T = T.getNextTypeLoc(); + return T; } \ No newline at end of file diff --git a/clang/test/CheckedCRewriter/arrboth.c b/clang/test/CheckedCRewriter/arrboth.c index 547ab23e20be..90a3fd946489 100644 --- a/clang/test/CheckedCRewriter/arrboth.c +++ b/clang/test/CheckedCRewriter/arrboth.c @@ -103,13 +103,13 @@ int *mul2(int *x) { } int * sus(int * x, int * y) { - //CHECK_NOALL: int * sus(int *x, _Ptr y) { - //CHECK_ALL: _Array_ptr sus(int *x, _Ptr y) { + //CHECK_NOALL: int * sus(int * x, _Ptr y) { + //CHECK_ALL: _Array_ptr sus(int * x, _Ptr y) { x = (int *) 5; //CHECK: x = (int *) 5; int *z = calloc(5, sizeof(int)); //CHECK_NOALL: int *z = calloc(5, sizeof(int)); - //CHECK_ALL: _Array_ptr z : count(5) = calloc(5, sizeof(int)); + //CHECK_ALL: _Array_ptr z : count(5) = calloc(5, sizeof(int)); int i, fac; int *p; //CHECK_NOALL: int *p; @@ -127,10 +127,10 @@ int * foo() { int * x = malloc(sizeof(int)); //CHECK: int * x = malloc(sizeof(int)); int * y = malloc(sizeof(int)); - //CHECK: _Ptr y = malloc(sizeof(int)); + //CHECK: _Ptr y = malloc(sizeof(int)); int * z = sus(x, y); //CHECK_NOALL: int * z = sus(x, y); - //CHECK_ALL: _Array_ptr z = sus(x, y); + //CHECK_ALL: _Array_ptr z = sus(x, y); return z; } int * bar() { @@ -139,9 +139,9 @@ int * bar() { int * x = malloc(sizeof(int)); //CHECK: int * x = malloc(sizeof(int)); int * y = malloc(sizeof(int)); - //CHECK: _Ptr y = malloc(sizeof(int)); + //CHECK: _Ptr y = malloc(sizeof(int)); int * z = sus(x, y); //CHECK_NOALL: int * z = sus(x, y); - //CHECK_ALL: _Array_ptr z = sus(x, y); + //CHECK_ALL: _Array_ptr z = sus(x, y); z += 2; return z; } diff --git a/clang/test/CheckedCRewriter/arrbothmulti1.c b/clang/test/CheckedCRewriter/arrbothmulti1.c index 2547140aa2ee..691bd271980b 100644 --- a/clang/test/CheckedCRewriter/arrbothmulti1.c +++ b/clang/test/CheckedCRewriter/arrbothmulti1.c @@ -120,10 +120,10 @@ int * foo() { int * x = malloc(sizeof(int)); //CHECK: int * x = malloc(sizeof(int)); int * y = malloc(sizeof(int)); - //CHECK: _Ptr y = malloc(sizeof(int)); + //CHECK: _Ptr y = malloc(sizeof(int)); int * z = sus(x, y); //CHECK_NOALL: int * z = sus(x, y); - //CHECK_ALL: _Array_ptr z = sus(x, y); + //CHECK_ALL: _Array_ptr z = sus(x, y); return z; } int * bar() { @@ -132,9 +132,9 @@ int * bar() { int * x = malloc(sizeof(int)); //CHECK: int * x = malloc(sizeof(int)); int * y = malloc(sizeof(int)); - //CHECK: _Ptr y = malloc(sizeof(int)); + //CHECK: _Ptr y = malloc(sizeof(int)); int * z = sus(x, y); //CHECK_NOALL: int * z = sus(x, y); - //CHECK_ALL: _Array_ptr z = sus(x, y); + //CHECK_ALL: _Array_ptr z = sus(x, y); z += 2; return z; } diff --git a/clang/test/CheckedCRewriter/arrbothmulti2.c b/clang/test/CheckedCRewriter/arrbothmulti2.c index afc2c247fbe0..6e64d961acb9 100644 --- a/clang/test/CheckedCRewriter/arrbothmulti2.c +++ b/clang/test/CheckedCRewriter/arrbothmulti2.c @@ -111,13 +111,13 @@ int *mul2(int *x) { } int * sus(int * x, int * y) { - //CHECK_NOALL: int * sus(int *x, _Ptr y) { - //CHECK_ALL: _Array_ptr sus(int *x, _Ptr y) { + //CHECK_NOALL: int * sus(int * x, _Ptr y) { + //CHECK_ALL: _Array_ptr sus(int * x, _Ptr y) { x = (int *) 5; //CHECK: x = (int *) 5; int *z = calloc(5, sizeof(int)); //CHECK_NOALL: int *z = calloc(5, sizeof(int)); - //CHECK_ALL: _Array_ptr z : count(5) = calloc(5, sizeof(int)); + //CHECK_ALL: _Array_ptr z : count(5) = calloc(5, sizeof(int)); int i, fac; int *p; //CHECK_NOALL: int *p; diff --git a/clang/test/CheckedCRewriter/arrboundsadvanced.c b/clang/test/CheckedCRewriter/arrboundsadvanced.c index d547f9479110..101086aa2f83 100644 --- a/clang/test/CheckedCRewriter/arrboundsadvanced.c +++ b/clang/test/CheckedCRewriter/arrboundsadvanced.c @@ -43,7 +43,7 @@ void setdata(struct foo **G, unsigned dlen, struct foo *d, unsigned idx) { // This will make dlen the length of G G[idx] = d; } -//CHECK: void setdata(_Array_ptr<_Ptr> G : count(dlen), unsigned int dlen, _Ptr d, unsigned int idx) { +//CHECK: void setdata(_Array_ptr<_Ptr> G : count(dlen), unsigned dlen, _Ptr d, unsigned idx) { int main(int argc, char **argv) { char *PN = argv[0]; diff --git a/clang/test/CheckedCRewriter/arrboundsbasic.c b/clang/test/CheckedCRewriter/arrboundsbasic.c index 35b503872efe..3ea46327cd89 100644 --- a/clang/test/CheckedCRewriter/arrboundsbasic.c +++ b/clang/test/CheckedCRewriter/arrboundsbasic.c @@ -37,6 +37,6 @@ int foo(int *arr, unsigned len) { a.a[0] = 0; return 0; } -//CHECK: int foo(_Array_ptr arr : count(len), unsigned int len) { +//CHECK: int foo(_Array_ptr arr : count(len), unsigned len) { //CHECK: _Array_ptr arr1 : count(n) = malloc(n*sizeof(char)); //CHECK: _Array_ptr arr2 : count(n) = calloc(n, sizeof(char)); diff --git a/clang/test/CheckedCRewriter/arrboundsbasicinfer.c b/clang/test/CheckedCRewriter/arrboundsbasicinfer.c index ef364fef7d0c..f9be7f8ab49b 100644 --- a/clang/test/CheckedCRewriter/arrboundsbasicinfer.c +++ b/clang/test/CheckedCRewriter/arrboundsbasicinfer.c @@ -28,7 +28,7 @@ int foo(int *arr, unsigned len) { return 0; } -//CHECK: int foo(_Array_ptr arr : count(len), unsigned int len) { +//CHECK: int foo(_Array_ptr arr : count(len), unsigned len) { void baz() { unsigned n; diff --git a/clang/test/CheckedCRewriter/arrboundsinfer2.c b/clang/test/CheckedCRewriter/arrboundsinfer2.c index de04593fa9a0..db359d082b17 100644 --- a/clang/test/CheckedCRewriter/arrboundsinfer2.c +++ b/clang/test/CheckedCRewriter/arrboundsinfer2.c @@ -35,7 +35,7 @@ int foo(int *arr, unsigned len) { return 0; } -//CHECK: int foo(_Array_ptr arr : count(len), unsigned int len) { +//CHECK: int foo(_Array_ptr arr : count(len), unsigned len) { //CHECK: _Array_ptr arr1 : count(len) = malloc(sizeof(int)*len); //CHECK: _Array_ptr arr2 : count(len) = malloc(sizeof(int)*len); //CHECK: _Array_ptr arr3 : count(len) = ((void *)0); diff --git a/clang/test/CheckedCRewriter/arrcallee.c b/clang/test/CheckedCRewriter/arrcallee.c index 5ac11b522bd9..febcb79ddf62 100644 --- a/clang/test/CheckedCRewriter/arrcallee.c +++ b/clang/test/CheckedCRewriter/arrcallee.c @@ -103,13 +103,13 @@ int *mul2(int *x) { } int * sus(int * x, int * y) { - //CHECK_NOALL: int * sus(int *x, _Ptr y) { - //CHECK_ALL: _Array_ptr sus(int *x, _Ptr y) { + //CHECK_NOALL: int * sus(int * x, _Ptr y) { + //CHECK_ALL: _Array_ptr sus(int * x, _Ptr y) { x = (int *) 5; //CHECK: x = (int *) 5; int *z = calloc(5, sizeof(int)); //CHECK_NOALL: int *z = calloc(5, sizeof(int)); - //CHECK_ALL: _Array_ptr z : count(5) = calloc(5, sizeof(int)); + //CHECK_ALL: _Array_ptr z : count(5) = calloc(5, sizeof(int)); int i, fac; int *p; //CHECK_NOALL: int *p; @@ -127,10 +127,10 @@ int * foo() { int * x = malloc(sizeof(int)); //CHECK: int * x = malloc(sizeof(int)); int * y = malloc(sizeof(int)); - //CHECK: _Ptr y = malloc(sizeof(int)); + //CHECK: _Ptr y = malloc(sizeof(int)); int * z = sus(x, y); //CHECK_NOALL: int * z = sus(x, y); - //CHECK_ALL: _Array_ptr z = sus(x, y); + //CHECK_ALL: _Array_ptr z = sus(x, y); return z; } int * bar() { @@ -139,8 +139,8 @@ int * bar() { int * x = malloc(sizeof(int)); //CHECK: int * x = malloc(sizeof(int)); int * y = malloc(sizeof(int)); - //CHECK: _Ptr y = malloc(sizeof(int)); + //CHECK: _Ptr y = malloc(sizeof(int)); int * z = sus(x, y); //CHECK_NOALL: int * z = sus(x, y); - //CHECK_ALL: _Array_ptr z = sus(x, y); + //CHECK_ALL: _Array_ptr z = sus(x, y); return z; } diff --git a/clang/test/CheckedCRewriter/arrcalleemulti1.c b/clang/test/CheckedCRewriter/arrcalleemulti1.c index c2d8f3254658..8fa4c8106ffe 100644 --- a/clang/test/CheckedCRewriter/arrcalleemulti1.c +++ b/clang/test/CheckedCRewriter/arrcalleemulti1.c @@ -120,10 +120,10 @@ int * foo() { int * x = malloc(sizeof(int)); //CHECK: int * x = malloc(sizeof(int)); int * y = malloc(sizeof(int)); - //CHECK: _Ptr y = malloc(sizeof(int)); + //CHECK: _Ptr y = malloc(sizeof(int)); int * z = sus(x, y); //CHECK_NOALL: int * z = sus(x, y); - //CHECK_ALL: _Array_ptr z = sus(x, y); + //CHECK_ALL: _Array_ptr z = sus(x, y); return z; } int * bar() { @@ -132,8 +132,8 @@ int * bar() { int * x = malloc(sizeof(int)); //CHECK: int * x = malloc(sizeof(int)); int * y = malloc(sizeof(int)); - //CHECK: _Ptr y = malloc(sizeof(int)); + //CHECK: _Ptr y = malloc(sizeof(int)); int * z = sus(x, y); //CHECK_NOALL: int * z = sus(x, y); - //CHECK_ALL: _Array_ptr z = sus(x, y); + //CHECK_ALL: _Array_ptr z = sus(x, y); return z; } diff --git a/clang/test/CheckedCRewriter/arrcalleemulti2.c b/clang/test/CheckedCRewriter/arrcalleemulti2.c index 05f74d81dae8..992913fec150 100644 --- a/clang/test/CheckedCRewriter/arrcalleemulti2.c +++ b/clang/test/CheckedCRewriter/arrcalleemulti2.c @@ -111,13 +111,13 @@ int *mul2(int *x) { } int * sus(int * x, int * y) { - //CHECK_NOALL: int * sus(int *x, _Ptr y) { - //CHECK_ALL: _Array_ptr sus(int *x, _Ptr y) { + //CHECK_NOALL: int * sus(int * x, _Ptr y) { + //CHECK_ALL: _Array_ptr sus(int * x, _Ptr y) { x = (int *) 5; //CHECK: x = (int *) 5; int *z = calloc(5, sizeof(int)); //CHECK_NOALL: int *z = calloc(5, sizeof(int)); - //CHECK_ALL: _Array_ptr z : count(5) = calloc(5, sizeof(int)); + //CHECK_ALL: _Array_ptr z : count(5) = calloc(5, sizeof(int)); int i, fac; int *p; //CHECK_NOALL: int *p; diff --git a/clang/test/CheckedCRewriter/arrcaller.c b/clang/test/CheckedCRewriter/arrcaller.c index c9dc00eda468..fcfe3de5622f 100644 --- a/clang/test/CheckedCRewriter/arrcaller.c +++ b/clang/test/CheckedCRewriter/arrcaller.c @@ -103,13 +103,13 @@ int *mul2(int *x) { } int * sus(int * x, int * y) { - //CHECK_NOALL: int * sus(int *x, _Ptr y) { - //CHECK_ALL: _Array_ptr sus(int *x, _Ptr y) { + //CHECK_NOALL: int * sus(int * x, _Ptr y) { + //CHECK_ALL: _Array_ptr sus(int * x, _Ptr y) { x = (int *) 5; //CHECK: x = (int *) 5; int *z = calloc(5, sizeof(int)); //CHECK_NOALL: int *z = calloc(5, sizeof(int)); - //CHECK_ALL: _Array_ptr z : count(5) = calloc(5, sizeof(int)); + //CHECK_ALL: _Array_ptr z : count(5) = calloc(5, sizeof(int)); int i, fac; int *p; //CHECK_NOALL: int *p; @@ -126,10 +126,10 @@ int * foo() { int * x = malloc(sizeof(int)); //CHECK: int * x = malloc(sizeof(int)); int * y = malloc(sizeof(int)); - //CHECK: _Ptr y = malloc(sizeof(int)); + //CHECK: _Ptr y = malloc(sizeof(int)); int * z = sus(x, y); //CHECK_NOALL: int * z = sus(x, y); - //CHECK_ALL: _Array_ptr z = sus(x, y); + //CHECK_ALL: _Array_ptr z = sus(x, y); return z; } int * bar() { @@ -138,9 +138,9 @@ int * bar() { int * x = malloc(sizeof(int)); //CHECK: int * x = malloc(sizeof(int)); int * y = malloc(sizeof(int)); - //CHECK: _Ptr y = malloc(sizeof(int)); + //CHECK: _Ptr y = malloc(sizeof(int)); int * z = sus(x, y); //CHECK_NOALL: int * z = sus(x, y); - //CHECK_ALL: _Array_ptr z = sus(x, y); + //CHECK_ALL: _Array_ptr z = sus(x, y); z += 2; return z; } diff --git a/clang/test/CheckedCRewriter/arrcallermulti1.c b/clang/test/CheckedCRewriter/arrcallermulti1.c index 78ec6cb2b8fd..a54c269db727 100644 --- a/clang/test/CheckedCRewriter/arrcallermulti1.c +++ b/clang/test/CheckedCRewriter/arrcallermulti1.c @@ -120,10 +120,10 @@ int * foo() { int * x = malloc(sizeof(int)); //CHECK: int * x = malloc(sizeof(int)); int * y = malloc(sizeof(int)); - //CHECK: _Ptr y = malloc(sizeof(int)); + //CHECK: _Ptr y = malloc(sizeof(int)); int * z = sus(x, y); //CHECK_NOALL: int * z = sus(x, y); - //CHECK_ALL: _Array_ptr z = sus(x, y); + //CHECK_ALL: _Array_ptr z = sus(x, y); return z; } int * bar() { @@ -132,9 +132,9 @@ int * bar() { int * x = malloc(sizeof(int)); //CHECK: int * x = malloc(sizeof(int)); int * y = malloc(sizeof(int)); - //CHECK: _Ptr y = malloc(sizeof(int)); + //CHECK: _Ptr y = malloc(sizeof(int)); int * z = sus(x, y); //CHECK_NOALL: int * z = sus(x, y); - //CHECK_ALL: _Array_ptr z = sus(x, y); + //CHECK_ALL: _Array_ptr z = sus(x, y); z += 2; return z; } diff --git a/clang/test/CheckedCRewriter/arrcallermulti2.c b/clang/test/CheckedCRewriter/arrcallermulti2.c index bb88a54ed45a..673ca8b74dcf 100644 --- a/clang/test/CheckedCRewriter/arrcallermulti2.c +++ b/clang/test/CheckedCRewriter/arrcallermulti2.c @@ -111,13 +111,13 @@ int *mul2(int *x) { } int * sus(int * x, int * y) { - //CHECK_NOALL: int * sus(int *x, _Ptr y) { - //CHECK_ALL: _Array_ptr sus(int *x, _Ptr y) { + //CHECK_NOALL: int * sus(int * x, _Ptr y) { + //CHECK_ALL: _Array_ptr sus(int * x, _Ptr y) { x = (int *) 5; //CHECK: x = (int *) 5; int *z = calloc(5, sizeof(int)); //CHECK_NOALL: int *z = calloc(5, sizeof(int)); - //CHECK_ALL: _Array_ptr z : count(5) = calloc(5, sizeof(int)); + //CHECK_ALL: _Array_ptr z : count(5) = calloc(5, sizeof(int)); int i, fac; int *p; //CHECK_NOALL: int *p; diff --git a/clang/test/CheckedCRewriter/arrinstructboth.c b/clang/test/CheckedCRewriter/arrinstructboth.c index 9342fc22d734..3a2f0c6b49b8 100644 --- a/clang/test/CheckedCRewriter/arrinstructboth.c +++ b/clang/test/CheckedCRewriter/arrinstructboth.c @@ -104,7 +104,7 @@ int *mul2(int *x) { struct warr * sus(struct warr * x, struct warr * y) { //CHECK_NOALL: struct warr * sus(struct warr * x, struct warr * y) { - //CHECK_ALL: _Array_ptr sus(struct warr *x, struct warr *y : itype(_Array_ptr)) { + //CHECK_ALL: _Array_ptr sus(struct warr * x, struct warr *y : itype(_Array_ptr)) { x = (struct warr *) 5; //CHECK: x = (struct warr *) 5; char name[20]; @@ -112,7 +112,7 @@ x = (struct warr *) 5; //CHECK_ALL: char name _Checked[20]; struct warr *z = y; //CHECK_NOALL: struct warr *z = y; - //CHECK_ALL: _Array_ptr z = y; + //CHECK_ALL: _Array_ptr z = y; int i; for(i = 0; i < 5; i++) { //CHECK_NOALL: for(i = 0; i < 5; i++) { @@ -132,7 +132,7 @@ struct warr * foo() { //CHECK: struct warr * y = malloc(sizeof(struct warr)); struct warr * z = sus(x, y); //CHECK_NOALL: struct warr * z = sus(x, y); - //CHECK_ALL: _Ptr z = sus(x, y); + //CHECK_ALL: _Ptr z = sus(x, y); return z; } struct warr * bar() { @@ -144,6 +144,6 @@ struct warr * bar() { //CHECK: struct warr * y = malloc(sizeof(struct warr)); struct warr * z = sus(x, y); //CHECK_NOALL: struct warr * z = sus(x, y); - //CHECK_ALL: _Array_ptr z = sus(x, y); + //CHECK_ALL: _Array_ptr z = sus(x, y); z += 2; return z; } diff --git a/clang/test/CheckedCRewriter/arrinstructbothmulti1.c b/clang/test/CheckedCRewriter/arrinstructbothmulti1.c index 849b25113718..82f3026a78c7 100644 --- a/clang/test/CheckedCRewriter/arrinstructbothmulti1.c +++ b/clang/test/CheckedCRewriter/arrinstructbothmulti1.c @@ -123,7 +123,7 @@ struct warr * foo() { //CHECK: struct warr * y = malloc(sizeof(struct warr)); struct warr * z = sus(x, y); //CHECK_NOALL: struct warr * z = sus(x, y); - //CHECK_ALL: _Ptr z = sus(x, y); + //CHECK_ALL: _Ptr z = sus(x, y); return z; } struct warr * bar() { @@ -135,6 +135,6 @@ struct warr * bar() { //CHECK: struct warr * y = malloc(sizeof(struct warr)); struct warr * z = sus(x, y); //CHECK_NOALL: struct warr * z = sus(x, y); - //CHECK_ALL: _Array_ptr z = sus(x, y); + //CHECK_ALL: _Array_ptr z = sus(x, y); z += 2; return z; } diff --git a/clang/test/CheckedCRewriter/arrinstructbothmulti2.c b/clang/test/CheckedCRewriter/arrinstructbothmulti2.c index d5ec283f1ec5..32f1c50c2ff6 100644 --- a/clang/test/CheckedCRewriter/arrinstructbothmulti2.c +++ b/clang/test/CheckedCRewriter/arrinstructbothmulti2.c @@ -112,7 +112,7 @@ int *mul2(int *x) { struct warr * sus(struct warr * x, struct warr * y) { //CHECK_NOALL: struct warr * sus(struct warr * x, struct warr * y) { - //CHECK_ALL: _Array_ptr sus(struct warr *x, struct warr *y : itype(_Array_ptr)) { + //CHECK_ALL: _Array_ptr sus(struct warr * x, struct warr *y : itype(_Array_ptr)) { x = (struct warr *) 5; //CHECK: x = (struct warr *) 5; char name[20]; @@ -120,7 +120,7 @@ x = (struct warr *) 5; //CHECK_ALL: char name _Checked[20]; struct warr *z = y; //CHECK_NOALL: struct warr *z = y; - //CHECK_ALL: _Array_ptr z = y; + //CHECK_ALL: _Array_ptr z = y; int i; for(i = 0; i < 5; i++) { //CHECK_NOALL: for(i = 0; i < 5; i++) { diff --git a/clang/test/CheckedCRewriter/arrinstructcallee.c b/clang/test/CheckedCRewriter/arrinstructcallee.c index 507753fcd96e..3f19f9872dd2 100644 --- a/clang/test/CheckedCRewriter/arrinstructcallee.c +++ b/clang/test/CheckedCRewriter/arrinstructcallee.c @@ -104,7 +104,7 @@ int *mul2(int *x) { struct warr * sus(struct warr * x, struct warr * y) { //CHECK_NOALL: struct warr * sus(struct warr * x, struct warr * y) { - //CHECK_ALL: _Ptr sus(struct warr *x, struct warr *y : itype(_Array_ptr)) { + //CHECK_ALL: _Ptr sus(struct warr * x, struct warr *y : itype(_Array_ptr)) { x = (struct warr *) 5; //CHECK: x = (struct warr *) 5; char name[20]; @@ -112,7 +112,7 @@ x = (struct warr *) 5; //CHECK_ALL: char name _Checked[20]; struct warr *z = y; //CHECK_NOALL: struct warr *z = y; - //CHECK_ALL: _Array_ptr z = y; + //CHECK_ALL: _Array_ptr z = y; int i; for(i = 0; i < 5; i++) { //CHECK_NOALL: for(i = 0; i < 5; i++) { @@ -132,7 +132,7 @@ struct warr * foo() { //CHECK: struct warr * y = malloc(sizeof(struct warr)); struct warr * z = sus(x, y); //CHECK_NOALL: struct warr * z = sus(x, y); - //CHECK_ALL: _Ptr z = sus(x, y); + //CHECK_ALL: _Ptr z = sus(x, y); return z; } struct warr * bar() { @@ -144,5 +144,5 @@ struct warr * bar() { //CHECK: struct warr * y = malloc(sizeof(struct warr)); struct warr * z = sus(x, y); //CHECK_NOALL: struct warr * z = sus(x, y); - //CHECK_ALL: _Ptr z = sus(x, y); + //CHECK_ALL: _Ptr z = sus(x, y); return z; } diff --git a/clang/test/CheckedCRewriter/arrinstructcalleemulti1.c b/clang/test/CheckedCRewriter/arrinstructcalleemulti1.c index 236fee4d2a5b..00650d7b0f9b 100644 --- a/clang/test/CheckedCRewriter/arrinstructcalleemulti1.c +++ b/clang/test/CheckedCRewriter/arrinstructcalleemulti1.c @@ -123,7 +123,7 @@ struct warr * foo() { //CHECK: struct warr * y = malloc(sizeof(struct warr)); struct warr * z = sus(x, y); //CHECK_NOALL: struct warr * z = sus(x, y); - //CHECK_ALL: _Ptr z = sus(x, y); + //CHECK_ALL: _Ptr z = sus(x, y); return z; } struct warr * bar() { @@ -135,5 +135,5 @@ struct warr * bar() { //CHECK: struct warr * y = malloc(sizeof(struct warr)); struct warr * z = sus(x, y); //CHECK_NOALL: struct warr * z = sus(x, y); - //CHECK_ALL: _Ptr z = sus(x, y); + //CHECK_ALL: _Ptr z = sus(x, y); return z; } diff --git a/clang/test/CheckedCRewriter/arrinstructcalleemulti2.c b/clang/test/CheckedCRewriter/arrinstructcalleemulti2.c index f0cc71e64726..0d0adcad6592 100644 --- a/clang/test/CheckedCRewriter/arrinstructcalleemulti2.c +++ b/clang/test/CheckedCRewriter/arrinstructcalleemulti2.c @@ -112,7 +112,7 @@ int *mul2(int *x) { struct warr * sus(struct warr * x, struct warr * y) { //CHECK_NOALL: struct warr * sus(struct warr * x, struct warr * y) { - //CHECK_ALL: _Ptr sus(struct warr *x, struct warr *y : itype(_Array_ptr)) { + //CHECK_ALL: _Ptr sus(struct warr * x, struct warr *y : itype(_Array_ptr)) { x = (struct warr *) 5; //CHECK: x = (struct warr *) 5; char name[20]; @@ -120,7 +120,7 @@ x = (struct warr *) 5; //CHECK_ALL: char name _Checked[20]; struct warr *z = y; //CHECK_NOALL: struct warr *z = y; - //CHECK_ALL: _Array_ptr z = y; + //CHECK_ALL: _Array_ptr z = y; int i; for(i = 0; i < 5; i++) { //CHECK_NOALL: for(i = 0; i < 5; i++) { diff --git a/clang/test/CheckedCRewriter/arrinstructcaller.c b/clang/test/CheckedCRewriter/arrinstructcaller.c index 3a7ac6b6f4ea..9096345a060c 100644 --- a/clang/test/CheckedCRewriter/arrinstructcaller.c +++ b/clang/test/CheckedCRewriter/arrinstructcaller.c @@ -103,16 +103,16 @@ int *mul2(int *x) { } struct warr * sus(struct warr * x, struct warr * y) { - //CHECK_NOALL: struct warr *sus(struct warr *x, _Ptr y) : itype(_Ptr) { - //CHECK_ALL: _Array_ptr sus(struct warr *x, struct warr *y : itype(_Array_ptr)) { + //CHECK_NOALL: struct warr *sus(struct warr * x, _Ptr y) : itype(_Ptr) { + //CHECK_ALL: _Array_ptr sus(struct warr * x, struct warr *y : itype(_Array_ptr)) { x = (struct warr *) 5; //CHECK: x = (struct warr *) 5; char name[20]; //CHECK_NOALL: char name[20]; //CHECK_ALL: char name _Checked[20]; struct warr *z = y; - //CHECK_NOALL: _Ptr z = y; - //CHECK_ALL: _Array_ptr z = y; + //CHECK_NOALL: _Ptr z = y; + //CHECK_ALL: _Array_ptr z = y; int i; for(i = 0; i < 5; i++) { //CHECK_NOALL: for(i = 0; i < 5; i++) { @@ -127,10 +127,10 @@ struct warr * foo() { struct warr * x = malloc(sizeof(struct warr)); //CHECK: struct warr * x = malloc(sizeof(struct warr)); struct warr * y = malloc(sizeof(struct warr)); - //CHECK_NOALL: _Ptr y = malloc(sizeof(struct warr)); + //CHECK_NOALL: _Ptr y = malloc(sizeof(struct warr)); //CHECK_ALL: struct warr * y = malloc(sizeof(struct warr)); struct warr * z = sus(x, y); - //CHECK: _Ptr z = sus(x, y); + //CHECK: _Ptr z = sus(x, y); return z; } struct warr * bar() { @@ -139,10 +139,10 @@ struct warr * bar() { struct warr * x = malloc(sizeof(struct warr)); //CHECK: struct warr * x = malloc(sizeof(struct warr)); struct warr * y = malloc(sizeof(struct warr)); - //CHECK_NOALL: _Ptr y = malloc(sizeof(struct warr)); + //CHECK_NOALL: _Ptr y = malloc(sizeof(struct warr)); //CHECK_ALL: struct warr * y = malloc(sizeof(struct warr)); struct warr * z = sus(x, y); //CHECK_NOALL: struct warr * z = sus(x, y); - //CHECK_ALL: _Array_ptr z = sus(x, y); + //CHECK_ALL: _Array_ptr z = sus(x, y); z += 2; return z; } diff --git a/clang/test/CheckedCRewriter/arrinstructcallermulti1.c b/clang/test/CheckedCRewriter/arrinstructcallermulti1.c index 1a6094e2d7e0..715336cf6962 100644 --- a/clang/test/CheckedCRewriter/arrinstructcallermulti1.c +++ b/clang/test/CheckedCRewriter/arrinstructcallermulti1.c @@ -119,10 +119,10 @@ struct warr * foo() { struct warr * x = malloc(sizeof(struct warr)); //CHECK: struct warr * x = malloc(sizeof(struct warr)); struct warr * y = malloc(sizeof(struct warr)); - //CHECK_NOALL: _Ptr y = malloc(sizeof(struct warr)); + //CHECK_NOALL: _Ptr y = malloc(sizeof(struct warr)); //CHECK_ALL: struct warr * y = malloc(sizeof(struct warr)); struct warr * z = sus(x, y); - //CHECK: _Ptr z = sus(x, y); + //CHECK: _Ptr z = sus(x, y); return z; } struct warr * bar() { @@ -131,10 +131,10 @@ struct warr * bar() { struct warr * x = malloc(sizeof(struct warr)); //CHECK: struct warr * x = malloc(sizeof(struct warr)); struct warr * y = malloc(sizeof(struct warr)); - //CHECK_NOALL: _Ptr y = malloc(sizeof(struct warr)); + //CHECK_NOALL: _Ptr y = malloc(sizeof(struct warr)); //CHECK_ALL: struct warr * y = malloc(sizeof(struct warr)); struct warr * z = sus(x, y); //CHECK_NOALL: struct warr * z = sus(x, y); - //CHECK_ALL: _Array_ptr z = sus(x, y); + //CHECK_ALL: _Array_ptr z = sus(x, y); z += 2; return z; } diff --git a/clang/test/CheckedCRewriter/arrinstructcallermulti2.c b/clang/test/CheckedCRewriter/arrinstructcallermulti2.c index c3b2cd9406cf..36aa72ddda2c 100644 --- a/clang/test/CheckedCRewriter/arrinstructcallermulti2.c +++ b/clang/test/CheckedCRewriter/arrinstructcallermulti2.c @@ -111,16 +111,16 @@ int *mul2(int *x) { } struct warr * sus(struct warr * x, struct warr * y) { - //CHECK_NOALL: struct warr *sus(struct warr *x, _Ptr y) : itype(_Ptr) { - //CHECK_ALL: _Array_ptr sus(struct warr *x, struct warr *y : itype(_Array_ptr)) { + //CHECK_NOALL: struct warr *sus(struct warr * x, _Ptr y) : itype(_Ptr) { + //CHECK_ALL: _Array_ptr sus(struct warr * x, struct warr *y : itype(_Array_ptr)) { x = (struct warr *) 5; //CHECK: x = (struct warr *) 5; char name[20]; //CHECK_NOALL: char name[20]; //CHECK_ALL: char name _Checked[20]; struct warr *z = y; - //CHECK_NOALL: _Ptr z = y; - //CHECK_ALL: _Array_ptr z = y; + //CHECK_NOALL: _Ptr z = y; + //CHECK_ALL: _Array_ptr z = y; int i; for(i = 0; i < 5; i++) { //CHECK_NOALL: for(i = 0; i < 5; i++) { diff --git a/clang/test/CheckedCRewriter/arrinstructprotoboth.c b/clang/test/CheckedCRewriter/arrinstructprotoboth.c index fda8407e2d48..4ccfb1e4d779 100644 --- a/clang/test/CheckedCRewriter/arrinstructprotoboth.c +++ b/clang/test/CheckedCRewriter/arrinstructprotoboth.c @@ -107,7 +107,7 @@ int *mul2(int *x) { struct warr * sus(struct warr *, struct warr *); //CHECK_NOALL: struct warr * sus(struct warr *, struct warr *); - //CHECK_ALL: _Array_ptr sus(struct warr *x, struct warr *y : itype(_Array_ptr)); + //CHECK_ALL: _Array_ptr sus(struct warr * x, struct warr *y : itype(_Array_ptr)); struct warr * foo() { //CHECK_NOALL: struct warr * foo(void) { @@ -118,7 +118,7 @@ struct warr * foo() { //CHECK: struct warr * y = malloc(sizeof(struct warr)); struct warr * z = sus(x, y); //CHECK_NOALL: struct warr * z = sus(x, y); - //CHECK_ALL: _Ptr z = sus(x, y); + //CHECK_ALL: _Ptr z = sus(x, y); return z; } struct warr * bar() { @@ -130,13 +130,13 @@ struct warr * bar() { //CHECK: struct warr * y = malloc(sizeof(struct warr)); struct warr * z = sus(x, y); //CHECK_NOALL: struct warr * z = sus(x, y); - //CHECK_ALL: _Array_ptr z = sus(x, y); + //CHECK_ALL: _Array_ptr z = sus(x, y); z += 2; return z; } struct warr * sus(struct warr * x, struct warr * y) { //CHECK_NOALL: struct warr * sus(struct warr * x, struct warr * y) { - //CHECK_ALL: _Array_ptr sus(struct warr *x, struct warr *y : itype(_Array_ptr)) { + //CHECK_ALL: _Array_ptr sus(struct warr * x, struct warr *y : itype(_Array_ptr)) { x = (struct warr *) 5; //CHECK: x = (struct warr *) 5; char name[20]; @@ -144,7 +144,7 @@ x = (struct warr *) 5; //CHECK_ALL: char name _Checked[20]; struct warr *z = y; //CHECK_NOALL: struct warr *z = y; - //CHECK_ALL: _Array_ptr z = y; + //CHECK_ALL: _Array_ptr z = y; int i; for(i = 0; i < 5; i++) { //CHECK_NOALL: for(i = 0; i < 5; i++) { diff --git a/clang/test/CheckedCRewriter/arrinstructprotocallee.c b/clang/test/CheckedCRewriter/arrinstructprotocallee.c index 9910c5f66d0e..5a253dbfdb76 100644 --- a/clang/test/CheckedCRewriter/arrinstructprotocallee.c +++ b/clang/test/CheckedCRewriter/arrinstructprotocallee.c @@ -107,7 +107,7 @@ int *mul2(int *x) { struct warr * sus(struct warr *, struct warr *); //CHECK_NOALL: struct warr * sus(struct warr *, struct warr *); - //CHECK_ALL: _Ptr sus(struct warr *x, struct warr *y : itype(_Array_ptr)); + //CHECK_ALL: _Ptr sus(struct warr * x, struct warr *y : itype(_Array_ptr)); struct warr * foo() { //CHECK_NOALL: struct warr * foo(void) { @@ -118,7 +118,7 @@ struct warr * foo() { //CHECK: struct warr * y = malloc(sizeof(struct warr)); struct warr * z = sus(x, y); //CHECK_NOALL: struct warr * z = sus(x, y); - //CHECK_ALL: _Ptr z = sus(x, y); + //CHECK_ALL: _Ptr z = sus(x, y); return z; } struct warr * bar() { @@ -130,12 +130,12 @@ struct warr * bar() { //CHECK: struct warr * y = malloc(sizeof(struct warr)); struct warr * z = sus(x, y); //CHECK_NOALL: struct warr * z = sus(x, y); - //CHECK_ALL: _Ptr z = sus(x, y); + //CHECK_ALL: _Ptr z = sus(x, y); return z; } struct warr * sus(struct warr * x, struct warr * y) { //CHECK_NOALL: struct warr * sus(struct warr * x, struct warr * y) { - //CHECK_ALL: _Ptr sus(struct warr *x, struct warr *y : itype(_Array_ptr)) { + //CHECK_ALL: _Ptr sus(struct warr * x, struct warr *y : itype(_Array_ptr)) { x = (struct warr *) 5; //CHECK: x = (struct warr *) 5; char name[20]; @@ -143,7 +143,7 @@ x = (struct warr *) 5; //CHECK_ALL: char name _Checked[20]; struct warr *z = y; //CHECK_NOALL: struct warr *z = y; - //CHECK_ALL: _Array_ptr z = y; + //CHECK_ALL: _Array_ptr z = y; int i; for(i = 0; i < 5; i++) { //CHECK_NOALL: for(i = 0; i < 5; i++) { diff --git a/clang/test/CheckedCRewriter/arrinstructprotocaller.c b/clang/test/CheckedCRewriter/arrinstructprotocaller.c index fc8be7f0619d..868c1a66cf25 100644 --- a/clang/test/CheckedCRewriter/arrinstructprotocaller.c +++ b/clang/test/CheckedCRewriter/arrinstructprotocaller.c @@ -106,18 +106,18 @@ int *mul2(int *x) { } struct warr * sus(struct warr *, struct warr *); - //CHECK_NOALL: struct warr *sus(struct warr *x, _Ptr y) : itype(_Ptr); - //CHECK_ALL: _Array_ptr sus(struct warr *x, struct warr *y : itype(_Array_ptr)); + //CHECK_NOALL: struct warr *sus(struct warr * x, _Ptr y) : itype(_Ptr); + //CHECK_ALL: _Array_ptr sus(struct warr * x, struct warr *y : itype(_Array_ptr)); struct warr * foo() { //CHECK: _Ptr foo(void) { struct warr * x = malloc(sizeof(struct warr)); //CHECK: struct warr * x = malloc(sizeof(struct warr)); struct warr * y = malloc(sizeof(struct warr)); - //CHECK_NOALL: _Ptr y = malloc(sizeof(struct warr)); + //CHECK_NOALL: _Ptr y = malloc(sizeof(struct warr)); //CHECK_ALL: struct warr * y = malloc(sizeof(struct warr)); struct warr * z = sus(x, y); - //CHECK: _Ptr z = sus(x, y); + //CHECK: _Ptr z = sus(x, y); return z; } struct warr * bar() { @@ -126,25 +126,25 @@ struct warr * bar() { struct warr * x = malloc(sizeof(struct warr)); //CHECK: struct warr * x = malloc(sizeof(struct warr)); struct warr * y = malloc(sizeof(struct warr)); - //CHECK_NOALL: _Ptr y = malloc(sizeof(struct warr)); + //CHECK_NOALL: _Ptr y = malloc(sizeof(struct warr)); //CHECK_ALL: struct warr * y = malloc(sizeof(struct warr)); struct warr * z = sus(x, y); //CHECK_NOALL: struct warr * z = sus(x, y); - //CHECK_ALL: _Array_ptr z = sus(x, y); + //CHECK_ALL: _Array_ptr z = sus(x, y); z += 2; return z; } struct warr * sus(struct warr * x, struct warr * y) { - //CHECK_NOALL: struct warr *sus(struct warr *x, _Ptr y) : itype(_Ptr) { - //CHECK_ALL: _Array_ptr sus(struct warr *x, struct warr *y : itype(_Array_ptr)) { + //CHECK_NOALL: struct warr *sus(struct warr * x, _Ptr y) : itype(_Ptr) { + //CHECK_ALL: _Array_ptr sus(struct warr * x, struct warr *y : itype(_Array_ptr)) { x = (struct warr *) 5; //CHECK: x = (struct warr *) 5; char name[20]; //CHECK_NOALL: char name[20]; //CHECK_ALL: char name _Checked[20]; struct warr *z = y; - //CHECK_NOALL: _Ptr z = y; - //CHECK_ALL: _Array_ptr z = y; + //CHECK_NOALL: _Ptr z = y; + //CHECK_ALL: _Array_ptr z = y; int i; for(i = 0; i < 5; i++) { //CHECK_NOALL: for(i = 0; i < 5; i++) { diff --git a/clang/test/CheckedCRewriter/arrinstructprotosafe.c b/clang/test/CheckedCRewriter/arrinstructprotosafe.c index 0ffee8499448..1b5408be6402 100644 --- a/clang/test/CheckedCRewriter/arrinstructprotosafe.c +++ b/clang/test/CheckedCRewriter/arrinstructprotosafe.c @@ -105,16 +105,16 @@ int *mul2(int *x) { } struct warr * sus(struct warr *, struct warr *); - //CHECK: _Ptr sus(struct warr *x, _Ptr y); + //CHECK: _Ptr sus(struct warr * x, _Ptr y); struct warr * foo() { //CHECK: _Ptr foo(void) { struct warr * x = malloc(sizeof(struct warr)); //CHECK: struct warr * x = malloc(sizeof(struct warr)); struct warr * y = malloc(sizeof(struct warr)); - //CHECK: _Ptr y = malloc(sizeof(struct warr)); + //CHECK: _Ptr y = malloc(sizeof(struct warr)); struct warr * z = sus(x, y); - //CHECK: _Ptr z = sus(x, y); + //CHECK: _Ptr z = sus(x, y); return z; } struct warr * bar() { @@ -122,20 +122,20 @@ struct warr * bar() { struct warr * x = malloc(sizeof(struct warr)); //CHECK: struct warr * x = malloc(sizeof(struct warr)); struct warr * y = malloc(sizeof(struct warr)); - //CHECK: _Ptr y = malloc(sizeof(struct warr)); + //CHECK: _Ptr y = malloc(sizeof(struct warr)); struct warr * z = sus(x, y); - //CHECK: _Ptr z = sus(x, y); + //CHECK: _Ptr z = sus(x, y); return z; } struct warr * sus(struct warr * x, struct warr * y) { - //CHECK: _Ptr sus(struct warr *x, _Ptr y) { + //CHECK: _Ptr sus(struct warr * x, _Ptr y) { x = (struct warr *) 5; //CHECK: x = (struct warr *) 5; char name[20]; //CHECK_NOALL: char name[20]; //CHECK_ALL: char name _Checked[20]; struct warr *z = y; - //CHECK: _Ptr z = y; + //CHECK: _Ptr z = y; int i; for(i = 0; i < 5; i++) { //CHECK_NOALL: for(i = 0; i < 5; i++) { diff --git a/clang/test/CheckedCRewriter/arrinstructsafe.c b/clang/test/CheckedCRewriter/arrinstructsafe.c index ded68e9ef102..79c451d17e88 100644 --- a/clang/test/CheckedCRewriter/arrinstructsafe.c +++ b/clang/test/CheckedCRewriter/arrinstructsafe.c @@ -102,14 +102,14 @@ int *mul2(int *x) { } struct warr * sus(struct warr * x, struct warr * y) { - //CHECK: _Ptr sus(struct warr *x, _Ptr y) { + //CHECK: _Ptr sus(struct warr * x, _Ptr y) { x = (struct warr *) 5; //CHECK: x = (struct warr *) 5; char name[20]; //CHECK_NOALL: char name[20]; //CHECK_ALL: char name _Checked[20]; struct warr *z = y; - //CHECK: _Ptr z = y; + //CHECK: _Ptr z = y; int i; for(i = 0; i < 5; i++) { //CHECK_NOALL: for(i = 0; i < 5; i++) { @@ -124,9 +124,9 @@ struct warr * foo() { struct warr * x = malloc(sizeof(struct warr)); //CHECK: struct warr * x = malloc(sizeof(struct warr)); struct warr * y = malloc(sizeof(struct warr)); - //CHECK: _Ptr y = malloc(sizeof(struct warr)); + //CHECK: _Ptr y = malloc(sizeof(struct warr)); struct warr * z = sus(x, y); - //CHECK: _Ptr z = sus(x, y); + //CHECK: _Ptr z = sus(x, y); return z; } struct warr * bar() { @@ -134,7 +134,7 @@ struct warr * bar() { struct warr * x = malloc(sizeof(struct warr)); //CHECK: struct warr * x = malloc(sizeof(struct warr)); struct warr * y = malloc(sizeof(struct warr)); - //CHECK: _Ptr y = malloc(sizeof(struct warr)); + //CHECK: _Ptr y = malloc(sizeof(struct warr)); struct warr * z = sus(x, y); - //CHECK: _Ptr z = sus(x, y); + //CHECK: _Ptr z = sus(x, y); return z; } diff --git a/clang/test/CheckedCRewriter/arrinstructsafemulti1.c b/clang/test/CheckedCRewriter/arrinstructsafemulti1.c index b9057b937adf..6aa0e1ff6b7d 100644 --- a/clang/test/CheckedCRewriter/arrinstructsafemulti1.c +++ b/clang/test/CheckedCRewriter/arrinstructsafemulti1.c @@ -117,9 +117,9 @@ struct warr * foo() { struct warr * x = malloc(sizeof(struct warr)); //CHECK: struct warr * x = malloc(sizeof(struct warr)); struct warr * y = malloc(sizeof(struct warr)); - //CHECK: _Ptr y = malloc(sizeof(struct warr)); + //CHECK: _Ptr y = malloc(sizeof(struct warr)); struct warr * z = sus(x, y); - //CHECK: _Ptr z = sus(x, y); + //CHECK: _Ptr z = sus(x, y); return z; } struct warr * bar() { @@ -127,7 +127,7 @@ struct warr * bar() { struct warr * x = malloc(sizeof(struct warr)); //CHECK: struct warr * x = malloc(sizeof(struct warr)); struct warr * y = malloc(sizeof(struct warr)); - //CHECK: _Ptr y = malloc(sizeof(struct warr)); + //CHECK: _Ptr y = malloc(sizeof(struct warr)); struct warr * z = sus(x, y); - //CHECK: _Ptr z = sus(x, y); + //CHECK: _Ptr z = sus(x, y); return z; } diff --git a/clang/test/CheckedCRewriter/arrinstructsafemulti2.c b/clang/test/CheckedCRewriter/arrinstructsafemulti2.c index 5c396347fc77..161c28331234 100644 --- a/clang/test/CheckedCRewriter/arrinstructsafemulti2.c +++ b/clang/test/CheckedCRewriter/arrinstructsafemulti2.c @@ -110,14 +110,14 @@ int *mul2(int *x) { } struct warr * sus(struct warr * x, struct warr * y) { - //CHECK: _Ptr sus(struct warr *x, _Ptr y) { + //CHECK: _Ptr sus(struct warr * x, _Ptr y) { x = (struct warr *) 5; //CHECK: x = (struct warr *) 5; char name[20]; //CHECK_NOALL: char name[20]; //CHECK_ALL: char name _Checked[20]; struct warr *z = y; - //CHECK: _Ptr z = y; + //CHECK: _Ptr z = y; int i; for(i = 0; i < 5; i++) { //CHECK_NOALL: for(i = 0; i < 5; i++) { diff --git a/clang/test/CheckedCRewriter/arrofstructboth.c b/clang/test/CheckedCRewriter/arrofstructboth.c index 754dea04b62b..62e255821832 100644 --- a/clang/test/CheckedCRewriter/arrofstructboth.c +++ b/clang/test/CheckedCRewriter/arrofstructboth.c @@ -105,15 +105,15 @@ int *mul2(int *x) { struct general ** sus(struct general * x, struct general * y) { //CHECK_NOALL: struct general ** sus(struct general * x, struct general * y) { - //CHECK_ALL: _Array_ptr<_Ptr> sus(struct general *x, _Ptr y) { + //CHECK_ALL: _Array_ptr<_Ptr> sus(struct general * x, _Ptr y) { x = (struct general *) 5; //CHECK: x = (struct general *) 5; struct general **z = calloc(5, sizeof(struct general *)); //CHECK_NOALL: struct general **z = calloc(5, sizeof(struct general *)); - //CHECK_ALL: _Array_ptr<_Ptr> z : count(5) = calloc<_Ptr>(5, sizeof(struct general *)); + //CHECK_ALL: _Array_ptr<_Ptr> z : count(5) = calloc<_Ptr>(5, sizeof(struct general *)); struct general *curr = y; //CHECK_NOALL: struct general *curr = y; - //CHECK_ALL: _Ptr curr = y; + //CHECK_ALL: _Ptr curr = y; int i; for(i = 0; i < 5; i++) { //CHECK_NOALL: for(i = 0; i < 5; i++) { @@ -132,11 +132,11 @@ struct general ** foo() { //CHECK: struct general * x = malloc(sizeof(struct general)); struct general * y = malloc(sizeof(struct general)); //CHECK_NOALL: struct general * y = malloc(sizeof(struct general)); - //CHECK_ALL: _Ptr y = malloc(sizeof(struct general)); + //CHECK_ALL: _Ptr y = malloc(sizeof(struct general)); struct general *curr = y; //CHECK_NOALL: struct general *curr = y; - //CHECK_ALL: _Ptr curr = y; + //CHECK_ALL: _Ptr curr = y; int i; for(i = 1; i < 5; i++, curr = curr->next) { curr->data = i; @@ -145,7 +145,7 @@ struct general ** foo() { } struct general ** z = sus(x, y); //CHECK_NOALL: struct general ** z = sus(x, y); - //CHECK_ALL: _Array_ptr<_Ptr> z = sus(x, y); + //CHECK_ALL: _Array_ptr<_Ptr> z = sus(x, y); return z; } struct general ** bar() { @@ -155,11 +155,11 @@ struct general ** bar() { //CHECK: struct general * x = malloc(sizeof(struct general)); struct general * y = malloc(sizeof(struct general)); //CHECK_NOALL: struct general * y = malloc(sizeof(struct general)); - //CHECK_ALL: _Ptr y = malloc(sizeof(struct general)); + //CHECK_ALL: _Ptr y = malloc(sizeof(struct general)); struct general *curr = y; //CHECK_NOALL: struct general *curr = y; - //CHECK_ALL: _Ptr curr = y; + //CHECK_ALL: _Ptr curr = y; int i; for(i = 1; i < 5; i++, curr = curr->next) { curr->data = i; @@ -168,6 +168,6 @@ struct general ** bar() { } struct general ** z = sus(x, y); //CHECK_NOALL: struct general ** z = sus(x, y); - //CHECK_ALL: _Array_ptr<_Ptr> z = sus(x, y); + //CHECK_ALL: _Array_ptr<_Ptr> z = sus(x, y); z += 2; return z; } diff --git a/clang/test/CheckedCRewriter/arrofstructbothmulti1.c b/clang/test/CheckedCRewriter/arrofstructbothmulti1.c index 818b8602c47a..17faf6d56268 100644 --- a/clang/test/CheckedCRewriter/arrofstructbothmulti1.c +++ b/clang/test/CheckedCRewriter/arrofstructbothmulti1.c @@ -122,11 +122,11 @@ struct general ** foo() { //CHECK: struct general * x = malloc(sizeof(struct general)); struct general * y = malloc(sizeof(struct general)); //CHECK_NOALL: struct general * y = malloc(sizeof(struct general)); - //CHECK_ALL: _Ptr y = malloc(sizeof(struct general)); + //CHECK_ALL: _Ptr y = malloc(sizeof(struct general)); struct general *curr = y; //CHECK_NOALL: struct general *curr = y; - //CHECK_ALL: _Ptr curr = y; + //CHECK_ALL: _Ptr curr = y; int i; for(i = 1; i < 5; i++, curr = curr->next) { curr->data = i; @@ -135,7 +135,7 @@ struct general ** foo() { } struct general ** z = sus(x, y); //CHECK_NOALL: struct general ** z = sus(x, y); - //CHECK_ALL: _Array_ptr<_Ptr> z = sus(x, y); + //CHECK_ALL: _Array_ptr<_Ptr> z = sus(x, y); return z; } struct general ** bar() { @@ -145,11 +145,11 @@ struct general ** bar() { //CHECK: struct general * x = malloc(sizeof(struct general)); struct general * y = malloc(sizeof(struct general)); //CHECK_NOALL: struct general * y = malloc(sizeof(struct general)); - //CHECK_ALL: _Ptr y = malloc(sizeof(struct general)); + //CHECK_ALL: _Ptr y = malloc(sizeof(struct general)); struct general *curr = y; //CHECK_NOALL: struct general *curr = y; - //CHECK_ALL: _Ptr curr = y; + //CHECK_ALL: _Ptr curr = y; int i; for(i = 1; i < 5; i++, curr = curr->next) { curr->data = i; @@ -158,6 +158,6 @@ struct general ** bar() { } struct general ** z = sus(x, y); //CHECK_NOALL: struct general ** z = sus(x, y); - //CHECK_ALL: _Array_ptr<_Ptr> z = sus(x, y); + //CHECK_ALL: _Array_ptr<_Ptr> z = sus(x, y); z += 2; return z; } diff --git a/clang/test/CheckedCRewriter/arrofstructbothmulti2.c b/clang/test/CheckedCRewriter/arrofstructbothmulti2.c index d6524c5be208..d6f1201f652c 100644 --- a/clang/test/CheckedCRewriter/arrofstructbothmulti2.c +++ b/clang/test/CheckedCRewriter/arrofstructbothmulti2.c @@ -113,15 +113,15 @@ int *mul2(int *x) { struct general ** sus(struct general * x, struct general * y) { //CHECK_NOALL: struct general ** sus(struct general * x, struct general * y) { - //CHECK_ALL: _Array_ptr<_Ptr> sus(struct general *x, _Ptr y) { + //CHECK_ALL: _Array_ptr<_Ptr> sus(struct general * x, _Ptr y) { x = (struct general *) 5; //CHECK: x = (struct general *) 5; struct general **z = calloc(5, sizeof(struct general *)); //CHECK_NOALL: struct general **z = calloc(5, sizeof(struct general *)); - //CHECK_ALL: _Array_ptr<_Ptr> z : count(5) = calloc<_Ptr>(5, sizeof(struct general *)); + //CHECK_ALL: _Array_ptr<_Ptr> z : count(5) = calloc<_Ptr>(5, sizeof(struct general *)); struct general *curr = y; //CHECK_NOALL: struct general *curr = y; - //CHECK_ALL: _Ptr curr = y; + //CHECK_ALL: _Ptr curr = y; int i; for(i = 0; i < 5; i++) { //CHECK_NOALL: for(i = 0; i < 5; i++) { diff --git a/clang/test/CheckedCRewriter/arrofstructcallee.c b/clang/test/CheckedCRewriter/arrofstructcallee.c index 3075597fdcdf..23d351d704df 100644 --- a/clang/test/CheckedCRewriter/arrofstructcallee.c +++ b/clang/test/CheckedCRewriter/arrofstructcallee.c @@ -105,15 +105,15 @@ int *mul2(int *x) { struct general ** sus(struct general * x, struct general * y) { //CHECK_NOALL: struct general ** sus(struct general * x, struct general * y) { - //CHECK_ALL: _Array_ptr<_Ptr> sus(struct general *x, _Ptr y) { + //CHECK_ALL: _Array_ptr<_Ptr> sus(struct general * x, _Ptr y) { x = (struct general *) 5; //CHECK: x = (struct general *) 5; struct general **z = calloc(5, sizeof(struct general *)); //CHECK_NOALL: struct general **z = calloc(5, sizeof(struct general *)); - //CHECK_ALL: _Array_ptr<_Ptr> z : count(5) = calloc<_Ptr>(5, sizeof(struct general *)); + //CHECK_ALL: _Array_ptr<_Ptr> z : count(5) = calloc<_Ptr>(5, sizeof(struct general *)); struct general *curr = y; //CHECK_NOALL: struct general *curr = y; - //CHECK_ALL: _Ptr curr = y; + //CHECK_ALL: _Ptr curr = y; int i; for(i = 0; i < 5; i++) { //CHECK_NOALL: for(i = 0; i < 5; i++) { @@ -132,11 +132,11 @@ struct general ** foo() { //CHECK: struct general * x = malloc(sizeof(struct general)); struct general * y = malloc(sizeof(struct general)); //CHECK_NOALL: struct general * y = malloc(sizeof(struct general)); - //CHECK_ALL: _Ptr y = malloc(sizeof(struct general)); + //CHECK_ALL: _Ptr y = malloc(sizeof(struct general)); struct general *curr = y; //CHECK_NOALL: struct general *curr = y; - //CHECK_ALL: _Ptr curr = y; + //CHECK_ALL: _Ptr curr = y; int i; for(i = 1; i < 5; i++, curr = curr->next) { curr->data = i; @@ -145,7 +145,7 @@ struct general ** foo() { } struct general ** z = sus(x, y); //CHECK_NOALL: struct general ** z = sus(x, y); - //CHECK_ALL: _Array_ptr<_Ptr> z = sus(x, y); + //CHECK_ALL: _Array_ptr<_Ptr> z = sus(x, y); return z; } struct general ** bar() { @@ -155,11 +155,11 @@ struct general ** bar() { //CHECK: struct general * x = malloc(sizeof(struct general)); struct general * y = malloc(sizeof(struct general)); //CHECK_NOALL: struct general * y = malloc(sizeof(struct general)); - //CHECK_ALL: _Ptr y = malloc(sizeof(struct general)); + //CHECK_ALL: _Ptr y = malloc(sizeof(struct general)); struct general *curr = y; //CHECK_NOALL: struct general *curr = y; - //CHECK_ALL: _Ptr curr = y; + //CHECK_ALL: _Ptr curr = y; int i; for(i = 1; i < 5; i++, curr = curr->next) { curr->data = i; @@ -168,5 +168,5 @@ struct general ** bar() { } struct general ** z = sus(x, y); //CHECK_NOALL: struct general ** z = sus(x, y); - //CHECK_ALL: _Array_ptr<_Ptr> z = sus(x, y); + //CHECK_ALL: _Array_ptr<_Ptr> z = sus(x, y); return z; } diff --git a/clang/test/CheckedCRewriter/arrofstructcalleemulti1.c b/clang/test/CheckedCRewriter/arrofstructcalleemulti1.c index 471cb46d717f..e22223b3999f 100644 --- a/clang/test/CheckedCRewriter/arrofstructcalleemulti1.c +++ b/clang/test/CheckedCRewriter/arrofstructcalleemulti1.c @@ -122,11 +122,11 @@ struct general ** foo() { //CHECK: struct general * x = malloc(sizeof(struct general)); struct general * y = malloc(sizeof(struct general)); //CHECK_NOALL: struct general * y = malloc(sizeof(struct general)); - //CHECK_ALL: _Ptr y = malloc(sizeof(struct general)); + //CHECK_ALL: _Ptr y = malloc(sizeof(struct general)); struct general *curr = y; //CHECK_NOALL: struct general *curr = y; - //CHECK_ALL: _Ptr curr = y; + //CHECK_ALL: _Ptr curr = y; int i; for(i = 1; i < 5; i++, curr = curr->next) { curr->data = i; @@ -135,7 +135,7 @@ struct general ** foo() { } struct general ** z = sus(x, y); //CHECK_NOALL: struct general ** z = sus(x, y); - //CHECK_ALL: _Array_ptr<_Ptr> z = sus(x, y); + //CHECK_ALL: _Array_ptr<_Ptr> z = sus(x, y); return z; } struct general ** bar() { @@ -145,11 +145,11 @@ struct general ** bar() { //CHECK: struct general * x = malloc(sizeof(struct general)); struct general * y = malloc(sizeof(struct general)); //CHECK_NOALL: struct general * y = malloc(sizeof(struct general)); - //CHECK_ALL: _Ptr y = malloc(sizeof(struct general)); + //CHECK_ALL: _Ptr y = malloc(sizeof(struct general)); struct general *curr = y; //CHECK_NOALL: struct general *curr = y; - //CHECK_ALL: _Ptr curr = y; + //CHECK_ALL: _Ptr curr = y; int i; for(i = 1; i < 5; i++, curr = curr->next) { curr->data = i; @@ -158,5 +158,5 @@ struct general ** bar() { } struct general ** z = sus(x, y); //CHECK_NOALL: struct general ** z = sus(x, y); - //CHECK_ALL: _Array_ptr<_Ptr> z = sus(x, y); + //CHECK_ALL: _Array_ptr<_Ptr> z = sus(x, y); return z; } diff --git a/clang/test/CheckedCRewriter/arrofstructcalleemulti2.c b/clang/test/CheckedCRewriter/arrofstructcalleemulti2.c index 9910d40eede3..7b5ef94ba615 100644 --- a/clang/test/CheckedCRewriter/arrofstructcalleemulti2.c +++ b/clang/test/CheckedCRewriter/arrofstructcalleemulti2.c @@ -113,15 +113,15 @@ int *mul2(int *x) { struct general ** sus(struct general * x, struct general * y) { //CHECK_NOALL: struct general ** sus(struct general * x, struct general * y) { - //CHECK_ALL: _Array_ptr<_Ptr> sus(struct general *x, _Ptr y) { + //CHECK_ALL: _Array_ptr<_Ptr> sus(struct general * x, _Ptr y) { x = (struct general *) 5; //CHECK: x = (struct general *) 5; struct general **z = calloc(5, sizeof(struct general *)); //CHECK_NOALL: struct general **z = calloc(5, sizeof(struct general *)); - //CHECK_ALL: _Array_ptr<_Ptr> z : count(5) = calloc<_Ptr>(5, sizeof(struct general *)); + //CHECK_ALL: _Array_ptr<_Ptr> z : count(5) = calloc<_Ptr>(5, sizeof(struct general *)); struct general *curr = y; //CHECK_NOALL: struct general *curr = y; - //CHECK_ALL: _Ptr curr = y; + //CHECK_ALL: _Ptr curr = y; int i; for(i = 0; i < 5; i++) { //CHECK_NOALL: for(i = 0; i < 5; i++) { diff --git a/clang/test/CheckedCRewriter/arrofstructcaller.c b/clang/test/CheckedCRewriter/arrofstructcaller.c index 16997bd4ad41..3a24f82e0216 100644 --- a/clang/test/CheckedCRewriter/arrofstructcaller.c +++ b/clang/test/CheckedCRewriter/arrofstructcaller.c @@ -105,15 +105,15 @@ int *mul2(int *x) { struct general ** sus(struct general * x, struct general * y) { //CHECK_NOALL: struct general ** sus(struct general * x, struct general * y) { - //CHECK_ALL: _Array_ptr<_Ptr> sus(struct general *x, _Ptr y) { + //CHECK_ALL: _Array_ptr<_Ptr> sus(struct general * x, _Ptr y) { x = (struct general *) 5; //CHECK: x = (struct general *) 5; struct general **z = calloc(5, sizeof(struct general *)); //CHECK_NOALL: struct general **z = calloc(5, sizeof(struct general *)); - //CHECK_ALL: _Array_ptr<_Ptr> z : count(5) = calloc<_Ptr>(5, sizeof(struct general *)); + //CHECK_ALL: _Array_ptr<_Ptr> z : count(5) = calloc<_Ptr>(5, sizeof(struct general *)); struct general *curr = y; //CHECK_NOALL: struct general *curr = y; - //CHECK_ALL: _Ptr curr = y; + //CHECK_ALL: _Ptr curr = y; int i; for(i = 0; i < 5; i++) { //CHECK_NOALL: for(i = 0; i < 5; i++) { @@ -131,11 +131,11 @@ struct general ** foo() { //CHECK: struct general * x = malloc(sizeof(struct general)); struct general * y = malloc(sizeof(struct general)); //CHECK_NOALL: struct general * y = malloc(sizeof(struct general)); - //CHECK_ALL: _Ptr y = malloc(sizeof(struct general)); + //CHECK_ALL: _Ptr y = malloc(sizeof(struct general)); struct general *curr = y; //CHECK_NOALL: struct general *curr = y; - //CHECK_ALL: _Ptr curr = y; + //CHECK_ALL: _Ptr curr = y; int i; for(i = 1; i < 5; i++, curr = curr->next) { curr->data = i; @@ -144,7 +144,7 @@ struct general ** foo() { } struct general ** z = sus(x, y); //CHECK_NOALL: struct general ** z = sus(x, y); - //CHECK_ALL: _Array_ptr<_Ptr> z = sus(x, y); + //CHECK_ALL: _Array_ptr<_Ptr> z = sus(x, y); return z; } struct general ** bar() { @@ -154,11 +154,11 @@ struct general ** bar() { //CHECK: struct general * x = malloc(sizeof(struct general)); struct general * y = malloc(sizeof(struct general)); //CHECK_NOALL: struct general * y = malloc(sizeof(struct general)); - //CHECK_ALL: _Ptr y = malloc(sizeof(struct general)); + //CHECK_ALL: _Ptr y = malloc(sizeof(struct general)); struct general *curr = y; //CHECK_NOALL: struct general *curr = y; - //CHECK_ALL: _Ptr curr = y; + //CHECK_ALL: _Ptr curr = y; int i; for(i = 1; i < 5; i++, curr = curr->next) { curr->data = i; @@ -167,6 +167,6 @@ struct general ** bar() { } struct general ** z = sus(x, y); //CHECK_NOALL: struct general ** z = sus(x, y); - //CHECK_ALL: _Array_ptr<_Ptr> z = sus(x, y); + //CHECK_ALL: _Array_ptr<_Ptr> z = sus(x, y); z += 2; return z; } diff --git a/clang/test/CheckedCRewriter/arrofstructcallermulti1.c b/clang/test/CheckedCRewriter/arrofstructcallermulti1.c index 36339029b16b..8f339d381c14 100644 --- a/clang/test/CheckedCRewriter/arrofstructcallermulti1.c +++ b/clang/test/CheckedCRewriter/arrofstructcallermulti1.c @@ -122,11 +122,11 @@ struct general ** foo() { //CHECK: struct general * x = malloc(sizeof(struct general)); struct general * y = malloc(sizeof(struct general)); //CHECK_NOALL: struct general * y = malloc(sizeof(struct general)); - //CHECK_ALL: _Ptr y = malloc(sizeof(struct general)); + //CHECK_ALL: _Ptr y = malloc(sizeof(struct general)); struct general *curr = y; //CHECK_NOALL: struct general *curr = y; - //CHECK_ALL: _Ptr curr = y; + //CHECK_ALL: _Ptr curr = y; int i; for(i = 1; i < 5; i++, curr = curr->next) { curr->data = i; @@ -135,7 +135,7 @@ struct general ** foo() { } struct general ** z = sus(x, y); //CHECK_NOALL: struct general ** z = sus(x, y); - //CHECK_ALL: _Array_ptr<_Ptr> z = sus(x, y); + //CHECK_ALL: _Array_ptr<_Ptr> z = sus(x, y); return z; } struct general ** bar() { @@ -145,11 +145,11 @@ struct general ** bar() { //CHECK: struct general * x = malloc(sizeof(struct general)); struct general * y = malloc(sizeof(struct general)); //CHECK_NOALL: struct general * y = malloc(sizeof(struct general)); - //CHECK_ALL: _Ptr y = malloc(sizeof(struct general)); + //CHECK_ALL: _Ptr y = malloc(sizeof(struct general)); struct general *curr = y; //CHECK_NOALL: struct general *curr = y; - //CHECK_ALL: _Ptr curr = y; + //CHECK_ALL: _Ptr curr = y; int i; for(i = 1; i < 5; i++, curr = curr->next) { curr->data = i; @@ -158,6 +158,6 @@ struct general ** bar() { } struct general ** z = sus(x, y); //CHECK_NOALL: struct general ** z = sus(x, y); - //CHECK_ALL: _Array_ptr<_Ptr> z = sus(x, y); + //CHECK_ALL: _Array_ptr<_Ptr> z = sus(x, y); z += 2; return z; } diff --git a/clang/test/CheckedCRewriter/arrofstructcallermulti2.c b/clang/test/CheckedCRewriter/arrofstructcallermulti2.c index aaf9c4b9c2a5..64a10fa3d8b1 100644 --- a/clang/test/CheckedCRewriter/arrofstructcallermulti2.c +++ b/clang/test/CheckedCRewriter/arrofstructcallermulti2.c @@ -113,15 +113,15 @@ int *mul2(int *x) { struct general ** sus(struct general * x, struct general * y) { //CHECK_NOALL: struct general ** sus(struct general * x, struct general * y) { - //CHECK_ALL: _Array_ptr<_Ptr> sus(struct general *x, _Ptr y) { + //CHECK_ALL: _Array_ptr<_Ptr> sus(struct general * x, _Ptr y) { x = (struct general *) 5; //CHECK: x = (struct general *) 5; struct general **z = calloc(5, sizeof(struct general *)); //CHECK_NOALL: struct general **z = calloc(5, sizeof(struct general *)); - //CHECK_ALL: _Array_ptr<_Ptr> z : count(5) = calloc<_Ptr>(5, sizeof(struct general *)); + //CHECK_ALL: _Array_ptr<_Ptr> z : count(5) = calloc<_Ptr>(5, sizeof(struct general *)); struct general *curr = y; //CHECK_NOALL: struct general *curr = y; - //CHECK_ALL: _Ptr curr = y; + //CHECK_ALL: _Ptr curr = y; int i; for(i = 0; i < 5; i++) { //CHECK_NOALL: for(i = 0; i < 5; i++) { diff --git a/clang/test/CheckedCRewriter/arrofstructprotoboth.c b/clang/test/CheckedCRewriter/arrofstructprotoboth.c index 2059aaaff927..947342918dcb 100644 --- a/clang/test/CheckedCRewriter/arrofstructprotoboth.c +++ b/clang/test/CheckedCRewriter/arrofstructprotoboth.c @@ -108,7 +108,7 @@ int *mul2(int *x) { struct general ** sus(struct general *, struct general *); //CHECK_NOALL: struct general ** sus(struct general *, struct general *); - //CHECK_ALL: _Array_ptr<_Ptr> sus(struct general *x, _Ptr y); + //CHECK_ALL: _Array_ptr<_Ptr> sus(struct general * x, _Ptr y); struct general ** foo() { //CHECK_NOALL: struct general ** foo(void) { @@ -117,11 +117,11 @@ struct general ** foo() { //CHECK: struct general * x = malloc(sizeof(struct general)); struct general * y = malloc(sizeof(struct general)); //CHECK_NOALL: struct general * y = malloc(sizeof(struct general)); - //CHECK_ALL: _Ptr y = malloc(sizeof(struct general)); + //CHECK_ALL: _Ptr y = malloc(sizeof(struct general)); struct general *curr = y; //CHECK_NOALL: struct general *curr = y; - //CHECK_ALL: _Ptr curr = y; + //CHECK_ALL: _Ptr curr = y; int i; for(i = 1; i < 5; i++, curr = curr->next) { curr->data = i; @@ -130,7 +130,7 @@ struct general ** foo() { } struct general ** z = sus(x, y); //CHECK_NOALL: struct general ** z = sus(x, y); - //CHECK_ALL: _Array_ptr<_Ptr> z = sus(x, y); + //CHECK_ALL: _Array_ptr<_Ptr> z = sus(x, y); return z; } struct general ** bar() { @@ -140,11 +140,11 @@ struct general ** bar() { //CHECK: struct general * x = malloc(sizeof(struct general)); struct general * y = malloc(sizeof(struct general)); //CHECK_NOALL: struct general * y = malloc(sizeof(struct general)); - //CHECK_ALL: _Ptr y = malloc(sizeof(struct general)); + //CHECK_ALL: _Ptr y = malloc(sizeof(struct general)); struct general *curr = y; //CHECK_NOALL: struct general *curr = y; - //CHECK_ALL: _Ptr curr = y; + //CHECK_ALL: _Ptr curr = y; int i; for(i = 1; i < 5; i++, curr = curr->next) { curr->data = i; @@ -153,21 +153,21 @@ struct general ** bar() { } struct general ** z = sus(x, y); //CHECK_NOALL: struct general ** z = sus(x, y); - //CHECK_ALL: _Array_ptr<_Ptr> z = sus(x, y); + //CHECK_ALL: _Array_ptr<_Ptr> z = sus(x, y); z += 2; return z; } struct general ** sus(struct general * x, struct general * y) { //CHECK_NOALL: struct general ** sus(struct general * x, struct general * y) { - //CHECK_ALL: _Array_ptr<_Ptr> sus(struct general *x, _Ptr y) { + //CHECK_ALL: _Array_ptr<_Ptr> sus(struct general * x, _Ptr y) { x = (struct general *) 5; //CHECK: x = (struct general *) 5; struct general **z = calloc(5, sizeof(struct general *)); //CHECK_NOALL: struct general **z = calloc(5, sizeof(struct general *)); - //CHECK_ALL: _Array_ptr<_Ptr> z : count(5) = calloc<_Ptr>(5, sizeof(struct general *)); + //CHECK_ALL: _Array_ptr<_Ptr> z : count(5) = calloc<_Ptr>(5, sizeof(struct general *)); struct general *curr = y; //CHECK_NOALL: struct general *curr = y; - //CHECK_ALL: _Ptr curr = y; + //CHECK_ALL: _Ptr curr = y; int i; for(i = 0; i < 5; i++) { //CHECK_NOALL: for(i = 0; i < 5; i++) { diff --git a/clang/test/CheckedCRewriter/arrofstructprotocallee.c b/clang/test/CheckedCRewriter/arrofstructprotocallee.c index b8ab086242b3..38c1c0dc0b91 100644 --- a/clang/test/CheckedCRewriter/arrofstructprotocallee.c +++ b/clang/test/CheckedCRewriter/arrofstructprotocallee.c @@ -108,7 +108,7 @@ int *mul2(int *x) { struct general ** sus(struct general *, struct general *); //CHECK_NOALL: struct general ** sus(struct general *, struct general *); - //CHECK_ALL: _Array_ptr<_Ptr> sus(struct general *x, _Ptr y); + //CHECK_ALL: _Array_ptr<_Ptr> sus(struct general * x, _Ptr y); struct general ** foo() { //CHECK_NOALL: struct general ** foo(void) { @@ -117,11 +117,11 @@ struct general ** foo() { //CHECK: struct general * x = malloc(sizeof(struct general)); struct general * y = malloc(sizeof(struct general)); //CHECK_NOALL: struct general * y = malloc(sizeof(struct general)); - //CHECK_ALL: _Ptr y = malloc(sizeof(struct general)); + //CHECK_ALL: _Ptr y = malloc(sizeof(struct general)); struct general *curr = y; //CHECK_NOALL: struct general *curr = y; - //CHECK_ALL: _Ptr curr = y; + //CHECK_ALL: _Ptr curr = y; int i; for(i = 1; i < 5; i++, curr = curr->next) { curr->data = i; @@ -130,7 +130,7 @@ struct general ** foo() { } struct general ** z = sus(x, y); //CHECK_NOALL: struct general ** z = sus(x, y); - //CHECK_ALL: _Array_ptr<_Ptr> z = sus(x, y); + //CHECK_ALL: _Array_ptr<_Ptr> z = sus(x, y); return z; } struct general ** bar() { @@ -140,11 +140,11 @@ struct general ** bar() { //CHECK: struct general * x = malloc(sizeof(struct general)); struct general * y = malloc(sizeof(struct general)); //CHECK_NOALL: struct general * y = malloc(sizeof(struct general)); - //CHECK_ALL: _Ptr y = malloc(sizeof(struct general)); + //CHECK_ALL: _Ptr y = malloc(sizeof(struct general)); struct general *curr = y; //CHECK_NOALL: struct general *curr = y; - //CHECK_ALL: _Ptr curr = y; + //CHECK_ALL: _Ptr curr = y; int i; for(i = 1; i < 5; i++, curr = curr->next) { curr->data = i; @@ -153,20 +153,20 @@ struct general ** bar() { } struct general ** z = sus(x, y); //CHECK_NOALL: struct general ** z = sus(x, y); - //CHECK_ALL: _Array_ptr<_Ptr> z = sus(x, y); + //CHECK_ALL: _Array_ptr<_Ptr> z = sus(x, y); return z; } struct general ** sus(struct general * x, struct general * y) { //CHECK_NOALL: struct general ** sus(struct general * x, struct general * y) { - //CHECK_ALL: _Array_ptr<_Ptr> sus(struct general *x, _Ptr y) { + //CHECK_ALL: _Array_ptr<_Ptr> sus(struct general * x, _Ptr y) { x = (struct general *) 5; //CHECK: x = (struct general *) 5; struct general **z = calloc(5, sizeof(struct general *)); //CHECK_NOALL: struct general **z = calloc(5, sizeof(struct general *)); - //CHECK_ALL: _Array_ptr<_Ptr> z : count(5) = calloc<_Ptr>(5, sizeof(struct general *)); + //CHECK_ALL: _Array_ptr<_Ptr> z : count(5) = calloc<_Ptr>(5, sizeof(struct general *)); struct general *curr = y; //CHECK_NOALL: struct general *curr = y; - //CHECK_ALL: _Ptr curr = y; + //CHECK_ALL: _Ptr curr = y; int i; for(i = 0; i < 5; i++) { //CHECK_NOALL: for(i = 0; i < 5; i++) { diff --git a/clang/test/CheckedCRewriter/arrofstructprotocaller.c b/clang/test/CheckedCRewriter/arrofstructprotocaller.c index bb256f497448..96ed4d8af77a 100644 --- a/clang/test/CheckedCRewriter/arrofstructprotocaller.c +++ b/clang/test/CheckedCRewriter/arrofstructprotocaller.c @@ -108,7 +108,7 @@ int *mul2(int *x) { struct general ** sus(struct general *, struct general *); //CHECK_NOALL: struct general ** sus(struct general *, struct general *); - //CHECK_ALL: _Array_ptr<_Ptr> sus(struct general *x, _Ptr y); + //CHECK_ALL: _Array_ptr<_Ptr> sus(struct general * x, _Ptr y); struct general ** foo() { //CHECK_NOALL: struct general ** foo(void) { @@ -117,11 +117,11 @@ struct general ** foo() { //CHECK: struct general * x = malloc(sizeof(struct general)); struct general * y = malloc(sizeof(struct general)); //CHECK_NOALL: struct general * y = malloc(sizeof(struct general)); - //CHECK_ALL: _Ptr y = malloc(sizeof(struct general)); + //CHECK_ALL: _Ptr y = malloc(sizeof(struct general)); struct general *curr = y; //CHECK_NOALL: struct general *curr = y; - //CHECK_ALL: _Ptr curr = y; + //CHECK_ALL: _Ptr curr = y; int i; for(i = 1; i < 5; i++, curr = curr->next) { curr->data = i; @@ -130,7 +130,7 @@ struct general ** foo() { } struct general ** z = sus(x, y); //CHECK_NOALL: struct general ** z = sus(x, y); - //CHECK_ALL: _Array_ptr<_Ptr> z = sus(x, y); + //CHECK_ALL: _Array_ptr<_Ptr> z = sus(x, y); return z; } struct general ** bar() { @@ -140,11 +140,11 @@ struct general ** bar() { //CHECK: struct general * x = malloc(sizeof(struct general)); struct general * y = malloc(sizeof(struct general)); //CHECK_NOALL: struct general * y = malloc(sizeof(struct general)); - //CHECK_ALL: _Ptr y = malloc(sizeof(struct general)); + //CHECK_ALL: _Ptr y = malloc(sizeof(struct general)); struct general *curr = y; //CHECK_NOALL: struct general *curr = y; - //CHECK_ALL: _Ptr curr = y; + //CHECK_ALL: _Ptr curr = y; int i; for(i = 1; i < 5; i++, curr = curr->next) { curr->data = i; @@ -153,21 +153,21 @@ struct general ** bar() { } struct general ** z = sus(x, y); //CHECK_NOALL: struct general ** z = sus(x, y); - //CHECK_ALL: _Array_ptr<_Ptr> z = sus(x, y); + //CHECK_ALL: _Array_ptr<_Ptr> z = sus(x, y); z += 2; return z; } struct general ** sus(struct general * x, struct general * y) { //CHECK_NOALL: struct general ** sus(struct general * x, struct general * y) { - //CHECK_ALL: _Array_ptr<_Ptr> sus(struct general *x, _Ptr y) { + //CHECK_ALL: _Array_ptr<_Ptr> sus(struct general * x, _Ptr y) { x = (struct general *) 5; //CHECK: x = (struct general *) 5; struct general **z = calloc(5, sizeof(struct general *)); //CHECK_NOALL: struct general **z = calloc(5, sizeof(struct general *)); - //CHECK_ALL: _Array_ptr<_Ptr> z : count(5) = calloc<_Ptr>(5, sizeof(struct general *)); + //CHECK_ALL: _Array_ptr<_Ptr> z : count(5) = calloc<_Ptr>(5, sizeof(struct general *)); struct general *curr = y; //CHECK_NOALL: struct general *curr = y; - //CHECK_ALL: _Ptr curr = y; + //CHECK_ALL: _Ptr curr = y; int i; for(i = 0; i < 5; i++) { //CHECK_NOALL: for(i = 0; i < 5; i++) { diff --git a/clang/test/CheckedCRewriter/arrofstructprotosafe.c b/clang/test/CheckedCRewriter/arrofstructprotosafe.c index c3c714a72f0f..5486c5031fd8 100644 --- a/clang/test/CheckedCRewriter/arrofstructprotosafe.c +++ b/clang/test/CheckedCRewriter/arrofstructprotosafe.c @@ -107,7 +107,7 @@ int *mul2(int *x) { struct general ** sus(struct general *, struct general *); //CHECK_NOALL: struct general ** sus(struct general *, struct general *); - //CHECK_ALL: _Array_ptr<_Ptr> sus(struct general *x, _Ptr y); + //CHECK_ALL: _Array_ptr<_Ptr> sus(struct general * x, _Ptr y); struct general ** foo() { //CHECK_NOALL: struct general ** foo(void) { @@ -116,11 +116,11 @@ struct general ** foo() { //CHECK: struct general * x = malloc(sizeof(struct general)); struct general * y = malloc(sizeof(struct general)); //CHECK_NOALL: struct general * y = malloc(sizeof(struct general)); - //CHECK_ALL: _Ptr y = malloc(sizeof(struct general)); + //CHECK_ALL: _Ptr y = malloc(sizeof(struct general)); struct general *curr = y; //CHECK_NOALL: struct general *curr = y; - //CHECK_ALL: _Ptr curr = y; + //CHECK_ALL: _Ptr curr = y; int i; for(i = 1; i < 5; i++, curr = curr->next) { curr->data = i; @@ -129,7 +129,7 @@ struct general ** foo() { } struct general ** z = sus(x, y); //CHECK_NOALL: struct general ** z = sus(x, y); - //CHECK_ALL: _Array_ptr<_Ptr> z = sus(x, y); + //CHECK_ALL: _Array_ptr<_Ptr> z = sus(x, y); return z; } struct general ** bar() { @@ -139,11 +139,11 @@ struct general ** bar() { //CHECK: struct general * x = malloc(sizeof(struct general)); struct general * y = malloc(sizeof(struct general)); //CHECK_NOALL: struct general * y = malloc(sizeof(struct general)); - //CHECK_ALL: _Ptr y = malloc(sizeof(struct general)); + //CHECK_ALL: _Ptr y = malloc(sizeof(struct general)); struct general *curr = y; //CHECK_NOALL: struct general *curr = y; - //CHECK_ALL: _Ptr curr = y; + //CHECK_ALL: _Ptr curr = y; int i; for(i = 1; i < 5; i++, curr = curr->next) { curr->data = i; @@ -152,20 +152,20 @@ struct general ** bar() { } struct general ** z = sus(x, y); //CHECK_NOALL: struct general ** z = sus(x, y); - //CHECK_ALL: _Array_ptr<_Ptr> z = sus(x, y); + //CHECK_ALL: _Array_ptr<_Ptr> z = sus(x, y); return z; } struct general ** sus(struct general * x, struct general * y) { //CHECK_NOALL: struct general ** sus(struct general * x, struct general * y) { - //CHECK_ALL: _Array_ptr<_Ptr> sus(struct general *x, _Ptr y) { + //CHECK_ALL: _Array_ptr<_Ptr> sus(struct general * x, _Ptr y) { x = (struct general *) 5; //CHECK: x = (struct general *) 5; struct general **z = calloc(5, sizeof(struct general *)); //CHECK_NOALL: struct general **z = calloc(5, sizeof(struct general *)); - //CHECK_ALL: _Array_ptr<_Ptr> z : count(5) = calloc<_Ptr>(5, sizeof(struct general *)); + //CHECK_ALL: _Array_ptr<_Ptr> z : count(5) = calloc<_Ptr>(5, sizeof(struct general *)); struct general *curr = y; //CHECK_NOALL: struct general *curr = y; - //CHECK_ALL: _Ptr curr = y; + //CHECK_ALL: _Ptr curr = y; int i; for(i = 0; i < 5; i++) { //CHECK_NOALL: for(i = 0; i < 5; i++) { diff --git a/clang/test/CheckedCRewriter/arrofstructsafe.c b/clang/test/CheckedCRewriter/arrofstructsafe.c index f437092a7fd5..04cd35c7005b 100644 --- a/clang/test/CheckedCRewriter/arrofstructsafe.c +++ b/clang/test/CheckedCRewriter/arrofstructsafe.c @@ -104,15 +104,15 @@ int *mul2(int *x) { struct general ** sus(struct general * x, struct general * y) { //CHECK_NOALL: struct general ** sus(struct general * x, struct general * y) { - //CHECK_ALL: _Array_ptr<_Ptr> sus(struct general *x, _Ptr y) { + //CHECK_ALL: _Array_ptr<_Ptr> sus(struct general * x, _Ptr y) { x = (struct general *) 5; //CHECK: x = (struct general *) 5; struct general **z = calloc(5, sizeof(struct general *)); //CHECK_NOALL: struct general **z = calloc(5, sizeof(struct general *)); - //CHECK_ALL: _Array_ptr<_Ptr> z : count(5) = calloc<_Ptr>(5, sizeof(struct general *)); + //CHECK_ALL: _Array_ptr<_Ptr> z : count(5) = calloc<_Ptr>(5, sizeof(struct general *)); struct general *curr = y; //CHECK_NOALL: struct general *curr = y; - //CHECK_ALL: _Ptr curr = y; + //CHECK_ALL: _Ptr curr = y; int i; for(i = 0; i < 5; i++) { //CHECK_NOALL: for(i = 0; i < 5; i++) { @@ -130,11 +130,11 @@ struct general ** foo() { //CHECK: struct general * x = malloc(sizeof(struct general)); struct general * y = malloc(sizeof(struct general)); //CHECK_NOALL: struct general * y = malloc(sizeof(struct general)); - //CHECK_ALL: _Ptr y = malloc(sizeof(struct general)); + //CHECK_ALL: _Ptr y = malloc(sizeof(struct general)); struct general *curr = y; //CHECK_NOALL: struct general *curr = y; - //CHECK_ALL: _Ptr curr = y; + //CHECK_ALL: _Ptr curr = y; int i; for(i = 1; i < 5; i++, curr = curr->next) { curr->data = i; @@ -143,7 +143,7 @@ struct general ** foo() { } struct general ** z = sus(x, y); //CHECK_NOALL: struct general ** z = sus(x, y); - //CHECK_ALL: _Array_ptr<_Ptr> z = sus(x, y); + //CHECK_ALL: _Array_ptr<_Ptr> z = sus(x, y); return z; } struct general ** bar() { @@ -153,11 +153,11 @@ struct general ** bar() { //CHECK: struct general * x = malloc(sizeof(struct general)); struct general * y = malloc(sizeof(struct general)); //CHECK_NOALL: struct general * y = malloc(sizeof(struct general)); - //CHECK_ALL: _Ptr y = malloc(sizeof(struct general)); + //CHECK_ALL: _Ptr y = malloc(sizeof(struct general)); struct general *curr = y; //CHECK_NOALL: struct general *curr = y; - //CHECK_ALL: _Ptr curr = y; + //CHECK_ALL: _Ptr curr = y; int i; for(i = 1; i < 5; i++, curr = curr->next) { curr->data = i; @@ -166,5 +166,5 @@ struct general ** bar() { } struct general ** z = sus(x, y); //CHECK_NOALL: struct general ** z = sus(x, y); - //CHECK_ALL: _Array_ptr<_Ptr> z = sus(x, y); + //CHECK_ALL: _Array_ptr<_Ptr> z = sus(x, y); return z; } diff --git a/clang/test/CheckedCRewriter/arrofstructsafemulti1.c b/clang/test/CheckedCRewriter/arrofstructsafemulti1.c index ee20debd563a..fc68fd929be7 100644 --- a/clang/test/CheckedCRewriter/arrofstructsafemulti1.c +++ b/clang/test/CheckedCRewriter/arrofstructsafemulti1.c @@ -121,11 +121,11 @@ struct general ** foo() { //CHECK: struct general * x = malloc(sizeof(struct general)); struct general * y = malloc(sizeof(struct general)); //CHECK_NOALL: struct general * y = malloc(sizeof(struct general)); - //CHECK_ALL: _Ptr y = malloc(sizeof(struct general)); + //CHECK_ALL: _Ptr y = malloc(sizeof(struct general)); struct general *curr = y; //CHECK_NOALL: struct general *curr = y; - //CHECK_ALL: _Ptr curr = y; + //CHECK_ALL: _Ptr curr = y; int i; for(i = 1; i < 5; i++, curr = curr->next) { curr->data = i; @@ -134,7 +134,7 @@ struct general ** foo() { } struct general ** z = sus(x, y); //CHECK_NOALL: struct general ** z = sus(x, y); - //CHECK_ALL: _Array_ptr<_Ptr> z = sus(x, y); + //CHECK_ALL: _Array_ptr<_Ptr> z = sus(x, y); return z; } struct general ** bar() { @@ -144,11 +144,11 @@ struct general ** bar() { //CHECK: struct general * x = malloc(sizeof(struct general)); struct general * y = malloc(sizeof(struct general)); //CHECK_NOALL: struct general * y = malloc(sizeof(struct general)); - //CHECK_ALL: _Ptr y = malloc(sizeof(struct general)); + //CHECK_ALL: _Ptr y = malloc(sizeof(struct general)); struct general *curr = y; //CHECK_NOALL: struct general *curr = y; - //CHECK_ALL: _Ptr curr = y; + //CHECK_ALL: _Ptr curr = y; int i; for(i = 1; i < 5; i++, curr = curr->next) { curr->data = i; @@ -157,5 +157,5 @@ struct general ** bar() { } struct general ** z = sus(x, y); //CHECK_NOALL: struct general ** z = sus(x, y); - //CHECK_ALL: _Array_ptr<_Ptr> z = sus(x, y); + //CHECK_ALL: _Array_ptr<_Ptr> z = sus(x, y); return z; } diff --git a/clang/test/CheckedCRewriter/arrofstructsafemulti2.c b/clang/test/CheckedCRewriter/arrofstructsafemulti2.c index 46dc5d9f6c9d..0bc97c594880 100644 --- a/clang/test/CheckedCRewriter/arrofstructsafemulti2.c +++ b/clang/test/CheckedCRewriter/arrofstructsafemulti2.c @@ -112,15 +112,15 @@ int *mul2(int *x) { struct general ** sus(struct general * x, struct general * y) { //CHECK_NOALL: struct general ** sus(struct general * x, struct general * y) { - //CHECK_ALL: _Array_ptr<_Ptr> sus(struct general *x, _Ptr y) { + //CHECK_ALL: _Array_ptr<_Ptr> sus(struct general * x, _Ptr y) { x = (struct general *) 5; //CHECK: x = (struct general *) 5; struct general **z = calloc(5, sizeof(struct general *)); //CHECK_NOALL: struct general **z = calloc(5, sizeof(struct general *)); - //CHECK_ALL: _Array_ptr<_Ptr> z : count(5) = calloc<_Ptr>(5, sizeof(struct general *)); + //CHECK_ALL: _Array_ptr<_Ptr> z : count(5) = calloc<_Ptr>(5, sizeof(struct general *)); struct general *curr = y; //CHECK_NOALL: struct general *curr = y; - //CHECK_ALL: _Ptr curr = y; + //CHECK_ALL: _Ptr curr = y; int i; for(i = 0; i < 5; i++) { //CHECK_NOALL: for(i = 0; i < 5; i++) { diff --git a/clang/test/CheckedCRewriter/arrprotoboth.c b/clang/test/CheckedCRewriter/arrprotoboth.c index 69aa6ddf45a1..ea4c8785cc1e 100644 --- a/clang/test/CheckedCRewriter/arrprotoboth.c +++ b/clang/test/CheckedCRewriter/arrprotoboth.c @@ -106,8 +106,8 @@ int *mul2(int *x) { } int * sus(int *, int *); - //CHECK_NOALL: int * sus(int *x, _Ptr y); - //CHECK_ALL: _Array_ptr sus(int *x, _Ptr y); + //CHECK_NOALL: int * sus(int * x, _Ptr y); + //CHECK_ALL: _Array_ptr sus(int * x, _Ptr y); int * foo() { //CHECK_NOALL: int * foo(void) { @@ -115,10 +115,10 @@ int * foo() { int * x = malloc(sizeof(int)); //CHECK: int * x = malloc(sizeof(int)); int * y = malloc(sizeof(int)); - //CHECK: _Ptr y = malloc(sizeof(int)); + //CHECK: _Ptr y = malloc(sizeof(int)); int * z = sus(x, y); //CHECK_NOALL: int * z = sus(x, y); - //CHECK_ALL: _Array_ptr z = sus(x, y); + //CHECK_ALL: _Array_ptr z = sus(x, y); return z; } int * bar() { @@ -127,21 +127,21 @@ int * bar() { int * x = malloc(sizeof(int)); //CHECK: int * x = malloc(sizeof(int)); int * y = malloc(sizeof(int)); - //CHECK: _Ptr y = malloc(sizeof(int)); + //CHECK: _Ptr y = malloc(sizeof(int)); int * z = sus(x, y); //CHECK_NOALL: int * z = sus(x, y); - //CHECK_ALL: _Array_ptr z = sus(x, y); + //CHECK_ALL: _Array_ptr z = sus(x, y); z += 2; return z; } int * sus(int * x, int * y) { - //CHECK_NOALL: int * sus(int *x, _Ptr y) { - //CHECK_ALL: _Array_ptr sus(int *x, _Ptr y) { + //CHECK_NOALL: int * sus(int * x, _Ptr y) { + //CHECK_ALL: _Array_ptr sus(int * x, _Ptr y) { x = (int *) 5; //CHECK: x = (int *) 5; int *z = calloc(5, sizeof(int)); //CHECK_NOALL: int *z = calloc(5, sizeof(int)); - //CHECK_ALL: _Array_ptr z : count(5) = calloc(5, sizeof(int)); + //CHECK_ALL: _Array_ptr z : count(5) = calloc(5, sizeof(int)); int i, fac; int *p; //CHECK_NOALL: int *p; diff --git a/clang/test/CheckedCRewriter/arrprotocallee.c b/clang/test/CheckedCRewriter/arrprotocallee.c index 3703731cc749..1bddac2b5659 100644 --- a/clang/test/CheckedCRewriter/arrprotocallee.c +++ b/clang/test/CheckedCRewriter/arrprotocallee.c @@ -106,8 +106,8 @@ int *mul2(int *x) { } int * sus(int *, int *); - //CHECK_NOALL: int * sus(int *x, _Ptr y); - //CHECK_ALL: _Array_ptr sus(int *x, _Ptr y); + //CHECK_NOALL: int * sus(int * x, _Ptr y); + //CHECK_ALL: _Array_ptr sus(int * x, _Ptr y); int * foo() { //CHECK_NOALL: int * foo(void) { @@ -115,10 +115,10 @@ int * foo() { int * x = malloc(sizeof(int)); //CHECK: int * x = malloc(sizeof(int)); int * y = malloc(sizeof(int)); - //CHECK: _Ptr y = malloc(sizeof(int)); + //CHECK: _Ptr y = malloc(sizeof(int)); int * z = sus(x, y); //CHECK_NOALL: int * z = sus(x, y); - //CHECK_ALL: _Array_ptr z = sus(x, y); + //CHECK_ALL: _Array_ptr z = sus(x, y); return z; } int * bar() { @@ -127,20 +127,20 @@ int * bar() { int * x = malloc(sizeof(int)); //CHECK: int * x = malloc(sizeof(int)); int * y = malloc(sizeof(int)); - //CHECK: _Ptr y = malloc(sizeof(int)); + //CHECK: _Ptr y = malloc(sizeof(int)); int * z = sus(x, y); //CHECK_NOALL: int * z = sus(x, y); - //CHECK_ALL: _Array_ptr z = sus(x, y); + //CHECK_ALL: _Array_ptr z = sus(x, y); return z; } int * sus(int * x, int * y) { - //CHECK_NOALL: int * sus(int *x, _Ptr y) { - //CHECK_ALL: _Array_ptr sus(int *x, _Ptr y) { + //CHECK_NOALL: int * sus(int * x, _Ptr y) { + //CHECK_ALL: _Array_ptr sus(int * x, _Ptr y) { x = (int *) 5; //CHECK: x = (int *) 5; int *z = calloc(5, sizeof(int)); //CHECK_NOALL: int *z = calloc(5, sizeof(int)); - //CHECK_ALL: _Array_ptr z : count(5) = calloc(5, sizeof(int)); + //CHECK_ALL: _Array_ptr z : count(5) = calloc(5, sizeof(int)); int i, fac; int *p; //CHECK_NOALL: int *p; diff --git a/clang/test/CheckedCRewriter/arrprotocaller.c b/clang/test/CheckedCRewriter/arrprotocaller.c index c5a59d92c8d5..6b8d1804e82e 100644 --- a/clang/test/CheckedCRewriter/arrprotocaller.c +++ b/clang/test/CheckedCRewriter/arrprotocaller.c @@ -106,8 +106,8 @@ int *mul2(int *x) { } int * sus(int *, int *); - //CHECK_NOALL: int * sus(int *x, _Ptr y); - //CHECK_ALL: _Array_ptr sus(int *x, _Ptr y); + //CHECK_NOALL: int * sus(int * x, _Ptr y); + //CHECK_ALL: _Array_ptr sus(int * x, _Ptr y); int * foo() { //CHECK_NOALL: int * foo(void) { @@ -115,10 +115,10 @@ int * foo() { int * x = malloc(sizeof(int)); //CHECK: int * x = malloc(sizeof(int)); int * y = malloc(sizeof(int)); - //CHECK: _Ptr y = malloc(sizeof(int)); + //CHECK: _Ptr y = malloc(sizeof(int)); int * z = sus(x, y); //CHECK_NOALL: int * z = sus(x, y); - //CHECK_ALL: _Array_ptr z = sus(x, y); + //CHECK_ALL: _Array_ptr z = sus(x, y); return z; } int * bar() { @@ -127,21 +127,21 @@ int * bar() { int * x = malloc(sizeof(int)); //CHECK: int * x = malloc(sizeof(int)); int * y = malloc(sizeof(int)); - //CHECK: _Ptr y = malloc(sizeof(int)); + //CHECK: _Ptr y = malloc(sizeof(int)); int * z = sus(x, y); //CHECK_NOALL: int * z = sus(x, y); - //CHECK_ALL: _Array_ptr z = sus(x, y); + //CHECK_ALL: _Array_ptr z = sus(x, y); z += 2; return z; } int * sus(int * x, int * y) { - //CHECK_NOALL: int * sus(int *x, _Ptr y) { - //CHECK_ALL: _Array_ptr sus(int *x, _Ptr y) { + //CHECK_NOALL: int * sus(int * x, _Ptr y) { + //CHECK_ALL: _Array_ptr sus(int * x, _Ptr y) { x = (int *) 5; //CHECK: x = (int *) 5; int *z = calloc(5, sizeof(int)); //CHECK_NOALL: int *z = calloc(5, sizeof(int)); - //CHECK_ALL: _Array_ptr z : count(5) = calloc(5, sizeof(int)); + //CHECK_ALL: _Array_ptr z : count(5) = calloc(5, sizeof(int)); int i, fac; int *p; //CHECK_NOALL: int *p; diff --git a/clang/test/CheckedCRewriter/arrprotosafe.c b/clang/test/CheckedCRewriter/arrprotosafe.c index a78da4f64276..617c8ea289ac 100644 --- a/clang/test/CheckedCRewriter/arrprotosafe.c +++ b/clang/test/CheckedCRewriter/arrprotosafe.c @@ -105,8 +105,8 @@ int *mul2(int *x) { } int * sus(int *, int *); - //CHECK_NOALL: int * sus(int *x, _Ptr y); - //CHECK_ALL: _Array_ptr sus(int *x, _Ptr y); + //CHECK_NOALL: int * sus(int * x, _Ptr y); + //CHECK_ALL: _Array_ptr sus(int * x, _Ptr y); int * foo() { //CHECK_NOALL: int * foo(void) { @@ -114,10 +114,10 @@ int * foo() { int * x = malloc(sizeof(int)); //CHECK: int * x = malloc(sizeof(int)); int * y = malloc(sizeof(int)); - //CHECK: _Ptr y = malloc(sizeof(int)); + //CHECK: _Ptr y = malloc(sizeof(int)); int * z = sus(x, y); //CHECK_NOALL: int * z = sus(x, y); - //CHECK_ALL: _Array_ptr z = sus(x, y); + //CHECK_ALL: _Array_ptr z = sus(x, y); return z; } int * bar() { @@ -126,20 +126,20 @@ int * bar() { int * x = malloc(sizeof(int)); //CHECK: int * x = malloc(sizeof(int)); int * y = malloc(sizeof(int)); - //CHECK: _Ptr y = malloc(sizeof(int)); + //CHECK: _Ptr y = malloc(sizeof(int)); int * z = sus(x, y); //CHECK_NOALL: int * z = sus(x, y); - //CHECK_ALL: _Array_ptr z = sus(x, y); + //CHECK_ALL: _Array_ptr z = sus(x, y); return z; } int * sus(int * x, int * y) { - //CHECK_NOALL: int * sus(int *x, _Ptr y) { - //CHECK_ALL: _Array_ptr sus(int *x, _Ptr y) { + //CHECK_NOALL: int * sus(int * x, _Ptr y) { + //CHECK_ALL: _Array_ptr sus(int * x, _Ptr y) { x = (int *) 5; //CHECK: x = (int *) 5; int *z = calloc(5, sizeof(int)); //CHECK_NOALL: int *z = calloc(5, sizeof(int)); - //CHECK_ALL: _Array_ptr z : count(5) = calloc(5, sizeof(int)); + //CHECK_ALL: _Array_ptr z : count(5) = calloc(5, sizeof(int)); int i, fac; int *p; //CHECK_NOALL: int *p; diff --git a/clang/test/CheckedCRewriter/arrsafe.c b/clang/test/CheckedCRewriter/arrsafe.c index 2f2cca530b5c..8c4f478ced98 100644 --- a/clang/test/CheckedCRewriter/arrsafe.c +++ b/clang/test/CheckedCRewriter/arrsafe.c @@ -102,13 +102,13 @@ int *mul2(int *x) { } int * sus(int * x, int * y) { - //CHECK_NOALL: int * sus(int *x, _Ptr y) { - //CHECK_ALL: _Array_ptr sus(int *x, _Ptr y) { + //CHECK_NOALL: int * sus(int * x, _Ptr y) { + //CHECK_ALL: _Array_ptr sus(int * x, _Ptr y) { x = (int *) 5; //CHECK: x = (int *) 5; int *z = calloc(5, sizeof(int)); //CHECK_NOALL: int *z = calloc(5, sizeof(int)); - //CHECK_ALL: _Array_ptr z : count(5) = calloc(5, sizeof(int)); + //CHECK_ALL: _Array_ptr z : count(5) = calloc(5, sizeof(int)); int i, fac; int *p; //CHECK_NOALL: int *p; @@ -125,10 +125,10 @@ int * foo() { int * x = malloc(sizeof(int)); //CHECK: int * x = malloc(sizeof(int)); int * y = malloc(sizeof(int)); - //CHECK: _Ptr y = malloc(sizeof(int)); + //CHECK: _Ptr y = malloc(sizeof(int)); int * z = sus(x, y); //CHECK_NOALL: int * z = sus(x, y); - //CHECK_ALL: _Array_ptr z = sus(x, y); + //CHECK_ALL: _Array_ptr z = sus(x, y); return z; } int * bar() { @@ -137,8 +137,8 @@ int * bar() { int * x = malloc(sizeof(int)); //CHECK: int * x = malloc(sizeof(int)); int * y = malloc(sizeof(int)); - //CHECK: _Ptr y = malloc(sizeof(int)); + //CHECK: _Ptr y = malloc(sizeof(int)); int * z = sus(x, y); //CHECK_NOALL: int * z = sus(x, y); - //CHECK_ALL: _Array_ptr z = sus(x, y); + //CHECK_ALL: _Array_ptr z = sus(x, y); return z; } diff --git a/clang/test/CheckedCRewriter/arrsafemulti1.c b/clang/test/CheckedCRewriter/arrsafemulti1.c index 30eff695ca83..cb7cacce25f5 100644 --- a/clang/test/CheckedCRewriter/arrsafemulti1.c +++ b/clang/test/CheckedCRewriter/arrsafemulti1.c @@ -119,10 +119,10 @@ int * foo() { int * x = malloc(sizeof(int)); //CHECK: int * x = malloc(sizeof(int)); int * y = malloc(sizeof(int)); - //CHECK: _Ptr y = malloc(sizeof(int)); + //CHECK: _Ptr y = malloc(sizeof(int)); int * z = sus(x, y); //CHECK_NOALL: int * z = sus(x, y); - //CHECK_ALL: _Array_ptr z = sus(x, y); + //CHECK_ALL: _Array_ptr z = sus(x, y); return z; } int * bar() { @@ -131,8 +131,8 @@ int * bar() { int * x = malloc(sizeof(int)); //CHECK: int * x = malloc(sizeof(int)); int * y = malloc(sizeof(int)); - //CHECK: _Ptr y = malloc(sizeof(int)); + //CHECK: _Ptr y = malloc(sizeof(int)); int * z = sus(x, y); //CHECK_NOALL: int * z = sus(x, y); - //CHECK_ALL: _Array_ptr z = sus(x, y); + //CHECK_ALL: _Array_ptr z = sus(x, y); return z; } diff --git a/clang/test/CheckedCRewriter/arrsafemulti2.c b/clang/test/CheckedCRewriter/arrsafemulti2.c index dcce282f3240..83697e36a92b 100644 --- a/clang/test/CheckedCRewriter/arrsafemulti2.c +++ b/clang/test/CheckedCRewriter/arrsafemulti2.c @@ -110,13 +110,13 @@ int *mul2(int *x) { } int * sus(int * x, int * y) { - //CHECK_NOALL: int * sus(int *x, _Ptr y) { - //CHECK_ALL: _Array_ptr sus(int *x, _Ptr y) { + //CHECK_NOALL: int * sus(int * x, _Ptr y) { + //CHECK_ALL: _Array_ptr sus(int * x, _Ptr y) { x = (int *) 5; //CHECK: x = (int *) 5; int *z = calloc(5, sizeof(int)); //CHECK_NOALL: int *z = calloc(5, sizeof(int)); - //CHECK_ALL: _Array_ptr z : count(5) = calloc(5, sizeof(int)); + //CHECK_ALL: _Array_ptr z : count(5) = calloc(5, sizeof(int)); int i, fac; int *p; //CHECK_NOALL: int *p; diff --git a/clang/test/CheckedCRewriter/arrstructboth.c b/clang/test/CheckedCRewriter/arrstructboth.c index f47a76fec812..9f2ef28060b2 100644 --- a/clang/test/CheckedCRewriter/arrstructboth.c +++ b/clang/test/CheckedCRewriter/arrstructboth.c @@ -103,15 +103,15 @@ int *mul2(int *x) { } int * sus(struct general * x, struct general * y) { - //CHECK_NOALL: int * sus(struct general *x, _Ptr y) { - //CHECK_ALL: _Array_ptr sus(struct general *x, _Ptr y) { + //CHECK_NOALL: int * sus(struct general * x, _Ptr y) { + //CHECK_ALL: _Array_ptr sus(struct general * x, _Ptr y) { x = (struct general *) 5; //CHECK: x = (struct general *) 5; int *z = calloc(5, sizeof(int)); //CHECK_NOALL: int *z = calloc(5, sizeof(int)); - //CHECK_ALL: _Array_ptr z : count(5) = calloc(5, sizeof(int)); + //CHECK_ALL: _Array_ptr z : count(5) = calloc(5, sizeof(int)); struct general *p = y; - //CHECK: _Ptr p = y; + //CHECK: _Ptr p = y; int i; for(i = 0; i < 5; p = p->next, i++) { //CHECK_NOALL: for(i = 0; i < 5; p = p->next, i++) { @@ -128,10 +128,10 @@ int * foo() { struct general * x = malloc(sizeof(struct general)); //CHECK: struct general * x = malloc(sizeof(struct general)); struct general * y = malloc(sizeof(struct general)); - //CHECK: _Ptr y = malloc(sizeof(struct general)); + //CHECK: _Ptr y = malloc(sizeof(struct general)); struct general *curr = y; - //CHECK: _Ptr curr = y; + //CHECK: _Ptr curr = y; int i; for(i = 1; i < 5; i++, curr = curr->next) { curr->data = i; @@ -140,7 +140,7 @@ int * foo() { } int * z = sus(x, y); //CHECK_NOALL: int * z = sus(x, y); - //CHECK_ALL: _Array_ptr z = sus(x, y); + //CHECK_ALL: _Array_ptr z = sus(x, y); return z; } int * bar() { @@ -149,10 +149,10 @@ int * bar() { struct general * x = malloc(sizeof(struct general)); //CHECK: struct general * x = malloc(sizeof(struct general)); struct general * y = malloc(sizeof(struct general)); - //CHECK: _Ptr y = malloc(sizeof(struct general)); + //CHECK: _Ptr y = malloc(sizeof(struct general)); struct general *curr = y; - //CHECK: _Ptr curr = y; + //CHECK: _Ptr curr = y; int i; for(i = 1; i < 5; i++, curr = curr->next) { curr->data = i; @@ -161,6 +161,6 @@ int * bar() { } int * z = sus(x, y); //CHECK_NOALL: int * z = sus(x, y); - //CHECK_ALL: _Array_ptr z = sus(x, y); + //CHECK_ALL: _Array_ptr z = sus(x, y); z += 2; return z; } diff --git a/clang/test/CheckedCRewriter/arrstructbothmulti1.c b/clang/test/CheckedCRewriter/arrstructbothmulti1.c index 19746786f33f..58d64e229c70 100644 --- a/clang/test/CheckedCRewriter/arrstructbothmulti1.c +++ b/clang/test/CheckedCRewriter/arrstructbothmulti1.c @@ -120,10 +120,10 @@ int * foo() { struct general * x = malloc(sizeof(struct general)); //CHECK: struct general * x = malloc(sizeof(struct general)); struct general * y = malloc(sizeof(struct general)); - //CHECK: _Ptr y = malloc(sizeof(struct general)); + //CHECK: _Ptr y = malloc(sizeof(struct general)); struct general *curr = y; - //CHECK: _Ptr curr = y; + //CHECK: _Ptr curr = y; int i; for(i = 1; i < 5; i++, curr = curr->next) { curr->data = i; @@ -132,7 +132,7 @@ int * foo() { } int * z = sus(x, y); //CHECK_NOALL: int * z = sus(x, y); - //CHECK_ALL: _Array_ptr z = sus(x, y); + //CHECK_ALL: _Array_ptr z = sus(x, y); return z; } int * bar() { @@ -141,10 +141,10 @@ int * bar() { struct general * x = malloc(sizeof(struct general)); //CHECK: struct general * x = malloc(sizeof(struct general)); struct general * y = malloc(sizeof(struct general)); - //CHECK: _Ptr y = malloc(sizeof(struct general)); + //CHECK: _Ptr y = malloc(sizeof(struct general)); struct general *curr = y; - //CHECK: _Ptr curr = y; + //CHECK: _Ptr curr = y; int i; for(i = 1; i < 5; i++, curr = curr->next) { curr->data = i; @@ -153,6 +153,6 @@ int * bar() { } int * z = sus(x, y); //CHECK_NOALL: int * z = sus(x, y); - //CHECK_ALL: _Array_ptr z = sus(x, y); + //CHECK_ALL: _Array_ptr z = sus(x, y); z += 2; return z; } diff --git a/clang/test/CheckedCRewriter/arrstructbothmulti2.c b/clang/test/CheckedCRewriter/arrstructbothmulti2.c index 189c65b2e5cb..66d8437e27c8 100644 --- a/clang/test/CheckedCRewriter/arrstructbothmulti2.c +++ b/clang/test/CheckedCRewriter/arrstructbothmulti2.c @@ -111,15 +111,15 @@ int *mul2(int *x) { } int * sus(struct general * x, struct general * y) { - //CHECK_NOALL: int * sus(struct general *x, _Ptr y) { - //CHECK_ALL: _Array_ptr sus(struct general *x, _Ptr y) { + //CHECK_NOALL: int * sus(struct general * x, _Ptr y) { + //CHECK_ALL: _Array_ptr sus(struct general * x, _Ptr y) { x = (struct general *) 5; //CHECK: x = (struct general *) 5; int *z = calloc(5, sizeof(int)); //CHECK_NOALL: int *z = calloc(5, sizeof(int)); - //CHECK_ALL: _Array_ptr z : count(5) = calloc(5, sizeof(int)); + //CHECK_ALL: _Array_ptr z : count(5) = calloc(5, sizeof(int)); struct general *p = y; - //CHECK: _Ptr p = y; + //CHECK: _Ptr p = y; int i; for(i = 0; i < 5; p = p->next, i++) { //CHECK_NOALL: for(i = 0; i < 5; p = p->next, i++) { diff --git a/clang/test/CheckedCRewriter/arrstructcallee.c b/clang/test/CheckedCRewriter/arrstructcallee.c index 33a62c1e4175..cdba5f9bc087 100644 --- a/clang/test/CheckedCRewriter/arrstructcallee.c +++ b/clang/test/CheckedCRewriter/arrstructcallee.c @@ -103,15 +103,15 @@ int *mul2(int *x) { } int * sus(struct general * x, struct general * y) { - //CHECK_NOALL: int * sus(struct general *x, _Ptr y) { - //CHECK_ALL: _Array_ptr sus(struct general *x, _Ptr y) { + //CHECK_NOALL: int * sus(struct general * x, _Ptr y) { + //CHECK_ALL: _Array_ptr sus(struct general * x, _Ptr y) { x = (struct general *) 5; //CHECK: x = (struct general *) 5; int *z = calloc(5, sizeof(int)); //CHECK_NOALL: int *z = calloc(5, sizeof(int)); - //CHECK_ALL: _Array_ptr z : count(5) = calloc(5, sizeof(int)); + //CHECK_ALL: _Array_ptr z : count(5) = calloc(5, sizeof(int)); struct general *p = y; - //CHECK: _Ptr p = y; + //CHECK: _Ptr p = y; int i; for(i = 0; i < 5; p = p->next, i++) { //CHECK_NOALL: for(i = 0; i < 5; p = p->next, i++) { @@ -128,10 +128,10 @@ int * foo() { struct general * x = malloc(sizeof(struct general)); //CHECK: struct general * x = malloc(sizeof(struct general)); struct general * y = malloc(sizeof(struct general)); - //CHECK: _Ptr y = malloc(sizeof(struct general)); + //CHECK: _Ptr y = malloc(sizeof(struct general)); struct general *curr = y; - //CHECK: _Ptr curr = y; + //CHECK: _Ptr curr = y; int i; for(i = 1; i < 5; i++, curr = curr->next) { curr->data = i; @@ -140,7 +140,7 @@ int * foo() { } int * z = sus(x, y); //CHECK_NOALL: int * z = sus(x, y); - //CHECK_ALL: _Array_ptr z = sus(x, y); + //CHECK_ALL: _Array_ptr z = sus(x, y); return z; } int * bar() { @@ -149,10 +149,10 @@ int * bar() { struct general * x = malloc(sizeof(struct general)); //CHECK: struct general * x = malloc(sizeof(struct general)); struct general * y = malloc(sizeof(struct general)); - //CHECK: _Ptr y = malloc(sizeof(struct general)); + //CHECK: _Ptr y = malloc(sizeof(struct general)); struct general *curr = y; - //CHECK: _Ptr curr = y; + //CHECK: _Ptr curr = y; int i; for(i = 1; i < 5; i++, curr = curr->next) { curr->data = i; @@ -161,5 +161,5 @@ int * bar() { } int * z = sus(x, y); //CHECK_NOALL: int * z = sus(x, y); - //CHECK_ALL: _Array_ptr z = sus(x, y); + //CHECK_ALL: _Array_ptr z = sus(x, y); return z; } diff --git a/clang/test/CheckedCRewriter/arrstructcalleemulti1.c b/clang/test/CheckedCRewriter/arrstructcalleemulti1.c index b3a50630bd22..5734a945a666 100644 --- a/clang/test/CheckedCRewriter/arrstructcalleemulti1.c +++ b/clang/test/CheckedCRewriter/arrstructcalleemulti1.c @@ -120,10 +120,10 @@ int * foo() { struct general * x = malloc(sizeof(struct general)); //CHECK: struct general * x = malloc(sizeof(struct general)); struct general * y = malloc(sizeof(struct general)); - //CHECK: _Ptr y = malloc(sizeof(struct general)); + //CHECK: _Ptr y = malloc(sizeof(struct general)); struct general *curr = y; - //CHECK: _Ptr curr = y; + //CHECK: _Ptr curr = y; int i; for(i = 1; i < 5; i++, curr = curr->next) { curr->data = i; @@ -132,7 +132,7 @@ int * foo() { } int * z = sus(x, y); //CHECK_NOALL: int * z = sus(x, y); - //CHECK_ALL: _Array_ptr z = sus(x, y); + //CHECK_ALL: _Array_ptr z = sus(x, y); return z; } int * bar() { @@ -141,10 +141,10 @@ int * bar() { struct general * x = malloc(sizeof(struct general)); //CHECK: struct general * x = malloc(sizeof(struct general)); struct general * y = malloc(sizeof(struct general)); - //CHECK: _Ptr y = malloc(sizeof(struct general)); + //CHECK: _Ptr y = malloc(sizeof(struct general)); struct general *curr = y; - //CHECK: _Ptr curr = y; + //CHECK: _Ptr curr = y; int i; for(i = 1; i < 5; i++, curr = curr->next) { curr->data = i; @@ -153,5 +153,5 @@ int * bar() { } int * z = sus(x, y); //CHECK_NOALL: int * z = sus(x, y); - //CHECK_ALL: _Array_ptr z = sus(x, y); + //CHECK_ALL: _Array_ptr z = sus(x, y); return z; } diff --git a/clang/test/CheckedCRewriter/arrstructcalleemulti2.c b/clang/test/CheckedCRewriter/arrstructcalleemulti2.c index 67f6c32afdba..7ca19aecc84a 100644 --- a/clang/test/CheckedCRewriter/arrstructcalleemulti2.c +++ b/clang/test/CheckedCRewriter/arrstructcalleemulti2.c @@ -111,15 +111,15 @@ int *mul2(int *x) { } int * sus(struct general * x, struct general * y) { - //CHECK_NOALL: int * sus(struct general *x, _Ptr y) { - //CHECK_ALL: _Array_ptr sus(struct general *x, _Ptr y) { + //CHECK_NOALL: int * sus(struct general * x, _Ptr y) { + //CHECK_ALL: _Array_ptr sus(struct general * x, _Ptr y) { x = (struct general *) 5; //CHECK: x = (struct general *) 5; int *z = calloc(5, sizeof(int)); //CHECK_NOALL: int *z = calloc(5, sizeof(int)); - //CHECK_ALL: _Array_ptr z : count(5) = calloc(5, sizeof(int)); + //CHECK_ALL: _Array_ptr z : count(5) = calloc(5, sizeof(int)); struct general *p = y; - //CHECK: _Ptr p = y; + //CHECK: _Ptr p = y; int i; for(i = 0; i < 5; p = p->next, i++) { //CHECK_NOALL: for(i = 0; i < 5; p = p->next, i++) { diff --git a/clang/test/CheckedCRewriter/arrstructcaller.c b/clang/test/CheckedCRewriter/arrstructcaller.c index 44627dc76b76..8752aae86fc9 100644 --- a/clang/test/CheckedCRewriter/arrstructcaller.c +++ b/clang/test/CheckedCRewriter/arrstructcaller.c @@ -103,15 +103,15 @@ int *mul2(int *x) { } int * sus(struct general * x, struct general * y) { - //CHECK_NOALL: int * sus(struct general *x, _Ptr y) { - //CHECK_ALL: _Array_ptr sus(struct general *x, _Ptr y) { + //CHECK_NOALL: int * sus(struct general * x, _Ptr y) { + //CHECK_ALL: _Array_ptr sus(struct general * x, _Ptr y) { x = (struct general *) 5; //CHECK: x = (struct general *) 5; int *z = calloc(5, sizeof(int)); //CHECK_NOALL: int *z = calloc(5, sizeof(int)); - //CHECK_ALL: _Array_ptr z : count(5) = calloc(5, sizeof(int)); + //CHECK_ALL: _Array_ptr z : count(5) = calloc(5, sizeof(int)); struct general *p = y; - //CHECK: _Ptr p = y; + //CHECK: _Ptr p = y; int i; for(i = 0; i < 5; p = p->next, i++) { //CHECK_NOALL: for(i = 0; i < 5; p = p->next, i++) { @@ -127,10 +127,10 @@ int * foo() { struct general * x = malloc(sizeof(struct general)); //CHECK: struct general * x = malloc(sizeof(struct general)); struct general * y = malloc(sizeof(struct general)); - //CHECK: _Ptr y = malloc(sizeof(struct general)); + //CHECK: _Ptr y = malloc(sizeof(struct general)); struct general *curr = y; - //CHECK: _Ptr curr = y; + //CHECK: _Ptr curr = y; int i; for(i = 1; i < 5; i++, curr = curr->next) { curr->data = i; @@ -139,7 +139,7 @@ int * foo() { } int * z = sus(x, y); //CHECK_NOALL: int * z = sus(x, y); - //CHECK_ALL: _Array_ptr z = sus(x, y); + //CHECK_ALL: _Array_ptr z = sus(x, y); return z; } int * bar() { @@ -148,10 +148,10 @@ int * bar() { struct general * x = malloc(sizeof(struct general)); //CHECK: struct general * x = malloc(sizeof(struct general)); struct general * y = malloc(sizeof(struct general)); - //CHECK: _Ptr y = malloc(sizeof(struct general)); + //CHECK: _Ptr y = malloc(sizeof(struct general)); struct general *curr = y; - //CHECK: _Ptr curr = y; + //CHECK: _Ptr curr = y; int i; for(i = 1; i < 5; i++, curr = curr->next) { curr->data = i; @@ -160,6 +160,6 @@ int * bar() { } int * z = sus(x, y); //CHECK_NOALL: int * z = sus(x, y); - //CHECK_ALL: _Array_ptr z = sus(x, y); + //CHECK_ALL: _Array_ptr z = sus(x, y); z += 2; return z; } diff --git a/clang/test/CheckedCRewriter/arrstructcallermulti1.c b/clang/test/CheckedCRewriter/arrstructcallermulti1.c index e7597f5055fe..962800b188f7 100644 --- a/clang/test/CheckedCRewriter/arrstructcallermulti1.c +++ b/clang/test/CheckedCRewriter/arrstructcallermulti1.c @@ -120,10 +120,10 @@ int * foo() { struct general * x = malloc(sizeof(struct general)); //CHECK: struct general * x = malloc(sizeof(struct general)); struct general * y = malloc(sizeof(struct general)); - //CHECK: _Ptr y = malloc(sizeof(struct general)); + //CHECK: _Ptr y = malloc(sizeof(struct general)); struct general *curr = y; - //CHECK: _Ptr curr = y; + //CHECK: _Ptr curr = y; int i; for(i = 1; i < 5; i++, curr = curr->next) { curr->data = i; @@ -132,7 +132,7 @@ int * foo() { } int * z = sus(x, y); //CHECK_NOALL: int * z = sus(x, y); - //CHECK_ALL: _Array_ptr z = sus(x, y); + //CHECK_ALL: _Array_ptr z = sus(x, y); return z; } int * bar() { @@ -141,10 +141,10 @@ int * bar() { struct general * x = malloc(sizeof(struct general)); //CHECK: struct general * x = malloc(sizeof(struct general)); struct general * y = malloc(sizeof(struct general)); - //CHECK: _Ptr y = malloc(sizeof(struct general)); + //CHECK: _Ptr y = malloc(sizeof(struct general)); struct general *curr = y; - //CHECK: _Ptr curr = y; + //CHECK: _Ptr curr = y; int i; for(i = 1; i < 5; i++, curr = curr->next) { curr->data = i; @@ -153,6 +153,6 @@ int * bar() { } int * z = sus(x, y); //CHECK_NOALL: int * z = sus(x, y); - //CHECK_ALL: _Array_ptr z = sus(x, y); + //CHECK_ALL: _Array_ptr z = sus(x, y); z += 2; return z; } diff --git a/clang/test/CheckedCRewriter/arrstructcallermulti2.c b/clang/test/CheckedCRewriter/arrstructcallermulti2.c index a0a66d6abe23..a45ce04c43fd 100644 --- a/clang/test/CheckedCRewriter/arrstructcallermulti2.c +++ b/clang/test/CheckedCRewriter/arrstructcallermulti2.c @@ -111,15 +111,15 @@ int *mul2(int *x) { } int * sus(struct general * x, struct general * y) { - //CHECK_NOALL: int * sus(struct general *x, _Ptr y) { - //CHECK_ALL: _Array_ptr sus(struct general *x, _Ptr y) { + //CHECK_NOALL: int * sus(struct general * x, _Ptr y) { + //CHECK_ALL: _Array_ptr sus(struct general * x, _Ptr y) { x = (struct general *) 5; //CHECK: x = (struct general *) 5; int *z = calloc(5, sizeof(int)); //CHECK_NOALL: int *z = calloc(5, sizeof(int)); - //CHECK_ALL: _Array_ptr z : count(5) = calloc(5, sizeof(int)); + //CHECK_ALL: _Array_ptr z : count(5) = calloc(5, sizeof(int)); struct general *p = y; - //CHECK: _Ptr p = y; + //CHECK: _Ptr p = y; int i; for(i = 0; i < 5; p = p->next, i++) { //CHECK_NOALL: for(i = 0; i < 5; p = p->next, i++) { diff --git a/clang/test/CheckedCRewriter/arrstructprotoboth.c b/clang/test/CheckedCRewriter/arrstructprotoboth.c index d37a403dc987..795c06bd7265 100644 --- a/clang/test/CheckedCRewriter/arrstructprotoboth.c +++ b/clang/test/CheckedCRewriter/arrstructprotoboth.c @@ -106,8 +106,8 @@ int *mul2(int *x) { } int * sus(struct general *, struct general *); - //CHECK_NOALL: int * sus(struct general *x, _Ptr y); - //CHECK_ALL: _Array_ptr sus(struct general *x, _Ptr y); + //CHECK_NOALL: int * sus(struct general * x, _Ptr y); + //CHECK_ALL: _Array_ptr sus(struct general * x, _Ptr y); int * foo() { //CHECK_NOALL: int * foo(void) { @@ -115,10 +115,10 @@ int * foo() { struct general * x = malloc(sizeof(struct general)); //CHECK: struct general * x = malloc(sizeof(struct general)); struct general * y = malloc(sizeof(struct general)); - //CHECK: _Ptr y = malloc(sizeof(struct general)); + //CHECK: _Ptr y = malloc(sizeof(struct general)); struct general *curr = y; - //CHECK: _Ptr curr = y; + //CHECK: _Ptr curr = y; int i; for(i = 1; i < 5; i++, curr = curr->next) { curr->data = i; @@ -127,7 +127,7 @@ int * foo() { } int * z = sus(x, y); //CHECK_NOALL: int * z = sus(x, y); - //CHECK_ALL: _Array_ptr z = sus(x, y); + //CHECK_ALL: _Array_ptr z = sus(x, y); return z; } int * bar() { @@ -136,10 +136,10 @@ int * bar() { struct general * x = malloc(sizeof(struct general)); //CHECK: struct general * x = malloc(sizeof(struct general)); struct general * y = malloc(sizeof(struct general)); - //CHECK: _Ptr y = malloc(sizeof(struct general)); + //CHECK: _Ptr y = malloc(sizeof(struct general)); struct general *curr = y; - //CHECK: _Ptr curr = y; + //CHECK: _Ptr curr = y; int i; for(i = 1; i < 5; i++, curr = curr->next) { curr->data = i; @@ -148,20 +148,20 @@ int * bar() { } int * z = sus(x, y); //CHECK_NOALL: int * z = sus(x, y); - //CHECK_ALL: _Array_ptr z = sus(x, y); + //CHECK_ALL: _Array_ptr z = sus(x, y); z += 2; return z; } int * sus(struct general * x, struct general * y) { - //CHECK_NOALL: int * sus(struct general *x, _Ptr y) { - //CHECK_ALL: _Array_ptr sus(struct general *x, _Ptr y) { + //CHECK_NOALL: int * sus(struct general * x, _Ptr y) { + //CHECK_ALL: _Array_ptr sus(struct general * x, _Ptr y) { x = (struct general *) 5; //CHECK: x = (struct general *) 5; int *z = calloc(5, sizeof(int)); //CHECK_NOALL: int *z = calloc(5, sizeof(int)); - //CHECK_ALL: _Array_ptr z : count(5) = calloc(5, sizeof(int)); + //CHECK_ALL: _Array_ptr z : count(5) = calloc(5, sizeof(int)); struct general *p = y; - //CHECK: _Ptr p = y; + //CHECK: _Ptr p = y; int i; for(i = 0; i < 5; p = p->next, i++) { //CHECK_NOALL: for(i = 0; i < 5; p = p->next, i++) { diff --git a/clang/test/CheckedCRewriter/arrstructprotocallee.c b/clang/test/CheckedCRewriter/arrstructprotocallee.c index d44e556469cf..88cc1893fc7c 100644 --- a/clang/test/CheckedCRewriter/arrstructprotocallee.c +++ b/clang/test/CheckedCRewriter/arrstructprotocallee.c @@ -106,8 +106,8 @@ int *mul2(int *x) { } int * sus(struct general *, struct general *); - //CHECK_NOALL: int * sus(struct general *x, _Ptr y); - //CHECK_ALL: _Array_ptr sus(struct general *x, _Ptr y); + //CHECK_NOALL: int * sus(struct general * x, _Ptr y); + //CHECK_ALL: _Array_ptr sus(struct general * x, _Ptr y); int * foo() { //CHECK_NOALL: int * foo(void) { @@ -115,10 +115,10 @@ int * foo() { struct general * x = malloc(sizeof(struct general)); //CHECK: struct general * x = malloc(sizeof(struct general)); struct general * y = malloc(sizeof(struct general)); - //CHECK: _Ptr y = malloc(sizeof(struct general)); + //CHECK: _Ptr y = malloc(sizeof(struct general)); struct general *curr = y; - //CHECK: _Ptr curr = y; + //CHECK: _Ptr curr = y; int i; for(i = 1; i < 5; i++, curr = curr->next) { curr->data = i; @@ -127,7 +127,7 @@ int * foo() { } int * z = sus(x, y); //CHECK_NOALL: int * z = sus(x, y); - //CHECK_ALL: _Array_ptr z = sus(x, y); + //CHECK_ALL: _Array_ptr z = sus(x, y); return z; } int * bar() { @@ -136,10 +136,10 @@ int * bar() { struct general * x = malloc(sizeof(struct general)); //CHECK: struct general * x = malloc(sizeof(struct general)); struct general * y = malloc(sizeof(struct general)); - //CHECK: _Ptr y = malloc(sizeof(struct general)); + //CHECK: _Ptr y = malloc(sizeof(struct general)); struct general *curr = y; - //CHECK: _Ptr curr = y; + //CHECK: _Ptr curr = y; int i; for(i = 1; i < 5; i++, curr = curr->next) { curr->data = i; @@ -148,19 +148,19 @@ int * bar() { } int * z = sus(x, y); //CHECK_NOALL: int * z = sus(x, y); - //CHECK_ALL: _Array_ptr z = sus(x, y); + //CHECK_ALL: _Array_ptr z = sus(x, y); return z; } int * sus(struct general * x, struct general * y) { - //CHECK_NOALL: int * sus(struct general *x, _Ptr y) { - //CHECK_ALL: _Array_ptr sus(struct general *x, _Ptr y) { + //CHECK_NOALL: int * sus(struct general * x, _Ptr y) { + //CHECK_ALL: _Array_ptr sus(struct general * x, _Ptr y) { x = (struct general *) 5; //CHECK: x = (struct general *) 5; int *z = calloc(5, sizeof(int)); //CHECK_NOALL: int *z = calloc(5, sizeof(int)); - //CHECK_ALL: _Array_ptr z : count(5) = calloc(5, sizeof(int)); + //CHECK_ALL: _Array_ptr z : count(5) = calloc(5, sizeof(int)); struct general *p = y; - //CHECK: _Ptr p = y; + //CHECK: _Ptr p = y; int i; for(i = 0; i < 5; p = p->next, i++) { //CHECK_NOALL: for(i = 0; i < 5; p = p->next, i++) { diff --git a/clang/test/CheckedCRewriter/arrstructprotocaller.c b/clang/test/CheckedCRewriter/arrstructprotocaller.c index dd67a550ebd5..2852f946617a 100644 --- a/clang/test/CheckedCRewriter/arrstructprotocaller.c +++ b/clang/test/CheckedCRewriter/arrstructprotocaller.c @@ -106,8 +106,8 @@ int *mul2(int *x) { } int * sus(struct general *, struct general *); - //CHECK_NOALL: int * sus(struct general *x, _Ptr y); - //CHECK_ALL: _Array_ptr sus(struct general *x, _Ptr y); + //CHECK_NOALL: int * sus(struct general * x, _Ptr y); + //CHECK_ALL: _Array_ptr sus(struct general * x, _Ptr y); int * foo() { //CHECK_NOALL: int * foo(void) { @@ -115,10 +115,10 @@ int * foo() { struct general * x = malloc(sizeof(struct general)); //CHECK: struct general * x = malloc(sizeof(struct general)); struct general * y = malloc(sizeof(struct general)); - //CHECK: _Ptr y = malloc(sizeof(struct general)); + //CHECK: _Ptr y = malloc(sizeof(struct general)); struct general *curr = y; - //CHECK: _Ptr curr = y; + //CHECK: _Ptr curr = y; int i; for(i = 1; i < 5; i++, curr = curr->next) { curr->data = i; @@ -127,7 +127,7 @@ int * foo() { } int * z = sus(x, y); //CHECK_NOALL: int * z = sus(x, y); - //CHECK_ALL: _Array_ptr z = sus(x, y); + //CHECK_ALL: _Array_ptr z = sus(x, y); return z; } int * bar() { @@ -136,10 +136,10 @@ int * bar() { struct general * x = malloc(sizeof(struct general)); //CHECK: struct general * x = malloc(sizeof(struct general)); struct general * y = malloc(sizeof(struct general)); - //CHECK: _Ptr y = malloc(sizeof(struct general)); + //CHECK: _Ptr y = malloc(sizeof(struct general)); struct general *curr = y; - //CHECK: _Ptr curr = y; + //CHECK: _Ptr curr = y; int i; for(i = 1; i < 5; i++, curr = curr->next) { curr->data = i; @@ -148,20 +148,20 @@ int * bar() { } int * z = sus(x, y); //CHECK_NOALL: int * z = sus(x, y); - //CHECK_ALL: _Array_ptr z = sus(x, y); + //CHECK_ALL: _Array_ptr z = sus(x, y); z += 2; return z; } int * sus(struct general * x, struct general * y) { - //CHECK_NOALL: int * sus(struct general *x, _Ptr y) { - //CHECK_ALL: _Array_ptr sus(struct general *x, _Ptr y) { + //CHECK_NOALL: int * sus(struct general * x, _Ptr y) { + //CHECK_ALL: _Array_ptr sus(struct general * x, _Ptr y) { x = (struct general *) 5; //CHECK: x = (struct general *) 5; int *z = calloc(5, sizeof(int)); //CHECK_NOALL: int *z = calloc(5, sizeof(int)); - //CHECK_ALL: _Array_ptr z : count(5) = calloc(5, sizeof(int)); + //CHECK_ALL: _Array_ptr z : count(5) = calloc(5, sizeof(int)); struct general *p = y; - //CHECK: _Ptr p = y; + //CHECK: _Ptr p = y; int i; for(i = 0; i < 5; p = p->next, i++) { //CHECK_NOALL: for(i = 0; i < 5; p = p->next, i++) { diff --git a/clang/test/CheckedCRewriter/arrstructprotosafe.c b/clang/test/CheckedCRewriter/arrstructprotosafe.c index 24ec5bc4606c..b07c75043f66 100644 --- a/clang/test/CheckedCRewriter/arrstructprotosafe.c +++ b/clang/test/CheckedCRewriter/arrstructprotosafe.c @@ -105,8 +105,8 @@ int *mul2(int *x) { } int * sus(struct general *, struct general *); - //CHECK_NOALL: int * sus(struct general *x, _Ptr y); - //CHECK_ALL: _Array_ptr sus(struct general *x, _Ptr y); + //CHECK_NOALL: int * sus(struct general * x, _Ptr y); + //CHECK_ALL: _Array_ptr sus(struct general * x, _Ptr y); int * foo() { //CHECK_NOALL: int * foo(void) { @@ -114,10 +114,10 @@ int * foo() { struct general * x = malloc(sizeof(struct general)); //CHECK: struct general * x = malloc(sizeof(struct general)); struct general * y = malloc(sizeof(struct general)); - //CHECK: _Ptr y = malloc(sizeof(struct general)); + //CHECK: _Ptr y = malloc(sizeof(struct general)); struct general *curr = y; - //CHECK: _Ptr curr = y; + //CHECK: _Ptr curr = y; int i; for(i = 1; i < 5; i++, curr = curr->next) { curr->data = i; @@ -126,7 +126,7 @@ int * foo() { } int * z = sus(x, y); //CHECK_NOALL: int * z = sus(x, y); - //CHECK_ALL: _Array_ptr z = sus(x, y); + //CHECK_ALL: _Array_ptr z = sus(x, y); return z; } int * bar() { @@ -135,10 +135,10 @@ int * bar() { struct general * x = malloc(sizeof(struct general)); //CHECK: struct general * x = malloc(sizeof(struct general)); struct general * y = malloc(sizeof(struct general)); - //CHECK: _Ptr y = malloc(sizeof(struct general)); + //CHECK: _Ptr y = malloc(sizeof(struct general)); struct general *curr = y; - //CHECK: _Ptr curr = y; + //CHECK: _Ptr curr = y; int i; for(i = 1; i < 5; i++, curr = curr->next) { curr->data = i; @@ -147,19 +147,19 @@ int * bar() { } int * z = sus(x, y); //CHECK_NOALL: int * z = sus(x, y); - //CHECK_ALL: _Array_ptr z = sus(x, y); + //CHECK_ALL: _Array_ptr z = sus(x, y); return z; } int * sus(struct general * x, struct general * y) { - //CHECK_NOALL: int * sus(struct general *x, _Ptr y) { - //CHECK_ALL: _Array_ptr sus(struct general *x, _Ptr y) { + //CHECK_NOALL: int * sus(struct general * x, _Ptr y) { + //CHECK_ALL: _Array_ptr sus(struct general * x, _Ptr y) { x = (struct general *) 5; //CHECK: x = (struct general *) 5; int *z = calloc(5, sizeof(int)); //CHECK_NOALL: int *z = calloc(5, sizeof(int)); - //CHECK_ALL: _Array_ptr z : count(5) = calloc(5, sizeof(int)); + //CHECK_ALL: _Array_ptr z : count(5) = calloc(5, sizeof(int)); struct general *p = y; - //CHECK: _Ptr p = y; + //CHECK: _Ptr p = y; int i; for(i = 0; i < 5; p = p->next, i++) { //CHECK_NOALL: for(i = 0; i < 5; p = p->next, i++) { diff --git a/clang/test/CheckedCRewriter/arrstructsafe.c b/clang/test/CheckedCRewriter/arrstructsafe.c index 050c37377b16..bb11c47944c6 100644 --- a/clang/test/CheckedCRewriter/arrstructsafe.c +++ b/clang/test/CheckedCRewriter/arrstructsafe.c @@ -102,15 +102,15 @@ int *mul2(int *x) { } int * sus(struct general * x, struct general * y) { - //CHECK_NOALL: int * sus(struct general *x, _Ptr y) { - //CHECK_ALL: _Array_ptr sus(struct general *x, _Ptr y) { + //CHECK_NOALL: int * sus(struct general * x, _Ptr y) { + //CHECK_ALL: _Array_ptr sus(struct general * x, _Ptr y) { x = (struct general *) 5; //CHECK: x = (struct general *) 5; int *z = calloc(5, sizeof(int)); //CHECK_NOALL: int *z = calloc(5, sizeof(int)); - //CHECK_ALL: _Array_ptr z : count(5) = calloc(5, sizeof(int)); + //CHECK_ALL: _Array_ptr z : count(5) = calloc(5, sizeof(int)); struct general *p = y; - //CHECK: _Ptr p = y; + //CHECK: _Ptr p = y; int i; for(i = 0; i < 5; p = p->next, i++) { //CHECK_NOALL: for(i = 0; i < 5; p = p->next, i++) { @@ -126,10 +126,10 @@ int * foo() { struct general * x = malloc(sizeof(struct general)); //CHECK: struct general * x = malloc(sizeof(struct general)); struct general * y = malloc(sizeof(struct general)); - //CHECK: _Ptr y = malloc(sizeof(struct general)); + //CHECK: _Ptr y = malloc(sizeof(struct general)); struct general *curr = y; - //CHECK: _Ptr curr = y; + //CHECK: _Ptr curr = y; int i; for(i = 1; i < 5; i++, curr = curr->next) { curr->data = i; @@ -138,7 +138,7 @@ int * foo() { } int * z = sus(x, y); //CHECK_NOALL: int * z = sus(x, y); - //CHECK_ALL: _Array_ptr z = sus(x, y); + //CHECK_ALL: _Array_ptr z = sus(x, y); return z; } int * bar() { @@ -147,10 +147,10 @@ int * bar() { struct general * x = malloc(sizeof(struct general)); //CHECK: struct general * x = malloc(sizeof(struct general)); struct general * y = malloc(sizeof(struct general)); - //CHECK: _Ptr y = malloc(sizeof(struct general)); + //CHECK: _Ptr y = malloc(sizeof(struct general)); struct general *curr = y; - //CHECK: _Ptr curr = y; + //CHECK: _Ptr curr = y; int i; for(i = 1; i < 5; i++, curr = curr->next) { curr->data = i; @@ -159,5 +159,5 @@ int * bar() { } int * z = sus(x, y); //CHECK_NOALL: int * z = sus(x, y); - //CHECK_ALL: _Array_ptr z = sus(x, y); + //CHECK_ALL: _Array_ptr z = sus(x, y); return z; } diff --git a/clang/test/CheckedCRewriter/arrstructsafemulti1.c b/clang/test/CheckedCRewriter/arrstructsafemulti1.c index b71304f14fb9..bf4ce551e1f0 100644 --- a/clang/test/CheckedCRewriter/arrstructsafemulti1.c +++ b/clang/test/CheckedCRewriter/arrstructsafemulti1.c @@ -119,10 +119,10 @@ int * foo() { struct general * x = malloc(sizeof(struct general)); //CHECK: struct general * x = malloc(sizeof(struct general)); struct general * y = malloc(sizeof(struct general)); - //CHECK: _Ptr y = malloc(sizeof(struct general)); + //CHECK: _Ptr y = malloc(sizeof(struct general)); struct general *curr = y; - //CHECK: _Ptr curr = y; + //CHECK: _Ptr curr = y; int i; for(i = 1; i < 5; i++, curr = curr->next) { curr->data = i; @@ -131,7 +131,7 @@ int * foo() { } int * z = sus(x, y); //CHECK_NOALL: int * z = sus(x, y); - //CHECK_ALL: _Array_ptr z = sus(x, y); + //CHECK_ALL: _Array_ptr z = sus(x, y); return z; } int * bar() { @@ -140,10 +140,10 @@ int * bar() { struct general * x = malloc(sizeof(struct general)); //CHECK: struct general * x = malloc(sizeof(struct general)); struct general * y = malloc(sizeof(struct general)); - //CHECK: _Ptr y = malloc(sizeof(struct general)); + //CHECK: _Ptr y = malloc(sizeof(struct general)); struct general *curr = y; - //CHECK: _Ptr curr = y; + //CHECK: _Ptr curr = y; int i; for(i = 1; i < 5; i++, curr = curr->next) { curr->data = i; @@ -152,5 +152,5 @@ int * bar() { } int * z = sus(x, y); //CHECK_NOALL: int * z = sus(x, y); - //CHECK_ALL: _Array_ptr z = sus(x, y); + //CHECK_ALL: _Array_ptr z = sus(x, y); return z; } diff --git a/clang/test/CheckedCRewriter/arrstructsafemulti2.c b/clang/test/CheckedCRewriter/arrstructsafemulti2.c index b382854eeec6..23c8ac46433e 100644 --- a/clang/test/CheckedCRewriter/arrstructsafemulti2.c +++ b/clang/test/CheckedCRewriter/arrstructsafemulti2.c @@ -110,15 +110,15 @@ int *mul2(int *x) { } int * sus(struct general * x, struct general * y) { - //CHECK_NOALL: int * sus(struct general *x, _Ptr y) { - //CHECK_ALL: _Array_ptr sus(struct general *x, _Ptr y) { + //CHECK_NOALL: int * sus(struct general * x, _Ptr y) { + //CHECK_ALL: _Array_ptr sus(struct general * x, _Ptr y) { x = (struct general *) 5; //CHECK: x = (struct general *) 5; int *z = calloc(5, sizeof(int)); //CHECK_NOALL: int *z = calloc(5, sizeof(int)); - //CHECK_ALL: _Array_ptr z : count(5) = calloc(5, sizeof(int)); + //CHECK_ALL: _Array_ptr z : count(5) = calloc(5, sizeof(int)); struct general *p = y; - //CHECK: _Ptr p = y; + //CHECK: _Ptr p = y; int i; for(i = 0; i < 5; p = p->next, i++) { //CHECK_NOALL: for(i = 0; i < 5; p = p->next, i++) { diff --git a/clang/test/CheckedCRewriter/b11_calleestructnp.c b/clang/test/CheckedCRewriter/b11_calleestructnp.c index 50116ec2fd44..b2424fe0c3f4 100644 --- a/clang/test/CheckedCRewriter/b11_calleestructnp.c +++ b/clang/test/CheckedCRewriter/b11_calleestructnp.c @@ -45,7 +45,7 @@ struct np *sus(struct p x, struct p y) { } struct np *foo() { - //CHECK: struct np * foo(void) { + //CHECK: struct np *foo(void) { struct p x, y; x.x = 1; x.y = 2; @@ -57,7 +57,7 @@ struct np *foo() { } struct np *bar() { - //CHECK: struct np * bar(void) { + //CHECK: struct np *bar(void) { struct p x, y; x.x = 1; x.y = 2; diff --git a/clang/test/CheckedCRewriter/b12_callerstructnp.c b/clang/test/CheckedCRewriter/b12_callerstructnp.c index cf53159dd583..e5e81ba159b9 100644 --- a/clang/test/CheckedCRewriter/b12_callerstructnp.c +++ b/clang/test/CheckedCRewriter/b12_callerstructnp.c @@ -47,20 +47,20 @@ struct np *sus(struct p x, struct p y) { struct np *foo() { //CHECK_NOALL: _Ptr foo(void) { - //CHECK_ALL: struct np * foo(void) { + //CHECK_ALL: struct np *foo(void) { struct p x, y; x.x = 1; x.y = 2; y.x = 3; y.y = 4; struct np *z = sus(x, y); - //CHECK_NOALL: _Ptr z = sus(x, y); + //CHECK_NOALL: _Ptr z = sus(x, y); //CHECK_ALL: struct np *z = sus(x, y); return z; } struct np *bar() { - //CHECK: struct np * bar(void) { + //CHECK: struct np *bar(void) { struct p x, y; x.x = 1; x.y = 2; diff --git a/clang/test/CheckedCRewriter/b15_calleepointerstruct.c b/clang/test/CheckedCRewriter/b15_calleepointerstruct.c index 007e5fe186f1..210158dffbb0 100644 --- a/clang/test/CheckedCRewriter/b15_calleepointerstruct.c +++ b/clang/test/CheckedCRewriter/b15_calleepointerstruct.c @@ -35,7 +35,7 @@ struct r { struct p *sus(struct p *x, struct p *y) { - //CHECK: struct p * sus(_Ptr x, _Ptr y) { + //CHECK: struct p *sus(_Ptr x, _Ptr y) { x->y += 1; struct p *z = malloc(sizeof(struct p)); //CHECK: struct p *z = malloc(sizeof(struct p)); @@ -44,7 +44,7 @@ struct p *sus(struct p *x, struct p *y) { } struct p *foo() { - //CHECK: struct p * foo(void) { + //CHECK: struct p *foo(void) { int ex1 = 2, ex2 = 3; struct p *x; //CHECK: _Ptr x = ((void *)0); @@ -60,7 +60,7 @@ struct p *foo() { } struct p *bar() { - //CHECK: struct p * bar(void) { + //CHECK: struct p *bar(void) { int ex1 = 2, ex2 = 3; struct p *x; //CHECK: _Ptr x = ((void *)0); diff --git a/clang/test/CheckedCRewriter/b16_callerpointerstruct.c b/clang/test/CheckedCRewriter/b16_callerpointerstruct.c index 9bcc86b401f0..9f637e14f6f3 100644 --- a/clang/test/CheckedCRewriter/b16_callerpointerstruct.c +++ b/clang/test/CheckedCRewriter/b16_callerpointerstruct.c @@ -36,17 +36,17 @@ struct r { struct p *sus(struct p *x, struct p *y) { //CHECK_NOALL: struct p *sus(_Ptr x, _Ptr y) : itype(_Ptr) { - //CHECK_ALL: struct p * sus(_Ptr x, _Ptr y) { + //CHECK_ALL: struct p *sus(_Ptr x, _Ptr y) { x->y += 1; struct p *z = malloc(sizeof(struct p)); - //CHECK_NOALL: _Ptr z = malloc(sizeof(struct p)); + //CHECK_NOALL: _Ptr z = malloc(sizeof(struct p)); //CHECK_ALL: struct p *z = malloc(sizeof(struct p)); return z; } struct p *foo() { //CHECK_NOALL: _Ptr foo(void) { - //CHECK_ALL: struct p * foo(void) { + //CHECK_ALL: struct p *foo(void) { int ex1 = 2, ex2 = 3; struct p *x; //CHECK: _Ptr x = ((void *)0); @@ -57,13 +57,13 @@ struct p *foo() { x->y = &ex2; y->y = &ex1; struct p *z = (struct p *) sus(x, y); - //CHECK_NOALL: _Ptr z = (_Ptr) sus(x, y); + //CHECK_NOALL: _Ptr z = (_Ptr) sus(x, y); //CHECK_ALL: struct p *z = (struct p *) sus(x, y); return z; } struct p *bar() { - //CHECK: struct p * bar(void) { + //CHECK: struct p *bar(void) { int ex1 = 2, ex2 = 3; struct p *x; //CHECK: _Ptr x = ((void *)0); diff --git a/clang/test/CheckedCRewriter/b17_bothstructnp.c b/clang/test/CheckedCRewriter/b17_bothstructnp.c index 707e48ca1ae5..83c33d0447a0 100644 --- a/clang/test/CheckedCRewriter/b17_bothstructnp.c +++ b/clang/test/CheckedCRewriter/b17_bothstructnp.c @@ -45,7 +45,7 @@ struct np *sus(struct p x, struct p y) { } struct np *foo() { - //CHECK: struct np * foo(void) { + //CHECK: struct np *foo(void) { struct p x, y; x.x = 1; x.y = 2; @@ -57,7 +57,7 @@ struct np *foo() { } struct np *bar() { - //CHECK: struct np * bar(void) { + //CHECK: struct np *bar(void) { struct p x, y; x.x = 1; x.y = 2; diff --git a/clang/test/CheckedCRewriter/b19_bothpointerstruct.c b/clang/test/CheckedCRewriter/b19_bothpointerstruct.c index b8052fa3ede6..aed78fe8918f 100644 --- a/clang/test/CheckedCRewriter/b19_bothpointerstruct.c +++ b/clang/test/CheckedCRewriter/b19_bothpointerstruct.c @@ -35,7 +35,7 @@ struct r { struct p *sus(struct p *x, struct p *y) { - //CHECK: struct p * sus(_Ptr x, _Ptr y) { + //CHECK: struct p *sus(_Ptr x, _Ptr y) { x->y += 1; struct p *z = malloc(sizeof(struct p)); //CHECK: struct p *z = malloc(sizeof(struct p)); @@ -44,7 +44,7 @@ struct p *sus(struct p *x, struct p *y) { } struct p *foo() { - //CHECK: struct p * foo(void) { + //CHECK: struct p *foo(void) { int ex1 = 2, ex2 = 3; struct p *x; //CHECK: _Ptr x = ((void *)0); @@ -60,7 +60,7 @@ struct p *foo() { } struct p *bar() { - //CHECK: struct p * bar(void) { + //CHECK: struct p *bar(void) { int ex1 = 2, ex2 = 3; struct p *x; //CHECK: _Ptr x = ((void *)0); diff --git a/clang/test/CheckedCRewriter/b21_calleepointerstructproto.c b/clang/test/CheckedCRewriter/b21_calleepointerstructproto.c index ec7f447dd8b1..ea1f2d34e46c 100644 --- a/clang/test/CheckedCRewriter/b21_calleepointerstructproto.c +++ b/clang/test/CheckedCRewriter/b21_calleepointerstructproto.c @@ -35,10 +35,10 @@ struct r { struct p *sus(struct p *, struct p *); - //CHECK: struct p * sus(_Ptr x, _Ptr y); + //CHECK: struct p *sus(_Ptr x, _Ptr y); struct p *foo() { - //CHECK: struct p * foo(void) { + //CHECK: struct p *foo(void) { int ex1 = 2, ex2 = 3; struct p *x; //CHECK: _Ptr x = ((void *)0); @@ -54,7 +54,7 @@ struct p *foo() { } struct p *bar() { - //CHECK: struct p * bar(void) { + //CHECK: struct p *bar(void) { int ex1 = 2, ex2 = 3; struct p *x; //CHECK: _Ptr x = ((void *)0); @@ -70,7 +70,7 @@ struct p *bar() { } struct p *sus(struct p *x, struct p *y) { - //CHECK: struct p * sus(_Ptr x, _Ptr y) { + //CHECK: struct p *sus(_Ptr x, _Ptr y) { x->y += 1; struct p *z = malloc(sizeof(struct p)); //CHECK: struct p *z = malloc(sizeof(struct p)); diff --git a/clang/test/CheckedCRewriter/b22_callerpointerstructproto.c b/clang/test/CheckedCRewriter/b22_callerpointerstructproto.c index 821ae2fe0097..cbd6affcee9e 100644 --- a/clang/test/CheckedCRewriter/b22_callerpointerstructproto.c +++ b/clang/test/CheckedCRewriter/b22_callerpointerstructproto.c @@ -36,11 +36,11 @@ struct r { struct p *sus(struct p *, struct p *); //CHECK_NOALL: struct p *sus(_Ptr x, _Ptr y) : itype(_Ptr); - //CHECK_ALL: struct p * sus(_Ptr x, _Ptr y); + //CHECK_ALL: struct p *sus(_Ptr x, _Ptr y); struct p *foo() { //CHECK_NOALL: _Ptr foo(void) { - //CHECK_ALL: struct p * foo(void) { + //CHECK_ALL: struct p *foo(void) { int ex1 = 2, ex2 = 3; struct p *x; //CHECK: _Ptr x = ((void *)0); @@ -51,13 +51,13 @@ struct p *foo() { x->y = &ex2; y->y = &ex1; struct p *z = (struct p *) sus(x, y); - //CHECK_NOALL: _Ptr z = (_Ptr) sus(x, y); + //CHECK_NOALL: _Ptr z = (_Ptr) sus(x, y); //CHECK_ALL: struct p *z = (struct p *) sus(x, y); return z; } struct p *bar() { - //CHECK: struct p * bar(void) { + //CHECK: struct p *bar(void) { int ex1 = 2, ex2 = 3; struct p *x; //CHECK: _Ptr x = ((void *)0); @@ -75,7 +75,7 @@ struct p *bar() { struct p *sus(struct p *x, struct p *y) { //CHECK_NOALL: struct p *sus(_Ptr x, _Ptr y) : itype(_Ptr) { - //CHECK_ALL: struct p * sus(_Ptr x, _Ptr y) { + //CHECK_ALL: struct p *sus(_Ptr x, _Ptr y) { x->y += 1; struct p *z = malloc(sizeof(struct p)); //CHECK_NOALL: _Ptr z = malloc(sizeof(struct p)); diff --git a/clang/test/CheckedCRewriter/b23_explicitunsafecast.c b/clang/test/CheckedCRewriter/b23_explicitunsafecast.c index 9790fdf613a6..b1715923dcc0 100644 --- a/clang/test/CheckedCRewriter/b23_explicitunsafecast.c +++ b/clang/test/CheckedCRewriter/b23_explicitunsafecast.c @@ -38,7 +38,7 @@ int* foo() { } char* bar() { - //CHECK: char * bar(void) { + //CHECK: char* bar(void) { int sx = 3, sy = 4; int *x = &sx; //CHECK: int *x = &sx; diff --git a/clang/test/CheckedCRewriter/b23_retswitchexplicit.c b/clang/test/CheckedCRewriter/b23_retswitchexplicit.c index 7e4b115be981..d9f4d6f9470c 100644 --- a/clang/test/CheckedCRewriter/b23_retswitchexplicit.c +++ b/clang/test/CheckedCRewriter/b23_retswitchexplicit.c @@ -14,8 +14,8 @@ extern int printf(const char * restrict format : itype(restrict _Nt_array_ptr)); char *sus(int *x, int*y) { - //CHECK_NOALL: char * sus(int *x, _Ptr y) { - //CHECK_ALL: char * sus(int *x : itype(_Array_ptr), _Ptr y) { + //CHECK_NOALL: char *sus(int *x, _Ptr y) { + //CHECK_ALL: char *sus(int *x : itype(_Array_ptr), _Ptr y) { int *z = malloc(sizeof(int)); //CHECK: int *z = malloc(sizeof(int)); *z = 1; @@ -25,7 +25,7 @@ char *sus(int *x, int*y) { } char* foo() { - //CHECK: char * foo(void) { + //CHECK: char* foo(void) { int sx = 3, sy = 4; int *x = &sx; //CHECK: int *x = &sx; @@ -38,7 +38,7 @@ char* foo() { } int* bar() { - //CHECK: int * bar(void) { + //CHECK: int* bar(void) { int sx = 3, sy = 4; int *x = &sx; //CHECK: int *x = &sx; diff --git a/clang/test/CheckedCRewriter/b24_implicitunsafecast.c b/clang/test/CheckedCRewriter/b24_implicitunsafecast.c index 0b5de26b4386..7ac4f03d7d68 100644 --- a/clang/test/CheckedCRewriter/b24_implicitunsafecast.c +++ b/clang/test/CheckedCRewriter/b24_implicitunsafecast.c @@ -38,7 +38,7 @@ int* foo() { } char* bar() { - //CHECK: char * bar(void) { + //CHECK: char* bar(void) { int sx = 3, sy = 4; int *x = &sx; //CHECK: int *x = &sx; diff --git a/clang/test/CheckedCRewriter/b24_retswitchimplicit.c b/clang/test/CheckedCRewriter/b24_retswitchimplicit.c index a2fe9e7da2d6..07fe45485b7c 100644 --- a/clang/test/CheckedCRewriter/b24_retswitchimplicit.c +++ b/clang/test/CheckedCRewriter/b24_retswitchimplicit.c @@ -25,7 +25,7 @@ char *sus(int *x, int*y) { } char* foo() { - //CHECK: char * foo(void) { + //CHECK: char* foo(void) { int sx = 3, sy = 4; int *x = &sx; //CHECK: int *x = &sx; @@ -38,7 +38,7 @@ char* foo() { } int* bar() { - //CHECK: int * bar(void) { + //CHECK: int* bar(void) { int sx = 3, sy = 4; int *x = &sx; //CHECK: int *x = &sx; @@ -47,4 +47,4 @@ int* bar() { int *z = sus(x, y); //CHECK: int *z = sus(x, y); return z; -} \ No newline at end of file +} diff --git a/clang/test/CheckedCRewriter/b26_castprotounsafe.c b/clang/test/CheckedCRewriter/b26_castprotounsafe.c index d42cf67d511f..6ba37ed82d56 100644 --- a/clang/test/CheckedCRewriter/b26_castprotounsafe.c +++ b/clang/test/CheckedCRewriter/b26_castprotounsafe.c @@ -31,7 +31,7 @@ int* foo() { } char* bar() { - //CHECK: char * bar(void) { + //CHECK: char* bar(void) { int sx = 3, sy = 4; int *x = &sx; //CHECK: int *x = &sx; diff --git a/clang/test/CheckedCRewriter/b26_castprotounsafeimplicit.c b/clang/test/CheckedCRewriter/b26_castprotounsafeimplicit.c index e7dbab9e71e6..c5230140b8fc 100644 --- a/clang/test/CheckedCRewriter/b26_castprotounsafeimplicit.c +++ b/clang/test/CheckedCRewriter/b26_castprotounsafeimplicit.c @@ -31,7 +31,7 @@ int* foo() { } char* bar() { - //CHECK: char * bar(void) { + //CHECK: char* bar(void) { int sx = 3, sy = 4; int *x = &sx; //CHECK: int *x = &sx; diff --git a/clang/test/CheckedCRewriter/b26_castprotounsafeimplicitretswitch.c b/clang/test/CheckedCRewriter/b26_castprotounsafeimplicitretswitch.c index c40c8d2c367b..e283bd74e056 100644 --- a/clang/test/CheckedCRewriter/b26_castprotounsafeimplicitretswitch.c +++ b/clang/test/CheckedCRewriter/b26_castprotounsafeimplicitretswitch.c @@ -18,7 +18,7 @@ char *sus(int *, int *); //CHECK_ALL: char *sus(int *x : itype(_Array_ptr), _Ptr y) : itype(_Ptr); char* foo() { - //CHECK: char * foo(void) { + //CHECK: char* foo(void) { int sx = 3, sy = 4; int *x = &sx; //CHECK: int *x = &sx; @@ -31,7 +31,7 @@ char* foo() { } int* bar() { - //CHECK: int * bar(void) { + //CHECK: int* bar(void) { int sx = 3, sy = 4; int *x = &sx; //CHECK: int *x = &sx; @@ -51,4 +51,4 @@ char *sus(int *x, int*y) { x++; *x = 2; return z; -} \ No newline at end of file +} diff --git a/clang/test/CheckedCRewriter/b28_structcastexplicit.c b/clang/test/CheckedCRewriter/b28_structcastexplicit.c index 3fd3052b9d75..7a0a62f87e7f 100644 --- a/clang/test/CheckedCRewriter/b28_structcastexplicit.c +++ b/clang/test/CheckedCRewriter/b28_structcastexplicit.c @@ -52,12 +52,12 @@ struct r *foo() { x.next = &y; y.next = &x; struct r *z = (struct r *) sus(x, y); - //CHECK: _Ptr z = (_Ptr) sus(x, y); + //CHECK: _Ptr z = (_Ptr) sus(x, y); return z; } struct np *bar() { - //CHECK: struct np * bar(void) { + //CHECK: struct np *bar(void) { struct r x, y; x.data = 2; y.data = 1; diff --git a/clang/test/CheckedCRewriter/b28_structcastimplicit.c b/clang/test/CheckedCRewriter/b28_structcastimplicit.c index 9ac51790c169..403edac4fd22 100644 --- a/clang/test/CheckedCRewriter/b28_structcastimplicit.c +++ b/clang/test/CheckedCRewriter/b28_structcastimplicit.c @@ -52,12 +52,12 @@ struct r *foo() { x.next = &y; y.next = &x; struct r *z = (struct r *) sus(x, y); - //CHECK: _Ptr z = (_Ptr) sus(x, y); + //CHECK: _Ptr z = (_Ptr) sus(x, y); return z; } struct np *bar() { - //CHECK: struct np * bar(void) { + //CHECK: struct np *bar(void) { struct r x, y; x.data = 2; y.data = 1; diff --git a/clang/test/CheckedCRewriter/b29_structprotocastsafeuseunsafe.c b/clang/test/CheckedCRewriter/b29_structprotocastsafeuseunsafe.c index 9acae2430b46..4dec7df93b17 100644 --- a/clang/test/CheckedCRewriter/b29_structprotocastsafeuseunsafe.c +++ b/clang/test/CheckedCRewriter/b29_structprotocastsafeuseunsafe.c @@ -36,11 +36,11 @@ struct r { struct r *sus(struct r *, struct r *); //CHECK_NOALL: struct r *sus(struct r *x : itype(_Ptr), struct r *y : itype(_Ptr)) : itype(_Ptr); - //CHECK_ALL: struct r * sus(struct r *x : itype(_Ptr), struct r *y : itype(_Ptr)); + //CHECK_ALL: struct r *sus(struct r *x : itype(_Ptr), struct r *y : itype(_Ptr)); struct r *foo() { //CHECK_NOALL: _Ptr foo(void) { - //CHECK_ALL: struct r * foo(void) { + //CHECK_ALL: struct r *foo(void) { struct r *x; //CHECK: struct r *x; struct r *y; @@ -50,13 +50,13 @@ struct r *foo() { x->next = &y; y->next = &x; struct r *z = (struct r *) sus(x, y); - //CHECK_NOALL: _Ptr z = (_Ptr) sus(x, y); + //CHECK_NOALL: _Ptr z = (_Ptr) sus(x, y); //CHECK_ALL: struct r *z = (struct r *) sus(x, y); return z; } struct r *bar() { - //CHECK: struct r * bar(void) { + //CHECK: struct r *bar(void) { struct r *x; //CHECK: struct r *x; struct r *y; @@ -73,7 +73,7 @@ struct r *bar() { struct r *sus(struct r *x, struct r *y) { //CHECK_NOALL: struct r *sus(struct r *x : itype(_Ptr), struct r *y : itype(_Ptr)) : itype(_Ptr) { - //CHECK_ALL: struct r * sus(struct r *x : itype(_Ptr), struct r *y : itype(_Ptr)) { + //CHECK_ALL: struct r *sus(struct r *x : itype(_Ptr), struct r *y : itype(_Ptr)) { x->next += 1; struct r *z = malloc(sizeof(struct r)); //CHECK_NOALL: _Ptr z = malloc(sizeof(struct r)); diff --git a/clang/test/CheckedCRewriter/b2_calleeunsafe.c b/clang/test/CheckedCRewriter/b2_calleeunsafe.c index 03e21cbb30bb..22ae28c7c095 100644 --- a/clang/test/CheckedCRewriter/b2_calleeunsafe.c +++ b/clang/test/CheckedCRewriter/b2_calleeunsafe.c @@ -14,8 +14,8 @@ extern int printf(const char * restrict format : itype(restrict _Nt_array_ptr)); int *sus(int *x, int*y) { - //CHECK_NOALL: int * sus(int *x, _Ptr y) { - //CHECK_ALL: int * sus(int *x : itype(_Array_ptr), _Ptr y) { + //CHECK_NOALL: int *sus(int *x, _Ptr y) { + //CHECK_ALL: int *sus(int *x : itype(_Array_ptr), _Ptr y) { int *z = malloc(sizeof(int)); //CHECK: int *z = malloc(sizeof(int)); *z = 1; @@ -26,7 +26,7 @@ int *sus(int *x, int*y) { } int* foo() { - //CHECK: int * foo(void) { + //CHECK: int* foo(void) { int sx = 3, sy = 4; int *x = &sx; //CHECK: int *x = &sx; @@ -39,7 +39,7 @@ int* foo() { } int* bar() { - //CHECK: int * bar(void) { + //CHECK: int* bar(void) { int sx = 3, sy = 4; int *x = &sx; //CHECK: int *x = &sx; diff --git a/clang/test/CheckedCRewriter/b30_structprotocastexplicitunsafeuseunsafe.c b/clang/test/CheckedCRewriter/b30_structprotocastexplicitunsafeuseunsafe.c index 732a30a42164..e57753793832 100644 --- a/clang/test/CheckedCRewriter/b30_structprotocastexplicitunsafeuseunsafe.c +++ b/clang/test/CheckedCRewriter/b30_structprotocastexplicitunsafeuseunsafe.c @@ -53,7 +53,7 @@ struct r *foo() { } struct np *bar() { - //CHECK: struct np * bar(void) { + //CHECK: struct np *bar(void) { struct r *x; //CHECK: struct r *x; struct r *y; diff --git a/clang/test/CheckedCRewriter/b30_structprotocastimplicitunsafeuseunsafe.c b/clang/test/CheckedCRewriter/b30_structprotocastimplicitunsafeuseunsafe.c index dbb2e4db598a..e258edbd2091 100644 --- a/clang/test/CheckedCRewriter/b30_structprotocastimplicitunsafeuseunsafe.c +++ b/clang/test/CheckedCRewriter/b30_structprotocastimplicitunsafeuseunsafe.c @@ -36,11 +36,11 @@ struct r { struct r *sus(struct r *, struct r *); //CHECK_NOALL: struct r *sus(struct r *x : itype(_Ptr), struct r *y : itype(_Ptr)) : itype(_Ptr); - //CHECK_ALL: struct r * sus(struct r *x : itype(_Ptr), struct r *y : itype(_Ptr)); + //CHECK_ALL: struct r *sus(struct r *x : itype(_Ptr), struct r *y : itype(_Ptr)); struct r *foo() { //CHECK_NOALL: _Ptr foo(void) { - //CHECK_ALL: struct r * foo(void) { + //CHECK_ALL: struct r *foo(void) { struct r *x; //CHECK: struct r *x; struct r *y; @@ -50,13 +50,13 @@ struct r *foo() { x->next = &y; y->next = &x; struct r *z = (struct r *) sus(x, y); - //CHECK_NOALL: _Ptr z = (_Ptr) sus(x, y); + //CHECK_NOALL: _Ptr z = (_Ptr) sus(x, y); //CHECK_ALL: struct r *z = (struct r *) sus(x, y); return z; } struct np *bar() { - //CHECK: struct np * bar(void) { + //CHECK: struct np *bar(void) { struct r *x; //CHECK: struct r *x; struct r *y; @@ -73,7 +73,7 @@ struct np *bar() { struct r *sus(struct r *x, struct r *y) { //CHECK_NOALL: struct r *sus(struct r *x : itype(_Ptr), struct r *y : itype(_Ptr)) : itype(_Ptr) { - //CHECK_ALL: struct r * sus(struct r *x : itype(_Ptr), struct r *y : itype(_Ptr)) { + //CHECK_ALL: struct r *sus(struct r *x : itype(_Ptr), struct r *y : itype(_Ptr)) { x->next += 1; struct r *z = malloc(sizeof(struct r)); //CHECK_NOALL: _Ptr z = malloc(sizeof(struct r)); diff --git a/clang/test/CheckedCRewriter/b30_structprotocastunsafeexplicit.c b/clang/test/CheckedCRewriter/b30_structprotocastunsafeexplicit.c index a9bdddbefb27..c04ffd57bf13 100644 --- a/clang/test/CheckedCRewriter/b30_structprotocastunsafeexplicit.c +++ b/clang/test/CheckedCRewriter/b30_structprotocastunsafeexplicit.c @@ -48,12 +48,12 @@ struct r *foo() { x->next = &y; y->next = &x; struct r *z = (struct r *) sus(x, y); - //CHECK: _Ptr z = (_Ptr) sus(x, y); + //CHECK: _Ptr z = (_Ptr) sus(x, y); return z; } struct np *bar() { - //CHECK: struct np * bar(void) { + //CHECK: struct np *bar(void) { struct r *x; //CHECK: struct r *x; struct r *y; diff --git a/clang/test/CheckedCRewriter/b30_structprotocastunsafeimplicit.c b/clang/test/CheckedCRewriter/b30_structprotocastunsafeimplicit.c index 0b2e1b44c326..ad327acdb552 100644 --- a/clang/test/CheckedCRewriter/b30_structprotocastunsafeimplicit.c +++ b/clang/test/CheckedCRewriter/b30_structprotocastunsafeimplicit.c @@ -48,12 +48,12 @@ struct r *foo() { x->next = &y; y->next = &x; struct r *z = (struct r *) sus(x, y); - //CHECK: _Ptr z = (_Ptr) sus(x, y); + //CHECK: _Ptr z = (_Ptr) sus(x, y); return z; } struct np *bar() { - //CHECK: struct np * bar(void) { + //CHECK: struct np *bar(void) { struct r *x; //CHECK: struct r *x; struct r *y; diff --git a/clang/test/CheckedCRewriter/b30_structprotocastunsafeimplicitretswitch.c b/clang/test/CheckedCRewriter/b30_structprotocastunsafeimplicitretswitch.c index 0513851574d6..d518990a8f50 100644 --- a/clang/test/CheckedCRewriter/b30_structprotocastunsafeimplicitretswitch.c +++ b/clang/test/CheckedCRewriter/b30_structprotocastunsafeimplicitretswitch.c @@ -38,7 +38,7 @@ struct np *sus(struct r *, struct r *); //CHECK: struct np *sus(struct r *x : itype(_Ptr), struct r *y : itype(_Ptr)) : itype(_Ptr); struct np *foo() { - //CHECK: struct np * foo(void) { + //CHECK: struct np *foo(void) { struct r *x; //CHECK: struct r *x; struct r *y; @@ -53,7 +53,7 @@ struct np *foo() { } struct r *bar() { - //CHECK: struct r * bar(void) { + //CHECK: struct r *bar(void) { struct r *x; //CHECK: struct r *x; struct r *y; diff --git a/clang/test/CheckedCRewriter/b30_structprotoconflict.c b/clang/test/CheckedCRewriter/b30_structprotoconflict.c index e822955c3dcc..439bd28c85c0 100644 --- a/clang/test/CheckedCRewriter/b30_structprotoconflict.c +++ b/clang/test/CheckedCRewriter/b30_structprotoconflict.c @@ -39,7 +39,7 @@ struct r *sus(struct r *, struct r *); //CHECK: struct r *sus(_Ptr x, _Ptr y) : itype(_Ptr); struct np *foo() { - //CHECK: struct np * foo(void) { + //CHECK: struct np *foo(void) { struct r x, y; x.data = 2; y.data = 1; diff --git a/clang/test/CheckedCRewriter/b30_structprotoconflictbodyconvert.c b/clang/test/CheckedCRewriter/b30_structprotoconflictbodyconvert.c index 4adb443f5d18..1c7eeee54c6a 100644 --- a/clang/test/CheckedCRewriter/b30_structprotoconflictbodyconvert.c +++ b/clang/test/CheckedCRewriter/b30_structprotoconflictbodyconvert.c @@ -41,7 +41,7 @@ struct np *sus(struct r *, struct r *); //CHECK_ALL: struct np *sus(_Ptr x, _Ptr y) : itype(_Ptr); struct r *foo() { - //CHECK: struct r * foo(void) { + //CHECK: struct r *foo(void) { struct r *x; //CHECK_NOALL: struct r *x; //CHECK_ALL: _Array_ptr x = ((void *)0); diff --git a/clang/test/CheckedCRewriter/b3_onecallerunsafe.c b/clang/test/CheckedCRewriter/b3_onecallerunsafe.c index 89c80636b7fe..c5b5b16e3c48 100644 --- a/clang/test/CheckedCRewriter/b3_onecallerunsafe.c +++ b/clang/test/CheckedCRewriter/b3_onecallerunsafe.c @@ -16,7 +16,7 @@ extern _Unchecked char *strcpy(char * restrict dest, const char * restrict src : int *sus(int *x, int*y) { //CHECK_NOALL: int *sus(int *x, _Ptr y) : itype(_Ptr) { - //CHECK_ALL: int * sus(int *x : itype(_Array_ptr), _Ptr y) { + //CHECK_ALL: int *sus(int *x : itype(_Array_ptr), _Ptr y) { int *z = malloc(sizeof(int)); //CHECK_NOALL: _Ptr z = malloc(sizeof(int)); //CHECK_ALL: int *z = malloc(sizeof(int)); @@ -28,7 +28,7 @@ int *sus(int *x, int*y) { int* foo() { //CHECK_NOALL: _Ptr foo(void) { - //CHECK_ALL: int * foo(void) { + //CHECK_ALL: int* foo(void) { int sx = 3; int sy = 4; int *x = &sx; @@ -43,7 +43,7 @@ int* foo() { } int* bar() { - //CHECK: int * bar(void) { + //CHECK: int* bar(void) { int sx = 3; int sy = 4; int *x = &sx; diff --git a/clang/test/CheckedCRewriter/b4_bothunsafe.c b/clang/test/CheckedCRewriter/b4_bothunsafe.c index 1c0de6d1535e..c696bc5f59d7 100644 --- a/clang/test/CheckedCRewriter/b4_bothunsafe.c +++ b/clang/test/CheckedCRewriter/b4_bothunsafe.c @@ -14,8 +14,8 @@ extern int printf(const char * restrict format : itype(restrict _Nt_array_ptr)); int *sus(int *x, int*y) { - //CHECK_NOALL: int * sus(int *x, _Ptr y) { - //CHECK_ALL: int * sus(int *x : itype(_Array_ptr), _Ptr y) { + //CHECK_NOALL: int *sus(int *x, _Ptr y) { + //CHECK_ALL: int *sus(int *x : itype(_Array_ptr), _Ptr y) { int *z = malloc(sizeof(int)); //CHECK: int *z = malloc(sizeof(int)); *z = 1; @@ -26,7 +26,7 @@ int *sus(int *x, int*y) { } int* foo() { - //CHECK: int * foo(void) { + //CHECK: int* foo(void) { int sx = 3, sy = 4; int *x = &sx; //CHECK: int *x = &sx; @@ -39,7 +39,7 @@ int* foo() { } int* bar() { - //CHECK: int * bar(void) { + //CHECK: int* bar(void) { int sx = 3, sy = 4; int *x = &sx; //CHECK: int *x = &sx; diff --git a/clang/test/CheckedCRewriter/b5_calleeunsafeproto.c b/clang/test/CheckedCRewriter/b5_calleeunsafeproto.c index fe7ce76ea148..6208278121b0 100644 --- a/clang/test/CheckedCRewriter/b5_calleeunsafeproto.c +++ b/clang/test/CheckedCRewriter/b5_calleeunsafeproto.c @@ -14,11 +14,11 @@ extern int printf(const char * restrict format : itype(restrict _Nt_array_ptr)); int* sus(int *, int *); - //CHECK_NOALL: int * sus(int *x, _Ptr y); - //CHECK_ALL: int * sus(int *x : itype(_Array_ptr), _Ptr y); + //CHECK_NOALL: int* sus(int *x, _Ptr y); + //CHECK_ALL: int* sus(int *x : itype(_Array_ptr), _Ptr y); int* foo() { - //CHECK: int * foo(void) { + //CHECK: int* foo(void) { int sx = 3, sy = 4; int *x = &sx; //CHECK: int *x = &sx; @@ -31,20 +31,20 @@ int* foo() { } int* bar() { - //CHECK: int * bar(void) { + //CHECK: int* bar(void) { int sx = 3, sy = 4; int *x = &sx; //CHECK: int *x = &sx; int *y = &sy; - //CHECK: _Ptr y = &sy; + //CHECK: _Ptr y = &sy; int *z = (sus(x, y)); //CHECK: int *z = (sus(x, y)); return z; } int *sus(int *x, int*y) { - //CHECK_NOALL: int * sus(int *x, _Ptr y) { - //CHECK_ALL: int * sus(int *x : itype(_Array_ptr), _Ptr y) { + //CHECK_NOALL: int *sus(int *x, _Ptr y) { + //CHECK_ALL: int *sus(int *x : itype(_Array_ptr), _Ptr y) { int *z = malloc(sizeof(int)); //CHECK: int *z = malloc(sizeof(int)); *z = 1; diff --git a/clang/test/CheckedCRewriter/b6_callerunsafeproto.c b/clang/test/CheckedCRewriter/b6_callerunsafeproto.c index aaac2027da15..c51a2d5edd68 100644 --- a/clang/test/CheckedCRewriter/b6_callerunsafeproto.c +++ b/clang/test/CheckedCRewriter/b6_callerunsafeproto.c @@ -15,11 +15,11 @@ extern _Unchecked char *strcpy(char * restrict dest, const char * restrict src : int* sus(int *, int *); //CHECK_NOALL: int *sus(int *x, _Ptr y) : itype(_Ptr); - //CHECK_ALL: int * sus(int *x : itype(_Array_ptr), _Ptr y); + //CHECK_ALL: int* sus(int *x : itype(_Array_ptr), _Ptr y); int* foo() { //CHECK_NOALL: _Ptr foo(void) { - //CHECK_ALL: int * foo(void) { + //CHECK_ALL: int* foo(void) { int sx = 3, sy = 4; int *x = &sx; //CHECK: int *x = &sx; @@ -33,7 +33,7 @@ int* foo() { } int* bar() { - //CHECK: int * bar(void) { + //CHECK: int* bar(void) { int sx = 3, sy = 4; int *x = &sx; //CHECK: int *x = &sx; @@ -47,7 +47,7 @@ int* bar() { int *sus(int *x, int*y) { //CHECK_NOALL: int *sus(int *x, _Ptr y) : itype(_Ptr) { - //CHECK_ALL: int * sus(int *x : itype(_Array_ptr), _Ptr y) { + //CHECK_ALL: int *sus(int *x : itype(_Array_ptr), _Ptr y) { int *z = malloc(sizeof(int)); //CHECK_NOALL: _Ptr z = malloc(sizeof(int)); //CHECK_ALL: int *z = malloc(sizeof(int)); diff --git a/clang/test/CheckedCRewriter/definedType.c b/clang/test/CheckedCRewriter/definedType.c new file mode 100644 index 000000000000..1e36b36dc2c4 --- /dev/null +++ b/clang/test/CheckedCRewriter/definedType.c @@ -0,0 +1,91 @@ +// RUN: cconv-standalone -addcr -alltypes %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +// RUN: cconv-standalone -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +// RUN: cconv-standalone -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +// RUN: cconv-standalone -alltypes -output-postfix=checked %s +// RUN: cconv-standalone -alltypes %S/definedType.checked.c -- | diff %S/definedType.checked.c - +// RUN: rm %S/definedType.checked.c + +#define size_t unsigned long +_Itype_for_any(T) void *malloc(size_t size) : itype(_Array_ptr) byte_count(size); + +// From issue 204 + +#define ulong unsigned long + +ulong * TOP; +// CHECK_NOALL: ulong * TOP; +// CHECK_ALL: _Array_ptr TOP = ((void *)0); +ulong channelColumns; + +void +DescribeChannel(void) +{ + ulong col; + TOP = (ulong *)malloc((channelColumns+1) * sizeof(ulong)); + // CHECK_ALL: TOP = (_Array_ptr)malloc((channelColumns+1) * sizeof(ulong)); + // CHECK_NOALL: TOP = (ulong *)malloc((channelColumns+1) * sizeof(ulong)); + TOP[col] = 0; +} + + +#define integer int +integer foo(int *p, int l) { +// CHECK_ALL: integer foo(_Array_ptr p : count(l), int l) _Checked { +// CHECK_NOALL: integer foo(int *p, int l) { + return p[l-1]; +} + +int *bar(integer p, integer i) { +// CHECK: _Ptr bar(integer p, integer i) _Checked { + return 0; +} + +// Macros containing only the base type are kept in checked pointer + +#define baz unsigned int + +baz a; +// CHECK: baz a; +baz *b; +// CHECK: _Ptr b = ((void *)0); +baz **c; +// CHECK: _Ptr<_Ptr> c = ((void *)0); +baz d[1]; +// CHECK_ALL: baz d _Checked[1]; +baz *e[1]; +// CHECK_ALL: _Ptr e _Checked[1]; +baz **f[1]; +// CHECK_ALL: _Ptr<_Ptr> f _Checked[1]; +baz (*g)[1]; +// CHECK_ALL: _Ptr g = ((void *)0); +baz h[1][1]; +// CHECK_ALL: baz h _Checked[1] _Checked[1]; + +baz *i(){ +// CHECK: _Ptr i(void)_Checked { + return 0; +} + +baz **j(){ +// CHECK: _Ptr<_Ptr> j(void)_Checked { + return 0; +} + +void k(baz x, baz *y, baz **z) {} +// COM: void k(baz x, _Ptr y, _Ptr<_Ptr> z) _Checked {} + +// Macros are inlined if there's a pointer in the macro +// This could probably be handled better in the future. + +#define buz int* + +buz l; +// CHECK: _Ptr l = ((void *)0); + +buz *m; +// CHECK: _Ptr<_Ptr> m = ((void *)0); + +// Macro should not change when wild + +buz n = (buz) 1; +// CHECK: buz n = (buz) 1; diff --git a/clang/test/CheckedCRewriter/dont_rewrite.c b/clang/test/CheckedCRewriter/dont_rewrite.c index 8c447ef096db..39f2bd64553a 100644 --- a/clang/test/CheckedCRewriter/dont_rewrite.c +++ b/clang/test/CheckedCRewriter/dont_rewrite.c @@ -16,7 +16,7 @@ _Itype_for_any(T) void vsf_sysutil_memclr(void* p_dest : itype(_Array_ptr) by int *foo( _Ptr q) { -// CHECK: _Ptr foo(_Ptr q) _Checked { +// CHECK: _Ptr foo( _Ptr q) _Checked { return q; } void bar(void) { diff --git a/clang/test/CheckedCRewriter/fn_sets.c b/clang/test/CheckedCRewriter/fn_sets.c index f2a6e382062b..5dbce4aa18dc 100644 --- a/clang/test/CheckedCRewriter/fn_sets.c +++ b/clang/test/CheckedCRewriter/fn_sets.c @@ -51,23 +51,23 @@ void foo1(int *z) { /* Testing Something with a larger set of functions */ int *a() { - //CHECK: int * a(void) _Checked { + //CHECK: int *a(void) _Checked { return 0; } int *b() { - //CHECK: int * b(void) _Checked { + //CHECK: int *b(void) _Checked { return 0; } int *c() { - //CHECK: int * c(void) _Checked { + //CHECK: int *c(void) _Checked { return 0; } int *d() { - //CHECK: int * d(void) _Checked { + //CHECK: int *d(void) _Checked { return 0; } int *e() { - //CHECK: int * e(void) { + //CHECK: int *e(void) { return (int*) 1; //CHECK: return (int*) 1; } diff --git a/clang/test/CheckedCRewriter/fptrarrboth.c b/clang/test/CheckedCRewriter/fptrarrboth.c index 4218e76a21d8..b7496e78a712 100644 --- a/clang/test/CheckedCRewriter/fptrarrboth.c +++ b/clang/test/CheckedCRewriter/fptrarrboth.c @@ -111,10 +111,10 @@ int ** sus(int *x, int *y) { //CHECK: x = (int *) 5; int **z = calloc(5, sizeof(int *)); //CHECK_NOALL: int **z = calloc(5, sizeof(int *)); - //CHECK_ALL: _Array_ptr<_Array_ptr> z : count(5) = calloc<_Array_ptr>(5, sizeof(int *)); + //CHECK_ALL: _Array_ptr<_Array_ptr> z : count(5) = calloc<_Array_ptr>(5, sizeof(int *)); int * (*mul2ptr) (int *) = mul2; - //CHECK_NOALL: _Ptr mul2ptr = mul2; - //CHECK_ALL: _Ptr<_Array_ptr (_Array_ptr )> mul2ptr = mul2; + //CHECK_NOALL: _Ptr mul2ptr = mul2; + //CHECK_ALL: _Ptr<_Array_ptr (_Array_ptr )> mul2ptr = mul2; int i; for(i = 0; i < 5; i++) { //CHECK_NOALL: for(i = 0; i < 5; i++) { @@ -133,7 +133,7 @@ int ** foo() { //CHECK: int *x = malloc(sizeof(int)); int *y = calloc(5, sizeof(int)); //CHECK_NOALL: int *y = calloc(5, sizeof(int)); - //CHECK_ALL: _Array_ptr y : count(5) = calloc(5, sizeof(int)); + //CHECK_ALL: _Array_ptr y : count(5) = calloc(5, sizeof(int)); int i; for(i = 0; i < 5; i++) { //CHECK_NOALL: for(i = 0; i < 5; i++) { @@ -142,7 +142,7 @@ int ** foo() { } int **z = sus(x, y); //CHECK_NOALL: int **z = sus(x, y); - //CHECK_ALL: _Array_ptr<_Array_ptr> z = sus(x, y); + //CHECK_ALL: _Array_ptr<_Array_ptr> z = sus(x, y); return z; } @@ -154,7 +154,7 @@ int ** bar() { //CHECK: int *x = malloc(sizeof(int)); int *y = calloc(5, sizeof(int)); //CHECK_NOALL: int *y = calloc(5, sizeof(int)); - //CHECK_ALL: _Array_ptr y : count(5) = calloc(5, sizeof(int)); + //CHECK_ALL: _Array_ptr y : count(5) = calloc(5, sizeof(int)); int i; for(i = 0; i < 5; i++) { //CHECK_NOALL: for(i = 0; i < 5; i++) { @@ -163,7 +163,7 @@ int ** bar() { } int **z = sus(x, y); //CHECK_NOALL: int **z = sus(x, y); - //CHECK_ALL: _Array_ptr<_Array_ptr> z = sus(x, y); + //CHECK_ALL: _Array_ptr<_Array_ptr> z = sus(x, y); z += 2; return z; } diff --git a/clang/test/CheckedCRewriter/fptrarrbothmulti1.c b/clang/test/CheckedCRewriter/fptrarrbothmulti1.c index 81f928f7705a..49344a9990c3 100644 --- a/clang/test/CheckedCRewriter/fptrarrbothmulti1.c +++ b/clang/test/CheckedCRewriter/fptrarrbothmulti1.c @@ -123,7 +123,7 @@ int ** foo() { //CHECK: int *x = malloc(sizeof(int)); int *y = calloc(5, sizeof(int)); //CHECK_NOALL: int *y = calloc(5, sizeof(int)); - //CHECK_ALL: _Array_ptr y : count(5) = calloc(5, sizeof(int)); + //CHECK_ALL: _Array_ptr y : count(5) = calloc(5, sizeof(int)); int i; for(i = 0; i < 5; i++) { //CHECK_NOALL: for(i = 0; i < 5; i++) { @@ -132,7 +132,7 @@ int ** foo() { } int **z = sus(x, y); //CHECK_NOALL: int **z = sus(x, y); - //CHECK_ALL: _Array_ptr<_Array_ptr> z = sus(x, y); + //CHECK_ALL: _Array_ptr<_Array_ptr> z = sus(x, y); return z; } @@ -144,7 +144,7 @@ int ** bar() { //CHECK: int *x = malloc(sizeof(int)); int *y = calloc(5, sizeof(int)); //CHECK_NOALL: int *y = calloc(5, sizeof(int)); - //CHECK_ALL: _Array_ptr y : count(5) = calloc(5, sizeof(int)); + //CHECK_ALL: _Array_ptr y : count(5) = calloc(5, sizeof(int)); int i; for(i = 0; i < 5; i++) { //CHECK_NOALL: for(i = 0; i < 5; i++) { @@ -153,7 +153,7 @@ int ** bar() { } int **z = sus(x, y); //CHECK_NOALL: int **z = sus(x, y); - //CHECK_ALL: _Array_ptr<_Array_ptr> z = sus(x, y); + //CHECK_ALL: _Array_ptr<_Array_ptr> z = sus(x, y); z += 2; return z; } diff --git a/clang/test/CheckedCRewriter/fptrarrbothmulti2.c b/clang/test/CheckedCRewriter/fptrarrbothmulti2.c index 623228ba7e77..b87d85f59655 100644 --- a/clang/test/CheckedCRewriter/fptrarrbothmulti2.c +++ b/clang/test/CheckedCRewriter/fptrarrbothmulti2.c @@ -119,10 +119,10 @@ int ** sus(int *x, int *y) { //CHECK: x = (int *) 5; int **z = calloc(5, sizeof(int *)); //CHECK_NOALL: int **z = calloc(5, sizeof(int *)); - //CHECK_ALL: _Array_ptr<_Array_ptr> z : count(5) = calloc<_Array_ptr>(5, sizeof(int *)); + //CHECK_ALL: _Array_ptr<_Array_ptr> z : count(5) = calloc<_Array_ptr>(5, sizeof(int *)); int * (*mul2ptr) (int *) = mul2; - //CHECK_NOALL: _Ptr mul2ptr = mul2; - //CHECK_ALL: _Ptr<_Array_ptr (_Array_ptr )> mul2ptr = mul2; + //CHECK_NOALL: _Ptr mul2ptr = mul2; + //CHECK_ALL: _Ptr<_Array_ptr (_Array_ptr )> mul2ptr = mul2; int i; for(i = 0; i < 5; i++) { //CHECK_NOALL: for(i = 0; i < 5; i++) { diff --git a/clang/test/CheckedCRewriter/fptrarrcallee.c b/clang/test/CheckedCRewriter/fptrarrcallee.c index 2166c7b0e960..3b1339164716 100644 --- a/clang/test/CheckedCRewriter/fptrarrcallee.c +++ b/clang/test/CheckedCRewriter/fptrarrcallee.c @@ -111,10 +111,10 @@ int ** sus(int *x, int *y) { //CHECK: x = (int *) 5; int **z = calloc(5, sizeof(int *)); //CHECK_NOALL: int **z = calloc(5, sizeof(int *)); - //CHECK_ALL: _Array_ptr<_Array_ptr> z : count(5) = calloc<_Array_ptr>(5, sizeof(int *)); + //CHECK_ALL: _Array_ptr<_Array_ptr> z : count(5) = calloc<_Array_ptr>(5, sizeof(int *)); int * (*mul2ptr) (int *) = mul2; - //CHECK_NOALL: _Ptr mul2ptr = mul2; - //CHECK_ALL: _Ptr<_Array_ptr (_Array_ptr )> mul2ptr = mul2; + //CHECK_NOALL: _Ptr mul2ptr = mul2; + //CHECK_ALL: _Ptr<_Array_ptr (_Array_ptr )> mul2ptr = mul2; int i; for(i = 0; i < 5; i++) { //CHECK_NOALL: for(i = 0; i < 5; i++) { @@ -133,7 +133,7 @@ int ** foo() { //CHECK: int *x = malloc(sizeof(int)); int *y = calloc(5, sizeof(int)); //CHECK_NOALL: int *y = calloc(5, sizeof(int)); - //CHECK_ALL: _Array_ptr y : count(5) = calloc(5, sizeof(int)); + //CHECK_ALL: _Array_ptr y : count(5) = calloc(5, sizeof(int)); int i; for(i = 0; i < 5; i++) { //CHECK_NOALL: for(i = 0; i < 5; i++) { @@ -142,7 +142,7 @@ int ** foo() { } int **z = sus(x, y); //CHECK_NOALL: int **z = sus(x, y); - //CHECK_ALL: _Array_ptr<_Array_ptr> z = sus(x, y); + //CHECK_ALL: _Array_ptr<_Array_ptr> z = sus(x, y); return z; } @@ -154,7 +154,7 @@ int ** bar() { //CHECK: int *x = malloc(sizeof(int)); int *y = calloc(5, sizeof(int)); //CHECK_NOALL: int *y = calloc(5, sizeof(int)); - //CHECK_ALL: _Array_ptr y : count(5) = calloc(5, sizeof(int)); + //CHECK_ALL: _Array_ptr y : count(5) = calloc(5, sizeof(int)); int i; for(i = 0; i < 5; i++) { //CHECK_NOALL: for(i = 0; i < 5; i++) { @@ -163,6 +163,6 @@ int ** bar() { } int **z = sus(x, y); //CHECK_NOALL: int **z = sus(x, y); - //CHECK_ALL: _Array_ptr<_Array_ptr> z = sus(x, y); + //CHECK_ALL: _Array_ptr<_Array_ptr> z = sus(x, y); return z; } diff --git a/clang/test/CheckedCRewriter/fptrarrcalleemulti1.c b/clang/test/CheckedCRewriter/fptrarrcalleemulti1.c index fe5f566baaea..aa80d001cb3a 100644 --- a/clang/test/CheckedCRewriter/fptrarrcalleemulti1.c +++ b/clang/test/CheckedCRewriter/fptrarrcalleemulti1.c @@ -123,7 +123,7 @@ int ** foo() { //CHECK: int *x = malloc(sizeof(int)); int *y = calloc(5, sizeof(int)); //CHECK_NOALL: int *y = calloc(5, sizeof(int)); - //CHECK_ALL: _Array_ptr y : count(5) = calloc(5, sizeof(int)); + //CHECK_ALL: _Array_ptr y : count(5) = calloc(5, sizeof(int)); int i; for(i = 0; i < 5; i++) { //CHECK_NOALL: for(i = 0; i < 5; i++) { @@ -132,7 +132,7 @@ int ** foo() { } int **z = sus(x, y); //CHECK_NOALL: int **z = sus(x, y); - //CHECK_ALL: _Array_ptr<_Array_ptr> z = sus(x, y); + //CHECK_ALL: _Array_ptr<_Array_ptr> z = sus(x, y); return z; } @@ -144,7 +144,7 @@ int ** bar() { //CHECK: int *x = malloc(sizeof(int)); int *y = calloc(5, sizeof(int)); //CHECK_NOALL: int *y = calloc(5, sizeof(int)); - //CHECK_ALL: _Array_ptr y : count(5) = calloc(5, sizeof(int)); + //CHECK_ALL: _Array_ptr y : count(5) = calloc(5, sizeof(int)); int i; for(i = 0; i < 5; i++) { //CHECK_NOALL: for(i = 0; i < 5; i++) { @@ -153,6 +153,6 @@ int ** bar() { } int **z = sus(x, y); //CHECK_NOALL: int **z = sus(x, y); - //CHECK_ALL: _Array_ptr<_Array_ptr> z = sus(x, y); + //CHECK_ALL: _Array_ptr<_Array_ptr> z = sus(x, y); return z; } diff --git a/clang/test/CheckedCRewriter/fptrarrcalleemulti2.c b/clang/test/CheckedCRewriter/fptrarrcalleemulti2.c index fc30abdfa180..97813dff07a1 100644 --- a/clang/test/CheckedCRewriter/fptrarrcalleemulti2.c +++ b/clang/test/CheckedCRewriter/fptrarrcalleemulti2.c @@ -119,10 +119,10 @@ int ** sus(int *x, int *y) { //CHECK: x = (int *) 5; int **z = calloc(5, sizeof(int *)); //CHECK_NOALL: int **z = calloc(5, sizeof(int *)); - //CHECK_ALL: _Array_ptr<_Array_ptr> z : count(5) = calloc<_Array_ptr>(5, sizeof(int *)); + //CHECK_ALL: _Array_ptr<_Array_ptr> z : count(5) = calloc<_Array_ptr>(5, sizeof(int *)); int * (*mul2ptr) (int *) = mul2; - //CHECK_NOALL: _Ptr mul2ptr = mul2; - //CHECK_ALL: _Ptr<_Array_ptr (_Array_ptr )> mul2ptr = mul2; + //CHECK_NOALL: _Ptr mul2ptr = mul2; + //CHECK_ALL: _Ptr<_Array_ptr (_Array_ptr )> mul2ptr = mul2; int i; for(i = 0; i < 5; i++) { //CHECK_NOALL: for(i = 0; i < 5; i++) { diff --git a/clang/test/CheckedCRewriter/fptrarrcaller.c b/clang/test/CheckedCRewriter/fptrarrcaller.c index fba7c763425d..8273c94b0b93 100644 --- a/clang/test/CheckedCRewriter/fptrarrcaller.c +++ b/clang/test/CheckedCRewriter/fptrarrcaller.c @@ -111,10 +111,10 @@ int ** sus(int *x, int *y) { //CHECK: x = (int *) 5; int **z = calloc(5, sizeof(int *)); //CHECK_NOALL: int **z = calloc(5, sizeof(int *)); - //CHECK_ALL: _Array_ptr<_Array_ptr> z : count(5) = calloc<_Array_ptr>(5, sizeof(int *)); + //CHECK_ALL: _Array_ptr<_Array_ptr> z : count(5) = calloc<_Array_ptr>(5, sizeof(int *)); int * (*mul2ptr) (int *) = mul2; - //CHECK_NOALL: _Ptr mul2ptr = mul2; - //CHECK_ALL: _Ptr<_Array_ptr (_Array_ptr )> mul2ptr = mul2; + //CHECK_NOALL: _Ptr mul2ptr = mul2; + //CHECK_ALL: _Ptr<_Array_ptr (_Array_ptr )> mul2ptr = mul2; int i; for(i = 0; i < 5; i++) { //CHECK_NOALL: for(i = 0; i < 5; i++) { @@ -132,7 +132,7 @@ int ** foo() { //CHECK: int *x = malloc(sizeof(int)); int *y = calloc(5, sizeof(int)); //CHECK_NOALL: int *y = calloc(5, sizeof(int)); - //CHECK_ALL: _Array_ptr y : count(5) = calloc(5, sizeof(int)); + //CHECK_ALL: _Array_ptr y : count(5) = calloc(5, sizeof(int)); int i; for(i = 0; i < 5; i++) { //CHECK_NOALL: for(i = 0; i < 5; i++) { @@ -141,7 +141,7 @@ int ** foo() { } int **z = sus(x, y); //CHECK_NOALL: int **z = sus(x, y); - //CHECK_ALL: _Array_ptr<_Array_ptr> z = sus(x, y); + //CHECK_ALL: _Array_ptr<_Array_ptr> z = sus(x, y); return z; } @@ -153,7 +153,7 @@ int ** bar() { //CHECK: int *x = malloc(sizeof(int)); int *y = calloc(5, sizeof(int)); //CHECK_NOALL: int *y = calloc(5, sizeof(int)); - //CHECK_ALL: _Array_ptr y : count(5) = calloc(5, sizeof(int)); + //CHECK_ALL: _Array_ptr y : count(5) = calloc(5, sizeof(int)); int i; for(i = 0; i < 5; i++) { //CHECK_NOALL: for(i = 0; i < 5; i++) { @@ -162,7 +162,7 @@ int ** bar() { } int **z = sus(x, y); //CHECK_NOALL: int **z = sus(x, y); - //CHECK_ALL: _Array_ptr<_Array_ptr> z = sus(x, y); + //CHECK_ALL: _Array_ptr<_Array_ptr> z = sus(x, y); z += 2; return z; } diff --git a/clang/test/CheckedCRewriter/fptrarrcallermulti1.c b/clang/test/CheckedCRewriter/fptrarrcallermulti1.c index 3e2d087dadac..7b0adcc6afcc 100644 --- a/clang/test/CheckedCRewriter/fptrarrcallermulti1.c +++ b/clang/test/CheckedCRewriter/fptrarrcallermulti1.c @@ -123,7 +123,7 @@ int ** foo() { //CHECK: int *x = malloc(sizeof(int)); int *y = calloc(5, sizeof(int)); //CHECK_NOALL: int *y = calloc(5, sizeof(int)); - //CHECK_ALL: _Array_ptr y : count(5) = calloc(5, sizeof(int)); + //CHECK_ALL: _Array_ptr y : count(5) = calloc(5, sizeof(int)); int i; for(i = 0; i < 5; i++) { //CHECK_NOALL: for(i = 0; i < 5; i++) { @@ -132,7 +132,7 @@ int ** foo() { } int **z = sus(x, y); //CHECK_NOALL: int **z = sus(x, y); - //CHECK_ALL: _Array_ptr<_Array_ptr> z = sus(x, y); + //CHECK_ALL: _Array_ptr<_Array_ptr> z = sus(x, y); return z; } @@ -144,7 +144,7 @@ int ** bar() { //CHECK: int *x = malloc(sizeof(int)); int *y = calloc(5, sizeof(int)); //CHECK_NOALL: int *y = calloc(5, sizeof(int)); - //CHECK_ALL: _Array_ptr y : count(5) = calloc(5, sizeof(int)); + //CHECK_ALL: _Array_ptr y : count(5) = calloc(5, sizeof(int)); int i; for(i = 0; i < 5; i++) { //CHECK_NOALL: for(i = 0; i < 5; i++) { @@ -153,7 +153,7 @@ int ** bar() { } int **z = sus(x, y); //CHECK_NOALL: int **z = sus(x, y); - //CHECK_ALL: _Array_ptr<_Array_ptr> z = sus(x, y); + //CHECK_ALL: _Array_ptr<_Array_ptr> z = sus(x, y); z += 2; return z; } diff --git a/clang/test/CheckedCRewriter/fptrarrcallermulti2.c b/clang/test/CheckedCRewriter/fptrarrcallermulti2.c index 54e05b63fd96..054689ceab2f 100644 --- a/clang/test/CheckedCRewriter/fptrarrcallermulti2.c +++ b/clang/test/CheckedCRewriter/fptrarrcallermulti2.c @@ -119,10 +119,10 @@ int ** sus(int *x, int *y) { //CHECK: x = (int *) 5; int **z = calloc(5, sizeof(int *)); //CHECK_NOALL: int **z = calloc(5, sizeof(int *)); - //CHECK_ALL: _Array_ptr<_Array_ptr> z : count(5) = calloc<_Array_ptr>(5, sizeof(int *)); + //CHECK_ALL: _Array_ptr<_Array_ptr> z : count(5) = calloc<_Array_ptr>(5, sizeof(int *)); int * (*mul2ptr) (int *) = mul2; - //CHECK_NOALL: _Ptr mul2ptr = mul2; - //CHECK_ALL: _Ptr<_Array_ptr (_Array_ptr )> mul2ptr = mul2; + //CHECK_NOALL: _Ptr mul2ptr = mul2; + //CHECK_ALL: _Ptr<_Array_ptr (_Array_ptr )> mul2ptr = mul2; int i; for(i = 0; i < 5; i++) { //CHECK_NOALL: for(i = 0; i < 5; i++) { diff --git a/clang/test/CheckedCRewriter/fptrarrinstructboth.c b/clang/test/CheckedCRewriter/fptrarrinstructboth.c index ecd38855fac0..0b03abcfe445 100644 --- a/clang/test/CheckedCRewriter/fptrarrinstructboth.c +++ b/clang/test/CheckedCRewriter/fptrarrinstructboth.c @@ -128,7 +128,7 @@ struct arrfptr * foo() { struct arrfptr * x = malloc(sizeof(struct arrfptr)); //CHECK: struct arrfptr * x = malloc(sizeof(struct arrfptr)); struct arrfptr * y = malloc(sizeof(struct arrfptr)); - //CHECK: _Ptr y = malloc(sizeof(struct arrfptr)); + //CHECK: _Ptr y = malloc(sizeof(struct arrfptr)); struct arrfptr *z = sus(x, y); //CHECK: struct arrfptr *z = sus(x, y); @@ -145,7 +145,7 @@ struct arrfptr * bar() { struct arrfptr * x = malloc(sizeof(struct arrfptr)); //CHECK: struct arrfptr * x = malloc(sizeof(struct arrfptr)); struct arrfptr * y = malloc(sizeof(struct arrfptr)); - //CHECK: _Ptr y = malloc(sizeof(struct arrfptr)); + //CHECK: _Ptr y = malloc(sizeof(struct arrfptr)); struct arrfptr *z = sus(x, y); //CHECK: struct arrfptr *z = sus(x, y); diff --git a/clang/test/CheckedCRewriter/fptrarrinstructbothmulti1.c b/clang/test/CheckedCRewriter/fptrarrinstructbothmulti1.c index 01a3c695814c..8648ff215506 100644 --- a/clang/test/CheckedCRewriter/fptrarrinstructbothmulti1.c +++ b/clang/test/CheckedCRewriter/fptrarrinstructbothmulti1.c @@ -119,7 +119,7 @@ struct arrfptr * foo() { struct arrfptr * x = malloc(sizeof(struct arrfptr)); //CHECK: struct arrfptr * x = malloc(sizeof(struct arrfptr)); struct arrfptr * y = malloc(sizeof(struct arrfptr)); - //CHECK: _Ptr y = malloc(sizeof(struct arrfptr)); + //CHECK: _Ptr y = malloc(sizeof(struct arrfptr)); struct arrfptr *z = sus(x, y); //CHECK: struct arrfptr *z = sus(x, y); @@ -136,7 +136,7 @@ struct arrfptr * bar() { struct arrfptr * x = malloc(sizeof(struct arrfptr)); //CHECK: struct arrfptr * x = malloc(sizeof(struct arrfptr)); struct arrfptr * y = malloc(sizeof(struct arrfptr)); - //CHECK: _Ptr y = malloc(sizeof(struct arrfptr)); + //CHECK: _Ptr y = malloc(sizeof(struct arrfptr)); struct arrfptr *z = sus(x, y); //CHECK: struct arrfptr *z = sus(x, y); diff --git a/clang/test/CheckedCRewriter/fptrarrinstructcallee.c b/clang/test/CheckedCRewriter/fptrarrinstructcallee.c index 58d71849e680..82560a52ab0d 100644 --- a/clang/test/CheckedCRewriter/fptrarrinstructcallee.c +++ b/clang/test/CheckedCRewriter/fptrarrinstructcallee.c @@ -128,7 +128,7 @@ struct arrfptr * foo() { struct arrfptr * x = malloc(sizeof(struct arrfptr)); //CHECK: struct arrfptr * x = malloc(sizeof(struct arrfptr)); struct arrfptr * y = malloc(sizeof(struct arrfptr)); - //CHECK: _Ptr y = malloc(sizeof(struct arrfptr)); + //CHECK: _Ptr y = malloc(sizeof(struct arrfptr)); struct arrfptr *z = sus(x, y); //CHECK: struct arrfptr *z = sus(x, y); @@ -145,7 +145,7 @@ struct arrfptr * bar() { struct arrfptr * x = malloc(sizeof(struct arrfptr)); //CHECK: struct arrfptr * x = malloc(sizeof(struct arrfptr)); struct arrfptr * y = malloc(sizeof(struct arrfptr)); - //CHECK: _Ptr y = malloc(sizeof(struct arrfptr)); + //CHECK: _Ptr y = malloc(sizeof(struct arrfptr)); struct arrfptr *z = sus(x, y); //CHECK: struct arrfptr *z = sus(x, y); diff --git a/clang/test/CheckedCRewriter/fptrarrinstructcalleemulti1.c b/clang/test/CheckedCRewriter/fptrarrinstructcalleemulti1.c index 765a6fae3017..be950c4a1208 100644 --- a/clang/test/CheckedCRewriter/fptrarrinstructcalleemulti1.c +++ b/clang/test/CheckedCRewriter/fptrarrinstructcalleemulti1.c @@ -119,7 +119,7 @@ struct arrfptr * foo() { struct arrfptr * x = malloc(sizeof(struct arrfptr)); //CHECK: struct arrfptr * x = malloc(sizeof(struct arrfptr)); struct arrfptr * y = malloc(sizeof(struct arrfptr)); - //CHECK: _Ptr y = malloc(sizeof(struct arrfptr)); + //CHECK: _Ptr y = malloc(sizeof(struct arrfptr)); struct arrfptr *z = sus(x, y); //CHECK: struct arrfptr *z = sus(x, y); @@ -136,7 +136,7 @@ struct arrfptr * bar() { struct arrfptr * x = malloc(sizeof(struct arrfptr)); //CHECK: struct arrfptr * x = malloc(sizeof(struct arrfptr)); struct arrfptr * y = malloc(sizeof(struct arrfptr)); - //CHECK: _Ptr y = malloc(sizeof(struct arrfptr)); + //CHECK: _Ptr y = malloc(sizeof(struct arrfptr)); struct arrfptr *z = sus(x, y); //CHECK: struct arrfptr *z = sus(x, y); diff --git a/clang/test/CheckedCRewriter/fptrarrinstructcaller.c b/clang/test/CheckedCRewriter/fptrarrinstructcaller.c index 72bb3baa37ba..2acfd91c501e 100644 --- a/clang/test/CheckedCRewriter/fptrarrinstructcaller.c +++ b/clang/test/CheckedCRewriter/fptrarrinstructcaller.c @@ -109,7 +109,7 @@ struct arrfptr * sus(struct arrfptr *x, struct arrfptr *y) { x = (struct arrfptr *) 5; //CHECK: x = (struct arrfptr *) 5; struct arrfptr *z = malloc(sizeof(struct arrfptr)); - //CHECK_NOALL: _Ptr z = malloc(sizeof(struct arrfptr)); + //CHECK_NOALL: _Ptr z = malloc(sizeof(struct arrfptr)); //CHECK_ALL: struct arrfptr *z = malloc(sizeof(struct arrfptr)); int i; for(i = 0; i < 5; i++) { @@ -130,10 +130,10 @@ struct arrfptr * foo() { struct arrfptr * x = malloc(sizeof(struct arrfptr)); //CHECK: struct arrfptr * x = malloc(sizeof(struct arrfptr)); struct arrfptr * y = malloc(sizeof(struct arrfptr)); - //CHECK: _Ptr y = malloc(sizeof(struct arrfptr)); + //CHECK: _Ptr y = malloc(sizeof(struct arrfptr)); struct arrfptr *z = sus(x, y); - //CHECK_NOALL: _Ptr z = sus(x, y); + //CHECK_NOALL: _Ptr z = sus(x, y); //CHECK_ALL: struct arrfptr *z = sus(x, y); int i; for(i = 0; i < 5; i++) { @@ -148,7 +148,7 @@ struct arrfptr * bar() { struct arrfptr * x = malloc(sizeof(struct arrfptr)); //CHECK: struct arrfptr * x = malloc(sizeof(struct arrfptr)); struct arrfptr * y = malloc(sizeof(struct arrfptr)); - //CHECK: _Ptr y = malloc(sizeof(struct arrfptr)); + //CHECK: _Ptr y = malloc(sizeof(struct arrfptr)); struct arrfptr *z = sus(x, y); //CHECK: struct arrfptr *z = sus(x, y); diff --git a/clang/test/CheckedCRewriter/fptrarrinstructcallermulti1.c b/clang/test/CheckedCRewriter/fptrarrinstructcallermulti1.c index 6233a634e087..7d45daac6468 100644 --- a/clang/test/CheckedCRewriter/fptrarrinstructcallermulti1.c +++ b/clang/test/CheckedCRewriter/fptrarrinstructcallermulti1.c @@ -121,10 +121,10 @@ struct arrfptr * foo() { struct arrfptr * x = malloc(sizeof(struct arrfptr)); //CHECK: struct arrfptr * x = malloc(sizeof(struct arrfptr)); struct arrfptr * y = malloc(sizeof(struct arrfptr)); - //CHECK: _Ptr y = malloc(sizeof(struct arrfptr)); + //CHECK: _Ptr y = malloc(sizeof(struct arrfptr)); struct arrfptr *z = sus(x, y); - //CHECK_NOALL: _Ptr z = sus(x, y); + //CHECK_NOALL: _Ptr z = sus(x, y); //CHECK_ALL: struct arrfptr *z = sus(x, y); int i; for(i = 0; i < 5; i++) { @@ -139,7 +139,7 @@ struct arrfptr * bar() { struct arrfptr * x = malloc(sizeof(struct arrfptr)); //CHECK: struct arrfptr * x = malloc(sizeof(struct arrfptr)); struct arrfptr * y = malloc(sizeof(struct arrfptr)); - //CHECK: _Ptr y = malloc(sizeof(struct arrfptr)); + //CHECK: _Ptr y = malloc(sizeof(struct arrfptr)); struct arrfptr *z = sus(x, y); //CHECK: struct arrfptr *z = sus(x, y); diff --git a/clang/test/CheckedCRewriter/fptrarrinstructcallermulti2.c b/clang/test/CheckedCRewriter/fptrarrinstructcallermulti2.c index 702481f61d81..beae2f56d1a8 100644 --- a/clang/test/CheckedCRewriter/fptrarrinstructcallermulti2.c +++ b/clang/test/CheckedCRewriter/fptrarrinstructcallermulti2.c @@ -117,7 +117,7 @@ struct arrfptr * sus(struct arrfptr *x, struct arrfptr *y) { x = (struct arrfptr *) 5; //CHECK: x = (struct arrfptr *) 5; struct arrfptr *z = malloc(sizeof(struct arrfptr)); - //CHECK_NOALL: _Ptr z = malloc(sizeof(struct arrfptr)); + //CHECK_NOALL: _Ptr z = malloc(sizeof(struct arrfptr)); //CHECK_ALL: struct arrfptr *z = malloc(sizeof(struct arrfptr)); int i; for(i = 0; i < 5; i++) { diff --git a/clang/test/CheckedCRewriter/fptrarrinstructprotoboth.c b/clang/test/CheckedCRewriter/fptrarrinstructprotoboth.c index 8c04a3bf8d80..6982c709edd9 100644 --- a/clang/test/CheckedCRewriter/fptrarrinstructprotoboth.c +++ b/clang/test/CheckedCRewriter/fptrarrinstructprotoboth.c @@ -114,7 +114,7 @@ struct arrfptr * foo() { struct arrfptr * x = malloc(sizeof(struct arrfptr)); //CHECK: struct arrfptr * x = malloc(sizeof(struct arrfptr)); struct arrfptr * y = malloc(sizeof(struct arrfptr)); - //CHECK: _Ptr y = malloc(sizeof(struct arrfptr)); + //CHECK: _Ptr y = malloc(sizeof(struct arrfptr)); struct arrfptr *z = sus(x, y); //CHECK: struct arrfptr *z = sus(x, y); @@ -131,7 +131,7 @@ struct arrfptr * bar() { struct arrfptr * x = malloc(sizeof(struct arrfptr)); //CHECK: struct arrfptr * x = malloc(sizeof(struct arrfptr)); struct arrfptr * y = malloc(sizeof(struct arrfptr)); - //CHECK: _Ptr y = malloc(sizeof(struct arrfptr)); + //CHECK: _Ptr y = malloc(sizeof(struct arrfptr)); struct arrfptr *z = sus(x, y); //CHECK: struct arrfptr *z = sus(x, y); diff --git a/clang/test/CheckedCRewriter/fptrarrinstructprotocallee.c b/clang/test/CheckedCRewriter/fptrarrinstructprotocallee.c index 65d6ccc229a2..6dac94b707db 100644 --- a/clang/test/CheckedCRewriter/fptrarrinstructprotocallee.c +++ b/clang/test/CheckedCRewriter/fptrarrinstructprotocallee.c @@ -114,7 +114,7 @@ struct arrfptr * foo() { struct arrfptr * x = malloc(sizeof(struct arrfptr)); //CHECK: struct arrfptr * x = malloc(sizeof(struct arrfptr)); struct arrfptr * y = malloc(sizeof(struct arrfptr)); - //CHECK: _Ptr y = malloc(sizeof(struct arrfptr)); + //CHECK: _Ptr y = malloc(sizeof(struct arrfptr)); struct arrfptr *z = sus(x, y); //CHECK: struct arrfptr *z = sus(x, y); @@ -131,7 +131,7 @@ struct arrfptr * bar() { struct arrfptr * x = malloc(sizeof(struct arrfptr)); //CHECK: struct arrfptr * x = malloc(sizeof(struct arrfptr)); struct arrfptr * y = malloc(sizeof(struct arrfptr)); - //CHECK: _Ptr y = malloc(sizeof(struct arrfptr)); + //CHECK: _Ptr y = malloc(sizeof(struct arrfptr)); struct arrfptr *z = sus(x, y); //CHECK: struct arrfptr *z = sus(x, y); diff --git a/clang/test/CheckedCRewriter/fptrarrinstructprotocaller.c b/clang/test/CheckedCRewriter/fptrarrinstructprotocaller.c index f1c788e4adac..29bce2833c1a 100644 --- a/clang/test/CheckedCRewriter/fptrarrinstructprotocaller.c +++ b/clang/test/CheckedCRewriter/fptrarrinstructprotocaller.c @@ -116,10 +116,10 @@ struct arrfptr * foo() { struct arrfptr * x = malloc(sizeof(struct arrfptr)); //CHECK: struct arrfptr * x = malloc(sizeof(struct arrfptr)); struct arrfptr * y = malloc(sizeof(struct arrfptr)); - //CHECK: _Ptr y = malloc(sizeof(struct arrfptr)); + //CHECK: _Ptr y = malloc(sizeof(struct arrfptr)); struct arrfptr *z = sus(x, y); - //CHECK_NOALL: _Ptr z = sus(x, y); + //CHECK_NOALL: _Ptr z = sus(x, y); //CHECK_ALL: struct arrfptr *z = sus(x, y); int i; for(i = 0; i < 5; i++) { @@ -134,7 +134,7 @@ struct arrfptr * bar() { struct arrfptr * x = malloc(sizeof(struct arrfptr)); //CHECK: struct arrfptr * x = malloc(sizeof(struct arrfptr)); struct arrfptr * y = malloc(sizeof(struct arrfptr)); - //CHECK: _Ptr y = malloc(sizeof(struct arrfptr)); + //CHECK: _Ptr y = malloc(sizeof(struct arrfptr)); struct arrfptr *z = sus(x, y); //CHECK: struct arrfptr *z = sus(x, y); @@ -153,7 +153,7 @@ struct arrfptr * sus(struct arrfptr *x, struct arrfptr *y) { x = (struct arrfptr *) 5; //CHECK: x = (struct arrfptr *) 5; struct arrfptr *z = malloc(sizeof(struct arrfptr)); - //CHECK_NOALL: _Ptr z = malloc(sizeof(struct arrfptr)); + //CHECK_NOALL: _Ptr z = malloc(sizeof(struct arrfptr)); //CHECK_ALL: struct arrfptr *z = malloc(sizeof(struct arrfptr)); int i; for(i = 0; i < 5; i++) { diff --git a/clang/test/CheckedCRewriter/fptrarrinstructprotosafe.c b/clang/test/CheckedCRewriter/fptrarrinstructprotosafe.c index d2e10ea31363..b8133bb17186 100644 --- a/clang/test/CheckedCRewriter/fptrarrinstructprotosafe.c +++ b/clang/test/CheckedCRewriter/fptrarrinstructprotosafe.c @@ -113,10 +113,10 @@ struct arrfptr * foo() { struct arrfptr * x = malloc(sizeof(struct arrfptr)); //CHECK: struct arrfptr * x = malloc(sizeof(struct arrfptr)); struct arrfptr * y = malloc(sizeof(struct arrfptr)); - //CHECK: _Ptr y = malloc(sizeof(struct arrfptr)); + //CHECK: _Ptr y = malloc(sizeof(struct arrfptr)); struct arrfptr *z = sus(x, y); - //CHECK: _Ptr z = sus(x, y); + //CHECK: _Ptr z = sus(x, y); int i; for(i = 0; i < 5; i++) { //CHECK_NOALL: for(i = 0; i < 5; i++) { @@ -132,10 +132,10 @@ struct arrfptr * bar() { struct arrfptr * x = malloc(sizeof(struct arrfptr)); //CHECK: struct arrfptr * x = malloc(sizeof(struct arrfptr)); struct arrfptr * y = malloc(sizeof(struct arrfptr)); - //CHECK: _Ptr y = malloc(sizeof(struct arrfptr)); + //CHECK: _Ptr y = malloc(sizeof(struct arrfptr)); struct arrfptr *z = sus(x, y); - //CHECK: _Ptr z = sus(x, y); + //CHECK: _Ptr z = sus(x, y); int i; for(i = 0; i < 5; i++) { //CHECK_NOALL: for(i = 0; i < 5; i++) { @@ -151,7 +151,7 @@ struct arrfptr * sus(struct arrfptr *x, struct arrfptr *y) { x = (struct arrfptr *) 5; //CHECK: x = (struct arrfptr *) 5; struct arrfptr *z = malloc(sizeof(struct arrfptr)); - //CHECK: _Ptr z = malloc(sizeof(struct arrfptr)); + //CHECK: _Ptr z = malloc(sizeof(struct arrfptr)); int i; for(i = 0; i < 5; i++) { //CHECK_NOALL: for(i = 0; i < 5; i++) { diff --git a/clang/test/CheckedCRewriter/fptrarrinstructsafe.c b/clang/test/CheckedCRewriter/fptrarrinstructsafe.c index 08aeb55708cc..b42311307970 100644 --- a/clang/test/CheckedCRewriter/fptrarrinstructsafe.c +++ b/clang/test/CheckedCRewriter/fptrarrinstructsafe.c @@ -107,7 +107,7 @@ struct arrfptr * sus(struct arrfptr *x, struct arrfptr *y) { x = (struct arrfptr *) 5; //CHECK: x = (struct arrfptr *) 5; struct arrfptr *z = malloc(sizeof(struct arrfptr)); - //CHECK: _Ptr z = malloc(sizeof(struct arrfptr)); + //CHECK: _Ptr z = malloc(sizeof(struct arrfptr)); int i; for(i = 0; i < 5; i++) { //CHECK_NOALL: for(i = 0; i < 5; i++) { @@ -128,10 +128,10 @@ struct arrfptr * foo() { struct arrfptr * x = malloc(sizeof(struct arrfptr)); //CHECK: struct arrfptr * x = malloc(sizeof(struct arrfptr)); struct arrfptr * y = malloc(sizeof(struct arrfptr)); - //CHECK: _Ptr y = malloc(sizeof(struct arrfptr)); + //CHECK: _Ptr y = malloc(sizeof(struct arrfptr)); struct arrfptr *z = sus(x, y); - //CHECK: _Ptr z = sus(x, y); + //CHECK: _Ptr z = sus(x, y); int i; for(i = 0; i < 5; i++) { //CHECK_NOALL: for(i = 0; i < 5; i++) { @@ -147,10 +147,10 @@ struct arrfptr * bar() { struct arrfptr * x = malloc(sizeof(struct arrfptr)); //CHECK: struct arrfptr * x = malloc(sizeof(struct arrfptr)); struct arrfptr * y = malloc(sizeof(struct arrfptr)); - //CHECK: _Ptr y = malloc(sizeof(struct arrfptr)); + //CHECK: _Ptr y = malloc(sizeof(struct arrfptr)); struct arrfptr *z = sus(x, y); - //CHECK: _Ptr z = sus(x, y); + //CHECK: _Ptr z = sus(x, y); int i; for(i = 0; i < 5; i++) { //CHECK_NOALL: for(i = 0; i < 5; i++) { diff --git a/clang/test/CheckedCRewriter/fptrarrinstructsafemulti1.c b/clang/test/CheckedCRewriter/fptrarrinstructsafemulti1.c index 20e4f80286af..656f3a68f2d8 100644 --- a/clang/test/CheckedCRewriter/fptrarrinstructsafemulti1.c +++ b/clang/test/CheckedCRewriter/fptrarrinstructsafemulti1.c @@ -118,10 +118,10 @@ struct arrfptr * foo() { struct arrfptr * x = malloc(sizeof(struct arrfptr)); //CHECK: struct arrfptr * x = malloc(sizeof(struct arrfptr)); struct arrfptr * y = malloc(sizeof(struct arrfptr)); - //CHECK: _Ptr y = malloc(sizeof(struct arrfptr)); + //CHECK: _Ptr y = malloc(sizeof(struct arrfptr)); struct arrfptr *z = sus(x, y); - //CHECK: _Ptr z = sus(x, y); + //CHECK: _Ptr z = sus(x, y); int i; for(i = 0; i < 5; i++) { //CHECK_NOALL: for(i = 0; i < 5; i++) { @@ -137,10 +137,10 @@ struct arrfptr * bar() { struct arrfptr * x = malloc(sizeof(struct arrfptr)); //CHECK: struct arrfptr * x = malloc(sizeof(struct arrfptr)); struct arrfptr * y = malloc(sizeof(struct arrfptr)); - //CHECK: _Ptr y = malloc(sizeof(struct arrfptr)); + //CHECK: _Ptr y = malloc(sizeof(struct arrfptr)); struct arrfptr *z = sus(x, y); - //CHECK: _Ptr z = sus(x, y); + //CHECK: _Ptr z = sus(x, y); int i; for(i = 0; i < 5; i++) { //CHECK_NOALL: for(i = 0; i < 5; i++) { diff --git a/clang/test/CheckedCRewriter/fptrarrinstructsafemulti2.c b/clang/test/CheckedCRewriter/fptrarrinstructsafemulti2.c index fbb830a2a044..d8ede13703a3 100644 --- a/clang/test/CheckedCRewriter/fptrarrinstructsafemulti2.c +++ b/clang/test/CheckedCRewriter/fptrarrinstructsafemulti2.c @@ -115,7 +115,7 @@ struct arrfptr * sus(struct arrfptr *x, struct arrfptr *y) { x = (struct arrfptr *) 5; //CHECK: x = (struct arrfptr *) 5; struct arrfptr *z = malloc(sizeof(struct arrfptr)); - //CHECK: _Ptr z = malloc(sizeof(struct arrfptr)); + //CHECK: _Ptr z = malloc(sizeof(struct arrfptr)); int i; for(i = 0; i < 5; i++) { //CHECK_NOALL: for(i = 0; i < 5; i++) { diff --git a/clang/test/CheckedCRewriter/fptrarrprotoboth.c b/clang/test/CheckedCRewriter/fptrarrprotoboth.c index a991df6c751f..77b7339d298d 100644 --- a/clang/test/CheckedCRewriter/fptrarrprotoboth.c +++ b/clang/test/CheckedCRewriter/fptrarrprotoboth.c @@ -118,7 +118,7 @@ int ** foo() { //CHECK: int *x = malloc(sizeof(int)); int *y = calloc(5, sizeof(int)); //CHECK_NOALL: int *y = calloc(5, sizeof(int)); - //CHECK_ALL: _Array_ptr y : count(5) = calloc(5, sizeof(int)); + //CHECK_ALL: _Array_ptr y : count(5) = calloc(5, sizeof(int)); int i; for(i = 0; i < 5; i++) { //CHECK_NOALL: for(i = 0; i < 5; i++) { @@ -127,7 +127,7 @@ int ** foo() { } int **z = sus(x, y); //CHECK_NOALL: int **z = sus(x, y); - //CHECK_ALL: _Array_ptr<_Array_ptr> z = sus(x, y); + //CHECK_ALL: _Array_ptr<_Array_ptr> z = sus(x, y); return z; } @@ -139,7 +139,7 @@ int ** bar() { //CHECK: int *x = malloc(sizeof(int)); int *y = calloc(5, sizeof(int)); //CHECK_NOALL: int *y = calloc(5, sizeof(int)); - //CHECK_ALL: _Array_ptr y : count(5) = calloc(5, sizeof(int)); + //CHECK_ALL: _Array_ptr y : count(5) = calloc(5, sizeof(int)); int i; for(i = 0; i < 5; i++) { //CHECK_NOALL: for(i = 0; i < 5; i++) { @@ -148,7 +148,7 @@ int ** bar() { } int **z = sus(x, y); //CHECK_NOALL: int **z = sus(x, y); - //CHECK_ALL: _Array_ptr<_Array_ptr> z = sus(x, y); + //CHECK_ALL: _Array_ptr<_Array_ptr> z = sus(x, y); z += 2; return z; } @@ -161,10 +161,10 @@ int ** sus(int *x, int *y) { //CHECK: x = (int *) 5; int **z = calloc(5, sizeof(int *)); //CHECK_NOALL: int **z = calloc(5, sizeof(int *)); - //CHECK_ALL: _Array_ptr<_Array_ptr> z : count(5) = calloc<_Array_ptr>(5, sizeof(int *)); + //CHECK_ALL: _Array_ptr<_Array_ptr> z : count(5) = calloc<_Array_ptr>(5, sizeof(int *)); int * (*mul2ptr) (int *) = mul2; - //CHECK_NOALL: _Ptr mul2ptr = mul2; - //CHECK_ALL: _Ptr<_Array_ptr (_Array_ptr )> mul2ptr = mul2; + //CHECK_NOALL: _Ptr mul2ptr = mul2; + //CHECK_ALL: _Ptr<_Array_ptr (_Array_ptr )> mul2ptr = mul2; int i; for(i = 0; i < 5; i++) { //CHECK_NOALL: for(i = 0; i < 5; i++) { diff --git a/clang/test/CheckedCRewriter/fptrarrprotocallee.c b/clang/test/CheckedCRewriter/fptrarrprotocallee.c index 0e9072ff3db3..cdbd4a90fa40 100644 --- a/clang/test/CheckedCRewriter/fptrarrprotocallee.c +++ b/clang/test/CheckedCRewriter/fptrarrprotocallee.c @@ -118,7 +118,7 @@ int ** foo() { //CHECK: int *x = malloc(sizeof(int)); int *y = calloc(5, sizeof(int)); //CHECK_NOALL: int *y = calloc(5, sizeof(int)); - //CHECK_ALL: _Array_ptr y : count(5) = calloc(5, sizeof(int)); + //CHECK_ALL: _Array_ptr y : count(5) = calloc(5, sizeof(int)); int i; for(i = 0; i < 5; i++) { //CHECK_NOALL: for(i = 0; i < 5; i++) { @@ -127,7 +127,7 @@ int ** foo() { } int **z = sus(x, y); //CHECK_NOALL: int **z = sus(x, y); - //CHECK_ALL: _Array_ptr<_Array_ptr> z = sus(x, y); + //CHECK_ALL: _Array_ptr<_Array_ptr> z = sus(x, y); return z; } @@ -139,7 +139,7 @@ int ** bar() { //CHECK: int *x = malloc(sizeof(int)); int *y = calloc(5, sizeof(int)); //CHECK_NOALL: int *y = calloc(5, sizeof(int)); - //CHECK_ALL: _Array_ptr y : count(5) = calloc(5, sizeof(int)); + //CHECK_ALL: _Array_ptr y : count(5) = calloc(5, sizeof(int)); int i; for(i = 0; i < 5; i++) { //CHECK_NOALL: for(i = 0; i < 5; i++) { @@ -148,7 +148,7 @@ int ** bar() { } int **z = sus(x, y); //CHECK_NOALL: int **z = sus(x, y); - //CHECK_ALL: _Array_ptr<_Array_ptr> z = sus(x, y); + //CHECK_ALL: _Array_ptr<_Array_ptr> z = sus(x, y); return z; } @@ -160,10 +160,10 @@ int ** sus(int *x, int *y) { //CHECK: x = (int *) 5; int **z = calloc(5, sizeof(int *)); //CHECK_NOALL: int **z = calloc(5, sizeof(int *)); - //CHECK_ALL: _Array_ptr<_Array_ptr> z : count(5) = calloc<_Array_ptr>(5, sizeof(int *)); + //CHECK_ALL: _Array_ptr<_Array_ptr> z : count(5) = calloc<_Array_ptr>(5, sizeof(int *)); int * (*mul2ptr) (int *) = mul2; - //CHECK_NOALL: _Ptr mul2ptr = mul2; - //CHECK_ALL: _Ptr<_Array_ptr (_Array_ptr )> mul2ptr = mul2; + //CHECK_NOALL: _Ptr mul2ptr = mul2; + //CHECK_ALL: _Ptr<_Array_ptr (_Array_ptr )> mul2ptr = mul2; int i; for(i = 0; i < 5; i++) { //CHECK_NOALL: for(i = 0; i < 5; i++) { diff --git a/clang/test/CheckedCRewriter/fptrarrprotocaller.c b/clang/test/CheckedCRewriter/fptrarrprotocaller.c index 0d95c9befd3d..ccbec3552866 100644 --- a/clang/test/CheckedCRewriter/fptrarrprotocaller.c +++ b/clang/test/CheckedCRewriter/fptrarrprotocaller.c @@ -118,7 +118,7 @@ int ** foo() { //CHECK: int *x = malloc(sizeof(int)); int *y = calloc(5, sizeof(int)); //CHECK_NOALL: int *y = calloc(5, sizeof(int)); - //CHECK_ALL: _Array_ptr y : count(5) = calloc(5, sizeof(int)); + //CHECK_ALL: _Array_ptr y : count(5) = calloc(5, sizeof(int)); int i; for(i = 0; i < 5; i++) { //CHECK_NOALL: for(i = 0; i < 5; i++) { @@ -127,7 +127,7 @@ int ** foo() { } int **z = sus(x, y); //CHECK_NOALL: int **z = sus(x, y); - //CHECK_ALL: _Array_ptr<_Array_ptr> z = sus(x, y); + //CHECK_ALL: _Array_ptr<_Array_ptr> z = sus(x, y); return z; } @@ -139,7 +139,7 @@ int ** bar() { //CHECK: int *x = malloc(sizeof(int)); int *y = calloc(5, sizeof(int)); //CHECK_NOALL: int *y = calloc(5, sizeof(int)); - //CHECK_ALL: _Array_ptr y : count(5) = calloc(5, sizeof(int)); + //CHECK_ALL: _Array_ptr y : count(5) = calloc(5, sizeof(int)); int i; for(i = 0; i < 5; i++) { //CHECK_NOALL: for(i = 0; i < 5; i++) { @@ -148,7 +148,7 @@ int ** bar() { } int **z = sus(x, y); //CHECK_NOALL: int **z = sus(x, y); - //CHECK_ALL: _Array_ptr<_Array_ptr> z = sus(x, y); + //CHECK_ALL: _Array_ptr<_Array_ptr> z = sus(x, y); z += 2; return z; } @@ -161,10 +161,10 @@ int ** sus(int *x, int *y) { //CHECK: x = (int *) 5; int **z = calloc(5, sizeof(int *)); //CHECK_NOALL: int **z = calloc(5, sizeof(int *)); - //CHECK_ALL: _Array_ptr<_Array_ptr> z : count(5) = calloc<_Array_ptr>(5, sizeof(int *)); + //CHECK_ALL: _Array_ptr<_Array_ptr> z : count(5) = calloc<_Array_ptr>(5, sizeof(int *)); int * (*mul2ptr) (int *) = mul2; - //CHECK_NOALL: _Ptr mul2ptr = mul2; - //CHECK_ALL: _Ptr<_Array_ptr (_Array_ptr )> mul2ptr = mul2; + //CHECK_NOALL: _Ptr mul2ptr = mul2; + //CHECK_ALL: _Ptr<_Array_ptr (_Array_ptr )> mul2ptr = mul2; int i; for(i = 0; i < 5; i++) { //CHECK_NOALL: for(i = 0; i < 5; i++) { diff --git a/clang/test/CheckedCRewriter/fptrarrprotosafe.c b/clang/test/CheckedCRewriter/fptrarrprotosafe.c index d7ed2cb114df..6fe1d56350b2 100644 --- a/clang/test/CheckedCRewriter/fptrarrprotosafe.c +++ b/clang/test/CheckedCRewriter/fptrarrprotosafe.c @@ -117,7 +117,7 @@ int ** foo() { //CHECK: int *x = malloc(sizeof(int)); int *y = calloc(5, sizeof(int)); //CHECK_NOALL: int *y = calloc(5, sizeof(int)); - //CHECK_ALL: _Array_ptr y : count(5) = calloc(5, sizeof(int)); + //CHECK_ALL: _Array_ptr y : count(5) = calloc(5, sizeof(int)); int i; for(i = 0; i < 5; i++) { //CHECK_NOALL: for(i = 0; i < 5; i++) { @@ -126,7 +126,7 @@ int ** foo() { } int **z = sus(x, y); //CHECK_NOALL: int **z = sus(x, y); - //CHECK_ALL: _Array_ptr<_Array_ptr> z = sus(x, y); + //CHECK_ALL: _Array_ptr<_Array_ptr> z = sus(x, y); return z; } @@ -138,7 +138,7 @@ int ** bar() { //CHECK: int *x = malloc(sizeof(int)); int *y = calloc(5, sizeof(int)); //CHECK_NOALL: int *y = calloc(5, sizeof(int)); - //CHECK_ALL: _Array_ptr y : count(5) = calloc(5, sizeof(int)); + //CHECK_ALL: _Array_ptr y : count(5) = calloc(5, sizeof(int)); int i; for(i = 0; i < 5; i++) { //CHECK_NOALL: for(i = 0; i < 5; i++) { @@ -147,7 +147,7 @@ int ** bar() { } int **z = sus(x, y); //CHECK_NOALL: int **z = sus(x, y); - //CHECK_ALL: _Array_ptr<_Array_ptr> z = sus(x, y); + //CHECK_ALL: _Array_ptr<_Array_ptr> z = sus(x, y); return z; } @@ -159,10 +159,10 @@ int ** sus(int *x, int *y) { //CHECK: x = (int *) 5; int **z = calloc(5, sizeof(int *)); //CHECK_NOALL: int **z = calloc(5, sizeof(int *)); - //CHECK_ALL: _Array_ptr<_Array_ptr> z : count(5) = calloc<_Array_ptr>(5, sizeof(int *)); + //CHECK_ALL: _Array_ptr<_Array_ptr> z : count(5) = calloc<_Array_ptr>(5, sizeof(int *)); int * (*mul2ptr) (int *) = mul2; - //CHECK_NOALL: _Ptr mul2ptr = mul2; - //CHECK_ALL: _Ptr<_Array_ptr (_Array_ptr )> mul2ptr = mul2; + //CHECK_NOALL: _Ptr mul2ptr = mul2; + //CHECK_ALL: _Ptr<_Array_ptr (_Array_ptr )> mul2ptr = mul2; int i; for(i = 0; i < 5; i++) { //CHECK_NOALL: for(i = 0; i < 5; i++) { diff --git a/clang/test/CheckedCRewriter/fptrarrsafe.c b/clang/test/CheckedCRewriter/fptrarrsafe.c index 92f6e02112dc..aa7012bf183f 100644 --- a/clang/test/CheckedCRewriter/fptrarrsafe.c +++ b/clang/test/CheckedCRewriter/fptrarrsafe.c @@ -110,10 +110,10 @@ int ** sus(int *x, int *y) { //CHECK: x = (int *) 5; int **z = calloc(5, sizeof(int *)); //CHECK_NOALL: int **z = calloc(5, sizeof(int *)); - //CHECK_ALL: _Array_ptr<_Array_ptr> z : count(5) = calloc<_Array_ptr>(5, sizeof(int *)); + //CHECK_ALL: _Array_ptr<_Array_ptr> z : count(5) = calloc<_Array_ptr>(5, sizeof(int *)); int * (*mul2ptr) (int *) = mul2; - //CHECK_NOALL: _Ptr mul2ptr = mul2; - //CHECK_ALL: _Ptr<_Array_ptr (_Array_ptr )> mul2ptr = mul2; + //CHECK_NOALL: _Ptr mul2ptr = mul2; + //CHECK_ALL: _Ptr<_Array_ptr (_Array_ptr )> mul2ptr = mul2; int i; for(i = 0; i < 5; i++) { //CHECK_NOALL: for(i = 0; i < 5; i++) { @@ -131,7 +131,7 @@ int ** foo() { //CHECK: int *x = malloc(sizeof(int)); int *y = calloc(5, sizeof(int)); //CHECK_NOALL: int *y = calloc(5, sizeof(int)); - //CHECK_ALL: _Array_ptr y : count(5) = calloc(5, sizeof(int)); + //CHECK_ALL: _Array_ptr y : count(5) = calloc(5, sizeof(int)); int i; for(i = 0; i < 5; i++) { //CHECK_NOALL: for(i = 0; i < 5; i++) { @@ -140,7 +140,7 @@ int ** foo() { } int **z = sus(x, y); //CHECK_NOALL: int **z = sus(x, y); - //CHECK_ALL: _Array_ptr<_Array_ptr> z = sus(x, y); + //CHECK_ALL: _Array_ptr<_Array_ptr> z = sus(x, y); return z; } @@ -152,7 +152,7 @@ int ** bar() { //CHECK: int *x = malloc(sizeof(int)); int *y = calloc(5, sizeof(int)); //CHECK_NOALL: int *y = calloc(5, sizeof(int)); - //CHECK_ALL: _Array_ptr y : count(5) = calloc(5, sizeof(int)); + //CHECK_ALL: _Array_ptr y : count(5) = calloc(5, sizeof(int)); int i; for(i = 0; i < 5; i++) { //CHECK_NOALL: for(i = 0; i < 5; i++) { @@ -161,6 +161,6 @@ int ** bar() { } int **z = sus(x, y); //CHECK_NOALL: int **z = sus(x, y); - //CHECK_ALL: _Array_ptr<_Array_ptr> z = sus(x, y); + //CHECK_ALL: _Array_ptr<_Array_ptr> z = sus(x, y); return z; } diff --git a/clang/test/CheckedCRewriter/fptrarrsafemulti1.c b/clang/test/CheckedCRewriter/fptrarrsafemulti1.c index c60b39236f39..9c5df8f143ec 100644 --- a/clang/test/CheckedCRewriter/fptrarrsafemulti1.c +++ b/clang/test/CheckedCRewriter/fptrarrsafemulti1.c @@ -122,7 +122,7 @@ int ** foo() { //CHECK: int *x = malloc(sizeof(int)); int *y = calloc(5, sizeof(int)); //CHECK_NOALL: int *y = calloc(5, sizeof(int)); - //CHECK_ALL: _Array_ptr y : count(5) = calloc(5, sizeof(int)); + //CHECK_ALL: _Array_ptr y : count(5) = calloc(5, sizeof(int)); int i; for(i = 0; i < 5; i++) { //CHECK_NOALL: for(i = 0; i < 5; i++) { @@ -131,7 +131,7 @@ int ** foo() { } int **z = sus(x, y); //CHECK_NOALL: int **z = sus(x, y); - //CHECK_ALL: _Array_ptr<_Array_ptr> z = sus(x, y); + //CHECK_ALL: _Array_ptr<_Array_ptr> z = sus(x, y); return z; } @@ -143,7 +143,7 @@ int ** bar() { //CHECK: int *x = malloc(sizeof(int)); int *y = calloc(5, sizeof(int)); //CHECK_NOALL: int *y = calloc(5, sizeof(int)); - //CHECK_ALL: _Array_ptr y : count(5) = calloc(5, sizeof(int)); + //CHECK_ALL: _Array_ptr y : count(5) = calloc(5, sizeof(int)); int i; for(i = 0; i < 5; i++) { //CHECK_NOALL: for(i = 0; i < 5; i++) { @@ -152,6 +152,6 @@ int ** bar() { } int **z = sus(x, y); //CHECK_NOALL: int **z = sus(x, y); - //CHECK_ALL: _Array_ptr<_Array_ptr> z = sus(x, y); + //CHECK_ALL: _Array_ptr<_Array_ptr> z = sus(x, y); return z; } diff --git a/clang/test/CheckedCRewriter/fptrarrsafemulti2.c b/clang/test/CheckedCRewriter/fptrarrsafemulti2.c index 3fecfc3afb93..a168cff5ca6f 100644 --- a/clang/test/CheckedCRewriter/fptrarrsafemulti2.c +++ b/clang/test/CheckedCRewriter/fptrarrsafemulti2.c @@ -118,10 +118,10 @@ int ** sus(int *x, int *y) { //CHECK: x = (int *) 5; int **z = calloc(5, sizeof(int *)); //CHECK_NOALL: int **z = calloc(5, sizeof(int *)); - //CHECK_ALL: _Array_ptr<_Array_ptr> z : count(5) = calloc<_Array_ptr>(5, sizeof(int *)); + //CHECK_ALL: _Array_ptr<_Array_ptr> z : count(5) = calloc<_Array_ptr>(5, sizeof(int *)); int * (*mul2ptr) (int *) = mul2; - //CHECK_NOALL: _Ptr mul2ptr = mul2; - //CHECK_ALL: _Ptr<_Array_ptr (_Array_ptr )> mul2ptr = mul2; + //CHECK_NOALL: _Ptr mul2ptr = mul2; + //CHECK_ALL: _Ptr<_Array_ptr (_Array_ptr )> mul2ptr = mul2; int i; for(i = 0; i < 5; i++) { //CHECK_NOALL: for(i = 0; i < 5; i++) { diff --git a/clang/test/CheckedCRewriter/fptrarrstructboth.c b/clang/test/CheckedCRewriter/fptrarrstructboth.c index ef1418506990..83db59a0fcbb 100644 --- a/clang/test/CheckedCRewriter/fptrarrstructboth.c +++ b/clang/test/CheckedCRewriter/fptrarrstructboth.c @@ -129,10 +129,10 @@ struct fptrarr * foo() { struct fptrarr * x = malloc(sizeof(struct fptrarr)); //CHECK: struct fptrarr * x = malloc(sizeof(struct fptrarr)); struct fptrarr *y = malloc(sizeof(struct fptrarr)); - //CHECK: _Ptr y = malloc(sizeof(struct fptrarr)); + //CHECK: _Ptr y = malloc(sizeof(struct fptrarr)); int *yvals = calloc(5, sizeof(int)); //CHECK_NOALL: int *yvals = calloc(5, sizeof(int)); - //CHECK_ALL: _Array_ptr yvals : count(5) = calloc(5, sizeof(int)); + //CHECK_ALL: _Array_ptr yvals : count(5) = calloc(5, sizeof(int)); int i; for(i = 0; i < 5; i++) { //CHECK_NOALL: for(i = 0; i < 5; i++) { @@ -155,10 +155,10 @@ struct fptrarr * bar() { struct fptrarr * x = malloc(sizeof(struct fptrarr)); //CHECK: struct fptrarr * x = malloc(sizeof(struct fptrarr)); struct fptrarr *y = malloc(sizeof(struct fptrarr)); - //CHECK: _Ptr y = malloc(sizeof(struct fptrarr)); + //CHECK: _Ptr y = malloc(sizeof(struct fptrarr)); int *yvals = calloc(5, sizeof(int)); //CHECK_NOALL: int *yvals = calloc(5, sizeof(int)); - //CHECK_ALL: _Array_ptr yvals : count(5) = calloc(5, sizeof(int)); + //CHECK_ALL: _Array_ptr yvals : count(5) = calloc(5, sizeof(int)); int i; for(i = 0; i < 5; i++) { //CHECK_NOALL: for(i = 0; i < 5; i++) { diff --git a/clang/test/CheckedCRewriter/fptrarrstructbothmulti1.c b/clang/test/CheckedCRewriter/fptrarrstructbothmulti1.c index 9901331300d8..9524e56777ce 100644 --- a/clang/test/CheckedCRewriter/fptrarrstructbothmulti1.c +++ b/clang/test/CheckedCRewriter/fptrarrstructbothmulti1.c @@ -121,10 +121,10 @@ struct fptrarr * foo() { struct fptrarr * x = malloc(sizeof(struct fptrarr)); //CHECK: struct fptrarr * x = malloc(sizeof(struct fptrarr)); struct fptrarr *y = malloc(sizeof(struct fptrarr)); - //CHECK: _Ptr y = malloc(sizeof(struct fptrarr)); + //CHECK: _Ptr y = malloc(sizeof(struct fptrarr)); int *yvals = calloc(5, sizeof(int)); //CHECK_NOALL: int *yvals = calloc(5, sizeof(int)); - //CHECK_ALL: _Array_ptr yvals : count(5) = calloc(5, sizeof(int)); + //CHECK_ALL: _Array_ptr yvals : count(5) = calloc(5, sizeof(int)); int i; for(i = 0; i < 5; i++) { //CHECK_NOALL: for(i = 0; i < 5; i++) { @@ -147,10 +147,10 @@ struct fptrarr * bar() { struct fptrarr * x = malloc(sizeof(struct fptrarr)); //CHECK: struct fptrarr * x = malloc(sizeof(struct fptrarr)); struct fptrarr *y = malloc(sizeof(struct fptrarr)); - //CHECK: _Ptr y = malloc(sizeof(struct fptrarr)); + //CHECK: _Ptr y = malloc(sizeof(struct fptrarr)); int *yvals = calloc(5, sizeof(int)); //CHECK_NOALL: int *yvals = calloc(5, sizeof(int)); - //CHECK_ALL: _Array_ptr yvals : count(5) = calloc(5, sizeof(int)); + //CHECK_ALL: _Array_ptr yvals : count(5) = calloc(5, sizeof(int)); int i; for(i = 0; i < 5; i++) { //CHECK_NOALL: for(i = 0; i < 5; i++) { diff --git a/clang/test/CheckedCRewriter/fptrarrstructcallee.c b/clang/test/CheckedCRewriter/fptrarrstructcallee.c index a513ed557a9e..a7808fda4746 100644 --- a/clang/test/CheckedCRewriter/fptrarrstructcallee.c +++ b/clang/test/CheckedCRewriter/fptrarrstructcallee.c @@ -129,10 +129,10 @@ struct fptrarr * foo() { struct fptrarr * x = malloc(sizeof(struct fptrarr)); //CHECK: struct fptrarr * x = malloc(sizeof(struct fptrarr)); struct fptrarr *y = malloc(sizeof(struct fptrarr)); - //CHECK: _Ptr y = malloc(sizeof(struct fptrarr)); + //CHECK: _Ptr y = malloc(sizeof(struct fptrarr)); int *yvals = calloc(5, sizeof(int)); //CHECK_NOALL: int *yvals = calloc(5, sizeof(int)); - //CHECK_ALL: _Array_ptr yvals : count(5) = calloc(5, sizeof(int)); + //CHECK_ALL: _Array_ptr yvals : count(5) = calloc(5, sizeof(int)); int i; for(i = 0; i < 5; i++) { //CHECK_NOALL: for(i = 0; i < 5; i++) { @@ -155,10 +155,10 @@ struct fptrarr * bar() { struct fptrarr * x = malloc(sizeof(struct fptrarr)); //CHECK: struct fptrarr * x = malloc(sizeof(struct fptrarr)); struct fptrarr *y = malloc(sizeof(struct fptrarr)); - //CHECK: _Ptr y = malloc(sizeof(struct fptrarr)); + //CHECK: _Ptr y = malloc(sizeof(struct fptrarr)); int *yvals = calloc(5, sizeof(int)); //CHECK_NOALL: int *yvals = calloc(5, sizeof(int)); - //CHECK_ALL: _Array_ptr yvals : count(5) = calloc(5, sizeof(int)); + //CHECK_ALL: _Array_ptr yvals : count(5) = calloc(5, sizeof(int)); int i; for(i = 0; i < 5; i++) { //CHECK_NOALL: for(i = 0; i < 5; i++) { diff --git a/clang/test/CheckedCRewriter/fptrarrstructcalleemulti1.c b/clang/test/CheckedCRewriter/fptrarrstructcalleemulti1.c index a3a44d9a8d13..4fa6086ca337 100644 --- a/clang/test/CheckedCRewriter/fptrarrstructcalleemulti1.c +++ b/clang/test/CheckedCRewriter/fptrarrstructcalleemulti1.c @@ -121,10 +121,10 @@ struct fptrarr * foo() { struct fptrarr * x = malloc(sizeof(struct fptrarr)); //CHECK: struct fptrarr * x = malloc(sizeof(struct fptrarr)); struct fptrarr *y = malloc(sizeof(struct fptrarr)); - //CHECK: _Ptr y = malloc(sizeof(struct fptrarr)); + //CHECK: _Ptr y = malloc(sizeof(struct fptrarr)); int *yvals = calloc(5, sizeof(int)); //CHECK_NOALL: int *yvals = calloc(5, sizeof(int)); - //CHECK_ALL: _Array_ptr yvals : count(5) = calloc(5, sizeof(int)); + //CHECK_ALL: _Array_ptr yvals : count(5) = calloc(5, sizeof(int)); int i; for(i = 0; i < 5; i++) { //CHECK_NOALL: for(i = 0; i < 5; i++) { @@ -147,10 +147,10 @@ struct fptrarr * bar() { struct fptrarr * x = malloc(sizeof(struct fptrarr)); //CHECK: struct fptrarr * x = malloc(sizeof(struct fptrarr)); struct fptrarr *y = malloc(sizeof(struct fptrarr)); - //CHECK: _Ptr y = malloc(sizeof(struct fptrarr)); + //CHECK: _Ptr y = malloc(sizeof(struct fptrarr)); int *yvals = calloc(5, sizeof(int)); //CHECK_NOALL: int *yvals = calloc(5, sizeof(int)); - //CHECK_ALL: _Array_ptr yvals : count(5) = calloc(5, sizeof(int)); + //CHECK_ALL: _Array_ptr yvals : count(5) = calloc(5, sizeof(int)); int i; for(i = 0; i < 5; i++) { //CHECK_NOALL: for(i = 0; i < 5; i++) { diff --git a/clang/test/CheckedCRewriter/fptrarrstructcaller.c b/clang/test/CheckedCRewriter/fptrarrstructcaller.c index 3fd8ed9dfd15..a1f4f9aa5bdb 100644 --- a/clang/test/CheckedCRewriter/fptrarrstructcaller.c +++ b/clang/test/CheckedCRewriter/fptrarrstructcaller.c @@ -111,7 +111,7 @@ struct fptrarr * sus(struct fptrarr *x, struct fptrarr *y) { //CHECK: x = (struct fptrarr *) 5; char name[30]; struct fptrarr *z = malloc(sizeof(struct fptrarr)); - //CHECK_NOALL: _Ptr z = malloc(sizeof(struct fptrarr)); + //CHECK_NOALL: _Ptr z = malloc(sizeof(struct fptrarr)); //CHECK_ALL: struct fptrarr *z = malloc(sizeof(struct fptrarr)); z->values = y->values; z->name = strcpy(name, "Hello World"); @@ -131,10 +131,10 @@ struct fptrarr * foo() { struct fptrarr * x = malloc(sizeof(struct fptrarr)); //CHECK: struct fptrarr * x = malloc(sizeof(struct fptrarr)); struct fptrarr *y = malloc(sizeof(struct fptrarr)); - //CHECK: _Ptr y = malloc(sizeof(struct fptrarr)); + //CHECK: _Ptr y = malloc(sizeof(struct fptrarr)); int *yvals = calloc(5, sizeof(int)); //CHECK_NOALL: int *yvals = calloc(5, sizeof(int)); - //CHECK_ALL: _Array_ptr yvals : count(5) = calloc(5, sizeof(int)); + //CHECK_ALL: _Array_ptr yvals : count(5) = calloc(5, sizeof(int)); int i; for(i = 0; i < 5; i++) { //CHECK_NOALL: for(i = 0; i < 5; i++) { @@ -146,7 +146,7 @@ struct fptrarr * foo() { y->mapper = NULL; strcpy(y->name, "Example"); struct fptrarr *z = sus(x, y); - //CHECK_NOALL: _Ptr z = sus(x, y); + //CHECK_NOALL: _Ptr z = sus(x, y); //CHECK_ALL: struct fptrarr *z = sus(x, y); return z; } @@ -158,10 +158,10 @@ struct fptrarr * bar() { struct fptrarr * x = malloc(sizeof(struct fptrarr)); //CHECK: struct fptrarr * x = malloc(sizeof(struct fptrarr)); struct fptrarr *y = malloc(sizeof(struct fptrarr)); - //CHECK: _Ptr y = malloc(sizeof(struct fptrarr)); + //CHECK: _Ptr y = malloc(sizeof(struct fptrarr)); int *yvals = calloc(5, sizeof(int)); //CHECK_NOALL: int *yvals = calloc(5, sizeof(int)); - //CHECK_ALL: _Array_ptr yvals : count(5) = calloc(5, sizeof(int)); + //CHECK_ALL: _Array_ptr yvals : count(5) = calloc(5, sizeof(int)); int i; for(i = 0; i < 5; i++) { //CHECK_NOALL: for(i = 0; i < 5; i++) { diff --git a/clang/test/CheckedCRewriter/fptrarrstructcallermulti1.c b/clang/test/CheckedCRewriter/fptrarrstructcallermulti1.c index 920310633690..69515beed4a4 100644 --- a/clang/test/CheckedCRewriter/fptrarrstructcallermulti1.c +++ b/clang/test/CheckedCRewriter/fptrarrstructcallermulti1.c @@ -123,10 +123,10 @@ struct fptrarr * foo() { struct fptrarr * x = malloc(sizeof(struct fptrarr)); //CHECK: struct fptrarr * x = malloc(sizeof(struct fptrarr)); struct fptrarr *y = malloc(sizeof(struct fptrarr)); - //CHECK: _Ptr y = malloc(sizeof(struct fptrarr)); + //CHECK: _Ptr y = malloc(sizeof(struct fptrarr)); int *yvals = calloc(5, sizeof(int)); //CHECK_NOALL: int *yvals = calloc(5, sizeof(int)); - //CHECK_ALL: _Array_ptr yvals : count(5) = calloc(5, sizeof(int)); + //CHECK_ALL: _Array_ptr yvals : count(5) = calloc(5, sizeof(int)); int i; for(i = 0; i < 5; i++) { //CHECK_NOALL: for(i = 0; i < 5; i++) { @@ -138,7 +138,7 @@ struct fptrarr * foo() { y->mapper = NULL; strcpy(y->name, "Example"); struct fptrarr *z = sus(x, y); - //CHECK_NOALL: _Ptr z = sus(x, y); + //CHECK_NOALL: _Ptr z = sus(x, y); //CHECK_ALL: struct fptrarr *z = sus(x, y); return z; } @@ -150,10 +150,10 @@ struct fptrarr * bar() { struct fptrarr * x = malloc(sizeof(struct fptrarr)); //CHECK: struct fptrarr * x = malloc(sizeof(struct fptrarr)); struct fptrarr *y = malloc(sizeof(struct fptrarr)); - //CHECK: _Ptr y = malloc(sizeof(struct fptrarr)); + //CHECK: _Ptr y = malloc(sizeof(struct fptrarr)); int *yvals = calloc(5, sizeof(int)); //CHECK_NOALL: int *yvals = calloc(5, sizeof(int)); - //CHECK_ALL: _Array_ptr yvals : count(5) = calloc(5, sizeof(int)); + //CHECK_ALL: _Array_ptr yvals : count(5) = calloc(5, sizeof(int)); int i; for(i = 0; i < 5; i++) { //CHECK_NOALL: for(i = 0; i < 5; i++) { diff --git a/clang/test/CheckedCRewriter/fptrarrstructcallermulti2.c b/clang/test/CheckedCRewriter/fptrarrstructcallermulti2.c index b085bfd261e4..7d759905ebb7 100644 --- a/clang/test/CheckedCRewriter/fptrarrstructcallermulti2.c +++ b/clang/test/CheckedCRewriter/fptrarrstructcallermulti2.c @@ -119,7 +119,7 @@ struct fptrarr * sus(struct fptrarr *x, struct fptrarr *y) { //CHECK: x = (struct fptrarr *) 5; char name[30]; struct fptrarr *z = malloc(sizeof(struct fptrarr)); - //CHECK_NOALL: _Ptr z = malloc(sizeof(struct fptrarr)); + //CHECK_NOALL: _Ptr z = malloc(sizeof(struct fptrarr)); //CHECK_ALL: struct fptrarr *z = malloc(sizeof(struct fptrarr)); z->values = y->values; z->name = strcpy(name, "Hello World"); diff --git a/clang/test/CheckedCRewriter/fptrarrstructprotoboth.c b/clang/test/CheckedCRewriter/fptrarrstructprotoboth.c index 9909d834abd5..ee3e94c36219 100644 --- a/clang/test/CheckedCRewriter/fptrarrstructprotoboth.c +++ b/clang/test/CheckedCRewriter/fptrarrstructprotoboth.c @@ -116,10 +116,10 @@ struct fptrarr * foo() { struct fptrarr * x = malloc(sizeof(struct fptrarr)); //CHECK: struct fptrarr * x = malloc(sizeof(struct fptrarr)); struct fptrarr *y = malloc(sizeof(struct fptrarr)); - //CHECK: _Ptr y = malloc(sizeof(struct fptrarr)); + //CHECK: _Ptr y = malloc(sizeof(struct fptrarr)); int *yvals = calloc(5, sizeof(int)); //CHECK_NOALL: int *yvals = calloc(5, sizeof(int)); - //CHECK_ALL: _Array_ptr yvals : count(5) = calloc(5, sizeof(int)); + //CHECK_ALL: _Array_ptr yvals : count(5) = calloc(5, sizeof(int)); int i; for(i = 0; i < 5; i++) { //CHECK_NOALL: for(i = 0; i < 5; i++) { @@ -142,10 +142,10 @@ struct fptrarr * bar() { struct fptrarr * x = malloc(sizeof(struct fptrarr)); //CHECK: struct fptrarr * x = malloc(sizeof(struct fptrarr)); struct fptrarr *y = malloc(sizeof(struct fptrarr)); - //CHECK: _Ptr y = malloc(sizeof(struct fptrarr)); + //CHECK: _Ptr y = malloc(sizeof(struct fptrarr)); int *yvals = calloc(5, sizeof(int)); //CHECK_NOALL: int *yvals = calloc(5, sizeof(int)); - //CHECK_ALL: _Array_ptr yvals : count(5) = calloc(5, sizeof(int)); + //CHECK_ALL: _Array_ptr yvals : count(5) = calloc(5, sizeof(int)); int i; for(i = 0; i < 5; i++) { //CHECK_NOALL: for(i = 0; i < 5; i++) { diff --git a/clang/test/CheckedCRewriter/fptrarrstructprotocallee.c b/clang/test/CheckedCRewriter/fptrarrstructprotocallee.c index d58769e18e67..c61875c7cd5c 100644 --- a/clang/test/CheckedCRewriter/fptrarrstructprotocallee.c +++ b/clang/test/CheckedCRewriter/fptrarrstructprotocallee.c @@ -116,10 +116,10 @@ struct fptrarr * foo() { struct fptrarr * x = malloc(sizeof(struct fptrarr)); //CHECK: struct fptrarr * x = malloc(sizeof(struct fptrarr)); struct fptrarr *y = malloc(sizeof(struct fptrarr)); - //CHECK: _Ptr y = malloc(sizeof(struct fptrarr)); + //CHECK: _Ptr y = malloc(sizeof(struct fptrarr)); int *yvals = calloc(5, sizeof(int)); //CHECK_NOALL: int *yvals = calloc(5, sizeof(int)); - //CHECK_ALL: _Array_ptr yvals : count(5) = calloc(5, sizeof(int)); + //CHECK_ALL: _Array_ptr yvals : count(5) = calloc(5, sizeof(int)); int i; for(i = 0; i < 5; i++) { //CHECK_NOALL: for(i = 0; i < 5; i++) { @@ -142,10 +142,10 @@ struct fptrarr * bar() { struct fptrarr * x = malloc(sizeof(struct fptrarr)); //CHECK: struct fptrarr * x = malloc(sizeof(struct fptrarr)); struct fptrarr *y = malloc(sizeof(struct fptrarr)); - //CHECK: _Ptr y = malloc(sizeof(struct fptrarr)); + //CHECK: _Ptr y = malloc(sizeof(struct fptrarr)); int *yvals = calloc(5, sizeof(int)); //CHECK_NOALL: int *yvals = calloc(5, sizeof(int)); - //CHECK_ALL: _Array_ptr yvals : count(5) = calloc(5, sizeof(int)); + //CHECK_ALL: _Array_ptr yvals : count(5) = calloc(5, sizeof(int)); int i; for(i = 0; i < 5; i++) { //CHECK_NOALL: for(i = 0; i < 5; i++) { diff --git a/clang/test/CheckedCRewriter/fptrarrstructprotocaller.c b/clang/test/CheckedCRewriter/fptrarrstructprotocaller.c index c2e29f3fda01..a15b1371c2df 100644 --- a/clang/test/CheckedCRewriter/fptrarrstructprotocaller.c +++ b/clang/test/CheckedCRewriter/fptrarrstructprotocaller.c @@ -118,10 +118,10 @@ struct fptrarr * foo() { struct fptrarr * x = malloc(sizeof(struct fptrarr)); //CHECK: struct fptrarr * x = malloc(sizeof(struct fptrarr)); struct fptrarr *y = malloc(sizeof(struct fptrarr)); - //CHECK: _Ptr y = malloc(sizeof(struct fptrarr)); + //CHECK: _Ptr y = malloc(sizeof(struct fptrarr)); int *yvals = calloc(5, sizeof(int)); //CHECK_NOALL: int *yvals = calloc(5, sizeof(int)); - //CHECK_ALL: _Array_ptr yvals : count(5) = calloc(5, sizeof(int)); + //CHECK_ALL: _Array_ptr yvals : count(5) = calloc(5, sizeof(int)); int i; for(i = 0; i < 5; i++) { //CHECK_NOALL: for(i = 0; i < 5; i++) { @@ -133,7 +133,7 @@ struct fptrarr * foo() { y->mapper = NULL; strcpy(y->name, "Example"); struct fptrarr *z = sus(x, y); - //CHECK_NOALL: _Ptr z = sus(x, y); + //CHECK_NOALL: _Ptr z = sus(x, y); //CHECK_ALL: struct fptrarr *z = sus(x, y); return z; } @@ -145,10 +145,10 @@ struct fptrarr * bar() { struct fptrarr * x = malloc(sizeof(struct fptrarr)); //CHECK: struct fptrarr * x = malloc(sizeof(struct fptrarr)); struct fptrarr *y = malloc(sizeof(struct fptrarr)); - //CHECK: _Ptr y = malloc(sizeof(struct fptrarr)); + //CHECK: _Ptr y = malloc(sizeof(struct fptrarr)); int *yvals = calloc(5, sizeof(int)); //CHECK_NOALL: int *yvals = calloc(5, sizeof(int)); - //CHECK_ALL: _Array_ptr yvals : count(5) = calloc(5, sizeof(int)); + //CHECK_ALL: _Array_ptr yvals : count(5) = calloc(5, sizeof(int)); int i; for(i = 0; i < 5; i++) { //CHECK_NOALL: for(i = 0; i < 5; i++) { @@ -173,7 +173,7 @@ struct fptrarr * sus(struct fptrarr *x, struct fptrarr *y) { //CHECK: x = (struct fptrarr *) 5; char name[30]; struct fptrarr *z = malloc(sizeof(struct fptrarr)); - //CHECK_NOALL: _Ptr z = malloc(sizeof(struct fptrarr)); + //CHECK_NOALL: _Ptr z = malloc(sizeof(struct fptrarr)); //CHECK_ALL: struct fptrarr *z = malloc(sizeof(struct fptrarr)); z->values = y->values; z->name = strcpy(name, "Hello World"); diff --git a/clang/test/CheckedCRewriter/fptrarrstructprotosafe.c b/clang/test/CheckedCRewriter/fptrarrstructprotosafe.c index 64a4510b182c..f63986c1f9ac 100644 --- a/clang/test/CheckedCRewriter/fptrarrstructprotosafe.c +++ b/clang/test/CheckedCRewriter/fptrarrstructprotosafe.c @@ -115,10 +115,10 @@ struct fptrarr * foo() { struct fptrarr * x = malloc(sizeof(struct fptrarr)); //CHECK: struct fptrarr * x = malloc(sizeof(struct fptrarr)); struct fptrarr *y = malloc(sizeof(struct fptrarr)); - //CHECK: _Ptr y = malloc(sizeof(struct fptrarr)); + //CHECK: _Ptr y = malloc(sizeof(struct fptrarr)); int *yvals = calloc(5, sizeof(int)); //CHECK_NOALL: int *yvals = calloc(5, sizeof(int)); - //CHECK_ALL: _Array_ptr yvals : count(5) = calloc(5, sizeof(int)); + //CHECK_ALL: _Array_ptr yvals : count(5) = calloc(5, sizeof(int)); int i; for(i = 0; i < 5; i++) { //CHECK_NOALL: for(i = 0; i < 5; i++) { @@ -130,7 +130,7 @@ struct fptrarr * foo() { y->mapper = NULL; strcpy(y->name, "Example"); struct fptrarr *z = sus(x, y); - //CHECK: _Ptr z = sus(x, y); + //CHECK: _Ptr z = sus(x, y); return z; } @@ -141,10 +141,10 @@ struct fptrarr * bar() { struct fptrarr * x = malloc(sizeof(struct fptrarr)); //CHECK: struct fptrarr * x = malloc(sizeof(struct fptrarr)); struct fptrarr *y = malloc(sizeof(struct fptrarr)); - //CHECK: _Ptr y = malloc(sizeof(struct fptrarr)); + //CHECK: _Ptr y = malloc(sizeof(struct fptrarr)); int *yvals = calloc(5, sizeof(int)); //CHECK_NOALL: int *yvals = calloc(5, sizeof(int)); - //CHECK_ALL: _Array_ptr yvals : count(5) = calloc(5, sizeof(int)); + //CHECK_ALL: _Array_ptr yvals : count(5) = calloc(5, sizeof(int)); int i; for(i = 0; i < 5; i++) { //CHECK_NOALL: for(i = 0; i < 5; i++) { @@ -156,7 +156,7 @@ struct fptrarr * bar() { y->mapper = NULL; strcpy(y->name, "Example"); struct fptrarr *z = sus(x, y); - //CHECK: _Ptr z = sus(x, y); + //CHECK: _Ptr z = sus(x, y); return z; } @@ -167,7 +167,7 @@ struct fptrarr * sus(struct fptrarr *x, struct fptrarr *y) { //CHECK: x = (struct fptrarr *) 5; char name[30]; struct fptrarr *z = malloc(sizeof(struct fptrarr)); - //CHECK: _Ptr z = malloc(sizeof(struct fptrarr)); + //CHECK: _Ptr z = malloc(sizeof(struct fptrarr)); z->values = y->values; z->name = strcpy(name, "Hello World"); z->mapper = fact; diff --git a/clang/test/CheckedCRewriter/fptrarrstructsafe.c b/clang/test/CheckedCRewriter/fptrarrstructsafe.c index f824fa559415..ca2dda7b78ef 100644 --- a/clang/test/CheckedCRewriter/fptrarrstructsafe.c +++ b/clang/test/CheckedCRewriter/fptrarrstructsafe.c @@ -109,7 +109,7 @@ struct fptrarr * sus(struct fptrarr *x, struct fptrarr *y) { //CHECK: x = (struct fptrarr *) 5; char name[30]; struct fptrarr *z = malloc(sizeof(struct fptrarr)); - //CHECK: _Ptr z = malloc(sizeof(struct fptrarr)); + //CHECK: _Ptr z = malloc(sizeof(struct fptrarr)); z->values = y->values; z->name = strcpy(name, "Hello World"); z->mapper = fact; @@ -127,10 +127,10 @@ struct fptrarr * foo() { struct fptrarr * x = malloc(sizeof(struct fptrarr)); //CHECK: struct fptrarr * x = malloc(sizeof(struct fptrarr)); struct fptrarr *y = malloc(sizeof(struct fptrarr)); - //CHECK: _Ptr y = malloc(sizeof(struct fptrarr)); + //CHECK: _Ptr y = malloc(sizeof(struct fptrarr)); int *yvals = calloc(5, sizeof(int)); //CHECK_NOALL: int *yvals = calloc(5, sizeof(int)); - //CHECK_ALL: _Array_ptr yvals : count(5) = calloc(5, sizeof(int)); + //CHECK_ALL: _Array_ptr yvals : count(5) = calloc(5, sizeof(int)); int i; for(i = 0; i < 5; i++) { //CHECK_NOALL: for(i = 0; i < 5; i++) { @@ -142,7 +142,7 @@ struct fptrarr * foo() { y->mapper = NULL; strcpy(y->name, "Example"); struct fptrarr *z = sus(x, y); - //CHECK: _Ptr z = sus(x, y); + //CHECK: _Ptr z = sus(x, y); return z; } @@ -153,10 +153,10 @@ struct fptrarr * bar() { struct fptrarr * x = malloc(sizeof(struct fptrarr)); //CHECK: struct fptrarr * x = malloc(sizeof(struct fptrarr)); struct fptrarr *y = malloc(sizeof(struct fptrarr)); - //CHECK: _Ptr y = malloc(sizeof(struct fptrarr)); + //CHECK: _Ptr y = malloc(sizeof(struct fptrarr)); int *yvals = calloc(5, sizeof(int)); //CHECK_NOALL: int *yvals = calloc(5, sizeof(int)); - //CHECK_ALL: _Array_ptr yvals : count(5) = calloc(5, sizeof(int)); + //CHECK_ALL: _Array_ptr yvals : count(5) = calloc(5, sizeof(int)); int i; for(i = 0; i < 5; i++) { //CHECK_NOALL: for(i = 0; i < 5; i++) { @@ -168,6 +168,6 @@ struct fptrarr * bar() { y->mapper = NULL; strcpy(y->name, "Example"); struct fptrarr *z = sus(x, y); - //CHECK: _Ptr z = sus(x, y); + //CHECK: _Ptr z = sus(x, y); return z; } diff --git a/clang/test/CheckedCRewriter/fptrarrstructsafemulti1.c b/clang/test/CheckedCRewriter/fptrarrstructsafemulti1.c index 6233ccf0d6cc..c0d4faaf676b 100644 --- a/clang/test/CheckedCRewriter/fptrarrstructsafemulti1.c +++ b/clang/test/CheckedCRewriter/fptrarrstructsafemulti1.c @@ -120,10 +120,10 @@ struct fptrarr * foo() { struct fptrarr * x = malloc(sizeof(struct fptrarr)); //CHECK: struct fptrarr * x = malloc(sizeof(struct fptrarr)); struct fptrarr *y = malloc(sizeof(struct fptrarr)); - //CHECK: _Ptr y = malloc(sizeof(struct fptrarr)); + //CHECK: _Ptr y = malloc(sizeof(struct fptrarr)); int *yvals = calloc(5, sizeof(int)); //CHECK_NOALL: int *yvals = calloc(5, sizeof(int)); - //CHECK_ALL: _Array_ptr yvals : count(5) = calloc(5, sizeof(int)); + //CHECK_ALL: _Array_ptr yvals : count(5) = calloc(5, sizeof(int)); int i; for(i = 0; i < 5; i++) { //CHECK_NOALL: for(i = 0; i < 5; i++) { @@ -135,7 +135,7 @@ struct fptrarr * foo() { y->mapper = NULL; strcpy(y->name, "Example"); struct fptrarr *z = sus(x, y); - //CHECK: _Ptr z = sus(x, y); + //CHECK: _Ptr z = sus(x, y); return z; } @@ -146,10 +146,10 @@ struct fptrarr * bar() { struct fptrarr * x = malloc(sizeof(struct fptrarr)); //CHECK: struct fptrarr * x = malloc(sizeof(struct fptrarr)); struct fptrarr *y = malloc(sizeof(struct fptrarr)); - //CHECK: _Ptr y = malloc(sizeof(struct fptrarr)); + //CHECK: _Ptr y = malloc(sizeof(struct fptrarr)); int *yvals = calloc(5, sizeof(int)); //CHECK_NOALL: int *yvals = calloc(5, sizeof(int)); - //CHECK_ALL: _Array_ptr yvals : count(5) = calloc(5, sizeof(int)); + //CHECK_ALL: _Array_ptr yvals : count(5) = calloc(5, sizeof(int)); int i; for(i = 0; i < 5; i++) { //CHECK_NOALL: for(i = 0; i < 5; i++) { @@ -161,6 +161,6 @@ struct fptrarr * bar() { y->mapper = NULL; strcpy(y->name, "Example"); struct fptrarr *z = sus(x, y); - //CHECK: _Ptr z = sus(x, y); + //CHECK: _Ptr z = sus(x, y); return z; } diff --git a/clang/test/CheckedCRewriter/fptrarrstructsafemulti2.c b/clang/test/CheckedCRewriter/fptrarrstructsafemulti2.c index 2651b3cc6b49..96c5a18cfb0e 100644 --- a/clang/test/CheckedCRewriter/fptrarrstructsafemulti2.c +++ b/clang/test/CheckedCRewriter/fptrarrstructsafemulti2.c @@ -117,7 +117,7 @@ struct fptrarr * sus(struct fptrarr *x, struct fptrarr *y) { //CHECK: x = (struct fptrarr *) 5; char name[30]; struct fptrarr *z = malloc(sizeof(struct fptrarr)); - //CHECK: _Ptr z = malloc(sizeof(struct fptrarr)); + //CHECK: _Ptr z = malloc(sizeof(struct fptrarr)); z->values = y->values; z->name = strcpy(name, "Hello World"); z->mapper = fact; diff --git a/clang/test/CheckedCRewriter/fptrinstructboth.c b/clang/test/CheckedCRewriter/fptrinstructboth.c index 5ec187f464c6..d230ea33700c 100644 --- a/clang/test/CheckedCRewriter/fptrinstructboth.c +++ b/clang/test/CheckedCRewriter/fptrinstructboth.c @@ -121,7 +121,7 @@ struct fptr * foo() { struct fptr * x = malloc(sizeof(struct fptr)); //CHECK: struct fptr * x = malloc(sizeof(struct fptr)); struct fptr *y = malloc(sizeof(struct fptr)); - //CHECK: _Ptr y = malloc(sizeof(struct fptr)); + //CHECK: _Ptr y = malloc(sizeof(struct fptr)); struct fptr *z = sus(x, y); //CHECK: struct fptr *z = sus(x, y); @@ -133,7 +133,7 @@ struct fptr * bar() { struct fptr * x = malloc(sizeof(struct fptr)); //CHECK: struct fptr * x = malloc(sizeof(struct fptr)); struct fptr *y = malloc(sizeof(struct fptr)); - //CHECK: _Ptr y = malloc(sizeof(struct fptr)); + //CHECK: _Ptr y = malloc(sizeof(struct fptr)); struct fptr *z = sus(x, y); //CHECK: struct fptr *z = sus(x, y); diff --git a/clang/test/CheckedCRewriter/fptrinstructbothmulti1.c b/clang/test/CheckedCRewriter/fptrinstructbothmulti1.c index 68180ad202da..34225ce1ba27 100644 --- a/clang/test/CheckedCRewriter/fptrinstructbothmulti1.c +++ b/clang/test/CheckedCRewriter/fptrinstructbothmulti1.c @@ -119,7 +119,7 @@ struct fptr * foo() { struct fptr * x = malloc(sizeof(struct fptr)); //CHECK: struct fptr * x = malloc(sizeof(struct fptr)); struct fptr *y = malloc(sizeof(struct fptr)); - //CHECK: _Ptr y = malloc(sizeof(struct fptr)); + //CHECK: _Ptr y = malloc(sizeof(struct fptr)); struct fptr *z = sus(x, y); //CHECK: struct fptr *z = sus(x, y); @@ -131,7 +131,7 @@ struct fptr * bar() { struct fptr * x = malloc(sizeof(struct fptr)); //CHECK: struct fptr * x = malloc(sizeof(struct fptr)); struct fptr *y = malloc(sizeof(struct fptr)); - //CHECK: _Ptr y = malloc(sizeof(struct fptr)); + //CHECK: _Ptr y = malloc(sizeof(struct fptr)); struct fptr *z = sus(x, y); //CHECK: struct fptr *z = sus(x, y); diff --git a/clang/test/CheckedCRewriter/fptrinstructcallee.c b/clang/test/CheckedCRewriter/fptrinstructcallee.c index 6c1e7b5c3a53..122d06e83b90 100644 --- a/clang/test/CheckedCRewriter/fptrinstructcallee.c +++ b/clang/test/CheckedCRewriter/fptrinstructcallee.c @@ -121,7 +121,7 @@ struct fptr * foo() { struct fptr * x = malloc(sizeof(struct fptr)); //CHECK: struct fptr * x = malloc(sizeof(struct fptr)); struct fptr *y = malloc(sizeof(struct fptr)); - //CHECK: _Ptr y = malloc(sizeof(struct fptr)); + //CHECK: _Ptr y = malloc(sizeof(struct fptr)); struct fptr *z = sus(x, y); //CHECK: struct fptr *z = sus(x, y); @@ -133,7 +133,7 @@ struct fptr * bar() { struct fptr * x = malloc(sizeof(struct fptr)); //CHECK: struct fptr * x = malloc(sizeof(struct fptr)); struct fptr *y = malloc(sizeof(struct fptr)); - //CHECK: _Ptr y = malloc(sizeof(struct fptr)); + //CHECK: _Ptr y = malloc(sizeof(struct fptr)); struct fptr *z = sus(x, y); //CHECK: struct fptr *z = sus(x, y); diff --git a/clang/test/CheckedCRewriter/fptrinstructcalleemulti1.c b/clang/test/CheckedCRewriter/fptrinstructcalleemulti1.c index da9bc56635e7..cbc60040434c 100644 --- a/clang/test/CheckedCRewriter/fptrinstructcalleemulti1.c +++ b/clang/test/CheckedCRewriter/fptrinstructcalleemulti1.c @@ -119,7 +119,7 @@ struct fptr * foo() { struct fptr * x = malloc(sizeof(struct fptr)); //CHECK: struct fptr * x = malloc(sizeof(struct fptr)); struct fptr *y = malloc(sizeof(struct fptr)); - //CHECK: _Ptr y = malloc(sizeof(struct fptr)); + //CHECK: _Ptr y = malloc(sizeof(struct fptr)); struct fptr *z = sus(x, y); //CHECK: struct fptr *z = sus(x, y); @@ -131,7 +131,7 @@ struct fptr * bar() { struct fptr * x = malloc(sizeof(struct fptr)); //CHECK: struct fptr * x = malloc(sizeof(struct fptr)); struct fptr *y = malloc(sizeof(struct fptr)); - //CHECK: _Ptr y = malloc(sizeof(struct fptr)); + //CHECK: _Ptr y = malloc(sizeof(struct fptr)); struct fptr *z = sus(x, y); //CHECK: struct fptr *z = sus(x, y); diff --git a/clang/test/CheckedCRewriter/fptrinstructcaller.c b/clang/test/CheckedCRewriter/fptrinstructcaller.c index 999dea8db5ee..7d46fdb8e4a2 100644 --- a/clang/test/CheckedCRewriter/fptrinstructcaller.c +++ b/clang/test/CheckedCRewriter/fptrinstructcaller.c @@ -109,7 +109,7 @@ struct fptr * sus(struct fptr *x, struct fptr *y) { x = (struct fptr *) 5; //CHECK: x = (struct fptr *) 5; struct fptr *z = malloc(sizeof(struct fptr)); - //CHECK_NOALL: _Ptr z = malloc(sizeof(struct fptr)); + //CHECK_NOALL: _Ptr z = malloc(sizeof(struct fptr)); //CHECK_ALL: struct fptr *z = malloc(sizeof(struct fptr)); z->value = y->value; z->func = fact; @@ -123,9 +123,9 @@ struct fptr * foo() { struct fptr * x = malloc(sizeof(struct fptr)); //CHECK: struct fptr * x = malloc(sizeof(struct fptr)); struct fptr *y = malloc(sizeof(struct fptr)); - //CHECK: _Ptr y = malloc(sizeof(struct fptr)); + //CHECK: _Ptr y = malloc(sizeof(struct fptr)); struct fptr *z = sus(x, y); - //CHECK_NOALL: _Ptr z = sus(x, y); + //CHECK_NOALL: _Ptr z = sus(x, y); //CHECK_ALL: struct fptr *z = sus(x, y); return z; } @@ -136,7 +136,7 @@ struct fptr * bar() { struct fptr * x = malloc(sizeof(struct fptr)); //CHECK: struct fptr * x = malloc(sizeof(struct fptr)); struct fptr *y = malloc(sizeof(struct fptr)); - //CHECK: _Ptr y = malloc(sizeof(struct fptr)); + //CHECK: _Ptr y = malloc(sizeof(struct fptr)); struct fptr *z = sus(x, y); //CHECK: struct fptr *z = sus(x, y); diff --git a/clang/test/CheckedCRewriter/fptrinstructcallermulti1.c b/clang/test/CheckedCRewriter/fptrinstructcallermulti1.c index 86a2d3a900d9..c8326e312d17 100644 --- a/clang/test/CheckedCRewriter/fptrinstructcallermulti1.c +++ b/clang/test/CheckedCRewriter/fptrinstructcallermulti1.c @@ -121,9 +121,9 @@ struct fptr * foo() { struct fptr * x = malloc(sizeof(struct fptr)); //CHECK: struct fptr * x = malloc(sizeof(struct fptr)); struct fptr *y = malloc(sizeof(struct fptr)); - //CHECK: _Ptr y = malloc(sizeof(struct fptr)); + //CHECK: _Ptr y = malloc(sizeof(struct fptr)); struct fptr *z = sus(x, y); - //CHECK_NOALL: _Ptr z = sus(x, y); + //CHECK_NOALL: _Ptr z = sus(x, y); //CHECK_ALL: struct fptr *z = sus(x, y); return z; } @@ -134,7 +134,7 @@ struct fptr * bar() { struct fptr * x = malloc(sizeof(struct fptr)); //CHECK: struct fptr * x = malloc(sizeof(struct fptr)); struct fptr *y = malloc(sizeof(struct fptr)); - //CHECK: _Ptr y = malloc(sizeof(struct fptr)); + //CHECK: _Ptr y = malloc(sizeof(struct fptr)); struct fptr *z = sus(x, y); //CHECK: struct fptr *z = sus(x, y); diff --git a/clang/test/CheckedCRewriter/fptrinstructcallermulti2.c b/clang/test/CheckedCRewriter/fptrinstructcallermulti2.c index de9594d9554a..c0ffb6c687fd 100644 --- a/clang/test/CheckedCRewriter/fptrinstructcallermulti2.c +++ b/clang/test/CheckedCRewriter/fptrinstructcallermulti2.c @@ -117,7 +117,7 @@ struct fptr * sus(struct fptr *x, struct fptr *y) { x = (struct fptr *) 5; //CHECK: x = (struct fptr *) 5; struct fptr *z = malloc(sizeof(struct fptr)); - //CHECK_NOALL: _Ptr z = malloc(sizeof(struct fptr)); + //CHECK_NOALL: _Ptr z = malloc(sizeof(struct fptr)); //CHECK_ALL: struct fptr *z = malloc(sizeof(struct fptr)); z->value = y->value; z->func = fact; diff --git a/clang/test/CheckedCRewriter/fptrinstructprotoboth.c b/clang/test/CheckedCRewriter/fptrinstructprotoboth.c index d8d5da8c7d4f..a37881e770ed 100644 --- a/clang/test/CheckedCRewriter/fptrinstructprotoboth.c +++ b/clang/test/CheckedCRewriter/fptrinstructprotoboth.c @@ -114,7 +114,7 @@ struct fptr * foo() { struct fptr * x = malloc(sizeof(struct fptr)); //CHECK: struct fptr * x = malloc(sizeof(struct fptr)); struct fptr *y = malloc(sizeof(struct fptr)); - //CHECK: _Ptr y = malloc(sizeof(struct fptr)); + //CHECK: _Ptr y = malloc(sizeof(struct fptr)); struct fptr *z = sus(x, y); //CHECK: struct fptr *z = sus(x, y); @@ -126,7 +126,7 @@ struct fptr * bar() { struct fptr * x = malloc(sizeof(struct fptr)); //CHECK: struct fptr * x = malloc(sizeof(struct fptr)); struct fptr *y = malloc(sizeof(struct fptr)); - //CHECK: _Ptr y = malloc(sizeof(struct fptr)); + //CHECK: _Ptr y = malloc(sizeof(struct fptr)); struct fptr *z = sus(x, y); //CHECK: struct fptr *z = sus(x, y); diff --git a/clang/test/CheckedCRewriter/fptrinstructprotocallee.c b/clang/test/CheckedCRewriter/fptrinstructprotocallee.c index 2fa49d54469a..54b134540d54 100644 --- a/clang/test/CheckedCRewriter/fptrinstructprotocallee.c +++ b/clang/test/CheckedCRewriter/fptrinstructprotocallee.c @@ -114,7 +114,7 @@ struct fptr * foo() { struct fptr * x = malloc(sizeof(struct fptr)); //CHECK: struct fptr * x = malloc(sizeof(struct fptr)); struct fptr *y = malloc(sizeof(struct fptr)); - //CHECK: _Ptr y = malloc(sizeof(struct fptr)); + //CHECK: _Ptr y = malloc(sizeof(struct fptr)); struct fptr *z = sus(x, y); //CHECK: struct fptr *z = sus(x, y); @@ -126,7 +126,7 @@ struct fptr * bar() { struct fptr * x = malloc(sizeof(struct fptr)); //CHECK: struct fptr * x = malloc(sizeof(struct fptr)); struct fptr *y = malloc(sizeof(struct fptr)); - //CHECK: _Ptr y = malloc(sizeof(struct fptr)); + //CHECK: _Ptr y = malloc(sizeof(struct fptr)); struct fptr *z = sus(x, y); //CHECK: struct fptr *z = sus(x, y); diff --git a/clang/test/CheckedCRewriter/fptrinstructprotocaller.c b/clang/test/CheckedCRewriter/fptrinstructprotocaller.c index 0ec9cee58fed..f3f9f2c22ae5 100644 --- a/clang/test/CheckedCRewriter/fptrinstructprotocaller.c +++ b/clang/test/CheckedCRewriter/fptrinstructprotocaller.c @@ -116,9 +116,9 @@ struct fptr * foo() { struct fptr * x = malloc(sizeof(struct fptr)); //CHECK: struct fptr * x = malloc(sizeof(struct fptr)); struct fptr *y = malloc(sizeof(struct fptr)); - //CHECK: _Ptr y = malloc(sizeof(struct fptr)); + //CHECK: _Ptr y = malloc(sizeof(struct fptr)); struct fptr *z = sus(x, y); - //CHECK_NOALL: _Ptr z = sus(x, y); + //CHECK_NOALL: _Ptr z = sus(x, y); //CHECK_ALL: struct fptr *z = sus(x, y); return z; } @@ -129,7 +129,7 @@ struct fptr * bar() { struct fptr * x = malloc(sizeof(struct fptr)); //CHECK: struct fptr * x = malloc(sizeof(struct fptr)); struct fptr *y = malloc(sizeof(struct fptr)); - //CHECK: _Ptr y = malloc(sizeof(struct fptr)); + //CHECK: _Ptr y = malloc(sizeof(struct fptr)); struct fptr *z = sus(x, y); //CHECK: struct fptr *z = sus(x, y); @@ -143,7 +143,7 @@ struct fptr * sus(struct fptr *x, struct fptr *y) { x = (struct fptr *) 5; //CHECK: x = (struct fptr *) 5; struct fptr *z = malloc(sizeof(struct fptr)); - //CHECK_NOALL: _Ptr z = malloc(sizeof(struct fptr)); + //CHECK_NOALL: _Ptr z = malloc(sizeof(struct fptr)); //CHECK_ALL: struct fptr *z = malloc(sizeof(struct fptr)); z->value = y->value; z->func = fact; diff --git a/clang/test/CheckedCRewriter/fptrinstructprotosafe.c b/clang/test/CheckedCRewriter/fptrinstructprotosafe.c index 9a61c70a052c..1db8e0afd46b 100644 --- a/clang/test/CheckedCRewriter/fptrinstructprotosafe.c +++ b/clang/test/CheckedCRewriter/fptrinstructprotosafe.c @@ -113,9 +113,9 @@ struct fptr * foo() { struct fptr * x = malloc(sizeof(struct fptr)); //CHECK: struct fptr * x = malloc(sizeof(struct fptr)); struct fptr *y = malloc(sizeof(struct fptr)); - //CHECK: _Ptr y = malloc(sizeof(struct fptr)); + //CHECK: _Ptr y = malloc(sizeof(struct fptr)); struct fptr *z = sus(x, y); - //CHECK: _Ptr z = sus(x, y); + //CHECK: _Ptr z = sus(x, y); return z; } @@ -125,9 +125,9 @@ struct fptr * bar() { struct fptr * x = malloc(sizeof(struct fptr)); //CHECK: struct fptr * x = malloc(sizeof(struct fptr)); struct fptr *y = malloc(sizeof(struct fptr)); - //CHECK: _Ptr y = malloc(sizeof(struct fptr)); + //CHECK: _Ptr y = malloc(sizeof(struct fptr)); struct fptr *z = sus(x, y); - //CHECK: _Ptr z = sus(x, y); + //CHECK: _Ptr z = sus(x, y); return z; } @@ -137,7 +137,7 @@ struct fptr * sus(struct fptr *x, struct fptr *y) { x = (struct fptr *) 5; //CHECK: x = (struct fptr *) 5; struct fptr *z = malloc(sizeof(struct fptr)); - //CHECK: _Ptr z = malloc(sizeof(struct fptr)); + //CHECK: _Ptr z = malloc(sizeof(struct fptr)); z->value = y->value; z->func = fact; diff --git a/clang/test/CheckedCRewriter/fptrinstructsafe.c b/clang/test/CheckedCRewriter/fptrinstructsafe.c index dba47f6b620a..a6cdd6a359a5 100644 --- a/clang/test/CheckedCRewriter/fptrinstructsafe.c +++ b/clang/test/CheckedCRewriter/fptrinstructsafe.c @@ -107,7 +107,7 @@ struct fptr * sus(struct fptr *x, struct fptr *y) { x = (struct fptr *) 5; //CHECK: x = (struct fptr *) 5; struct fptr *z = malloc(sizeof(struct fptr)); - //CHECK: _Ptr z = malloc(sizeof(struct fptr)); + //CHECK: _Ptr z = malloc(sizeof(struct fptr)); z->value = y->value; z->func = fact; @@ -119,9 +119,9 @@ struct fptr * foo() { struct fptr * x = malloc(sizeof(struct fptr)); //CHECK: struct fptr * x = malloc(sizeof(struct fptr)); struct fptr *y = malloc(sizeof(struct fptr)); - //CHECK: _Ptr y = malloc(sizeof(struct fptr)); + //CHECK: _Ptr y = malloc(sizeof(struct fptr)); struct fptr *z = sus(x, y); - //CHECK: _Ptr z = sus(x, y); + //CHECK: _Ptr z = sus(x, y); return z; } @@ -131,8 +131,8 @@ struct fptr * bar() { struct fptr * x = malloc(sizeof(struct fptr)); //CHECK: struct fptr * x = malloc(sizeof(struct fptr)); struct fptr *y = malloc(sizeof(struct fptr)); - //CHECK: _Ptr y = malloc(sizeof(struct fptr)); + //CHECK: _Ptr y = malloc(sizeof(struct fptr)); struct fptr *z = sus(x, y); - //CHECK: _Ptr z = sus(x, y); + //CHECK: _Ptr z = sus(x, y); return z; } diff --git a/clang/test/CheckedCRewriter/fptrinstructsafemulti1.c b/clang/test/CheckedCRewriter/fptrinstructsafemulti1.c index 6bcfb4e5b69e..99db0f6f1c67 100644 --- a/clang/test/CheckedCRewriter/fptrinstructsafemulti1.c +++ b/clang/test/CheckedCRewriter/fptrinstructsafemulti1.c @@ -118,9 +118,9 @@ struct fptr * foo() { struct fptr * x = malloc(sizeof(struct fptr)); //CHECK: struct fptr * x = malloc(sizeof(struct fptr)); struct fptr *y = malloc(sizeof(struct fptr)); - //CHECK: _Ptr y = malloc(sizeof(struct fptr)); + //CHECK: _Ptr y = malloc(sizeof(struct fptr)); struct fptr *z = sus(x, y); - //CHECK: _Ptr z = sus(x, y); + //CHECK: _Ptr z = sus(x, y); return z; } @@ -130,8 +130,8 @@ struct fptr * bar() { struct fptr * x = malloc(sizeof(struct fptr)); //CHECK: struct fptr * x = malloc(sizeof(struct fptr)); struct fptr *y = malloc(sizeof(struct fptr)); - //CHECK: _Ptr y = malloc(sizeof(struct fptr)); + //CHECK: _Ptr y = malloc(sizeof(struct fptr)); struct fptr *z = sus(x, y); - //CHECK: _Ptr z = sus(x, y); + //CHECK: _Ptr z = sus(x, y); return z; } diff --git a/clang/test/CheckedCRewriter/fptrinstructsafemulti2.c b/clang/test/CheckedCRewriter/fptrinstructsafemulti2.c index 6e300696c13d..3a6567c05a69 100644 --- a/clang/test/CheckedCRewriter/fptrinstructsafemulti2.c +++ b/clang/test/CheckedCRewriter/fptrinstructsafemulti2.c @@ -115,7 +115,7 @@ struct fptr * sus(struct fptr *x, struct fptr *y) { x = (struct fptr *) 5; //CHECK: x = (struct fptr *) 5; struct fptr *z = malloc(sizeof(struct fptr)); - //CHECK: _Ptr z = malloc(sizeof(struct fptr)); + //CHECK: _Ptr z = malloc(sizeof(struct fptr)); z->value = y->value; z->func = fact; diff --git a/clang/test/CheckedCRewriter/fptrsafeboth.c b/clang/test/CheckedCRewriter/fptrsafeboth.c index 725a37ef9642..fddae604094c 100644 --- a/clang/test/CheckedCRewriter/fptrsafeboth.c +++ b/clang/test/CheckedCRewriter/fptrsafeboth.c @@ -110,9 +110,9 @@ int * sus(struct general *x, struct general *y) { //CHECK: x = (struct general *) 5; int *z = calloc(5, sizeof(int)); //CHECK_NOALL: int *z = calloc(5, sizeof(int)); - //CHECK_ALL: _Array_ptr z : count(5) = calloc(5, sizeof(int)); + //CHECK_ALL: _Array_ptr z : count(5) = calloc(5, sizeof(int)); struct general *p = y; - //CHECK: _Ptr p = y; + //CHECK: _Ptr p = y; int i; for(i = 0; i < 5; p = p->next, i++) { //CHECK_NOALL: for(i = 0; i < 5; p = p->next, i++) { @@ -130,9 +130,9 @@ int * foo() { struct general *x = malloc(sizeof(struct general)); //CHECK: struct general *x = malloc(sizeof(struct general)); struct general *y = malloc(sizeof(struct general)); - //CHECK: _Ptr y = malloc(sizeof(struct general)); + //CHECK: _Ptr y = malloc(sizeof(struct general)); struct general *curr = y; - //CHECK: _Ptr curr = y; + //CHECK: _Ptr curr = y; int i; for(i = 1; i < 5; i++, curr = curr->next) { curr->data = i; @@ -140,11 +140,11 @@ int * foo() { curr->next->data = i+1; } int * (*sus_ptr)(struct general *, struct general *) = sus; - //CHECK_NOALL: _Ptr )> sus_ptr = sus; - //CHECK_ALL: _Ptr<_Array_ptr (struct general *, _Ptr )> sus_ptr = sus; + //CHECK_NOALL: _Ptr )> sus_ptr = sus; + //CHECK_ALL: _Ptr<_Array_ptr (struct general *, _Ptr )> sus_ptr = sus; int *z = sus_ptr(x, y); //CHECK_NOALL: int *z = sus_ptr(x, y); - //CHECK_ALL: _Array_ptr z = sus_ptr(x, y); + //CHECK_ALL: _Array_ptr z = sus_ptr(x, y); return z; } @@ -155,9 +155,9 @@ int * bar() { struct general *x = malloc(sizeof(struct general)); //CHECK: struct general *x = malloc(sizeof(struct general)); struct general *y = malloc(sizeof(struct general)); - //CHECK: _Ptr y = malloc(sizeof(struct general)); + //CHECK: _Ptr y = malloc(sizeof(struct general)); struct general *curr = y; - //CHECK: _Ptr curr = y; + //CHECK: _Ptr curr = y; int i; for(i = 1; i < 5; i++, curr = curr->next) { curr->data = i; @@ -165,11 +165,11 @@ int * bar() { curr->next->data = i+1; } int * (*sus_ptr)(struct general *, struct general *) = sus; - //CHECK_NOALL: _Ptr )> sus_ptr = sus; - //CHECK_ALL: _Ptr<_Array_ptr (struct general *, _Ptr )> sus_ptr = sus; + //CHECK_NOALL: _Ptr )> sus_ptr = sus; + //CHECK_ALL: _Ptr<_Array_ptr (struct general *, _Ptr )> sus_ptr = sus; int *z = sus_ptr(x, y); //CHECK_NOALL: int *z = sus_ptr(x, y); - //CHECK_ALL: _Array_ptr z = sus_ptr(x, y); + //CHECK_ALL: _Array_ptr z = sus_ptr(x, y); z += 2; return z; } diff --git a/clang/test/CheckedCRewriter/fptrsafebothmulti1.c b/clang/test/CheckedCRewriter/fptrsafebothmulti1.c index cc5924274439..0718ba2a6e15 100644 --- a/clang/test/CheckedCRewriter/fptrsafebothmulti1.c +++ b/clang/test/CheckedCRewriter/fptrsafebothmulti1.c @@ -121,9 +121,9 @@ int * foo() { struct general *x = malloc(sizeof(struct general)); //CHECK: struct general *x = malloc(sizeof(struct general)); struct general *y = malloc(sizeof(struct general)); - //CHECK: _Ptr y = malloc(sizeof(struct general)); + //CHECK: _Ptr y = malloc(sizeof(struct general)); struct general *curr = y; - //CHECK: _Ptr curr = y; + //CHECK: _Ptr curr = y; int i; for(i = 1; i < 5; i++, curr = curr->next) { curr->data = i; @@ -131,11 +131,11 @@ int * foo() { curr->next->data = i+1; } int * (*sus_ptr)(struct general *, struct general *) = sus; - //CHECK_NOALL: _Ptr )> sus_ptr = sus; - //CHECK_ALL: _Ptr<_Array_ptr (struct general *, _Ptr )> sus_ptr = sus; + //CHECK_NOALL: _Ptr )> sus_ptr = sus; + //CHECK_ALL: _Ptr<_Array_ptr (struct general *, _Ptr )> sus_ptr = sus; int *z = sus_ptr(x, y); //CHECK_NOALL: int *z = sus_ptr(x, y); - //CHECK_ALL: _Array_ptr z = sus_ptr(x, y); + //CHECK_ALL: _Array_ptr z = sus_ptr(x, y); return z; } @@ -146,9 +146,9 @@ int * bar() { struct general *x = malloc(sizeof(struct general)); //CHECK: struct general *x = malloc(sizeof(struct general)); struct general *y = malloc(sizeof(struct general)); - //CHECK: _Ptr y = malloc(sizeof(struct general)); + //CHECK: _Ptr y = malloc(sizeof(struct general)); struct general *curr = y; - //CHECK: _Ptr curr = y; + //CHECK: _Ptr curr = y; int i; for(i = 1; i < 5; i++, curr = curr->next) { curr->data = i; @@ -156,11 +156,11 @@ int * bar() { curr->next->data = i+1; } int * (*sus_ptr)(struct general *, struct general *) = sus; - //CHECK_NOALL: _Ptr )> sus_ptr = sus; - //CHECK_ALL: _Ptr<_Array_ptr (struct general *, _Ptr )> sus_ptr = sus; + //CHECK_NOALL: _Ptr )> sus_ptr = sus; + //CHECK_ALL: _Ptr<_Array_ptr (struct general *, _Ptr )> sus_ptr = sus; int *z = sus_ptr(x, y); //CHECK_NOALL: int *z = sus_ptr(x, y); - //CHECK_ALL: _Array_ptr z = sus_ptr(x, y); + //CHECK_ALL: _Array_ptr z = sus_ptr(x, y); z += 2; return z; } diff --git a/clang/test/CheckedCRewriter/fptrsafebothmulti2.c b/clang/test/CheckedCRewriter/fptrsafebothmulti2.c index bb704a22673d..9c35aaa06831 100644 --- a/clang/test/CheckedCRewriter/fptrsafebothmulti2.c +++ b/clang/test/CheckedCRewriter/fptrsafebothmulti2.c @@ -118,9 +118,9 @@ int * sus(struct general *x, struct general *y) { //CHECK: x = (struct general *) 5; int *z = calloc(5, sizeof(int)); //CHECK_NOALL: int *z = calloc(5, sizeof(int)); - //CHECK_ALL: _Array_ptr z : count(5) = calloc(5, sizeof(int)); + //CHECK_ALL: _Array_ptr z : count(5) = calloc(5, sizeof(int)); struct general *p = y; - //CHECK: _Ptr p = y; + //CHECK: _Ptr p = y; int i; for(i = 0; i < 5; p = p->next, i++) { //CHECK_NOALL: for(i = 0; i < 5; p = p->next, i++) { diff --git a/clang/test/CheckedCRewriter/fptrsafecallee.c b/clang/test/CheckedCRewriter/fptrsafecallee.c index 21c6db7674ff..8dc5f60370b6 100644 --- a/clang/test/CheckedCRewriter/fptrsafecallee.c +++ b/clang/test/CheckedCRewriter/fptrsafecallee.c @@ -110,9 +110,9 @@ int * sus(struct general *x, struct general *y) { //CHECK: x = (struct general *) 5; int *z = calloc(5, sizeof(int)); //CHECK_NOALL: int *z = calloc(5, sizeof(int)); - //CHECK_ALL: _Array_ptr z : count(5) = calloc(5, sizeof(int)); + //CHECK_ALL: _Array_ptr z : count(5) = calloc(5, sizeof(int)); struct general *p = y; - //CHECK: _Ptr p = y; + //CHECK: _Ptr p = y; int i; for(i = 0; i < 5; p = p->next, i++) { //CHECK_NOALL: for(i = 0; i < 5; p = p->next, i++) { @@ -130,9 +130,9 @@ int * foo() { struct general *x = malloc(sizeof(struct general)); //CHECK: struct general *x = malloc(sizeof(struct general)); struct general *y = malloc(sizeof(struct general)); - //CHECK: _Ptr y = malloc(sizeof(struct general)); + //CHECK: _Ptr y = malloc(sizeof(struct general)); struct general *curr = y; - //CHECK: _Ptr curr = y; + //CHECK: _Ptr curr = y; int i; for(i = 1; i < 5; i++, curr = curr->next) { curr->data = i; @@ -140,11 +140,11 @@ int * foo() { curr->next->data = i+1; } int * (*sus_ptr)(struct general *, struct general *) = sus; - //CHECK_NOALL: _Ptr )> sus_ptr = sus; - //CHECK_ALL: _Ptr<_Array_ptr (struct general *, _Ptr )> sus_ptr = sus; + //CHECK_NOALL: _Ptr )> sus_ptr = sus; + //CHECK_ALL: _Ptr<_Array_ptr (struct general *, _Ptr )> sus_ptr = sus; int *z = sus_ptr(x, y); //CHECK_NOALL: int *z = sus_ptr(x, y); - //CHECK_ALL: _Array_ptr z = sus_ptr(x, y); + //CHECK_ALL: _Array_ptr z = sus_ptr(x, y); return z; } @@ -155,9 +155,9 @@ int * bar() { struct general *x = malloc(sizeof(struct general)); //CHECK: struct general *x = malloc(sizeof(struct general)); struct general *y = malloc(sizeof(struct general)); - //CHECK: _Ptr y = malloc(sizeof(struct general)); + //CHECK: _Ptr y = malloc(sizeof(struct general)); struct general *curr = y; - //CHECK: _Ptr curr = y; + //CHECK: _Ptr curr = y; int i; for(i = 1; i < 5; i++, curr = curr->next) { curr->data = i; @@ -165,10 +165,10 @@ int * bar() { curr->next->data = i+1; } int * (*sus_ptr)(struct general *, struct general *) = sus; - //CHECK_NOALL: _Ptr )> sus_ptr = sus; - //CHECK_ALL: _Ptr<_Array_ptr (struct general *, _Ptr )> sus_ptr = sus; + //CHECK_NOALL: _Ptr )> sus_ptr = sus; + //CHECK_ALL: _Ptr<_Array_ptr (struct general *, _Ptr )> sus_ptr = sus; int *z = sus_ptr(x, y); //CHECK_NOALL: int *z = sus_ptr(x, y); - //CHECK_ALL: _Array_ptr z = sus_ptr(x, y); + //CHECK_ALL: _Array_ptr z = sus_ptr(x, y); return z; } diff --git a/clang/test/CheckedCRewriter/fptrsafecalleemulti1.c b/clang/test/CheckedCRewriter/fptrsafecalleemulti1.c index d24e81c87399..e4cfcc991b36 100644 --- a/clang/test/CheckedCRewriter/fptrsafecalleemulti1.c +++ b/clang/test/CheckedCRewriter/fptrsafecalleemulti1.c @@ -121,9 +121,9 @@ int * foo() { struct general *x = malloc(sizeof(struct general)); //CHECK: struct general *x = malloc(sizeof(struct general)); struct general *y = malloc(sizeof(struct general)); - //CHECK: _Ptr y = malloc(sizeof(struct general)); + //CHECK: _Ptr y = malloc(sizeof(struct general)); struct general *curr = y; - //CHECK: _Ptr curr = y; + //CHECK: _Ptr curr = y; int i; for(i = 1; i < 5; i++, curr = curr->next) { curr->data = i; @@ -131,11 +131,11 @@ int * foo() { curr->next->data = i+1; } int * (*sus_ptr)(struct general *, struct general *) = sus; - //CHECK_NOALL: _Ptr )> sus_ptr = sus; - //CHECK_ALL: _Ptr<_Array_ptr (struct general *, _Ptr )> sus_ptr = sus; + //CHECK_NOALL: _Ptr )> sus_ptr = sus; + //CHECK_ALL: _Ptr<_Array_ptr (struct general *, _Ptr )> sus_ptr = sus; int *z = sus_ptr(x, y); //CHECK_NOALL: int *z = sus_ptr(x, y); - //CHECK_ALL: _Array_ptr z = sus_ptr(x, y); + //CHECK_ALL: _Array_ptr z = sus_ptr(x, y); return z; } @@ -146,9 +146,9 @@ int * bar() { struct general *x = malloc(sizeof(struct general)); //CHECK: struct general *x = malloc(sizeof(struct general)); struct general *y = malloc(sizeof(struct general)); - //CHECK: _Ptr y = malloc(sizeof(struct general)); + //CHECK: _Ptr y = malloc(sizeof(struct general)); struct general *curr = y; - //CHECK: _Ptr curr = y; + //CHECK: _Ptr curr = y; int i; for(i = 1; i < 5; i++, curr = curr->next) { curr->data = i; @@ -156,10 +156,10 @@ int * bar() { curr->next->data = i+1; } int * (*sus_ptr)(struct general *, struct general *) = sus; - //CHECK_NOALL: _Ptr )> sus_ptr = sus; - //CHECK_ALL: _Ptr<_Array_ptr (struct general *, _Ptr )> sus_ptr = sus; + //CHECK_NOALL: _Ptr )> sus_ptr = sus; + //CHECK_ALL: _Ptr<_Array_ptr (struct general *, _Ptr )> sus_ptr = sus; int *z = sus_ptr(x, y); //CHECK_NOALL: int *z = sus_ptr(x, y); - //CHECK_ALL: _Array_ptr z = sus_ptr(x, y); + //CHECK_ALL: _Array_ptr z = sus_ptr(x, y); return z; } diff --git a/clang/test/CheckedCRewriter/fptrsafecalleemulti2.c b/clang/test/CheckedCRewriter/fptrsafecalleemulti2.c index e299666dcd05..a036ee0ee5fd 100644 --- a/clang/test/CheckedCRewriter/fptrsafecalleemulti2.c +++ b/clang/test/CheckedCRewriter/fptrsafecalleemulti2.c @@ -118,9 +118,9 @@ int * sus(struct general *x, struct general *y) { //CHECK: x = (struct general *) 5; int *z = calloc(5, sizeof(int)); //CHECK_NOALL: int *z = calloc(5, sizeof(int)); - //CHECK_ALL: _Array_ptr z : count(5) = calloc(5, sizeof(int)); + //CHECK_ALL: _Array_ptr z : count(5) = calloc(5, sizeof(int)); struct general *p = y; - //CHECK: _Ptr p = y; + //CHECK: _Ptr p = y; int i; for(i = 0; i < 5; p = p->next, i++) { //CHECK_NOALL: for(i = 0; i < 5; p = p->next, i++) { diff --git a/clang/test/CheckedCRewriter/fptrsafecaller.c b/clang/test/CheckedCRewriter/fptrsafecaller.c index f3c9db54e952..bc987b910ac3 100644 --- a/clang/test/CheckedCRewriter/fptrsafecaller.c +++ b/clang/test/CheckedCRewriter/fptrsafecaller.c @@ -110,9 +110,9 @@ int * sus(struct general *x, struct general *y) { //CHECK: x = (struct general *) 5; int *z = calloc(5, sizeof(int)); //CHECK_NOALL: int *z = calloc(5, sizeof(int)); - //CHECK_ALL: _Array_ptr z : count(5) = calloc(5, sizeof(int)); + //CHECK_ALL: _Array_ptr z : count(5) = calloc(5, sizeof(int)); struct general *p = y; - //CHECK: _Ptr p = y; + //CHECK: _Ptr p = y; int i; for(i = 0; i < 5; p = p->next, i++) { //CHECK_NOALL: for(i = 0; i < 5; p = p->next, i++) { @@ -129,9 +129,9 @@ int * foo() { struct general *x = malloc(sizeof(struct general)); //CHECK: struct general *x = malloc(sizeof(struct general)); struct general *y = malloc(sizeof(struct general)); - //CHECK: _Ptr y = malloc(sizeof(struct general)); + //CHECK: _Ptr y = malloc(sizeof(struct general)); struct general *curr = y; - //CHECK: _Ptr curr = y; + //CHECK: _Ptr curr = y; int i; for(i = 1; i < 5; i++, curr = curr->next) { curr->data = i; @@ -139,11 +139,11 @@ int * foo() { curr->next->data = i+1; } int * (*sus_ptr)(struct general *, struct general *) = sus; - //CHECK_NOALL: _Ptr )> sus_ptr = sus; - //CHECK_ALL: _Ptr<_Array_ptr (struct general *, _Ptr )> sus_ptr = sus; + //CHECK_NOALL: _Ptr )> sus_ptr = sus; + //CHECK_ALL: _Ptr<_Array_ptr (struct general *, _Ptr )> sus_ptr = sus; int *z = sus_ptr(x, y); //CHECK_NOALL: int *z = sus_ptr(x, y); - //CHECK_ALL: _Array_ptr z = sus_ptr(x, y); + //CHECK_ALL: _Array_ptr z = sus_ptr(x, y); return z; } @@ -154,9 +154,9 @@ int * bar() { struct general *x = malloc(sizeof(struct general)); //CHECK: struct general *x = malloc(sizeof(struct general)); struct general *y = malloc(sizeof(struct general)); - //CHECK: _Ptr y = malloc(sizeof(struct general)); + //CHECK: _Ptr y = malloc(sizeof(struct general)); struct general *curr = y; - //CHECK: _Ptr curr = y; + //CHECK: _Ptr curr = y; int i; for(i = 1; i < 5; i++, curr = curr->next) { curr->data = i; @@ -164,11 +164,11 @@ int * bar() { curr->next->data = i+1; } int * (*sus_ptr)(struct general *, struct general *) = sus; - //CHECK_NOALL: _Ptr )> sus_ptr = sus; - //CHECK_ALL: _Ptr<_Array_ptr (struct general *, _Ptr )> sus_ptr = sus; + //CHECK_NOALL: _Ptr )> sus_ptr = sus; + //CHECK_ALL: _Ptr<_Array_ptr (struct general *, _Ptr )> sus_ptr = sus; int *z = sus_ptr(x, y); //CHECK_NOALL: int *z = sus_ptr(x, y); - //CHECK_ALL: _Array_ptr z = sus_ptr(x, y); + //CHECK_ALL: _Array_ptr z = sus_ptr(x, y); z += 2; return z; } diff --git a/clang/test/CheckedCRewriter/fptrsafecallermulti1.c b/clang/test/CheckedCRewriter/fptrsafecallermulti1.c index 59563ac96234..1cc745889e34 100644 --- a/clang/test/CheckedCRewriter/fptrsafecallermulti1.c +++ b/clang/test/CheckedCRewriter/fptrsafecallermulti1.c @@ -121,9 +121,9 @@ int * foo() { struct general *x = malloc(sizeof(struct general)); //CHECK: struct general *x = malloc(sizeof(struct general)); struct general *y = malloc(sizeof(struct general)); - //CHECK: _Ptr y = malloc(sizeof(struct general)); + //CHECK: _Ptr y = malloc(sizeof(struct general)); struct general *curr = y; - //CHECK: _Ptr curr = y; + //CHECK: _Ptr curr = y; int i; for(i = 1; i < 5; i++, curr = curr->next) { curr->data = i; @@ -131,11 +131,11 @@ int * foo() { curr->next->data = i+1; } int * (*sus_ptr)(struct general *, struct general *) = sus; - //CHECK_NOALL: _Ptr )> sus_ptr = sus; - //CHECK_ALL: _Ptr<_Array_ptr (struct general *, _Ptr )> sus_ptr = sus; + //CHECK_NOALL: _Ptr )> sus_ptr = sus; + //CHECK_ALL: _Ptr<_Array_ptr (struct general *, _Ptr )> sus_ptr = sus; int *z = sus_ptr(x, y); //CHECK_NOALL: int *z = sus_ptr(x, y); - //CHECK_ALL: _Array_ptr z = sus_ptr(x, y); + //CHECK_ALL: _Array_ptr z = sus_ptr(x, y); return z; } @@ -146,9 +146,9 @@ int * bar() { struct general *x = malloc(sizeof(struct general)); //CHECK: struct general *x = malloc(sizeof(struct general)); struct general *y = malloc(sizeof(struct general)); - //CHECK: _Ptr y = malloc(sizeof(struct general)); + //CHECK: _Ptr y = malloc(sizeof(struct general)); struct general *curr = y; - //CHECK: _Ptr curr = y; + //CHECK: _Ptr curr = y; int i; for(i = 1; i < 5; i++, curr = curr->next) { curr->data = i; @@ -156,11 +156,11 @@ int * bar() { curr->next->data = i+1; } int * (*sus_ptr)(struct general *, struct general *) = sus; - //CHECK_NOALL: _Ptr )> sus_ptr = sus; - //CHECK_ALL: _Ptr<_Array_ptr (struct general *, _Ptr )> sus_ptr = sus; + //CHECK_NOALL: _Ptr )> sus_ptr = sus; + //CHECK_ALL: _Ptr<_Array_ptr (struct general *, _Ptr )> sus_ptr = sus; int *z = sus_ptr(x, y); //CHECK_NOALL: int *z = sus_ptr(x, y); - //CHECK_ALL: _Array_ptr z = sus_ptr(x, y); + //CHECK_ALL: _Array_ptr z = sus_ptr(x, y); z += 2; return z; } diff --git a/clang/test/CheckedCRewriter/fptrsafecallermulti2.c b/clang/test/CheckedCRewriter/fptrsafecallermulti2.c index 0f428954da14..7f1775ff69dd 100644 --- a/clang/test/CheckedCRewriter/fptrsafecallermulti2.c +++ b/clang/test/CheckedCRewriter/fptrsafecallermulti2.c @@ -118,9 +118,9 @@ int * sus(struct general *x, struct general *y) { //CHECK: x = (struct general *) 5; int *z = calloc(5, sizeof(int)); //CHECK_NOALL: int *z = calloc(5, sizeof(int)); - //CHECK_ALL: _Array_ptr z : count(5) = calloc(5, sizeof(int)); + //CHECK_ALL: _Array_ptr z : count(5) = calloc(5, sizeof(int)); struct general *p = y; - //CHECK: _Ptr p = y; + //CHECK: _Ptr p = y; int i; for(i = 0; i < 5; p = p->next, i++) { //CHECK_NOALL: for(i = 0; i < 5; p = p->next, i++) { diff --git a/clang/test/CheckedCRewriter/fptrsafeprotoboth.c b/clang/test/CheckedCRewriter/fptrsafeprotoboth.c index c2d428d63162..00ac6f6384bc 100644 --- a/clang/test/CheckedCRewriter/fptrsafeprotoboth.c +++ b/clang/test/CheckedCRewriter/fptrsafeprotoboth.c @@ -116,9 +116,9 @@ int * foo() { struct general *x = malloc(sizeof(struct general)); //CHECK: struct general *x = malloc(sizeof(struct general)); struct general *y = malloc(sizeof(struct general)); - //CHECK: _Ptr y = malloc(sizeof(struct general)); + //CHECK: _Ptr y = malloc(sizeof(struct general)); struct general *curr = y; - //CHECK: _Ptr curr = y; + //CHECK: _Ptr curr = y; int i; for(i = 1; i < 5; i++, curr = curr->next) { curr->data = i; @@ -126,11 +126,11 @@ int * foo() { curr->next->data = i+1; } int * (*sus_ptr)(struct general *, struct general *) = sus; - //CHECK_NOALL: _Ptr )> sus_ptr = sus; - //CHECK_ALL: _Ptr<_Array_ptr (struct general *, _Ptr )> sus_ptr = sus; + //CHECK_NOALL: _Ptr )> sus_ptr = sus; + //CHECK_ALL: _Ptr<_Array_ptr (struct general *, _Ptr )> sus_ptr = sus; int *z = sus_ptr(x, y); //CHECK_NOALL: int *z = sus_ptr(x, y); - //CHECK_ALL: _Array_ptr z = sus_ptr(x, y); + //CHECK_ALL: _Array_ptr z = sus_ptr(x, y); return z; } @@ -141,9 +141,9 @@ int * bar() { struct general *x = malloc(sizeof(struct general)); //CHECK: struct general *x = malloc(sizeof(struct general)); struct general *y = malloc(sizeof(struct general)); - //CHECK: _Ptr y = malloc(sizeof(struct general)); + //CHECK: _Ptr y = malloc(sizeof(struct general)); struct general *curr = y; - //CHECK: _Ptr curr = y; + //CHECK: _Ptr curr = y; int i; for(i = 1; i < 5; i++, curr = curr->next) { curr->data = i; @@ -151,11 +151,11 @@ int * bar() { curr->next->data = i+1; } int * (*sus_ptr)(struct general *, struct general *) = sus; - //CHECK_NOALL: _Ptr )> sus_ptr = sus; - //CHECK_ALL: _Ptr<_Array_ptr (struct general *, _Ptr )> sus_ptr = sus; + //CHECK_NOALL: _Ptr )> sus_ptr = sus; + //CHECK_ALL: _Ptr<_Array_ptr (struct general *, _Ptr )> sus_ptr = sus; int *z = sus_ptr(x, y); //CHECK_NOALL: int *z = sus_ptr(x, y); - //CHECK_ALL: _Array_ptr z = sus_ptr(x, y); + //CHECK_ALL: _Array_ptr z = sus_ptr(x, y); z += 2; return z; } @@ -168,9 +168,9 @@ int * sus(struct general *x, struct general *y) { //CHECK: x = (struct general *) 5; int *z = calloc(5, sizeof(int)); //CHECK_NOALL: int *z = calloc(5, sizeof(int)); - //CHECK_ALL: _Array_ptr z : count(5) = calloc(5, sizeof(int)); + //CHECK_ALL: _Array_ptr z : count(5) = calloc(5, sizeof(int)); struct general *p = y; - //CHECK: _Ptr p = y; + //CHECK: _Ptr p = y; int i; for(i = 0; i < 5; p = p->next, i++) { //CHECK_NOALL: for(i = 0; i < 5; p = p->next, i++) { diff --git a/clang/test/CheckedCRewriter/fptrsafeprotocallee.c b/clang/test/CheckedCRewriter/fptrsafeprotocallee.c index 3eb5058d1798..341aa5854a93 100644 --- a/clang/test/CheckedCRewriter/fptrsafeprotocallee.c +++ b/clang/test/CheckedCRewriter/fptrsafeprotocallee.c @@ -116,9 +116,9 @@ int * foo() { struct general *x = malloc(sizeof(struct general)); //CHECK: struct general *x = malloc(sizeof(struct general)); struct general *y = malloc(sizeof(struct general)); - //CHECK: _Ptr y = malloc(sizeof(struct general)); + //CHECK: _Ptr y = malloc(sizeof(struct general)); struct general *curr = y; - //CHECK: _Ptr curr = y; + //CHECK: _Ptr curr = y; int i; for(i = 1; i < 5; i++, curr = curr->next) { curr->data = i; @@ -126,11 +126,11 @@ int * foo() { curr->next->data = i+1; } int * (*sus_ptr)(struct general *, struct general *) = sus; - //CHECK_NOALL: _Ptr )> sus_ptr = sus; - //CHECK_ALL: _Ptr<_Array_ptr (struct general *, _Ptr )> sus_ptr = sus; + //CHECK_NOALL: _Ptr )> sus_ptr = sus; + //CHECK_ALL: _Ptr<_Array_ptr (struct general *, _Ptr )> sus_ptr = sus; int *z = sus_ptr(x, y); //CHECK_NOALL: int *z = sus_ptr(x, y); - //CHECK_ALL: _Array_ptr z = sus_ptr(x, y); + //CHECK_ALL: _Array_ptr z = sus_ptr(x, y); return z; } @@ -141,9 +141,9 @@ int * bar() { struct general *x = malloc(sizeof(struct general)); //CHECK: struct general *x = malloc(sizeof(struct general)); struct general *y = malloc(sizeof(struct general)); - //CHECK: _Ptr y = malloc(sizeof(struct general)); + //CHECK: _Ptr y = malloc(sizeof(struct general)); struct general *curr = y; - //CHECK: _Ptr curr = y; + //CHECK: _Ptr curr = y; int i; for(i = 1; i < 5; i++, curr = curr->next) { curr->data = i; @@ -151,11 +151,11 @@ int * bar() { curr->next->data = i+1; } int * (*sus_ptr)(struct general *, struct general *) = sus; - //CHECK_NOALL: _Ptr )> sus_ptr = sus; - //CHECK_ALL: _Ptr<_Array_ptr (struct general *, _Ptr )> sus_ptr = sus; + //CHECK_NOALL: _Ptr )> sus_ptr = sus; + //CHECK_ALL: _Ptr<_Array_ptr (struct general *, _Ptr )> sus_ptr = sus; int *z = sus_ptr(x, y); //CHECK_NOALL: int *z = sus_ptr(x, y); - //CHECK_ALL: _Array_ptr z = sus_ptr(x, y); + //CHECK_ALL: _Array_ptr z = sus_ptr(x, y); return z; } @@ -167,9 +167,9 @@ int * sus(struct general *x, struct general *y) { //CHECK: x = (struct general *) 5; int *z = calloc(5, sizeof(int)); //CHECK_NOALL: int *z = calloc(5, sizeof(int)); - //CHECK_ALL: _Array_ptr z : count(5) = calloc(5, sizeof(int)); + //CHECK_ALL: _Array_ptr z : count(5) = calloc(5, sizeof(int)); struct general *p = y; - //CHECK: _Ptr p = y; + //CHECK: _Ptr p = y; int i; for(i = 0; i < 5; p = p->next, i++) { //CHECK_NOALL: for(i = 0; i < 5; p = p->next, i++) { diff --git a/clang/test/CheckedCRewriter/fptrsafeprotocaller.c b/clang/test/CheckedCRewriter/fptrsafeprotocaller.c index ebfd3c3bdf7f..bec1ae500857 100644 --- a/clang/test/CheckedCRewriter/fptrsafeprotocaller.c +++ b/clang/test/CheckedCRewriter/fptrsafeprotocaller.c @@ -116,9 +116,9 @@ int * foo() { struct general *x = malloc(sizeof(struct general)); //CHECK: struct general *x = malloc(sizeof(struct general)); struct general *y = malloc(sizeof(struct general)); - //CHECK: _Ptr y = malloc(sizeof(struct general)); + //CHECK: _Ptr y = malloc(sizeof(struct general)); struct general *curr = y; - //CHECK: _Ptr curr = y; + //CHECK: _Ptr curr = y; int i; for(i = 1; i < 5; i++, curr = curr->next) { curr->data = i; @@ -126,11 +126,11 @@ int * foo() { curr->next->data = i+1; } int * (*sus_ptr)(struct general *, struct general *) = sus; - //CHECK_NOALL: _Ptr )> sus_ptr = sus; - //CHECK_ALL: _Ptr<_Array_ptr (struct general *, _Ptr )> sus_ptr = sus; + //CHECK_NOALL: _Ptr )> sus_ptr = sus; + //CHECK_ALL: _Ptr<_Array_ptr (struct general *, _Ptr )> sus_ptr = sus; int *z = sus_ptr(x, y); //CHECK_NOALL: int *z = sus_ptr(x, y); - //CHECK_ALL: _Array_ptr z = sus_ptr(x, y); + //CHECK_ALL: _Array_ptr z = sus_ptr(x, y); return z; } @@ -141,9 +141,9 @@ int * bar() { struct general *x = malloc(sizeof(struct general)); //CHECK: struct general *x = malloc(sizeof(struct general)); struct general *y = malloc(sizeof(struct general)); - //CHECK: _Ptr y = malloc(sizeof(struct general)); + //CHECK: _Ptr y = malloc(sizeof(struct general)); struct general *curr = y; - //CHECK: _Ptr curr = y; + //CHECK: _Ptr curr = y; int i; for(i = 1; i < 5; i++, curr = curr->next) { curr->data = i; @@ -151,11 +151,11 @@ int * bar() { curr->next->data = i+1; } int * (*sus_ptr)(struct general *, struct general *) = sus; - //CHECK_NOALL: _Ptr )> sus_ptr = sus; - //CHECK_ALL: _Ptr<_Array_ptr (struct general *, _Ptr )> sus_ptr = sus; + //CHECK_NOALL: _Ptr )> sus_ptr = sus; + //CHECK_ALL: _Ptr<_Array_ptr (struct general *, _Ptr )> sus_ptr = sus; int *z = sus_ptr(x, y); //CHECK_NOALL: int *z = sus_ptr(x, y); - //CHECK_ALL: _Array_ptr z = sus_ptr(x, y); + //CHECK_ALL: _Array_ptr z = sus_ptr(x, y); z += 2; return z; } @@ -168,9 +168,9 @@ int * sus(struct general *x, struct general *y) { //CHECK: x = (struct general *) 5; int *z = calloc(5, sizeof(int)); //CHECK_NOALL: int *z = calloc(5, sizeof(int)); - //CHECK_ALL: _Array_ptr z : count(5) = calloc(5, sizeof(int)); + //CHECK_ALL: _Array_ptr z : count(5) = calloc(5, sizeof(int)); struct general *p = y; - //CHECK: _Ptr p = y; + //CHECK: _Ptr p = y; int i; for(i = 0; i < 5; p = p->next, i++) { //CHECK_NOALL: for(i = 0; i < 5; p = p->next, i++) { diff --git a/clang/test/CheckedCRewriter/fptrsafeprotosafe.c b/clang/test/CheckedCRewriter/fptrsafeprotosafe.c index 126dae93c666..3bb908cb03d2 100644 --- a/clang/test/CheckedCRewriter/fptrsafeprotosafe.c +++ b/clang/test/CheckedCRewriter/fptrsafeprotosafe.c @@ -115,9 +115,9 @@ int * foo() { struct general *x = malloc(sizeof(struct general)); //CHECK: struct general *x = malloc(sizeof(struct general)); struct general *y = malloc(sizeof(struct general)); - //CHECK: _Ptr y = malloc(sizeof(struct general)); + //CHECK: _Ptr y = malloc(sizeof(struct general)); struct general *curr = y; - //CHECK: _Ptr curr = y; + //CHECK: _Ptr curr = y; int i; for(i = 1; i < 5; i++, curr = curr->next) { curr->data = i; @@ -125,11 +125,11 @@ int * foo() { curr->next->data = i+1; } int * (*sus_ptr)(struct general *, struct general *) = sus; - //CHECK_NOALL: _Ptr )> sus_ptr = sus; - //CHECK_ALL: _Ptr<_Array_ptr (struct general *, _Ptr )> sus_ptr = sus; + //CHECK_NOALL: _Ptr )> sus_ptr = sus; + //CHECK_ALL: _Ptr<_Array_ptr (struct general *, _Ptr )> sus_ptr = sus; int *z = sus_ptr(x, y); //CHECK_NOALL: int *z = sus_ptr(x, y); - //CHECK_ALL: _Array_ptr z = sus_ptr(x, y); + //CHECK_ALL: _Array_ptr z = sus_ptr(x, y); return z; } @@ -140,9 +140,9 @@ int * bar() { struct general *x = malloc(sizeof(struct general)); //CHECK: struct general *x = malloc(sizeof(struct general)); struct general *y = malloc(sizeof(struct general)); - //CHECK: _Ptr y = malloc(sizeof(struct general)); + //CHECK: _Ptr y = malloc(sizeof(struct general)); struct general *curr = y; - //CHECK: _Ptr curr = y; + //CHECK: _Ptr curr = y; int i; for(i = 1; i < 5; i++, curr = curr->next) { curr->data = i; @@ -150,11 +150,11 @@ int * bar() { curr->next->data = i+1; } int * (*sus_ptr)(struct general *, struct general *) = sus; - //CHECK_NOALL: _Ptr )> sus_ptr = sus; - //CHECK_ALL: _Ptr<_Array_ptr (struct general *, _Ptr )> sus_ptr = sus; + //CHECK_NOALL: _Ptr )> sus_ptr = sus; + //CHECK_ALL: _Ptr<_Array_ptr (struct general *, _Ptr )> sus_ptr = sus; int *z = sus_ptr(x, y); //CHECK_NOALL: int *z = sus_ptr(x, y); - //CHECK_ALL: _Array_ptr z = sus_ptr(x, y); + //CHECK_ALL: _Array_ptr z = sus_ptr(x, y); return z; } @@ -166,9 +166,9 @@ int * sus(struct general *x, struct general *y) { //CHECK: x = (struct general *) 5; int *z = calloc(5, sizeof(int)); //CHECK_NOALL: int *z = calloc(5, sizeof(int)); - //CHECK_ALL: _Array_ptr z : count(5) = calloc(5, sizeof(int)); + //CHECK_ALL: _Array_ptr z : count(5) = calloc(5, sizeof(int)); struct general *p = y; - //CHECK: _Ptr p = y; + //CHECK: _Ptr p = y; int i; for(i = 0; i < 5; p = p->next, i++) { //CHECK_NOALL: for(i = 0; i < 5; p = p->next, i++) { diff --git a/clang/test/CheckedCRewriter/fptrsafesafe.c b/clang/test/CheckedCRewriter/fptrsafesafe.c index 359c0bbe3c12..f37809ecf2ec 100644 --- a/clang/test/CheckedCRewriter/fptrsafesafe.c +++ b/clang/test/CheckedCRewriter/fptrsafesafe.c @@ -109,9 +109,9 @@ int * sus(struct general *x, struct general *y) { //CHECK: x = (struct general *) 5; int *z = calloc(5, sizeof(int)); //CHECK_NOALL: int *z = calloc(5, sizeof(int)); - //CHECK_ALL: _Array_ptr z : count(5) = calloc(5, sizeof(int)); + //CHECK_ALL: _Array_ptr z : count(5) = calloc(5, sizeof(int)); struct general *p = y; - //CHECK: _Ptr p = y; + //CHECK: _Ptr p = y; int i; for(i = 0; i < 5; p = p->next, i++) { //CHECK_NOALL: for(i = 0; i < 5; p = p->next, i++) { @@ -128,9 +128,9 @@ int * foo() { struct general *x = malloc(sizeof(struct general)); //CHECK: struct general *x = malloc(sizeof(struct general)); struct general *y = malloc(sizeof(struct general)); - //CHECK: _Ptr y = malloc(sizeof(struct general)); + //CHECK: _Ptr y = malloc(sizeof(struct general)); struct general *curr = y; - //CHECK: _Ptr curr = y; + //CHECK: _Ptr curr = y; int i; for(i = 1; i < 5; i++, curr = curr->next) { curr->data = i; @@ -138,11 +138,11 @@ int * foo() { curr->next->data = i+1; } int * (*sus_ptr)(struct general *, struct general *) = sus; - //CHECK_NOALL: _Ptr )> sus_ptr = sus; - //CHECK_ALL: _Ptr<_Array_ptr (struct general *, _Ptr )> sus_ptr = sus; + //CHECK_NOALL: _Ptr )> sus_ptr = sus; + //CHECK_ALL: _Ptr<_Array_ptr (struct general *, _Ptr )> sus_ptr = sus; int *z = sus_ptr(x, y); //CHECK_NOALL: int *z = sus_ptr(x, y); - //CHECK_ALL: _Array_ptr z = sus_ptr(x, y); + //CHECK_ALL: _Array_ptr z = sus_ptr(x, y); return z; } @@ -153,9 +153,9 @@ int * bar() { struct general *x = malloc(sizeof(struct general)); //CHECK: struct general *x = malloc(sizeof(struct general)); struct general *y = malloc(sizeof(struct general)); - //CHECK: _Ptr y = malloc(sizeof(struct general)); + //CHECK: _Ptr y = malloc(sizeof(struct general)); struct general *curr = y; - //CHECK: _Ptr curr = y; + //CHECK: _Ptr curr = y; int i; for(i = 1; i < 5; i++, curr = curr->next) { curr->data = i; @@ -163,10 +163,10 @@ int * bar() { curr->next->data = i+1; } int * (*sus_ptr)(struct general *, struct general *) = sus; - //CHECK_NOALL: _Ptr )> sus_ptr = sus; - //CHECK_ALL: _Ptr<_Array_ptr (struct general *, _Ptr )> sus_ptr = sus; + //CHECK_NOALL: _Ptr )> sus_ptr = sus; + //CHECK_ALL: _Ptr<_Array_ptr (struct general *, _Ptr )> sus_ptr = sus; int *z = sus_ptr(x, y); //CHECK_NOALL: int *z = sus_ptr(x, y); - //CHECK_ALL: _Array_ptr z = sus_ptr(x, y); + //CHECK_ALL: _Array_ptr z = sus_ptr(x, y); return z; } diff --git a/clang/test/CheckedCRewriter/fptrsafesafemulti1.c b/clang/test/CheckedCRewriter/fptrsafesafemulti1.c index efae3466aca5..49d9eb8e2051 100644 --- a/clang/test/CheckedCRewriter/fptrsafesafemulti1.c +++ b/clang/test/CheckedCRewriter/fptrsafesafemulti1.c @@ -120,9 +120,9 @@ int * foo() { struct general *x = malloc(sizeof(struct general)); //CHECK: struct general *x = malloc(sizeof(struct general)); struct general *y = malloc(sizeof(struct general)); - //CHECK: _Ptr y = malloc(sizeof(struct general)); + //CHECK: _Ptr y = malloc(sizeof(struct general)); struct general *curr = y; - //CHECK: _Ptr curr = y; + //CHECK: _Ptr curr = y; int i; for(i = 1; i < 5; i++, curr = curr->next) { curr->data = i; @@ -130,11 +130,11 @@ int * foo() { curr->next->data = i+1; } int * (*sus_ptr)(struct general *, struct general *) = sus; - //CHECK_NOALL: _Ptr )> sus_ptr = sus; - //CHECK_ALL: _Ptr<_Array_ptr (struct general *, _Ptr )> sus_ptr = sus; + //CHECK_NOALL: _Ptr )> sus_ptr = sus; + //CHECK_ALL: _Ptr<_Array_ptr (struct general *, _Ptr )> sus_ptr = sus; int *z = sus_ptr(x, y); //CHECK_NOALL: int *z = sus_ptr(x, y); - //CHECK_ALL: _Array_ptr z = sus_ptr(x, y); + //CHECK_ALL: _Array_ptr z = sus_ptr(x, y); return z; } @@ -145,9 +145,9 @@ int * bar() { struct general *x = malloc(sizeof(struct general)); //CHECK: struct general *x = malloc(sizeof(struct general)); struct general *y = malloc(sizeof(struct general)); - //CHECK: _Ptr y = malloc(sizeof(struct general)); + //CHECK: _Ptr y = malloc(sizeof(struct general)); struct general *curr = y; - //CHECK: _Ptr curr = y; + //CHECK: _Ptr curr = y; int i; for(i = 1; i < 5; i++, curr = curr->next) { curr->data = i; @@ -155,10 +155,10 @@ int * bar() { curr->next->data = i+1; } int * (*sus_ptr)(struct general *, struct general *) = sus; - //CHECK_NOALL: _Ptr )> sus_ptr = sus; - //CHECK_ALL: _Ptr<_Array_ptr (struct general *, _Ptr )> sus_ptr = sus; + //CHECK_NOALL: _Ptr )> sus_ptr = sus; + //CHECK_ALL: _Ptr<_Array_ptr (struct general *, _Ptr )> sus_ptr = sus; int *z = sus_ptr(x, y); //CHECK_NOALL: int *z = sus_ptr(x, y); - //CHECK_ALL: _Array_ptr z = sus_ptr(x, y); + //CHECK_ALL: _Array_ptr z = sus_ptr(x, y); return z; } diff --git a/clang/test/CheckedCRewriter/fptrsafesafemulti2.c b/clang/test/CheckedCRewriter/fptrsafesafemulti2.c index b71d1af31025..2ef158d7a84b 100644 --- a/clang/test/CheckedCRewriter/fptrsafesafemulti2.c +++ b/clang/test/CheckedCRewriter/fptrsafesafemulti2.c @@ -117,9 +117,9 @@ int * sus(struct general *x, struct general *y) { //CHECK: x = (struct general *) 5; int *z = calloc(5, sizeof(int)); //CHECK_NOALL: int *z = calloc(5, sizeof(int)); - //CHECK_ALL: _Array_ptr z : count(5) = calloc(5, sizeof(int)); + //CHECK_ALL: _Array_ptr z : count(5) = calloc(5, sizeof(int)); struct general *p = y; - //CHECK: _Ptr p = y; + //CHECK: _Ptr p = y; int i; for(i = 0; i < 5; p = p->next, i++) { //CHECK_NOALL: for(i = 0; i < 5; p = p->next, i++) { diff --git a/clang/test/CheckedCRewriter/free.c b/clang/test/CheckedCRewriter/free.c index e8657ea535b2..acf9078e4dbc 100644 --- a/clang/test/CheckedCRewriter/free.c +++ b/clang/test/CheckedCRewriter/free.c @@ -8,7 +8,7 @@ _Itype_for_any(T) void *malloc(size_t size) : itype(_Array_ptr) byte_count(si int *test() { -// CHECK_NOALL: int * test(void) { +// CHECK_NOALL: int *test(void) { // CHECK_ALL: _Array_ptr test(void) { int *a = malloc(sizeof(int)); // CHECK: _Ptr a = malloc(sizeof(int)); @@ -26,7 +26,7 @@ int *test() { _Itype_for_any(T) void my_free(void *pointer : itype(_Array_ptr) byte_count(0)); int *test2() { -// CHECK_NOALL: int * test2(void) { +// CHECK_NOALL: int *test2(void) { // CHECK_ALL:_Array_ptr test2(void) { int *a = malloc(sizeof(int)); // CHECK: _Ptr a = malloc(sizeof(int)); diff --git a/clang/test/CheckedCRewriter/graphs.c b/clang/test/CheckedCRewriter/graphs.c index ae9501e1f745..bfb91a6bf2e5 100644 --- a/clang/test/CheckedCRewriter/graphs.c +++ b/clang/test/CheckedCRewriter/graphs.c @@ -78,7 +78,7 @@ struct Stack }; struct Graph* createGraph(int); - //CHECK: _Ptr createGraph(int vertices); + //CHECK: _Ptr createGraph(int); void addEdge(struct Graph*, int, int); //CHECK: void addEdge(_Ptr graph, int src, int dest); diff --git a/clang/test/CheckedCRewriter/hash.c b/clang/test/CheckedCRewriter/hash.c index aa96a81dfd0c..2b36a76e8854 100644 --- a/clang/test/CheckedCRewriter/hash.c +++ b/clang/test/CheckedCRewriter/hash.c @@ -39,9 +39,9 @@ void* hash_lookup_entry(struct hash* p_hash, void* p_key); void hash_add_entry(struct hash* p_hash, void* p_key, void* p_value); void hash_free_entry(struct hash* p_hash, void* p_key); //CHECK_ALL: _Ptr hash_alloc(unsigned int buckets, unsigned int key_size, unsigned int value_size, _Ptr hash_func); -//CHECK_ALL: void * hash_lookup_entry(_Ptr p_hash, void *p_key); -//CHECK_ALL: void hash_add_entry(_Ptr p_hash, void *p_key, void *p_value); -//CHECK_ALL: void hash_free_entry(_Ptr p_hash, void *p_key); +//CHECK_ALL: void* hash_lookup_entry(_Ptr p_hash, void* p_key); +//CHECK_ALL: void hash_add_entry(_Ptr p_hash, void* p_key, void* p_value); +//CHECK_ALL: void hash_free_entry(_Ptr p_hash, void* p_key); #define bug(s) { } @@ -69,8 +69,8 @@ struct hash /* Internal functions */ struct hash_node** hash_get_bucket(struct hash* p_hash, void* p_key); struct hash_node* hash_get_node_by_key(struct hash* p_hash, void* p_key); -//CHECK_ALL: _Array_ptr<_Ptr> hash_get_bucket(_Ptr p_hash, void *p_key); -//CHECK_ALL: _Ptr hash_get_node_by_key(_Ptr p_hash, void *p_key); +//CHECK_ALL: _Array_ptr<_Ptr> hash_get_bucket(_Ptr p_hash, void* p_key); +//CHECK_ALL: _Ptr hash_get_node_by_key(_Ptr p_hash, void* p_key); struct hash* hash_alloc(unsigned int buckets, unsigned int key_size, @@ -95,7 +95,7 @@ hash_alloc(unsigned int buckets, unsigned int key_size, void* hash_lookup_entry(struct hash* p_hash, void* p_key) -//CHECK_ALL: void * hash_lookup_entry(_Ptr p_hash, void *p_key) +//CHECK_ALL: hash_lookup_entry(_Ptr p_hash, void* p_key) { struct hash_node* p_node = hash_get_node_by_key(p_hash, p_key); //CHECK_ALL: _Ptr p_node = hash_get_node_by_key(p_hash, p_key); @@ -110,7 +110,7 @@ hash_lookup_entry(struct hash* p_hash, void* p_key) void hash_add_entry(struct hash* p_hash, void* p_key, void* p_value) -//CHECK_ALL: void hash_add_entry(_Ptr p_hash, void *p_key, void *p_value) +//CHECK_ALL: hash_add_entry(_Ptr p_hash, void* p_key, void* p_value) { struct hash_node** p_bucket; struct hash_node* p_new_node; @@ -144,7 +144,7 @@ hash_add_entry(struct hash* p_hash, void* p_key, void* p_value) void hash_free_entry(struct hash* p_hash, void* p_key) -//CHECK_ALL: void hash_free_entry(_Ptr p_hash, void *p_key) +//CHECK_ALL: hash_free_entry(_Ptr p_hash, void* p_key) { struct hash_node* p_node = hash_get_node_by_key(p_hash, p_key); //CHECK_ALL: _Ptr p_node = hash_get_node_by_key(p_hash, p_key); @@ -173,7 +173,7 @@ hash_free_entry(struct hash* p_hash, void* p_key) struct hash_node** hash_get_bucket(struct hash* p_hash, void* p_key) -//CHECK_ALL: _Array_ptr<_Ptr> hash_get_bucket(_Ptr p_hash, void *p_key) +//CHECK_ALL: _Array_ptr<_Ptr> hash_get_bucket(_Ptr p_hash, void* p_key) { unsigned int bucket = (*p_hash->hash_func)(p_hash->buckets, p_key); if (bucket >= p_hash->buckets) @@ -185,7 +185,7 @@ hash_get_bucket(struct hash* p_hash, void* p_key) struct hash_node* hash_get_node_by_key(struct hash* p_hash, void* p_key) -//CHECK_ALL: _Ptr hash_get_node_by_key(_Ptr p_hash, void *p_key) +//CHECK_ALL: _Ptr hash_get_node_by_key(_Ptr p_hash, void* p_key) { struct hash_node** p_bucket = hash_get_bucket(p_hash, p_key); struct hash_node* p_node = *p_bucket; diff --git a/clang/test/CheckedCRewriter/i1.c b/clang/test/CheckedCRewriter/i1.c index 336338b27e88..32a232ee3e07 100644 --- a/clang/test/CheckedCRewriter/i1.c +++ b/clang/test/CheckedCRewriter/i1.c @@ -7,7 +7,7 @@ /*nothing in this file, save the trivially converted w, should be converted*/ int *foo(int *w) { - //CHECK: int * foo(_Ptr w) { + //CHECK: int *foo(_Ptr w) { int x = 1; int y = 2; int z = 3; diff --git a/clang/test/CheckedCRewriter/ptrTOptrboth.c b/clang/test/CheckedCRewriter/ptrTOptrboth.c index de1094558055..b8187065606c 100644 --- a/clang/test/CheckedCRewriter/ptrTOptrboth.c +++ b/clang/test/CheckedCRewriter/ptrTOptrboth.c @@ -102,8 +102,8 @@ int *mul2(int *x) { } char *** sus(char * * * x, char * * * y) { - //CHECK_NOALL: char *** sus(char ***x, _Ptr<_Ptr<_Ptr>> y) { - //CHECK_ALL: _Array_ptr<_Array_ptr> sus(char ***x, _Ptr<_Ptr<_Ptr>> y) { + //CHECK_NOALL: char *** sus(char * * * x, _Ptr<_Ptr<_Ptr>> y) { + //CHECK_ALL: _Array_ptr<_Array_ptr> sus(char * * * x, _Ptr<_Ptr<_Ptr>> y) { x = (char * * *) 5; //CHECK: x = (char * * *) 5; char *ch = malloc(sizeof(char)); @@ -111,7 +111,7 @@ x = (char * * *) 5; *ch = 'A'; /*Capital A*/ char *** z = malloc(5*sizeof(char**)); //CHECK_NOALL: char *** z = malloc(5*sizeof(char**)); - //CHECK_ALL: _Array_ptr<_Array_ptr> z : count(5) = malloc<_Array_ptr>(5*sizeof(char**)); + //CHECK_ALL: _Array_ptr<_Array_ptr> z : count(5) = malloc<_Array_ptr>(5*sizeof(char**)); for(int i = 0; i < 5; i++) { z[i] = malloc(5*sizeof(char *)); //CHECK: z[i] = malloc(5*sizeof(char *)); @@ -132,10 +132,10 @@ char *** foo() { char * * * x = malloc(sizeof(char * *)); //CHECK: char * * * x = malloc(sizeof(char * *)); char * * * y = malloc(sizeof(char * *)); - //CHECK: _Ptr<_Ptr<_Ptr>> y = malloc<_Ptr<_Ptr>>(sizeof(char * *)); + //CHECK: _Ptr<_Ptr<_Ptr>> y = malloc<_Ptr<_Ptr>>(sizeof(char * *)); char *** z = sus(x, y); //CHECK_NOALL: char *** z = sus(x, y); - //CHECK_ALL: _Ptr<_Array_ptr> z = sus(x, y); + //CHECK_ALL: _Ptr<_Array_ptr> z = sus(x, y); return z; } char *** bar() { @@ -144,9 +144,9 @@ char *** bar() { char * * * x = malloc(sizeof(char * *)); //CHECK: char * * * x = malloc(sizeof(char * *)); char * * * y = malloc(sizeof(char * *)); - //CHECK: _Ptr<_Ptr<_Ptr>> y = malloc<_Ptr<_Ptr>>(sizeof(char * *)); + //CHECK: _Ptr<_Ptr<_Ptr>> y = malloc<_Ptr<_Ptr>>(sizeof(char * *)); char *** z = sus(x, y); //CHECK_NOALL: char *** z = sus(x, y); - //CHECK_ALL: _Array_ptr<_Array_ptr> z = sus(x, y); + //CHECK_ALL: _Array_ptr<_Array_ptr> z = sus(x, y); z += 2; return z; } diff --git a/clang/test/CheckedCRewriter/ptrTOptrbothmulti1.c b/clang/test/CheckedCRewriter/ptrTOptrbothmulti1.c index ff2ee6e5981e..12578a6cfb13 100644 --- a/clang/test/CheckedCRewriter/ptrTOptrbothmulti1.c +++ b/clang/test/CheckedCRewriter/ptrTOptrbothmulti1.c @@ -110,8 +110,8 @@ int *mul2(int *x) { } char *** sus(char * * *, char * * *); - //CHECK_NOALL: char *** sus(char ***, _Ptr<_Ptr<_Ptr>> y); - //CHECK_ALL: _Array_ptr<_Array_ptr> sus(char ***, _Ptr<_Ptr<_Ptr>> y); + //CHECK_NOALL: char *** sus(char * * *, _Ptr<_Ptr<_Ptr>> y); + //CHECK_ALL: _Array_ptr<_Array_ptr> sus(char * * *, _Ptr<_Ptr<_Ptr>> y); char *** foo() { //CHECK_NOALL: char *** foo(void) { @@ -119,10 +119,10 @@ char *** foo() { char * * * x = malloc(sizeof(char * *)); //CHECK: char * * * x = malloc(sizeof(char * *)); char * * * y = malloc(sizeof(char * *)); - //CHECK: _Ptr<_Ptr<_Ptr>> y = malloc<_Ptr<_Ptr>>(sizeof(char * *)); + //CHECK: _Ptr<_Ptr<_Ptr>> y = malloc<_Ptr<_Ptr>>(sizeof(char * *)); char *** z = sus(x, y); //CHECK_NOALL: char *** z = sus(x, y); - //CHECK_ALL: _Ptr<_Array_ptr> z = sus(x, y); + //CHECK_ALL: _Ptr<_Array_ptr> z = sus(x, y); return z; } char *** bar() { @@ -131,9 +131,9 @@ char *** bar() { char * * * x = malloc(sizeof(char * *)); //CHECK: char * * * x = malloc(sizeof(char * *)); char * * * y = malloc(sizeof(char * *)); - //CHECK: _Ptr<_Ptr<_Ptr>> y = malloc<_Ptr<_Ptr>>(sizeof(char * *)); + //CHECK: _Ptr<_Ptr<_Ptr>> y = malloc<_Ptr<_Ptr>>(sizeof(char * *)); char *** z = sus(x, y); //CHECK_NOALL: char *** z = sus(x, y); - //CHECK_ALL: _Array_ptr<_Array_ptr> z = sus(x, y); + //CHECK_ALL: _Array_ptr<_Array_ptr> z = sus(x, y); z += 2; return z; } diff --git a/clang/test/CheckedCRewriter/ptrTOptrbothmulti2.c b/clang/test/CheckedCRewriter/ptrTOptrbothmulti2.c index 4889d9429d70..5fbcb59cb548 100644 --- a/clang/test/CheckedCRewriter/ptrTOptrbothmulti2.c +++ b/clang/test/CheckedCRewriter/ptrTOptrbothmulti2.c @@ -110,8 +110,8 @@ int *mul2(int *x) { } char *** sus(char * * * x, char * * * y) { - //CHECK_NOALL: char *** sus(char ***x, _Ptr<_Ptr<_Ptr>> y) { - //CHECK_ALL: _Array_ptr<_Array_ptr> sus(char ***x, _Ptr<_Ptr<_Ptr>> y) { + //CHECK_NOALL: char *** sus(char * * * x, _Ptr<_Ptr<_Ptr>> y) { + //CHECK_ALL: _Array_ptr<_Array_ptr> sus(char * * * x, _Ptr<_Ptr<_Ptr>> y) { x = (char * * *) 5; //CHECK: x = (char * * *) 5; char *ch = malloc(sizeof(char)); @@ -119,7 +119,7 @@ x = (char * * *) 5; *ch = 'A'; /*Capital A*/ char *** z = malloc(5*sizeof(char**)); //CHECK_NOALL: char *** z = malloc(5*sizeof(char**)); - //CHECK_ALL: _Array_ptr<_Array_ptr> z : count(5) = malloc<_Array_ptr>(5*sizeof(char**)); + //CHECK_ALL: _Array_ptr<_Array_ptr> z : count(5) = malloc<_Array_ptr>(5*sizeof(char**)); for(int i = 0; i < 5; i++) { z[i] = malloc(5*sizeof(char *)); //CHECK: z[i] = malloc(5*sizeof(char *)); diff --git a/clang/test/CheckedCRewriter/ptrTOptrcallee.c b/clang/test/CheckedCRewriter/ptrTOptrcallee.c index 97556cb609de..c275ca307440 100644 --- a/clang/test/CheckedCRewriter/ptrTOptrcallee.c +++ b/clang/test/CheckedCRewriter/ptrTOptrcallee.c @@ -102,8 +102,8 @@ int *mul2(int *x) { } char *** sus(char * * * x, char * * * y) { - //CHECK_NOALL: char *** sus(char ***x, _Ptr<_Ptr<_Ptr>> y) { - //CHECK_ALL: _Ptr<_Array_ptr> sus(char ***x, _Ptr<_Ptr<_Ptr>> y) { + //CHECK_NOALL: char *** sus(char * * * x, _Ptr<_Ptr<_Ptr>> y) { + //CHECK_ALL: _Ptr<_Array_ptr> sus(char * * * x, _Ptr<_Ptr<_Ptr>> y) { x = (char * * *) 5; //CHECK: x = (char * * *) 5; char *ch = malloc(sizeof(char)); @@ -111,7 +111,7 @@ x = (char * * *) 5; *ch = 'A'; /*Capital A*/ char *** z = malloc(5*sizeof(char**)); //CHECK_NOALL: char *** z = malloc(5*sizeof(char**)); - //CHECK_ALL: _Array_ptr<_Array_ptr> z : count(5) = malloc<_Array_ptr>(5*sizeof(char**)); + //CHECK_ALL: _Array_ptr<_Array_ptr> z : count(5) = malloc<_Array_ptr>(5*sizeof(char**)); for(int i = 0; i < 5; i++) { z[i] = malloc(5*sizeof(char *)); //CHECK: z[i] = malloc(5*sizeof(char *)); @@ -132,10 +132,10 @@ char *** foo() { char * * * x = malloc(sizeof(char * *)); //CHECK: char * * * x = malloc(sizeof(char * *)); char * * * y = malloc(sizeof(char * *)); - //CHECK: _Ptr<_Ptr<_Ptr>> y = malloc<_Ptr<_Ptr>>(sizeof(char * *)); + //CHECK: _Ptr<_Ptr<_Ptr>> y = malloc<_Ptr<_Ptr>>(sizeof(char * *)); char *** z = sus(x, y); //CHECK_NOALL: char *** z = sus(x, y); - //CHECK_ALL: _Ptr<_Array_ptr> z = sus(x, y); + //CHECK_ALL: _Ptr<_Array_ptr> z = sus(x, y); return z; } char *** bar() { @@ -144,8 +144,8 @@ char *** bar() { char * * * x = malloc(sizeof(char * *)); //CHECK: char * * * x = malloc(sizeof(char * *)); char * * * y = malloc(sizeof(char * *)); - //CHECK: _Ptr<_Ptr<_Ptr>> y = malloc<_Ptr<_Ptr>>(sizeof(char * *)); + //CHECK: _Ptr<_Ptr<_Ptr>> y = malloc<_Ptr<_Ptr>>(sizeof(char * *)); char *** z = sus(x, y); //CHECK_NOALL: char *** z = sus(x, y); - //CHECK_ALL: _Ptr<_Array_ptr> z = sus(x, y); + //CHECK_ALL: _Ptr<_Array_ptr> z = sus(x, y); return z; } diff --git a/clang/test/CheckedCRewriter/ptrTOptrcalleemulti1.c b/clang/test/CheckedCRewriter/ptrTOptrcalleemulti1.c index ed7984a559b9..789f07820344 100644 --- a/clang/test/CheckedCRewriter/ptrTOptrcalleemulti1.c +++ b/clang/test/CheckedCRewriter/ptrTOptrcalleemulti1.c @@ -110,8 +110,8 @@ int *mul2(int *x) { } char *** sus(char * * *, char * * *); - //CHECK_NOALL: char *** sus(char ***, _Ptr<_Ptr<_Ptr>> y); - //CHECK_ALL: _Ptr<_Array_ptr> sus(char ***, _Ptr<_Ptr<_Ptr>> y); + //CHECK_NOALL: char *** sus(char * * *, _Ptr<_Ptr<_Ptr>> y); + //CHECK_ALL: _Ptr<_Array_ptr> sus(char * * *, _Ptr<_Ptr<_Ptr>> y); char *** foo() { //CHECK_NOALL: char *** foo(void) { @@ -119,10 +119,10 @@ char *** foo() { char * * * x = malloc(sizeof(char * *)); //CHECK: char * * * x = malloc(sizeof(char * *)); char * * * y = malloc(sizeof(char * *)); - //CHECK: _Ptr<_Ptr<_Ptr>> y = malloc<_Ptr<_Ptr>>(sizeof(char * *)); + //CHECK: _Ptr<_Ptr<_Ptr>> y = malloc<_Ptr<_Ptr>>(sizeof(char * *)); char *** z = sus(x, y); //CHECK_NOALL: char *** z = sus(x, y); - //CHECK_ALL: _Ptr<_Array_ptr> z = sus(x, y); + //CHECK_ALL: _Ptr<_Array_ptr> z = sus(x, y); return z; } char *** bar() { @@ -131,8 +131,8 @@ char *** bar() { char * * * x = malloc(sizeof(char * *)); //CHECK: char * * * x = malloc(sizeof(char * *)); char * * * y = malloc(sizeof(char * *)); - //CHECK: _Ptr<_Ptr<_Ptr>> y = malloc<_Ptr<_Ptr>>(sizeof(char * *)); + //CHECK: _Ptr<_Ptr<_Ptr>> y = malloc<_Ptr<_Ptr>>(sizeof(char * *)); char *** z = sus(x, y); //CHECK_NOALL: char *** z = sus(x, y); - //CHECK_ALL: _Ptr<_Array_ptr> z = sus(x, y); + //CHECK_ALL: _Ptr<_Array_ptr> z = sus(x, y); return z; } diff --git a/clang/test/CheckedCRewriter/ptrTOptrcalleemulti2.c b/clang/test/CheckedCRewriter/ptrTOptrcalleemulti2.c index b2abd5058a04..6568f3f3ee38 100644 --- a/clang/test/CheckedCRewriter/ptrTOptrcalleemulti2.c +++ b/clang/test/CheckedCRewriter/ptrTOptrcalleemulti2.c @@ -110,8 +110,8 @@ int *mul2(int *x) { } char *** sus(char * * * x, char * * * y) { - //CHECK_NOALL: char *** sus(char ***x, _Ptr<_Ptr<_Ptr>> y) { - //CHECK_ALL: _Ptr<_Array_ptr> sus(char ***x, _Ptr<_Ptr<_Ptr>> y) { + //CHECK_NOALL: char *** sus(char * * * x, _Ptr<_Ptr<_Ptr>> y) { + //CHECK_ALL: _Ptr<_Array_ptr> sus(char * * * x, _Ptr<_Ptr<_Ptr>> y) { x = (char * * *) 5; //CHECK: x = (char * * *) 5; char *ch = malloc(sizeof(char)); @@ -119,7 +119,7 @@ x = (char * * *) 5; *ch = 'A'; /*Capital A*/ char *** z = malloc(5*sizeof(char**)); //CHECK_NOALL: char *** z = malloc(5*sizeof(char**)); - //CHECK_ALL: _Array_ptr<_Array_ptr> z : count(5) = malloc<_Array_ptr>(5*sizeof(char**)); + //CHECK_ALL: _Array_ptr<_Array_ptr> z : count(5) = malloc<_Array_ptr>(5*sizeof(char**)); for(int i = 0; i < 5; i++) { z[i] = malloc(5*sizeof(char *)); //CHECK: z[i] = malloc(5*sizeof(char *)); diff --git a/clang/test/CheckedCRewriter/ptrTOptrcaller.c b/clang/test/CheckedCRewriter/ptrTOptrcaller.c index 049cfbcc186e..d0c41c6695b0 100644 --- a/clang/test/CheckedCRewriter/ptrTOptrcaller.c +++ b/clang/test/CheckedCRewriter/ptrTOptrcaller.c @@ -102,8 +102,8 @@ int *mul2(int *x) { } char *** sus(char * * * x, char * * * y) { - //CHECK_NOALL: char *** sus(char ***x, _Ptr<_Ptr<_Ptr>> y) { - //CHECK_ALL: _Array_ptr<_Array_ptr> sus(char ***x, _Ptr<_Ptr<_Ptr>> y) { + //CHECK_NOALL: char *** sus(char * * * x, _Ptr<_Ptr<_Ptr>> y) { + //CHECK_ALL: _Array_ptr<_Array_ptr> sus(char * * * x, _Ptr<_Ptr<_Ptr>> y) { x = (char * * *) 5; //CHECK: x = (char * * *) 5; char *ch = malloc(sizeof(char)); @@ -111,7 +111,7 @@ x = (char * * *) 5; *ch = 'A'; /*Capital A*/ char *** z = malloc(5*sizeof(char**)); //CHECK_NOALL: char *** z = malloc(5*sizeof(char**)); - //CHECK_ALL: _Array_ptr<_Array_ptr> z : count(5) = malloc<_Array_ptr>(5*sizeof(char**)); + //CHECK_ALL: _Array_ptr<_Array_ptr> z : count(5) = malloc<_Array_ptr>(5*sizeof(char**)); for(int i = 0; i < 5; i++) { z[i] = malloc(5*sizeof(char *)); //CHECK: z[i] = malloc(5*sizeof(char *)); @@ -131,10 +131,10 @@ char *** foo() { char * * * x = malloc(sizeof(char * *)); //CHECK: char * * * x = malloc(sizeof(char * *)); char * * * y = malloc(sizeof(char * *)); - //CHECK: _Ptr<_Ptr<_Ptr>> y = malloc<_Ptr<_Ptr>>(sizeof(char * *)); + //CHECK: _Ptr<_Ptr<_Ptr>> y = malloc<_Ptr<_Ptr>>(sizeof(char * *)); char *** z = sus(x, y); //CHECK_NOALL: char *** z = sus(x, y); - //CHECK_ALL: _Ptr<_Array_ptr> z = sus(x, y); + //CHECK_ALL: _Ptr<_Array_ptr> z = sus(x, y); return z; } char *** bar() { @@ -143,9 +143,9 @@ char *** bar() { char * * * x = malloc(sizeof(char * *)); //CHECK: char * * * x = malloc(sizeof(char * *)); char * * * y = malloc(sizeof(char * *)); - //CHECK: _Ptr<_Ptr<_Ptr>> y = malloc<_Ptr<_Ptr>>(sizeof(char * *)); + //CHECK: _Ptr<_Ptr<_Ptr>> y = malloc<_Ptr<_Ptr>>(sizeof(char * *)); char *** z = sus(x, y); //CHECK_NOALL: char *** z = sus(x, y); - //CHECK_ALL: _Array_ptr<_Array_ptr> z = sus(x, y); + //CHECK_ALL: _Array_ptr<_Array_ptr> z = sus(x, y); z += 2; return z; } diff --git a/clang/test/CheckedCRewriter/ptrTOptrcallermulti1.c b/clang/test/CheckedCRewriter/ptrTOptrcallermulti1.c index 5860c4bdb533..44bd096af7bd 100644 --- a/clang/test/CheckedCRewriter/ptrTOptrcallermulti1.c +++ b/clang/test/CheckedCRewriter/ptrTOptrcallermulti1.c @@ -110,8 +110,8 @@ int *mul2(int *x) { } char *** sus(char * * *, char * * *); - //CHECK_NOALL: char *** sus(char ***, _Ptr<_Ptr<_Ptr>> y); - //CHECK_ALL: _Array_ptr<_Array_ptr> sus(char ***, _Ptr<_Ptr<_Ptr>> y); + //CHECK_NOALL: char *** sus(char * * *, _Ptr<_Ptr<_Ptr>> y); + //CHECK_ALL: _Array_ptr<_Array_ptr> sus(char * * *, _Ptr<_Ptr<_Ptr>> y); char *** foo() { //CHECK_NOALL: char *** foo(void) { @@ -119,10 +119,10 @@ char *** foo() { char * * * x = malloc(sizeof(char * *)); //CHECK: char * * * x = malloc(sizeof(char * *)); char * * * y = malloc(sizeof(char * *)); - //CHECK: _Ptr<_Ptr<_Ptr>> y = malloc<_Ptr<_Ptr>>(sizeof(char * *)); + //CHECK: _Ptr<_Ptr<_Ptr>> y = malloc<_Ptr<_Ptr>>(sizeof(char * *)); char *** z = sus(x, y); //CHECK_NOALL: char *** z = sus(x, y); - //CHECK_ALL: _Ptr<_Array_ptr> z = sus(x, y); + //CHECK_ALL: _Ptr<_Array_ptr> z = sus(x, y); return z; } char *** bar() { @@ -131,9 +131,9 @@ char *** bar() { char * * * x = malloc(sizeof(char * *)); //CHECK: char * * * x = malloc(sizeof(char * *)); char * * * y = malloc(sizeof(char * *)); - //CHECK: _Ptr<_Ptr<_Ptr>> y = malloc<_Ptr<_Ptr>>(sizeof(char * *)); + //CHECK: _Ptr<_Ptr<_Ptr>> y = malloc<_Ptr<_Ptr>>(sizeof(char * *)); char *** z = sus(x, y); //CHECK_NOALL: char *** z = sus(x, y); - //CHECK_ALL: _Array_ptr<_Array_ptr> z = sus(x, y); + //CHECK_ALL: _Array_ptr<_Array_ptr> z = sus(x, y); z += 2; return z; } diff --git a/clang/test/CheckedCRewriter/ptrTOptrcallermulti2.c b/clang/test/CheckedCRewriter/ptrTOptrcallermulti2.c index e69c58067e87..166e519ee5c6 100644 --- a/clang/test/CheckedCRewriter/ptrTOptrcallermulti2.c +++ b/clang/test/CheckedCRewriter/ptrTOptrcallermulti2.c @@ -110,8 +110,8 @@ int *mul2(int *x) { } char *** sus(char * * * x, char * * * y) { - //CHECK_NOALL: char *** sus(char ***x, _Ptr<_Ptr<_Ptr>> y) { - //CHECK_ALL: _Array_ptr<_Array_ptr> sus(char ***x, _Ptr<_Ptr<_Ptr>> y) { + //CHECK_NOALL: char *** sus(char * * * x, _Ptr<_Ptr<_Ptr>> y) { + //CHECK_ALL: _Array_ptr<_Array_ptr> sus(char * * * x, _Ptr<_Ptr<_Ptr>> y) { x = (char * * *) 5; //CHECK: x = (char * * *) 5; char *ch = malloc(sizeof(char)); @@ -119,7 +119,7 @@ x = (char * * *) 5; *ch = 'A'; /*Capital A*/ char *** z = malloc(5*sizeof(char**)); //CHECK_NOALL: char *** z = malloc(5*sizeof(char**)); - //CHECK_ALL: _Array_ptr<_Array_ptr> z : count(5) = malloc<_Array_ptr>(5*sizeof(char**)); + //CHECK_ALL: _Array_ptr<_Array_ptr> z : count(5) = malloc<_Array_ptr>(5*sizeof(char**)); for(int i = 0; i < 5; i++) { z[i] = malloc(5*sizeof(char *)); //CHECK: z[i] = malloc(5*sizeof(char *)); diff --git a/clang/test/CheckedCRewriter/ptrTOptrprotoboth.c b/clang/test/CheckedCRewriter/ptrTOptrprotoboth.c index 51e71b529466..85547dbfc4fc 100644 --- a/clang/test/CheckedCRewriter/ptrTOptrprotoboth.c +++ b/clang/test/CheckedCRewriter/ptrTOptrprotoboth.c @@ -105,8 +105,8 @@ int *mul2(int *x) { } char *** sus(char * * *, char * * *); - //CHECK_NOALL: char *** sus(char ***x, _Ptr<_Ptr<_Ptr>> y); - //CHECK_ALL: _Array_ptr<_Array_ptr> sus(char ***x, _Ptr<_Ptr<_Ptr>> y); + //CHECK_NOALL: char *** sus(char * * * x, _Ptr<_Ptr<_Ptr>> y); + //CHECK_ALL: _Array_ptr<_Array_ptr> sus(char * * * x, _Ptr<_Ptr<_Ptr>> y); char *** foo() { //CHECK_NOALL: char *** foo(void) { @@ -114,10 +114,10 @@ char *** foo() { char * * * x = malloc(sizeof(char * *)); //CHECK: char * * * x = malloc(sizeof(char * *)); char * * * y = malloc(sizeof(char * *)); - //CHECK: _Ptr<_Ptr<_Ptr>> y = malloc<_Ptr<_Ptr>>(sizeof(char * *)); + //CHECK: _Ptr<_Ptr<_Ptr>> y = malloc<_Ptr<_Ptr>>(sizeof(char * *)); char *** z = sus(x, y); //CHECK_NOALL: char *** z = sus(x, y); - //CHECK_ALL: _Ptr<_Array_ptr> z = sus(x, y); + //CHECK_ALL: _Ptr<_Array_ptr> z = sus(x, y); return z; } char *** bar() { @@ -126,16 +126,16 @@ char *** bar() { char * * * x = malloc(sizeof(char * *)); //CHECK: char * * * x = malloc(sizeof(char * *)); char * * * y = malloc(sizeof(char * *)); - //CHECK: _Ptr<_Ptr<_Ptr>> y = malloc<_Ptr<_Ptr>>(sizeof(char * *)); + //CHECK: _Ptr<_Ptr<_Ptr>> y = malloc<_Ptr<_Ptr>>(sizeof(char * *)); char *** z = sus(x, y); //CHECK_NOALL: char *** z = sus(x, y); - //CHECK_ALL: _Array_ptr<_Array_ptr> z = sus(x, y); + //CHECK_ALL: _Array_ptr<_Array_ptr> z = sus(x, y); z += 2; return z; } char *** sus(char * * * x, char * * * y) { - //CHECK_NOALL: char *** sus(char ***x, _Ptr<_Ptr<_Ptr>> y) { - //CHECK_ALL: _Array_ptr<_Array_ptr> sus(char ***x, _Ptr<_Ptr<_Ptr>> y) { + //CHECK_NOALL: char *** sus(char * * * x, _Ptr<_Ptr<_Ptr>> y) { + //CHECK_ALL: _Array_ptr<_Array_ptr> sus(char * * * x, _Ptr<_Ptr<_Ptr>> y) { x = (char * * *) 5; //CHECK: x = (char * * *) 5; char *ch = malloc(sizeof(char)); @@ -143,7 +143,7 @@ x = (char * * *) 5; *ch = 'A'; /*Capital A*/ char *** z = malloc(5*sizeof(char**)); //CHECK_NOALL: char *** z = malloc(5*sizeof(char**)); - //CHECK_ALL: _Array_ptr<_Array_ptr> z : count(5) = malloc<_Array_ptr>(5*sizeof(char**)); + //CHECK_ALL: _Array_ptr<_Array_ptr> z : count(5) = malloc<_Array_ptr>(5*sizeof(char**)); for(int i = 0; i < 5; i++) { z[i] = malloc(5*sizeof(char *)); //CHECK: z[i] = malloc(5*sizeof(char *)); diff --git a/clang/test/CheckedCRewriter/ptrTOptrprotocallee.c b/clang/test/CheckedCRewriter/ptrTOptrprotocallee.c index f6469e6a06f4..ff72c1ebaca3 100644 --- a/clang/test/CheckedCRewriter/ptrTOptrprotocallee.c +++ b/clang/test/CheckedCRewriter/ptrTOptrprotocallee.c @@ -105,8 +105,8 @@ int *mul2(int *x) { } char *** sus(char * * *, char * * *); - //CHECK_NOALL: char *** sus(char ***x, _Ptr<_Ptr<_Ptr>> y); - //CHECK_ALL: _Ptr<_Array_ptr> sus(char ***x, _Ptr<_Ptr<_Ptr>> y); + //CHECK_NOALL: char *** sus(char * * * x, _Ptr<_Ptr<_Ptr>> y); + //CHECK_ALL: _Ptr<_Array_ptr> sus(char * * * x, _Ptr<_Ptr<_Ptr>> y); char *** foo() { //CHECK_NOALL: char *** foo(void) { @@ -114,10 +114,10 @@ char *** foo() { char * * * x = malloc(sizeof(char * *)); //CHECK: char * * * x = malloc(sizeof(char * *)); char * * * y = malloc(sizeof(char * *)); - //CHECK: _Ptr<_Ptr<_Ptr>> y = malloc<_Ptr<_Ptr>>(sizeof(char * *)); + //CHECK: _Ptr<_Ptr<_Ptr>> y = malloc<_Ptr<_Ptr>>(sizeof(char * *)); char *** z = sus(x, y); //CHECK_NOALL: char *** z = sus(x, y); - //CHECK_ALL: _Ptr<_Array_ptr> z = sus(x, y); + //CHECK_ALL: _Ptr<_Array_ptr> z = sus(x, y); return z; } char *** bar() { @@ -126,15 +126,15 @@ char *** bar() { char * * * x = malloc(sizeof(char * *)); //CHECK: char * * * x = malloc(sizeof(char * *)); char * * * y = malloc(sizeof(char * *)); - //CHECK: _Ptr<_Ptr<_Ptr>> y = malloc<_Ptr<_Ptr>>(sizeof(char * *)); + //CHECK: _Ptr<_Ptr<_Ptr>> y = malloc<_Ptr<_Ptr>>(sizeof(char * *)); char *** z = sus(x, y); //CHECK_NOALL: char *** z = sus(x, y); - //CHECK_ALL: _Ptr<_Array_ptr> z = sus(x, y); + //CHECK_ALL: _Ptr<_Array_ptr> z = sus(x, y); return z; } char *** sus(char * * * x, char * * * y) { - //CHECK_NOALL: char *** sus(char ***x, _Ptr<_Ptr<_Ptr>> y) { - //CHECK_ALL: _Ptr<_Array_ptr> sus(char ***x, _Ptr<_Ptr<_Ptr>> y) { + //CHECK_NOALL: char *** sus(char * * * x, _Ptr<_Ptr<_Ptr>> y) { + //CHECK_ALL: _Ptr<_Array_ptr> sus(char * * * x, _Ptr<_Ptr<_Ptr>> y) { x = (char * * *) 5; //CHECK: x = (char * * *) 5; char *ch = malloc(sizeof(char)); @@ -142,7 +142,7 @@ x = (char * * *) 5; *ch = 'A'; /*Capital A*/ char *** z = malloc(5*sizeof(char**)); //CHECK_NOALL: char *** z = malloc(5*sizeof(char**)); - //CHECK_ALL: _Array_ptr<_Array_ptr> z : count(5) = malloc<_Array_ptr>(5*sizeof(char**)); + //CHECK_ALL: _Array_ptr<_Array_ptr> z : count(5) = malloc<_Array_ptr>(5*sizeof(char**)); for(int i = 0; i < 5; i++) { z[i] = malloc(5*sizeof(char *)); //CHECK: z[i] = malloc(5*sizeof(char *)); diff --git a/clang/test/CheckedCRewriter/ptrTOptrprotocaller.c b/clang/test/CheckedCRewriter/ptrTOptrprotocaller.c index 9a75c57ac1da..ac3fa00c7b14 100644 --- a/clang/test/CheckedCRewriter/ptrTOptrprotocaller.c +++ b/clang/test/CheckedCRewriter/ptrTOptrprotocaller.c @@ -105,8 +105,8 @@ int *mul2(int *x) { } char *** sus(char * * *, char * * *); - //CHECK_NOALL: char *** sus(char ***x, _Ptr<_Ptr<_Ptr>> y); - //CHECK_ALL: _Array_ptr<_Array_ptr> sus(char ***x, _Ptr<_Ptr<_Ptr>> y); + //CHECK_NOALL: char *** sus(char * * * x, _Ptr<_Ptr<_Ptr>> y); + //CHECK_ALL: _Array_ptr<_Array_ptr> sus(char * * * x, _Ptr<_Ptr<_Ptr>> y); char *** foo() { //CHECK_NOALL: char *** foo(void) { @@ -114,10 +114,10 @@ char *** foo() { char * * * x = malloc(sizeof(char * *)); //CHECK: char * * * x = malloc(sizeof(char * *)); char * * * y = malloc(sizeof(char * *)); - //CHECK: _Ptr<_Ptr<_Ptr>> y = malloc<_Ptr<_Ptr>>(sizeof(char * *)); + //CHECK: _Ptr<_Ptr<_Ptr>> y = malloc<_Ptr<_Ptr>>(sizeof(char * *)); char *** z = sus(x, y); //CHECK_NOALL: char *** z = sus(x, y); - //CHECK_ALL: _Ptr<_Array_ptr> z = sus(x, y); + //CHECK_ALL: _Ptr<_Array_ptr> z = sus(x, y); return z; } char *** bar() { @@ -126,16 +126,16 @@ char *** bar() { char * * * x = malloc(sizeof(char * *)); //CHECK: char * * * x = malloc(sizeof(char * *)); char * * * y = malloc(sizeof(char * *)); - //CHECK: _Ptr<_Ptr<_Ptr>> y = malloc<_Ptr<_Ptr>>(sizeof(char * *)); + //CHECK: _Ptr<_Ptr<_Ptr>> y = malloc<_Ptr<_Ptr>>(sizeof(char * *)); char *** z = sus(x, y); //CHECK_NOALL: char *** z = sus(x, y); - //CHECK_ALL: _Array_ptr<_Array_ptr> z = sus(x, y); + //CHECK_ALL: _Array_ptr<_Array_ptr> z = sus(x, y); z += 2; return z; } char *** sus(char * * * x, char * * * y) { - //CHECK_NOALL: char *** sus(char ***x, _Ptr<_Ptr<_Ptr>> y) { - //CHECK_ALL: _Array_ptr<_Array_ptr> sus(char ***x, _Ptr<_Ptr<_Ptr>> y) { + //CHECK_NOALL: char *** sus(char * * * x, _Ptr<_Ptr<_Ptr>> y) { + //CHECK_ALL: _Array_ptr<_Array_ptr> sus(char * * * x, _Ptr<_Ptr<_Ptr>> y) { x = (char * * *) 5; //CHECK: x = (char * * *) 5; char *ch = malloc(sizeof(char)); @@ -143,7 +143,7 @@ x = (char * * *) 5; *ch = 'A'; /*Capital A*/ char *** z = malloc(5*sizeof(char**)); //CHECK_NOALL: char *** z = malloc(5*sizeof(char**)); - //CHECK_ALL: _Array_ptr<_Array_ptr> z : count(5) = malloc<_Array_ptr>(5*sizeof(char**)); + //CHECK_ALL: _Array_ptr<_Array_ptr> z : count(5) = malloc<_Array_ptr>(5*sizeof(char**)); for(int i = 0; i < 5; i++) { z[i] = malloc(5*sizeof(char *)); //CHECK: z[i] = malloc(5*sizeof(char *)); diff --git a/clang/test/CheckedCRewriter/ptrTOptrprotosafe.c b/clang/test/CheckedCRewriter/ptrTOptrprotosafe.c index 5738d20b0dba..57d3630670fd 100644 --- a/clang/test/CheckedCRewriter/ptrTOptrprotosafe.c +++ b/clang/test/CheckedCRewriter/ptrTOptrprotosafe.c @@ -104,8 +104,8 @@ int *mul2(int *x) { } char *** sus(char * * *, char * * *); - //CHECK_NOALL: char *** sus(char ***x, _Ptr<_Ptr<_Ptr>> y); - //CHECK_ALL: _Ptr<_Array_ptr> sus(char ***x, _Ptr<_Ptr<_Ptr>> y); + //CHECK_NOALL: char *** sus(char * * * x, _Ptr<_Ptr<_Ptr>> y); + //CHECK_ALL: _Ptr<_Array_ptr> sus(char * * * x, _Ptr<_Ptr<_Ptr>> y); char *** foo() { //CHECK_NOALL: char *** foo(void) { @@ -113,10 +113,10 @@ char *** foo() { char * * * x = malloc(sizeof(char * *)); //CHECK: char * * * x = malloc(sizeof(char * *)); char * * * y = malloc(sizeof(char * *)); - //CHECK: _Ptr<_Ptr<_Ptr>> y = malloc<_Ptr<_Ptr>>(sizeof(char * *)); + //CHECK: _Ptr<_Ptr<_Ptr>> y = malloc<_Ptr<_Ptr>>(sizeof(char * *)); char *** z = sus(x, y); //CHECK_NOALL: char *** z = sus(x, y); - //CHECK_ALL: _Ptr<_Array_ptr> z = sus(x, y); + //CHECK_ALL: _Ptr<_Array_ptr> z = sus(x, y); return z; } char *** bar() { @@ -125,15 +125,15 @@ char *** bar() { char * * * x = malloc(sizeof(char * *)); //CHECK: char * * * x = malloc(sizeof(char * *)); char * * * y = malloc(sizeof(char * *)); - //CHECK: _Ptr<_Ptr<_Ptr>> y = malloc<_Ptr<_Ptr>>(sizeof(char * *)); + //CHECK: _Ptr<_Ptr<_Ptr>> y = malloc<_Ptr<_Ptr>>(sizeof(char * *)); char *** z = sus(x, y); //CHECK_NOALL: char *** z = sus(x, y); - //CHECK_ALL: _Ptr<_Array_ptr> z = sus(x, y); + //CHECK_ALL: _Ptr<_Array_ptr> z = sus(x, y); return z; } char *** sus(char * * * x, char * * * y) { - //CHECK_NOALL: char *** sus(char ***x, _Ptr<_Ptr<_Ptr>> y) { - //CHECK_ALL: _Ptr<_Array_ptr> sus(char ***x, _Ptr<_Ptr<_Ptr>> y) { + //CHECK_NOALL: char *** sus(char * * * x, _Ptr<_Ptr<_Ptr>> y) { + //CHECK_ALL: _Ptr<_Array_ptr> sus(char * * * x, _Ptr<_Ptr<_Ptr>> y) { x = (char * * *) 5; //CHECK: x = (char * * *) 5; char *ch = malloc(sizeof(char)); @@ -141,7 +141,7 @@ x = (char * * *) 5; *ch = 'A'; /*Capital A*/ char *** z = malloc(5*sizeof(char**)); //CHECK_NOALL: char *** z = malloc(5*sizeof(char**)); - //CHECK_ALL: _Array_ptr<_Array_ptr> z : count(5) = malloc<_Array_ptr>(5*sizeof(char**)); + //CHECK_ALL: _Array_ptr<_Array_ptr> z : count(5) = malloc<_Array_ptr>(5*sizeof(char**)); for(int i = 0; i < 5; i++) { z[i] = malloc(5*sizeof(char *)); //CHECK: z[i] = malloc(5*sizeof(char *)); diff --git a/clang/test/CheckedCRewriter/ptrTOptrsafe.c b/clang/test/CheckedCRewriter/ptrTOptrsafe.c index 3887868ef376..0b6cf4d2b78c 100644 --- a/clang/test/CheckedCRewriter/ptrTOptrsafe.c +++ b/clang/test/CheckedCRewriter/ptrTOptrsafe.c @@ -101,8 +101,8 @@ int *mul2(int *x) { } char *** sus(char * * * x, char * * * y) { - //CHECK_NOALL: char *** sus(char ***x, _Ptr<_Ptr<_Ptr>> y) { - //CHECK_ALL: _Ptr<_Array_ptr> sus(char ***x, _Ptr<_Ptr<_Ptr>> y) { + //CHECK_NOALL: char *** sus(char * * * x, _Ptr<_Ptr<_Ptr>> y) { + //CHECK_ALL: _Ptr<_Array_ptr> sus(char * * * x, _Ptr<_Ptr<_Ptr>> y) { x = (char * * *) 5; //CHECK: x = (char * * *) 5; char *ch = malloc(sizeof(char)); @@ -110,7 +110,7 @@ x = (char * * *) 5; *ch = 'A'; /*Capital A*/ char *** z = malloc(5*sizeof(char**)); //CHECK_NOALL: char *** z = malloc(5*sizeof(char**)); - //CHECK_ALL: _Array_ptr<_Array_ptr> z : count(5) = malloc<_Array_ptr>(5*sizeof(char**)); + //CHECK_ALL: _Array_ptr<_Array_ptr> z : count(5) = malloc<_Array_ptr>(5*sizeof(char**)); for(int i = 0; i < 5; i++) { z[i] = malloc(5*sizeof(char *)); //CHECK: z[i] = malloc(5*sizeof(char *)); @@ -130,10 +130,10 @@ char *** foo() { char * * * x = malloc(sizeof(char * *)); //CHECK: char * * * x = malloc(sizeof(char * *)); char * * * y = malloc(sizeof(char * *)); - //CHECK: _Ptr<_Ptr<_Ptr>> y = malloc<_Ptr<_Ptr>>(sizeof(char * *)); + //CHECK: _Ptr<_Ptr<_Ptr>> y = malloc<_Ptr<_Ptr>>(sizeof(char * *)); char *** z = sus(x, y); //CHECK_NOALL: char *** z = sus(x, y); - //CHECK_ALL: _Ptr<_Array_ptr> z = sus(x, y); + //CHECK_ALL: _Ptr<_Array_ptr> z = sus(x, y); return z; } char *** bar() { @@ -142,8 +142,8 @@ char *** bar() { char * * * x = malloc(sizeof(char * *)); //CHECK: char * * * x = malloc(sizeof(char * *)); char * * * y = malloc(sizeof(char * *)); - //CHECK: _Ptr<_Ptr<_Ptr>> y = malloc<_Ptr<_Ptr>>(sizeof(char * *)); + //CHECK: _Ptr<_Ptr<_Ptr>> y = malloc<_Ptr<_Ptr>>(sizeof(char * *)); char *** z = sus(x, y); //CHECK_NOALL: char *** z = sus(x, y); - //CHECK_ALL: _Ptr<_Array_ptr> z = sus(x, y); + //CHECK_ALL: _Ptr<_Array_ptr> z = sus(x, y); return z; } diff --git a/clang/test/CheckedCRewriter/ptrTOptrsafemulti1.c b/clang/test/CheckedCRewriter/ptrTOptrsafemulti1.c index 5fac0327d987..8efb6f11a3de 100644 --- a/clang/test/CheckedCRewriter/ptrTOptrsafemulti1.c +++ b/clang/test/CheckedCRewriter/ptrTOptrsafemulti1.c @@ -109,8 +109,8 @@ int *mul2(int *x) { } char *** sus(char * * *, char * * *); - //CHECK_NOALL: char *** sus(char ***, _Ptr<_Ptr<_Ptr>> y); - //CHECK_ALL: _Ptr<_Array_ptr> sus(char ***, _Ptr<_Ptr<_Ptr>> y); + //CHECK_NOALL: char *** sus(char * * *, _Ptr<_Ptr<_Ptr>> y); + //CHECK_ALL: _Ptr<_Array_ptr> sus(char * * *, _Ptr<_Ptr<_Ptr>> y); char *** foo() { //CHECK_NOALL: char *** foo(void) { @@ -118,10 +118,10 @@ char *** foo() { char * * * x = malloc(sizeof(char * *)); //CHECK: char * * * x = malloc(sizeof(char * *)); char * * * y = malloc(sizeof(char * *)); - //CHECK: _Ptr<_Ptr<_Ptr>> y = malloc<_Ptr<_Ptr>>(sizeof(char * *)); + //CHECK: _Ptr<_Ptr<_Ptr>> y = malloc<_Ptr<_Ptr>>(sizeof(char * *)); char *** z = sus(x, y); //CHECK_NOALL: char *** z = sus(x, y); - //CHECK_ALL: _Ptr<_Array_ptr> z = sus(x, y); + //CHECK_ALL: _Ptr<_Array_ptr> z = sus(x, y); return z; } char *** bar() { @@ -130,8 +130,8 @@ char *** bar() { char * * * x = malloc(sizeof(char * *)); //CHECK: char * * * x = malloc(sizeof(char * *)); char * * * y = malloc(sizeof(char * *)); - //CHECK: _Ptr<_Ptr<_Ptr>> y = malloc<_Ptr<_Ptr>>(sizeof(char * *)); + //CHECK: _Ptr<_Ptr<_Ptr>> y = malloc<_Ptr<_Ptr>>(sizeof(char * *)); char *** z = sus(x, y); //CHECK_NOALL: char *** z = sus(x, y); - //CHECK_ALL: _Ptr<_Array_ptr> z = sus(x, y); + //CHECK_ALL: _Ptr<_Array_ptr> z = sus(x, y); return z; } diff --git a/clang/test/CheckedCRewriter/ptrTOptrsafemulti2.c b/clang/test/CheckedCRewriter/ptrTOptrsafemulti2.c index 082cd85b4f4b..b9e6a3bd791a 100644 --- a/clang/test/CheckedCRewriter/ptrTOptrsafemulti2.c +++ b/clang/test/CheckedCRewriter/ptrTOptrsafemulti2.c @@ -109,8 +109,8 @@ int *mul2(int *x) { } char *** sus(char * * * x, char * * * y) { - //CHECK_NOALL: char *** sus(char ***x, _Ptr<_Ptr<_Ptr>> y) { - //CHECK_ALL: _Ptr<_Array_ptr> sus(char ***x, _Ptr<_Ptr<_Ptr>> y) { + //CHECK_NOALL: char *** sus(char * * * x, _Ptr<_Ptr<_Ptr>> y) { + //CHECK_ALL: _Ptr<_Array_ptr> sus(char * * * x, _Ptr<_Ptr<_Ptr>> y) { x = (char * * *) 5; //CHECK: x = (char * * *) 5; char *ch = malloc(sizeof(char)); @@ -118,7 +118,7 @@ x = (char * * *) 5; *ch = 'A'; /*Capital A*/ char *** z = malloc(5*sizeof(char**)); //CHECK_NOALL: char *** z = malloc(5*sizeof(char**)); - //CHECK_ALL: _Array_ptr<_Array_ptr> z : count(5) = malloc<_Array_ptr>(5*sizeof(char**)); + //CHECK_ALL: _Array_ptr<_Array_ptr> z : count(5) = malloc<_Array_ptr>(5*sizeof(char**)); for(int i = 0; i < 5; i++) { z[i] = malloc(5*sizeof(char *)); //CHECK: z[i] = malloc(5*sizeof(char *)); diff --git a/clang/test/CheckedCRewriter/ptr_array.c b/clang/test/CheckedCRewriter/ptr_array.c index eee178b4213f..402580d663a5 100644 --- a/clang/test/CheckedCRewriter/ptr_array.c +++ b/clang/test/CheckedCRewriter/ptr_array.c @@ -34,7 +34,7 @@ void test1(int *a) { /* Example from from the issue */ int *foo() { - //CHECK: int * foo(void) { + //CHECK: int *foo(void) { int x = 1; int y = 2; @@ -53,7 +53,7 @@ int *foo() { /* Example from the issue, but everthing should check */ int *foo2() { - //CHECK_NOALL: int * foo2(void) { + //CHECK_NOALL: int *foo2(void) { //CHECK_ALL: _Ptr foo2(void) _Checked { int x = 1; diff --git a/clang/test/CheckedCRewriter/refarrsubscript.c b/clang/test/CheckedCRewriter/refarrsubscript.c index 23e0f74427ad..ca3888fdeace 100644 --- a/clang/test/CheckedCRewriter/refarrsubscript.c +++ b/clang/test/CheckedCRewriter/refarrsubscript.c @@ -6,7 +6,7 @@ // RUN: rm %S/refarrsubscript.checked.c int **func(int **p, int *x) { - //CHECK_NOALL: int ** func(int **p, _Ptr x) { + //CHECK_NOALL: int **func(int **p, _Ptr x) { //CHECK_ALL: _Array_ptr<_Ptr> func(_Array_ptr<_Ptr> p, _Ptr x) _Checked { return &(p[1]); } @@ -15,7 +15,7 @@ struct foo { int **b; int n; }; //CHECK_NOALL: struct foo { int **b; int n; }; //CHECK_ALL: struct foo { _Array_ptr<_Ptr> b; int n; }; int **bar(struct foo *p) { - //CHECK_NOALL: int ** bar(_Ptr p) { + //CHECK_NOALL: int **bar(_Ptr p) { //CHECK_ALL: _Array_ptr<_Ptr> bar(_Ptr p) _Checked { int *n = &p->n; //CHECK: _Ptr n = &p->n; diff --git a/clang/test/CheckedCRewriter/return_not_least.c b/clang/test/CheckedCRewriter/return_not_least.c index 59b3f697f386..4b979507e365 100644 --- a/clang/test/CheckedCRewriter/return_not_least.c +++ b/clang/test/CheckedCRewriter/return_not_least.c @@ -6,7 +6,7 @@ // RUN: rm %S/return_not_least.checked.c int *a() { - //CHECK_NOALL: int * a(void) { + //CHECK_NOALL: int *a(void) { //CHECK_ALL: _Array_ptr a(void) _Checked { int *a = 0; //CHECK_NOALL: int *a = 0; @@ -44,7 +44,7 @@ typedef unsigned long size_t; extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr) byte_count(nmemb * size); int *bar() { - //CHECK_NOALL: int * bar(void) { + //CHECK_NOALL: int *bar(void) { //CHECK_ALL: _Array_ptr bar(void) { int *z = calloc(2, sizeof(int)); //CHECK_NOALL: int *z = calloc(2, sizeof(int)); diff --git a/clang/test/CheckedCRewriter/safefptrargboth.c b/clang/test/CheckedCRewriter/safefptrargboth.c index 562797a79697..2d3f1371f1ce 100644 --- a/clang/test/CheckedCRewriter/safefptrargboth.c +++ b/clang/test/CheckedCRewriter/safefptrargboth.c @@ -103,14 +103,14 @@ int *mul2(int *x) { } int * sus(int (*x) (int), int (*y) (int)) { - //CHECK_NOALL: int * sus(int (*x)(int), _Ptr y) { - //CHECK_ALL: _Array_ptr sus(int (*x)(int), _Ptr y) { + //CHECK_NOALL: int * sus(int (*x) (int), _Ptr y) { + //CHECK_ALL: _Array_ptr sus(int (*x) (int), _Ptr y) { x = (int (*) (int)) 5; //CHECK: x = (int (*) (int)) 5; int *z = calloc(5, sizeof(int)); //CHECK_NOALL: int *z = calloc(5, sizeof(int)); - //CHECK_ALL: _Array_ptr z : count(5) = calloc(5, sizeof(int)); + //CHECK_ALL: _Array_ptr z : count(5) = calloc(5, sizeof(int)); int i; for(i = 0; i < 5; i++) { //CHECK_NOALL: for(i = 0; i < 5; i++) { @@ -128,10 +128,10 @@ int * foo() { int (*x)(int) = add1; //CHECK: int (*x)(int) = add1; int (*y)(int) = sub1; - //CHECK: _Ptr y = sub1; + //CHECK: _Ptr y = sub1; int *z = sus(x, y); //CHECK_NOALL: int *z = sus(x, y); - //CHECK_ALL: _Array_ptr z = sus(x, y); + //CHECK_ALL: _Array_ptr z = sus(x, y); return z; } @@ -142,10 +142,10 @@ int * bar() { int (*x)(int) = add1; //CHECK: int (*x)(int) = add1; int (*y)(int) = sub1; - //CHECK: _Ptr y = sub1; + //CHECK: _Ptr y = sub1; int *z = sus(x, y); //CHECK_NOALL: int *z = sus(x, y); - //CHECK_ALL: _Array_ptr z = sus(x, y); + //CHECK_ALL: _Array_ptr z = sus(x, y); z += 2; return z; } diff --git a/clang/test/CheckedCRewriter/safefptrargbothmulti1.c b/clang/test/CheckedCRewriter/safefptrargbothmulti1.c index 66343f5be943..89ef4762fdfa 100644 --- a/clang/test/CheckedCRewriter/safefptrargbothmulti1.c +++ b/clang/test/CheckedCRewriter/safefptrargbothmulti1.c @@ -111,8 +111,8 @@ int *mul2(int *x) { } int * sus(int (*) (int), int (*) (int)); - //CHECK_NOALL: int * sus(int (*)(int), _Ptr y); - //CHECK_ALL: _Array_ptr sus(int (*)(int), _Ptr y); + //CHECK_NOALL: int * sus(int (*) (int), _Ptr y); + //CHECK_ALL: _Array_ptr sus(int (*) (int), _Ptr y); int * foo() { //CHECK_NOALL: int * foo(void) { @@ -121,10 +121,10 @@ int * foo() { int (*x)(int) = add1; //CHECK: int (*x)(int) = add1; int (*y)(int) = sub1; - //CHECK: _Ptr y = sub1; + //CHECK: _Ptr y = sub1; int *z = sus(x, y); //CHECK_NOALL: int *z = sus(x, y); - //CHECK_ALL: _Array_ptr z = sus(x, y); + //CHECK_ALL: _Array_ptr z = sus(x, y); return z; } @@ -135,10 +135,10 @@ int * bar() { int (*x)(int) = add1; //CHECK: int (*x)(int) = add1; int (*y)(int) = sub1; - //CHECK: _Ptr y = sub1; + //CHECK: _Ptr y = sub1; int *z = sus(x, y); //CHECK_NOALL: int *z = sus(x, y); - //CHECK_ALL: _Array_ptr z = sus(x, y); + //CHECK_ALL: _Array_ptr z = sus(x, y); z += 2; return z; } diff --git a/clang/test/CheckedCRewriter/safefptrargbothmulti2.c b/clang/test/CheckedCRewriter/safefptrargbothmulti2.c index eff0c1ea1c83..eb90e365ca35 100644 --- a/clang/test/CheckedCRewriter/safefptrargbothmulti2.c +++ b/clang/test/CheckedCRewriter/safefptrargbothmulti2.c @@ -111,14 +111,14 @@ int *mul2(int *x) { } int * sus(int (*x) (int), int (*y) (int)) { - //CHECK_NOALL: int * sus(int (*x)(int), _Ptr y) { - //CHECK_ALL: _Array_ptr sus(int (*x)(int), _Ptr y) { + //CHECK_NOALL: int * sus(int (*x) (int), _Ptr y) { + //CHECK_ALL: _Array_ptr sus(int (*x) (int), _Ptr y) { x = (int (*) (int)) 5; //CHECK: x = (int (*) (int)) 5; int *z = calloc(5, sizeof(int)); //CHECK_NOALL: int *z = calloc(5, sizeof(int)); - //CHECK_ALL: _Array_ptr z : count(5) = calloc(5, sizeof(int)); + //CHECK_ALL: _Array_ptr z : count(5) = calloc(5, sizeof(int)); int i; for(i = 0; i < 5; i++) { //CHECK_NOALL: for(i = 0; i < 5; i++) { diff --git a/clang/test/CheckedCRewriter/safefptrargcallee.c b/clang/test/CheckedCRewriter/safefptrargcallee.c index 9ee922ca5bf5..e58541696698 100644 --- a/clang/test/CheckedCRewriter/safefptrargcallee.c +++ b/clang/test/CheckedCRewriter/safefptrargcallee.c @@ -103,14 +103,14 @@ int *mul2(int *x) { } int * sus(int (*x) (int), int (*y) (int)) { - //CHECK_NOALL: int * sus(int (*x)(int), _Ptr y) { - //CHECK_ALL: _Array_ptr sus(int (*x)(int), _Ptr y) { + //CHECK_NOALL: int * sus(int (*x) (int), _Ptr y) { + //CHECK_ALL: _Array_ptr sus(int (*x) (int), _Ptr y) { x = (int (*) (int)) 5; //CHECK: x = (int (*) (int)) 5; int *z = calloc(5, sizeof(int)); //CHECK_NOALL: int *z = calloc(5, sizeof(int)); - //CHECK_ALL: _Array_ptr z : count(5) = calloc(5, sizeof(int)); + //CHECK_ALL: _Array_ptr z : count(5) = calloc(5, sizeof(int)); int i; for(i = 0; i < 5; i++) { //CHECK_NOALL: for(i = 0; i < 5; i++) { @@ -128,10 +128,10 @@ int * foo() { int (*x)(int) = add1; //CHECK: int (*x)(int) = add1; int (*y)(int) = sub1; - //CHECK: _Ptr y = sub1; + //CHECK: _Ptr y = sub1; int *z = sus(x, y); //CHECK_NOALL: int *z = sus(x, y); - //CHECK_ALL: _Array_ptr z = sus(x, y); + //CHECK_ALL: _Array_ptr z = sus(x, y); return z; } @@ -142,9 +142,9 @@ int * bar() { int (*x)(int) = add1; //CHECK: int (*x)(int) = add1; int (*y)(int) = sub1; - //CHECK: _Ptr y = sub1; + //CHECK: _Ptr y = sub1; int *z = sus(x, y); //CHECK_NOALL: int *z = sus(x, y); - //CHECK_ALL: _Array_ptr z = sus(x, y); + //CHECK_ALL: _Array_ptr z = sus(x, y); return z; } diff --git a/clang/test/CheckedCRewriter/safefptrargcalleemulti1.c b/clang/test/CheckedCRewriter/safefptrargcalleemulti1.c index ccdbdf6fb422..63df0f95ac30 100644 --- a/clang/test/CheckedCRewriter/safefptrargcalleemulti1.c +++ b/clang/test/CheckedCRewriter/safefptrargcalleemulti1.c @@ -111,8 +111,8 @@ int *mul2(int *x) { } int * sus(int (*) (int), int (*) (int)); - //CHECK_NOALL: int * sus(int (*)(int), _Ptr y); - //CHECK_ALL: _Array_ptr sus(int (*)(int), _Ptr y); + //CHECK_NOALL: int * sus(int (*) (int), _Ptr y); + //CHECK_ALL: _Array_ptr sus(int (*) (int), _Ptr y); int * foo() { //CHECK_NOALL: int * foo(void) { @@ -121,10 +121,10 @@ int * foo() { int (*x)(int) = add1; //CHECK: int (*x)(int) = add1; int (*y)(int) = sub1; - //CHECK: _Ptr y = sub1; + //CHECK: _Ptr y = sub1; int *z = sus(x, y); //CHECK_NOALL: int *z = sus(x, y); - //CHECK_ALL: _Array_ptr z = sus(x, y); + //CHECK_ALL: _Array_ptr z = sus(x, y); return z; } @@ -135,9 +135,9 @@ int * bar() { int (*x)(int) = add1; //CHECK: int (*x)(int) = add1; int (*y)(int) = sub1; - //CHECK: _Ptr y = sub1; + //CHECK: _Ptr y = sub1; int *z = sus(x, y); //CHECK_NOALL: int *z = sus(x, y); - //CHECK_ALL: _Array_ptr z = sus(x, y); + //CHECK_ALL: _Array_ptr z = sus(x, y); return z; } diff --git a/clang/test/CheckedCRewriter/safefptrargcalleemulti2.c b/clang/test/CheckedCRewriter/safefptrargcalleemulti2.c index 6742b820b896..a68c97749ef6 100644 --- a/clang/test/CheckedCRewriter/safefptrargcalleemulti2.c +++ b/clang/test/CheckedCRewriter/safefptrargcalleemulti2.c @@ -111,14 +111,14 @@ int *mul2(int *x) { } int * sus(int (*x) (int), int (*y) (int)) { - //CHECK_NOALL: int * sus(int (*x)(int), _Ptr y) { - //CHECK_ALL: _Array_ptr sus(int (*x)(int), _Ptr y) { + //CHECK_NOALL: int * sus(int (*x) (int), _Ptr y) { + //CHECK_ALL: _Array_ptr sus(int (*x) (int), _Ptr y) { x = (int (*) (int)) 5; //CHECK: x = (int (*) (int)) 5; int *z = calloc(5, sizeof(int)); //CHECK_NOALL: int *z = calloc(5, sizeof(int)); - //CHECK_ALL: _Array_ptr z : count(5) = calloc(5, sizeof(int)); + //CHECK_ALL: _Array_ptr z : count(5) = calloc(5, sizeof(int)); int i; for(i = 0; i < 5; i++) { //CHECK_NOALL: for(i = 0; i < 5; i++) { diff --git a/clang/test/CheckedCRewriter/safefptrargcaller.c b/clang/test/CheckedCRewriter/safefptrargcaller.c index c0f7e62dc1e1..c9db931d6216 100644 --- a/clang/test/CheckedCRewriter/safefptrargcaller.c +++ b/clang/test/CheckedCRewriter/safefptrargcaller.c @@ -103,14 +103,14 @@ int *mul2(int *x) { } int * sus(int (*x) (int), int (*y) (int)) { - //CHECK_NOALL: int * sus(int (*x)(int), _Ptr y) { - //CHECK_ALL: _Array_ptr sus(int (*x)(int), _Ptr y) { + //CHECK_NOALL: int * sus(int (*x) (int), _Ptr y) { + //CHECK_ALL: _Array_ptr sus(int (*x) (int), _Ptr y) { x = (int (*) (int)) 5; //CHECK: x = (int (*) (int)) 5; int *z = calloc(5, sizeof(int)); //CHECK_NOALL: int *z = calloc(5, sizeof(int)); - //CHECK_ALL: _Array_ptr z : count(5) = calloc(5, sizeof(int)); + //CHECK_ALL: _Array_ptr z : count(5) = calloc(5, sizeof(int)); int i; for(i = 0; i < 5; i++) { //CHECK_NOALL: for(i = 0; i < 5; i++) { @@ -127,10 +127,10 @@ int * foo() { int (*x)(int) = add1; //CHECK: int (*x)(int) = add1; int (*y)(int) = sub1; - //CHECK: _Ptr y = sub1; + //CHECK: _Ptr y = sub1; int *z = sus(x, y); //CHECK_NOALL: int *z = sus(x, y); - //CHECK_ALL: _Array_ptr z = sus(x, y); + //CHECK_ALL: _Array_ptr z = sus(x, y); return z; } @@ -141,10 +141,10 @@ int * bar() { int (*x)(int) = add1; //CHECK: int (*x)(int) = add1; int (*y)(int) = sub1; - //CHECK: _Ptr y = sub1; + //CHECK: _Ptr y = sub1; int *z = sus(x, y); //CHECK_NOALL: int *z = sus(x, y); - //CHECK_ALL: _Array_ptr z = sus(x, y); + //CHECK_ALL: _Array_ptr z = sus(x, y); z += 2; return z; } diff --git a/clang/test/CheckedCRewriter/safefptrargcallermulti1.c b/clang/test/CheckedCRewriter/safefptrargcallermulti1.c index 35b5707b6abc..7f2f387e4fd4 100644 --- a/clang/test/CheckedCRewriter/safefptrargcallermulti1.c +++ b/clang/test/CheckedCRewriter/safefptrargcallermulti1.c @@ -111,8 +111,8 @@ int *mul2(int *x) { } int * sus(int (*) (int), int (*) (int)); - //CHECK_NOALL: int * sus(int (*)(int), _Ptr y); - //CHECK_ALL: _Array_ptr sus(int (*)(int), _Ptr y); + //CHECK_NOALL: int * sus(int (*) (int), _Ptr y); + //CHECK_ALL: _Array_ptr sus(int (*) (int), _Ptr y); int * foo() { //CHECK_NOALL: int * foo(void) { @@ -121,10 +121,10 @@ int * foo() { int (*x)(int) = add1; //CHECK: int (*x)(int) = add1; int (*y)(int) = sub1; - //CHECK: _Ptr y = sub1; + //CHECK: _Ptr y = sub1; int *z = sus(x, y); //CHECK_NOALL: int *z = sus(x, y); - //CHECK_ALL: _Array_ptr z = sus(x, y); + //CHECK_ALL: _Array_ptr z = sus(x, y); return z; } @@ -135,10 +135,10 @@ int * bar() { int (*x)(int) = add1; //CHECK: int (*x)(int) = add1; int (*y)(int) = sub1; - //CHECK: _Ptr y = sub1; + //CHECK: _Ptr y = sub1; int *z = sus(x, y); //CHECK_NOALL: int *z = sus(x, y); - //CHECK_ALL: _Array_ptr z = sus(x, y); + //CHECK_ALL: _Array_ptr z = sus(x, y); z += 2; return z; } diff --git a/clang/test/CheckedCRewriter/safefptrargcallermulti2.c b/clang/test/CheckedCRewriter/safefptrargcallermulti2.c index 97c434a4d67a..2d7209799b19 100644 --- a/clang/test/CheckedCRewriter/safefptrargcallermulti2.c +++ b/clang/test/CheckedCRewriter/safefptrargcallermulti2.c @@ -111,14 +111,14 @@ int *mul2(int *x) { } int * sus(int (*x) (int), int (*y) (int)) { - //CHECK_NOALL: int * sus(int (*x)(int), _Ptr y) { - //CHECK_ALL: _Array_ptr sus(int (*x)(int), _Ptr y) { + //CHECK_NOALL: int * sus(int (*x) (int), _Ptr y) { + //CHECK_ALL: _Array_ptr sus(int (*x) (int), _Ptr y) { x = (int (*) (int)) 5; //CHECK: x = (int (*) (int)) 5; int *z = calloc(5, sizeof(int)); //CHECK_NOALL: int *z = calloc(5, sizeof(int)); - //CHECK_ALL: _Array_ptr z : count(5) = calloc(5, sizeof(int)); + //CHECK_ALL: _Array_ptr z : count(5) = calloc(5, sizeof(int)); int i; for(i = 0; i < 5; i++) { //CHECK_NOALL: for(i = 0; i < 5; i++) { diff --git a/clang/test/CheckedCRewriter/safefptrargprotoboth.c b/clang/test/CheckedCRewriter/safefptrargprotoboth.c index 08c36ce4e2cb..0dd1fd42b88a 100644 --- a/clang/test/CheckedCRewriter/safefptrargprotoboth.c +++ b/clang/test/CheckedCRewriter/safefptrargprotoboth.c @@ -106,8 +106,8 @@ int *mul2(int *x) { } int * sus(int (*) (int), int (*) (int)); - //CHECK_NOALL: int * sus(int (*x)(int), _Ptr y); - //CHECK_ALL: _Array_ptr sus(int (*x)(int), _Ptr y); + //CHECK_NOALL: int * sus(int (*x) (int), _Ptr y); + //CHECK_ALL: _Array_ptr sus(int (*x) (int), _Ptr y); int * foo() { //CHECK_NOALL: int * foo(void) { @@ -116,10 +116,10 @@ int * foo() { int (*x)(int) = add1; //CHECK: int (*x)(int) = add1; int (*y)(int) = sub1; - //CHECK: _Ptr y = sub1; + //CHECK: _Ptr y = sub1; int *z = sus(x, y); //CHECK_NOALL: int *z = sus(x, y); - //CHECK_ALL: _Array_ptr z = sus(x, y); + //CHECK_ALL: _Array_ptr z = sus(x, y); return z; } @@ -130,23 +130,23 @@ int * bar() { int (*x)(int) = add1; //CHECK: int (*x)(int) = add1; int (*y)(int) = sub1; - //CHECK: _Ptr y = sub1; + //CHECK: _Ptr y = sub1; int *z = sus(x, y); //CHECK_NOALL: int *z = sus(x, y); - //CHECK_ALL: _Array_ptr z = sus(x, y); + //CHECK_ALL: _Array_ptr z = sus(x, y); z += 2; return z; } int * sus(int (*x) (int), int (*y) (int)) { - //CHECK_NOALL: int * sus(int (*x)(int), _Ptr y) { - //CHECK_ALL: _Array_ptr sus(int (*x)(int), _Ptr y) { + //CHECK_NOALL: int * sus(int (*x) (int), _Ptr y) { + //CHECK_ALL: _Array_ptr sus(int (*x) (int), _Ptr y) { x = (int (*) (int)) 5; //CHECK: x = (int (*) (int)) 5; int *z = calloc(5, sizeof(int)); //CHECK_NOALL: int *z = calloc(5, sizeof(int)); - //CHECK_ALL: _Array_ptr z : count(5) = calloc(5, sizeof(int)); + //CHECK_ALL: _Array_ptr z : count(5) = calloc(5, sizeof(int)); int i; for(i = 0; i < 5; i++) { //CHECK_NOALL: for(i = 0; i < 5; i++) { diff --git a/clang/test/CheckedCRewriter/safefptrargprotocallee.c b/clang/test/CheckedCRewriter/safefptrargprotocallee.c index 54ceed93d423..a0f3a36da67b 100644 --- a/clang/test/CheckedCRewriter/safefptrargprotocallee.c +++ b/clang/test/CheckedCRewriter/safefptrargprotocallee.c @@ -106,8 +106,8 @@ int *mul2(int *x) { } int * sus(int (*) (int), int (*) (int)); - //CHECK_NOALL: int * sus(int (*x)(int), _Ptr y); - //CHECK_ALL: _Array_ptr sus(int (*x)(int), _Ptr y); + //CHECK_NOALL: int * sus(int (*x) (int), _Ptr y); + //CHECK_ALL: _Array_ptr sus(int (*x) (int), _Ptr y); int * foo() { //CHECK_NOALL: int * foo(void) { @@ -116,10 +116,10 @@ int * foo() { int (*x)(int) = add1; //CHECK: int (*x)(int) = add1; int (*y)(int) = sub1; - //CHECK: _Ptr y = sub1; + //CHECK: _Ptr y = sub1; int *z = sus(x, y); //CHECK_NOALL: int *z = sus(x, y); - //CHECK_ALL: _Array_ptr z = sus(x, y); + //CHECK_ALL: _Array_ptr z = sus(x, y); return z; } @@ -130,22 +130,22 @@ int * bar() { int (*x)(int) = add1; //CHECK: int (*x)(int) = add1; int (*y)(int) = sub1; - //CHECK: _Ptr y = sub1; + //CHECK: _Ptr y = sub1; int *z = sus(x, y); //CHECK_NOALL: int *z = sus(x, y); - //CHECK_ALL: _Array_ptr z = sus(x, y); + //CHECK_ALL: _Array_ptr z = sus(x, y); return z; } int * sus(int (*x) (int), int (*y) (int)) { - //CHECK_NOALL: int * sus(int (*x)(int), _Ptr y) { - //CHECK_ALL: _Array_ptr sus(int (*x)(int), _Ptr y) { + //CHECK_NOALL: int * sus(int (*x) (int), _Ptr y) { + //CHECK_ALL: _Array_ptr sus(int (*x) (int), _Ptr y) { x = (int (*) (int)) 5; //CHECK: x = (int (*) (int)) 5; int *z = calloc(5, sizeof(int)); //CHECK_NOALL: int *z = calloc(5, sizeof(int)); - //CHECK_ALL: _Array_ptr z : count(5) = calloc(5, sizeof(int)); + //CHECK_ALL: _Array_ptr z : count(5) = calloc(5, sizeof(int)); int i; for(i = 0; i < 5; i++) { //CHECK_NOALL: for(i = 0; i < 5; i++) { diff --git a/clang/test/CheckedCRewriter/safefptrargprotocaller.c b/clang/test/CheckedCRewriter/safefptrargprotocaller.c index 51644037cb08..09c03db5274e 100644 --- a/clang/test/CheckedCRewriter/safefptrargprotocaller.c +++ b/clang/test/CheckedCRewriter/safefptrargprotocaller.c @@ -106,8 +106,8 @@ int *mul2(int *x) { } int * sus(int (*) (int), int (*) (int)); - //CHECK_NOALL: int * sus(int (*x)(int), _Ptr y); - //CHECK_ALL: _Array_ptr sus(int (*x)(int), _Ptr y); + //CHECK_NOALL: int * sus(int (*x) (int), _Ptr y); + //CHECK_ALL: _Array_ptr sus(int (*x) (int), _Ptr y); int * foo() { //CHECK_NOALL: int * foo(void) { @@ -116,10 +116,10 @@ int * foo() { int (*x)(int) = add1; //CHECK: int (*x)(int) = add1; int (*y)(int) = sub1; - //CHECK: _Ptr y = sub1; + //CHECK: _Ptr y = sub1; int *z = sus(x, y); //CHECK_NOALL: int *z = sus(x, y); - //CHECK_ALL: _Array_ptr z = sus(x, y); + //CHECK_ALL: _Array_ptr z = sus(x, y); return z; } @@ -130,23 +130,23 @@ int * bar() { int (*x)(int) = add1; //CHECK: int (*x)(int) = add1; int (*y)(int) = sub1; - //CHECK: _Ptr y = sub1; + //CHECK: _Ptr y = sub1; int *z = sus(x, y); //CHECK_NOALL: int *z = sus(x, y); - //CHECK_ALL: _Array_ptr z = sus(x, y); + //CHECK_ALL: _Array_ptr z = sus(x, y); z += 2; return z; } int * sus(int (*x) (int), int (*y) (int)) { - //CHECK_NOALL: int * sus(int (*x)(int), _Ptr y) { - //CHECK_ALL: _Array_ptr sus(int (*x)(int), _Ptr y) { + //CHECK_NOALL: int * sus(int (*x) (int), _Ptr y) { + //CHECK_ALL: _Array_ptr sus(int (*x) (int), _Ptr y) { x = (int (*) (int)) 5; //CHECK: x = (int (*) (int)) 5; int *z = calloc(5, sizeof(int)); //CHECK_NOALL: int *z = calloc(5, sizeof(int)); - //CHECK_ALL: _Array_ptr z : count(5) = calloc(5, sizeof(int)); + //CHECK_ALL: _Array_ptr z : count(5) = calloc(5, sizeof(int)); int i; for(i = 0; i < 5; i++) { //CHECK_NOALL: for(i = 0; i < 5; i++) { diff --git a/clang/test/CheckedCRewriter/safefptrargprotosafe.c b/clang/test/CheckedCRewriter/safefptrargprotosafe.c index 3f20ee80fcc8..fa4ead49370c 100644 --- a/clang/test/CheckedCRewriter/safefptrargprotosafe.c +++ b/clang/test/CheckedCRewriter/safefptrargprotosafe.c @@ -105,8 +105,8 @@ int *mul2(int *x) { } int * sus(int (*) (int), int (*) (int)); - //CHECK_NOALL: int * sus(int (*x)(int), _Ptr y); - //CHECK_ALL: _Array_ptr sus(int (*x)(int), _Ptr y); + //CHECK_NOALL: int * sus(int (*x) (int), _Ptr y); + //CHECK_ALL: _Array_ptr sus(int (*x) (int), _Ptr y); int * foo() { //CHECK_NOALL: int * foo(void) { @@ -115,10 +115,10 @@ int * foo() { int (*x)(int) = add1; //CHECK: int (*x)(int) = add1; int (*y)(int) = sub1; - //CHECK: _Ptr y = sub1; + //CHECK: _Ptr y = sub1; int *z = sus(x, y); //CHECK_NOALL: int *z = sus(x, y); - //CHECK_ALL: _Array_ptr z = sus(x, y); + //CHECK_ALL: _Array_ptr z = sus(x, y); return z; } @@ -129,22 +129,22 @@ int * bar() { int (*x)(int) = add1; //CHECK: int (*x)(int) = add1; int (*y)(int) = sub1; - //CHECK: _Ptr y = sub1; + //CHECK: _Ptr y = sub1; int *z = sus(x, y); //CHECK_NOALL: int *z = sus(x, y); - //CHECK_ALL: _Array_ptr z = sus(x, y); + //CHECK_ALL: _Array_ptr z = sus(x, y); return z; } int * sus(int (*x) (int), int (*y) (int)) { - //CHECK_NOALL: int * sus(int (*x)(int), _Ptr y) { - //CHECK_ALL: _Array_ptr sus(int (*x)(int), _Ptr y) { + //CHECK_NOALL: int * sus(int (*x) (int), _Ptr y) { + //CHECK_ALL: _Array_ptr sus(int (*x) (int), _Ptr y) { x = (int (*) (int)) 5; //CHECK: x = (int (*) (int)) 5; int *z = calloc(5, sizeof(int)); //CHECK_NOALL: int *z = calloc(5, sizeof(int)); - //CHECK_ALL: _Array_ptr z : count(5) = calloc(5, sizeof(int)); + //CHECK_ALL: _Array_ptr z : count(5) = calloc(5, sizeof(int)); int i; for(i = 0; i < 5; i++) { //CHECK_NOALL: for(i = 0; i < 5; i++) { diff --git a/clang/test/CheckedCRewriter/safefptrargsafe.c b/clang/test/CheckedCRewriter/safefptrargsafe.c index 1d285f51dd71..e1e20278e30f 100644 --- a/clang/test/CheckedCRewriter/safefptrargsafe.c +++ b/clang/test/CheckedCRewriter/safefptrargsafe.c @@ -102,14 +102,14 @@ int *mul2(int *x) { } int * sus(int (*x) (int), int (*y) (int)) { - //CHECK_NOALL: int * sus(int (*x)(int), _Ptr y) { - //CHECK_ALL: _Array_ptr sus(int (*x)(int), _Ptr y) { + //CHECK_NOALL: int * sus(int (*x) (int), _Ptr y) { + //CHECK_ALL: _Array_ptr sus(int (*x) (int), _Ptr y) { x = (int (*) (int)) 5; //CHECK: x = (int (*) (int)) 5; int *z = calloc(5, sizeof(int)); //CHECK_NOALL: int *z = calloc(5, sizeof(int)); - //CHECK_ALL: _Array_ptr z : count(5) = calloc(5, sizeof(int)); + //CHECK_ALL: _Array_ptr z : count(5) = calloc(5, sizeof(int)); int i; for(i = 0; i < 5; i++) { //CHECK_NOALL: for(i = 0; i < 5; i++) { @@ -126,10 +126,10 @@ int * foo() { int (*x)(int) = add1; //CHECK: int (*x)(int) = add1; int (*y)(int) = sub1; - //CHECK: _Ptr y = sub1; + //CHECK: _Ptr y = sub1; int *z = sus(x, y); //CHECK_NOALL: int *z = sus(x, y); - //CHECK_ALL: _Array_ptr z = sus(x, y); + //CHECK_ALL: _Array_ptr z = sus(x, y); return z; } @@ -140,9 +140,9 @@ int * bar() { int (*x)(int) = add1; //CHECK: int (*x)(int) = add1; int (*y)(int) = sub1; - //CHECK: _Ptr y = sub1; + //CHECK: _Ptr y = sub1; int *z = sus(x, y); //CHECK_NOALL: int *z = sus(x, y); - //CHECK_ALL: _Array_ptr z = sus(x, y); + //CHECK_ALL: _Array_ptr z = sus(x, y); return z; } diff --git a/clang/test/CheckedCRewriter/safefptrargsafemulti1.c b/clang/test/CheckedCRewriter/safefptrargsafemulti1.c index 2de4da18e96b..b90d37dfa1dc 100644 --- a/clang/test/CheckedCRewriter/safefptrargsafemulti1.c +++ b/clang/test/CheckedCRewriter/safefptrargsafemulti1.c @@ -110,8 +110,8 @@ int *mul2(int *x) { } int * sus(int (*) (int), int (*) (int)); - //CHECK_NOALL: int * sus(int (*)(int), _Ptr y); - //CHECK_ALL: _Array_ptr sus(int (*)(int), _Ptr y); + //CHECK_NOALL: int * sus(int (*) (int), _Ptr y); + //CHECK_ALL: _Array_ptr sus(int (*) (int), _Ptr y); int * foo() { //CHECK_NOALL: int * foo(void) { @@ -120,10 +120,10 @@ int * foo() { int (*x)(int) = add1; //CHECK: int (*x)(int) = add1; int (*y)(int) = sub1; - //CHECK: _Ptr y = sub1; + //CHECK: _Ptr y = sub1; int *z = sus(x, y); //CHECK_NOALL: int *z = sus(x, y); - //CHECK_ALL: _Array_ptr z = sus(x, y); + //CHECK_ALL: _Array_ptr z = sus(x, y); return z; } @@ -134,9 +134,9 @@ int * bar() { int (*x)(int) = add1; //CHECK: int (*x)(int) = add1; int (*y)(int) = sub1; - //CHECK: _Ptr y = sub1; + //CHECK: _Ptr y = sub1; int *z = sus(x, y); //CHECK_NOALL: int *z = sus(x, y); - //CHECK_ALL: _Array_ptr z = sus(x, y); + //CHECK_ALL: _Array_ptr z = sus(x, y); return z; } diff --git a/clang/test/CheckedCRewriter/safefptrargsafemulti2.c b/clang/test/CheckedCRewriter/safefptrargsafemulti2.c index af9dc33920cf..5ecf33fa5273 100644 --- a/clang/test/CheckedCRewriter/safefptrargsafemulti2.c +++ b/clang/test/CheckedCRewriter/safefptrargsafemulti2.c @@ -110,14 +110,14 @@ int *mul2(int *x) { } int * sus(int (*x) (int), int (*y) (int)) { - //CHECK_NOALL: int * sus(int (*x)(int), _Ptr y) { - //CHECK_ALL: _Array_ptr sus(int (*x)(int), _Ptr y) { + //CHECK_NOALL: int * sus(int (*x) (int), _Ptr y) { + //CHECK_ALL: _Array_ptr sus(int (*x) (int), _Ptr y) { x = (int (*) (int)) 5; //CHECK: x = (int (*) (int)) 5; int *z = calloc(5, sizeof(int)); //CHECK_NOALL: int *z = calloc(5, sizeof(int)); - //CHECK_ALL: _Array_ptr z : count(5) = calloc(5, sizeof(int)); + //CHECK_ALL: _Array_ptr z : count(5) = calloc(5, sizeof(int)); int i; for(i = 0; i < 5; i++) { //CHECK_NOALL: for(i = 0; i < 5; i++) {