diff --git a/cpp2rust/analyses/address_taken.cpp b/cpp2rust/analyses/address_taken.cpp deleted file mode 100644 index 246c7344a..000000000 --- a/cpp2rust/analyses/address_taken.cpp +++ /dev/null @@ -1,207 +0,0 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - -#include "address_taken.h" - -#include -#include - -namespace cpp2rust { -bool AddressTakenVisitor::TraverseInitListExpr(clang::InitListExpr *Expr) { - for (auto *Init : Expr->inits()) { - const auto *ImplicitCast = clang::dyn_cast(Init); - if ((ImplicitCast != nullptr) && - (ImplicitCast->getCastKind() == clang::CK_LValueToRValue)) { - // If the initializer is an implicit cast of kind CK_LValueToRValue, we - // skip visiting the subexpression. - - continue; - } - TraverseStmt(Init); - } - - return true; -} - -bool AddressTakenVisitor::TraverseCXXMemberCallExpr( - clang::CXXMemberCallExpr *Expr) { - if (auto *BaseExpr = Expr->getImplicitObjectArgument()) { - if (dyn_cast(BaseExpr->IgnoreParenImpCasts())) { - // If the base of the member call is a DeclRefExpr, skip traversing it - // but visit its arguments - - for (auto *Arg : Expr->arguments()) { - TraverseStmt(Arg); - } - - return true; - } - } - - return RecursiveASTVisitor::TraverseCXXMemberCallExpr(Expr); -} - -bool AddressTakenVisitor::TraverseCXXOperatorCallExpr( - clang::CXXOperatorCallExpr *Expr) { - if (Expr->isAssignmentOp() && Expr->getNumArgs() == 2) { - const auto *DeclRef = clang::dyn_cast(Expr->getArg(0)); - if (DeclRef != nullptr) { - // If the left-hand side of an assignment is a DeclRefExpr, we skip - // visiting the left-hand side. - RecursiveASTVisitor::TraverseStmt(Expr->getArg(1)); - - return true; - } - - const auto *ArraySubscript = - clang::dyn_cast(Expr->getArg(0)); - if (ArraySubscript != nullptr) { - // If the left-hand side of an assignment is an ArraySubscriptExpr, we - // skip visiting the left-hand side. - RecursiveASTVisitor::TraverseStmt(Expr->getArg(1)); - - return true; - } - - return true; - } else if (Expr->getOperator() == clang::OO_Star || - Expr->getOperator() == clang::OO_Subscript) { - if (Expr->getNumArgs() > 0) { - auto *BaseExpr = Expr->getArg(0); - if (clang::dyn_cast( - BaseExpr->IgnoreParenImpCasts())) { - // If the base of the operator call is a DeclRefExpr, skip traversing it - // but visit its other arguments (if any). - - for (size_t i = 1; i < Expr->getNumArgs(); ++i) { - TraverseStmt(Expr->getArg(i)); - } - - return true; - } - } - } - - return RecursiveASTVisitor::TraverseCXXOperatorCallExpr(Expr); -} - -bool AddressTakenVisitor::TraverseBinaryOperator(clang::BinaryOperator *Expr) { - if (Expr->isAssignmentOp()) { - const auto *DeclRef = clang::dyn_cast(Expr->getLHS()); - if (DeclRef != nullptr) { - // If the left-hand side of an assignment is a DeclRefExpr, we skip - // visiting the left-hand side. - RecursiveASTVisitor::TraverseStmt(Expr->getRHS()); - - return true; - } - - const auto *ArraySubscript = - clang::dyn_cast(Expr->getLHS()); - if (ArraySubscript != nullptr) { - // If the left-hand side of an assignment is an ArraySubscriptExpr, we - // skip visiting the left-hand side. - RecursiveASTVisitor::TraverseStmt(Expr->getRHS()); - - return true; - } - - return true; - } - - return RecursiveASTVisitor::TraverseBinaryOperator(Expr); -} - -bool AddressTakenVisitor::TraverseMemberExpr(clang::MemberExpr *Expr) { - const auto *ValueDecl = Expr->getMemberDecl(); - /* llvm::errs() << "Address taken in field: " << ValueDecl->getNameAsString() - << " at " - << Expr->getBeginLoc().printToString(Context->getSourceManager()) - << '\n'; */ - State->members.insert(ValueDecl); - - auto *ArraySubscript = - clang::dyn_cast(Expr->getBase()); - if (ArraySubscript != nullptr) { - const auto *ImplicitCast = - clang::dyn_cast(ArraySubscript->getBase()); - if (ImplicitCast != nullptr) { - if (clang::isa(ImplicitCast->getSubExpr())) { - // Don't visit the base of an array subscript expression - // if the parent expression is a a MemberExpr. We do this since - // we aim to escape the member itself and not the whole base expression. - RecursiveASTVisitor::TraverseStmt(ArraySubscript->getIdx()); - - return true; - } - } - } - - return RecursiveASTVisitor::TraverseMemberExpr(Expr); -} - -bool AddressTakenVisitor::TraverseImplicitCastExpr( - clang::ImplicitCastExpr *Expr) { - const auto *DeclRef = clang::dyn_cast(Expr->getSubExpr()); - if ((DeclRef != nullptr) && Expr->getCastKind() == clang::CK_LValueToRValue) { - // Don't visit the subexpression of an implicit cast of kind - // CK_LValueToRValue if the subexpression is a DeclRefExpr. - - return true; - } - - if ((DeclRef != nullptr) && - (Expr->getCastKind() == clang::CK_ArrayToPointerDecay)) { - // If the subexpression of an implicit cast is a DeclRefExpr, we mark the - // corresponding VarDecl as decayed. - - const clang::ValueDecl *Decl = DeclRef->getDecl(); - if (const auto *VarDecl = clang::dyn_cast(Decl)) { - /* llvm::errs() << "Decayed array address: " << VarDecl->getNameAsString() - << " at " - << Expr->getBeginLoc().printToString( - Context->getSourceManager()) - << '\n'; */ - State->decayed.insert(VarDecl); - } - - return true; - } - - const auto *MemberExpr = - clang::dyn_cast(Expr->getSubExpr()); - if ((MemberExpr != nullptr) && - Expr->getCastKind() == clang::CK_LValueToRValue) { - // Only visit the base of a member expression when the - // expression is implicitly cast to an rvalue. - - return RecursiveASTVisitor::VisitExpr(MemberExpr->getBase()); - } - - auto *ArraySubscript = - clang::dyn_cast(Expr->getSubExpr()); - if ((ArraySubscript != nullptr) && - Expr->getCastKind() == clang::CK_LValueToRValue) { - // Only visit the index of an array subscript expression when the - // expression is implicitly cast to an rvalue. - - return RecursiveASTVisitor::VisitExpr(ArraySubscript->getIdx()); - } - - return RecursiveASTVisitor::TraverseImplicitCastExpr(Expr); -} - -bool AddressTakenVisitor::VisitDeclRefExpr(clang::DeclRefExpr *Expr) { - if (const auto *VarDecl = clang::dyn_cast(Expr->getDecl())) { - // Everytime we see a DeclRefExpr, we mark the corresponding VarDecl as - // taken. - /* llvm::errs() << "Taken address local: " << VarDecl->getNameAsString() << - " at " - << Expr->getLocation().printToString(Context->getSourceManager()) - << '\n'; */ - State->taken.insert(VarDecl); - } - - return true; -} -} // namespace cpp2rust diff --git a/cpp2rust/analyses/address_taken.h b/cpp2rust/analyses/address_taken.h deleted file mode 100644 index 30ba4abe6..000000000 --- a/cpp2rust/analyses/address_taken.h +++ /dev/null @@ -1,150 +0,0 @@ -#pragma once - -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - -#include -#include -#include -#include -#include - -#include - -namespace cpp2rust { -struct AddressTakenState { - /// A set of local variables whose address was taken. - std::unordered_set taken; - - /// A set of local array variables that have decayed to pointers. - std::unordered_set decayed; - - /// A set of member variables whose address was taken. - std::unordered_set members; -}; - -/// A basic analysis that, for each local variable, determines -/// whether its address was taken or not. This may be due to -/// the variable being used as a reference or the address -/// being taken explicitly. -class AddressTakenVisitor - : public clang::RecursiveASTVisitor { -public: - /// Constructs the visitor with a state pointer. - /// - /// \param State The state of the analysis. - /// \param Context The current AST context. - explicit AddressTakenVisitor(AddressTakenState *State, - clang::ASTContext *Context) - : State(State), Context(Context) {} - - /// Curbs the analysis in order to avoid false positives. - /// - /// \param Expr The expression that may take the address of the local - /// variable. - bool TraverseInitListExpr(clang::InitListExpr *Expr); - - /// Curbs the analysis in order to avoid false positives. - /// - /// \param Expr The expression that may take the address of the local - /// variable. - bool TraverseCXXMemberCallExpr(clang::CXXMemberCallExpr *Expr); - - /// Curbs the analysis in order to avoid false positives. - /// - /// \param Expr The expression that may take the address of the local - /// variable. - bool TraverseCXXOperatorCallExpr(clang::CXXOperatorCallExpr *Expr); - - /// Curbs the analysis in order to avoid false positives. - /// - /// \param Expr The expression that may take the address of the local - /// variable. - bool TraverseBinaryOperator(clang::BinaryOperator *Expr); - - /// Handles the cases where a member variable is used as a reference. - /// - /// \param Expr The expression that may take the address of the member - /// variable. - bool TraverseMemberExpr(clang::MemberExpr *Expr); - - /// Curbs the analysis in order to avoid false positives. - /// - /// \param Expr The expression that may take the address of the local - /// variable. - bool TraverseImplicitCastExpr(clang::ImplicitCastExpr *Expr); - - /// Handles the case where a local variable is used as a reference. - /// - /// \param Expr The expression that may take the address of the local - bool VisitDeclRefExpr(clang::DeclRefExpr *Expr); - -private: - /// The current state of the analysis. - AddressTakenState *State; - /// The current AST context. - /// This field is not used, but it is useful for printing source locations. - [[maybe_unused]] clang::ASTContext *Context; -}; - -class AddressTakenASTConsumer : public clang::ASTConsumer { -public: - /// Constructs the AST consumer with a state pointer. - /// - /// \param State The state of the analysis. - explicit AddressTakenASTConsumer(AddressTakenState *State) : State(State) {} - - /// Handles the translation unit. - /// - /// \param Ctx The current AST context. - void HandleTranslationUnit([[maybe_unused]] clang::ASTContext &Ctx) override { - AddressTakenVisitor Visitor(State, &Ctx); - Visitor.TraverseDecl(Ctx.getTranslationUnitDecl()); - } - -private: - /// The current state of the analysis. - AddressTakenState *State; -}; - -class AddressTakenAction : public clang::ASTFrontendAction { -public: - /// Constructs the action with a state pointer. - /// - /// \param State The state of the analysis. - explicit AddressTakenAction(AddressTakenState *State) : State(State) {} - - /// Creates the AST consumer. - /// - /// \param CI The current compiler instance. - /// \param InFile The current input file. - std::unique_ptr - CreateASTConsumer([[maybe_unused]] clang::CompilerInstance &CI, - [[maybe_unused]] llvm::StringRef InFile) override { - return std::make_unique(State); - } - -private: - /// The current state of the analysis. - AddressTakenState *State; -}; - -class AddressTakenActionFactory : public clang::tooling::FrontendActionFactory { -public: - /// Constructs the factory with a state pointer. - /// - /// \param State The state of the analysis. - explicit AddressTakenActionFactory(AddressTakenState *State) : State(State) {} - - /// Creates the frontend action. - /// - /// \return The frontend action. - std::unique_ptr create() override { - return std::make_unique(State); - } - -private: - /// The current state of the analysis. - AddressTakenState *State; -}; -} // namespace cpp2rust diff --git a/tests/ub/dangling-prvalue-as-lvalue.cpp b/tests/ub/dangling-prvalue-as-lvalue.cpp index ea4bd2eca..77d816165 100644 --- a/tests/ub/dangling-prvalue-as-lvalue.cpp +++ b/tests/ub/dangling-prvalue-as-lvalue.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - // panic-ub: refcount // nondet-result: unsafe diff --git a/tests/ub/max.cpp b/tests/ub/max.cpp index b8a810c25..ef1e073a2 100644 --- a/tests/ub/max.cpp +++ b/tests/ub/max.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - // ub: unsafe // panic-ub: refcount diff --git a/tests/ub/ub1.cpp b/tests/ub/ub1.cpp index a58c9fa66..46441d34a 100644 --- a/tests/ub/ub1.cpp +++ b/tests/ub/ub1.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - // panic-ub: refcount // nondet-result: unsafe int &dangling() { diff --git a/tests/ub/ub10.cpp b/tests/ub/ub10.cpp index df14449a4..60af7cbe6 100644 --- a/tests/ub/ub10.cpp +++ b/tests/ub/ub10.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - // panic-ub: refcount // nondet-result: unsafe int main() { diff --git a/tests/ub/ub11.cpp b/tests/ub/ub11.cpp index 719a29e7f..a75446ca4 100644 --- a/tests/ub/ub11.cpp +++ b/tests/ub/ub11.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - // panic-ub: refcount // nondet-result: unsafe int main() { diff --git a/tests/ub/ub12.cpp b/tests/ub/ub12.cpp index 61b4811cf..6e6539a22 100644 --- a/tests/ub/ub12.cpp +++ b/tests/ub/ub12.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - // panic-ub: refcount // nondet-result: unsafe void escape(int *ptr) { delete ptr; } diff --git a/tests/ub/ub13.cpp b/tests/ub/ub13.cpp index 2c5ce1d12..43eadae8f 100644 --- a/tests/ub/ub13.cpp +++ b/tests/ub/ub13.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - // panic-ub: refcount // nondet-result: unsafe void escape(int *p) { delete p; } diff --git a/tests/ub/ub14.cpp b/tests/ub/ub14.cpp index ffd8a2509..fb136b7d2 100644 --- a/tests/ub/ub14.cpp +++ b/tests/ub/ub14.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - // panic-ub: refcount // nondet-result: unsafe int main() { diff --git a/tests/ub/ub15.cpp b/tests/ub/ub15.cpp index 7043ece27..4a10fb8a3 100644 --- a/tests/ub/ub15.cpp +++ b/tests/ub/ub15.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - // panic-ub: refcount // nondet-result: unsafe int main() { diff --git a/tests/ub/ub16.cpp b/tests/ub/ub16.cpp index 88d789696..760a449fd 100644 --- a/tests/ub/ub16.cpp +++ b/tests/ub/ub16.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - // panic-ub: refcount // nondet-result: unsafe int *foo(int *a) { return &a[5]; } diff --git a/tests/ub/ub17.cpp b/tests/ub/ub17.cpp index 50bf11442..5fc368f8e 100644 --- a/tests/ub/ub17.cpp +++ b/tests/ub/ub17.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - // panic-ub: refcount // nondet-result: unsafe int main() { diff --git a/tests/ub/ub18.cpp b/tests/ub/ub18.cpp index a9fcf3062..2cd3acedb 100644 --- a/tests/ub/ub18.cpp +++ b/tests/ub/ub18.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - // panic-ub: refcount // nondet-result: unsafe int main() { diff --git a/tests/ub/ub19.cpp b/tests/ub/ub19.cpp index dc33cfdfe..8e2ee5779 100644 --- a/tests/ub/ub19.cpp +++ b/tests/ub/ub19.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - // panic-ub: refcount // nondet-result: unsafe void foo(int *array) { delete[] array; } diff --git a/tests/ub/ub2.cpp b/tests/ub/ub2.cpp index 4cd52b99a..ab1baf21f 100644 --- a/tests/ub/ub2.cpp +++ b/tests/ub/ub2.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - // panic-ub: refcount // nondet-result: unsafe int *null() { diff --git a/tests/ub/ub20.cpp b/tests/ub/ub20.cpp index 44c059b72..0c1aa2df3 100644 --- a/tests/ub/ub20.cpp +++ b/tests/ub/ub20.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - // panic-ub: refcount // nondet-result: unsafe void foo(int *single) { delete single; } diff --git a/tests/ub/ub21.cpp b/tests/ub/ub21.cpp index 4db369c28..85f374c17 100644 --- a/tests/ub/ub21.cpp +++ b/tests/ub/ub21.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - // panic-ub: refcount // nondet-result: unsafe #include diff --git a/tests/ub/ub3.cpp b/tests/ub/ub3.cpp index ebaefcf4b..ff5096274 100644 --- a/tests/ub/ub3.cpp +++ b/tests/ub/ub3.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - // panic-ub: refcount // nondet-result: unsafe int *dangling() { diff --git a/tests/ub/ub4.cpp b/tests/ub/ub4.cpp index 0c6a9495b..73c4560c8 100644 --- a/tests/ub/ub4.cpp +++ b/tests/ub/ub4.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - // panic-ub: refcount // nondet-result: unsafe int *smaller(int &x1, int &x2) { return (x1 < x2) ? &x1 : &x2; } diff --git a/tests/ub/ub5.cpp b/tests/ub/ub5.cpp index 21eaa2626..cc2c7392c 100644 --- a/tests/ub/ub5.cpp +++ b/tests/ub/ub5.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - // panic-ub: refcount // nondet-result: unsafe void null(int **p) { *p = nullptr; } diff --git a/tests/ub/ub6.cpp b/tests/ub/ub6.cpp index c072fd0f1..b457d39cd 100644 --- a/tests/ub/ub6.cpp +++ b/tests/ub/ub6.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - // panic-ub: refcount // nondet-result: unsafe #include diff --git a/tests/ub/ub7.cpp b/tests/ub/ub7.cpp index 5d89fa8db..1480fce84 100644 --- a/tests/ub/ub7.cpp +++ b/tests/ub/ub7.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - // panic-ub: refcount // nondet-result: unsafe #include diff --git a/tests/ub/ub8.cpp b/tests/ub/ub8.cpp index 5da0ae96c..0dfca126c 100644 --- a/tests/ub/ub8.cpp +++ b/tests/ub/ub8.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - // panic-ub: refcount // nondet-result: unsafe int main() { diff --git a/tests/ub/ub9.cpp b/tests/ub/ub9.cpp index 1ad99a2cf..4b4029fe0 100644 --- a/tests/ub/ub9.cpp +++ b/tests/ub/ub9.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - // panic-ub: refcount // nondet-result: unsafe int main() { diff --git a/tests/unit/01_local.cpp b/tests/unit/01_local.cpp index 181a91d66..ea9a7bfa5 100644 --- a/tests/unit/01_local.cpp +++ b/tests/unit/01_local.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include int main() { diff --git a/tests/unit/02_address_taken.cpp b/tests/unit/02_address_taken.cpp index 6b9607d0f..9a51dc66a 100644 --- a/tests/unit/02_address_taken.cpp +++ b/tests/unit/02_address_taken.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include #include diff --git a/tests/unit/03_local_array.cpp b/tests/unit/03_local_array.cpp index 34b2395b3..49ff66b37 100644 --- a/tests/unit/03_local_array.cpp +++ b/tests/unit/03_local_array.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include int main() { diff --git a/tests/unit/04_address_taken_array.cpp b/tests/unit/04_address_taken_array.cpp index f6d77d60a..149af43c9 100644 --- a/tests/unit/04_address_taken_array.cpp +++ b/tests/unit/04_address_taken_array.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include int main() { diff --git a/tests/unit/05_new.cpp b/tests/unit/05_new.cpp index 4afb49df1..b39f9d911 100644 --- a/tests/unit/05_new.cpp +++ b/tests/unit/05_new.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - int main() { int *d = new int(0); *d = 5; diff --git a/tests/unit/06_new_array.cpp b/tests/unit/06_new_array.cpp index 9d506c5b4..004dc6bee 100644 --- a/tests/unit/06_new_array.cpp +++ b/tests/unit/06_new_array.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - int main() { int *e = new int[2]; e[0] = 6; diff --git a/tests/unit/07_unique.cpp b/tests/unit/07_unique.cpp index d0581e624..d81663c52 100644 --- a/tests/unit/07_unique.cpp +++ b/tests/unit/07_unique.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include #include diff --git a/tests/unit/08_unique_array.cpp b/tests/unit/08_unique_array.cpp index 23d1c8761..a34d3765c 100644 --- a/tests/unit/08_unique_array.cpp +++ b/tests/unit/08_unique_array.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include #include diff --git a/tests/unit/09_references.cpp b/tests/unit/09_references.cpp index ea6e15378..fe9b77f60 100644 --- a/tests/unit/09_references.cpp +++ b/tests/unit/09_references.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include int main() { diff --git a/tests/unit/10_struct.cpp b/tests/unit/10_struct.cpp index f1e4f7dd9..10a15b634 100644 --- a/tests/unit/10_struct.cpp +++ b/tests/unit/10_struct.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - struct GraphNode { unsigned dst; GraphNode *next; diff --git a/tests/unit/11_move.cpp b/tests/unit/11_move.cpp index 07fd982bf..13d123888 100644 --- a/tests/unit/11_move.cpp +++ b/tests/unit/11_move.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include #include diff --git a/tests/unit/12_test.cpp b/tests/unit/12_test.cpp index e0f7ec551..a6394b39c 100644 --- a/tests/unit/12_test.cpp +++ b/tests/unit/12_test.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include int main() { diff --git a/tests/unit/13_testing.cpp b/tests/unit/13_testing.cpp index 22e50e5ce..ee37850eb 100644 --- a/tests/unit/13_testing.cpp +++ b/tests/unit/13_testing.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - int main() { int a = 1; int &r = a; diff --git a/tests/unit/14_testing2.cpp b/tests/unit/14_testing2.cpp index c97a4c72f..9d06810a4 100644 --- a/tests/unit/14_testing2.cpp +++ b/tests/unit/14_testing2.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include int main() { diff --git a/tests/unit/__builtin_constant_p.cpp b/tests/unit/__builtin_constant_p.cpp index 88437ad04..0dd62ffb8 100644 --- a/tests/unit/__builtin_constant_p.cpp +++ b/tests/unit/__builtin_constant_p.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include int main() { diff --git a/tests/unit/alloc_array.cpp b/tests/unit/alloc_array.cpp index f2748391c..669d85075 100644 --- a/tests/unit/alloc_array.cpp +++ b/tests/unit/alloc_array.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include #include diff --git a/tests/unit/array.cpp b/tests/unit/array.cpp index 6c76da0fa..c78105f56 100644 --- a/tests/unit/array.cpp +++ b/tests/unit/array.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include int main() { diff --git a/tests/unit/assert.cpp b/tests/unit/assert.cpp index 6185257cf..ffc2e8d76 100644 --- a/tests/unit/assert.cpp +++ b/tests/unit/assert.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include int main() { diff --git a/tests/unit/auto.cpp b/tests/unit/auto.cpp index 595aba92e..d063fbb63 100644 --- a/tests/unit/auto.cpp +++ b/tests/unit/auto.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include #include diff --git a/tests/unit/bool_printing.cpp b/tests/unit/bool_printing.cpp index 73482d027..5cb886a0f 100644 --- a/tests/unit/bool_printing.cpp +++ b/tests/unit/bool_printing.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include bool foo() { return true; } diff --git a/tests/unit/borrow_mut_opt.cpp b/tests/unit/borrow_mut_opt.cpp index fa18db1ca..a2ea0f6c9 100644 --- a/tests/unit/borrow_mut_opt.cpp +++ b/tests/unit/borrow_mut_opt.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - void convert_without_rhs() { int x = 0; int y = 1; diff --git a/tests/unit/bounded_struct_ptr.cpp b/tests/unit/bounded_struct_ptr.cpp index fe5ad7ee9..6e0e5ed56 100644 --- a/tests/unit/bounded_struct_ptr.cpp +++ b/tests/unit/bounded_struct_ptr.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include struct Foo { diff --git a/tests/unit/break.cpp b/tests/unit/break.cpp index 48e0898ee..c53f82b12 100644 --- a/tests/unit/break.cpp +++ b/tests/unit/break.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include int for_test(const int n) { diff --git a/tests/unit/bst.cpp b/tests/unit/bst.cpp index b98b58853..6c9255b02 100644 --- a/tests/unit/bst.cpp +++ b/tests/unit/bst.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include #include diff --git a/tests/unit/byte.cpp b/tests/unit/byte.cpp index 9eead9684..14ca152ae 100644 --- a/tests/unit/byte.cpp +++ b/tests/unit/byte.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include #include diff --git a/tests/unit/cast.cpp b/tests/unit/cast.cpp index 6ac017ac7..b67144511 100644 --- a/tests/unit/cast.cpp +++ b/tests/unit/cast.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include #include diff --git a/tests/unit/cast_array_to_pointer_decay.cpp b/tests/unit/cast_array_to_pointer_decay.cpp index aa1b89217..48ac2343e 100644 --- a/tests/unit/cast_array_to_pointer_decay.cpp +++ b/tests/unit/cast_array_to_pointer_decay.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include int deref(int *p) { return *p; } diff --git a/tests/unit/char_printing.cpp b/tests/unit/char_printing.cpp index 6c6e46a74..0ea0380bf 100644 --- a/tests/unit/char_printing.cpp +++ b/tests/unit/char_printing.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include #include #include diff --git a/tests/unit/char_printing_cerr.cpp b/tests/unit/char_printing_cerr.cpp index 6f81fcdee..64b21591b 100644 --- a/tests/unit/char_printing_cerr.cpp +++ b/tests/unit/char_printing_cerr.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include #include #include diff --git a/tests/unit/class.cpp b/tests/unit/class.cpp index c90c95332..cdb862173 100644 --- a/tests/unit/class.cpp +++ b/tests/unit/class.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include class Pair { diff --git a/tests/unit/clone_vs_move.cpp b/tests/unit/clone_vs_move.cpp index 4ce0b3427..915f55e21 100644 --- a/tests/unit/clone_vs_move.cpp +++ b/tests/unit/clone_vs_move.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include #include #include diff --git a/tests/unit/complex_function.cpp b/tests/unit/complex_function.cpp index edb544248..e2dccfea1 100644 --- a/tests/unit/complex_function.cpp +++ b/tests/unit/complex_function.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include int foo(int x) { return x; } diff --git a/tests/unit/compound_assign_ref.cpp b/tests/unit/compound_assign_ref.cpp index 9911a553e..2a7789aa5 100644 --- a/tests/unit/compound_assign_ref.cpp +++ b/tests/unit/compound_assign_ref.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include #include diff --git a/tests/unit/continue.cpp b/tests/unit/continue.cpp index 0fa9d4968..8b253142e 100644 --- a/tests/unit/continue.cpp +++ b/tests/unit/continue.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include int main() { diff --git a/tests/unit/cout_alias.cpp b/tests/unit/cout_alias.cpp index 725326f8e..bbb5e140c 100644 --- a/tests/unit/cout_alias.cpp +++ b/tests/unit/cout_alias.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include int main() { diff --git a/tests/unit/default.cpp b/tests/unit/default.cpp index c26fe496f..a37af25b0 100644 --- a/tests/unit/default.cpp +++ b/tests/unit/default.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - struct Pointers { int *x1; const int *x2; diff --git a/tests/unit/dowhile.cpp b/tests/unit/dowhile.cpp index 70ab2d1d4..6ea0fd456 100644 --- a/tests/unit/dowhile.cpp +++ b/tests/unit/dowhile.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include int dowhile(int x) { diff --git a/tests/unit/empty_array_init.cpp b/tests/unit/empty_array_init.cpp index ab951e984..adf19b259 100644 --- a/tests/unit/empty_array_init.cpp +++ b/tests/unit/empty_array_init.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include #include diff --git a/tests/unit/exprs.cpp b/tests/unit/exprs.cpp index 03e15e467..642e5bbb7 100644 --- a/tests/unit/exprs.cpp +++ b/tests/unit/exprs.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include struct X { diff --git a/tests/unit/fatorial.cpp b/tests/unit/fatorial.cpp index dc2e171e9..a3f55005b 100644 --- a/tests/unit/fatorial.cpp +++ b/tests/unit/fatorial.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include int fatorial(int n) { diff --git a/tests/unit/fcall.cpp b/tests/unit/fcall.cpp index 956fe2c12..dd2441ead 100644 --- a/tests/unit/fcall.cpp +++ b/tests/unit/fcall.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include double f2(double x, double y) { return x - y; } diff --git a/tests/unit/fflush_null.cpp b/tests/unit/fflush_null.cpp index 93b567704..2a689df4c 100644 --- a/tests/unit/fflush_null.cpp +++ b/tests/unit/fflush_null.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include int main() { diff --git a/tests/unit/fft.cpp b/tests/unit/fft.cpp index 55f61e1c5..317268193 100644 --- a/tests/unit/fft.cpp +++ b/tests/unit/fft.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include #include #include diff --git a/tests/unit/find.cpp b/tests/unit/find.cpp index 8a6ae7042..0126e2eed 100644 --- a/tests/unit/find.cpp +++ b/tests/unit/find.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include #include #include diff --git a/tests/unit/fn_ptr.cpp b/tests/unit/fn_ptr.cpp index 0706e7d80..c7c9c7e4a 100644 --- a/tests/unit/fn_ptr.cpp +++ b/tests/unit/fn_ptr.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include typedef int (*foo_t)(void *); diff --git a/tests/unit/fn_ptr_array.cpp b/tests/unit/fn_ptr_array.cpp index ef6f335d9..f7521faa8 100644 --- a/tests/unit/fn_ptr_array.cpp +++ b/tests/unit/fn_ptr_array.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include typedef int (*op_t)(int, int); diff --git a/tests/unit/fn_ptr_as_condition.cpp b/tests/unit/fn_ptr_as_condition.cpp index be74365db..5817f7e48 100644 --- a/tests/unit/fn_ptr_as_condition.cpp +++ b/tests/unit/fn_ptr_as_condition.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include typedef void (*callback_t)(int *); diff --git a/tests/unit/fn_ptr_cast.cpp b/tests/unit/fn_ptr_cast.cpp index eb5c5abfe..d825b0507 100644 --- a/tests/unit/fn_ptr_cast.cpp +++ b/tests/unit/fn_ptr_cast.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include typedef void (*generic_fn)(void); diff --git a/tests/unit/fn_ptr_conditional.cpp b/tests/unit/fn_ptr_conditional.cpp index 343eaeda0..d1b4c832a 100644 --- a/tests/unit/fn_ptr_conditional.cpp +++ b/tests/unit/fn_ptr_conditional.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include typedef int (*op_t)(int); diff --git a/tests/unit/fn_ptr_default_arg.cpp b/tests/unit/fn_ptr_default_arg.cpp index c5d659eb7..c5e0f55ba 100644 --- a/tests/unit/fn_ptr_default_arg.cpp +++ b/tests/unit/fn_ptr_default_arg.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include typedef int (*transform_t)(int); diff --git a/tests/unit/fn_ptr_global.cpp b/tests/unit/fn_ptr_global.cpp index 034e2c2bb..5ff3082f8 100644 --- a/tests/unit/fn_ptr_global.cpp +++ b/tests/unit/fn_ptr_global.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include typedef int (*op_t)(int); diff --git a/tests/unit/fn_ptr_reassign.cpp b/tests/unit/fn_ptr_reassign.cpp index ecb1af3e7..b8dc48f85 100644 --- a/tests/unit/fn_ptr_reassign.cpp +++ b/tests/unit/fn_ptr_reassign.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include typedef int (*op_t)(int, int); diff --git a/tests/unit/fn_ptr_return.cpp b/tests/unit/fn_ptr_return.cpp index 4112b6b09..6e570931a 100644 --- a/tests/unit/fn_ptr_return.cpp +++ b/tests/unit/fn_ptr_return.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include typedef int (*op_t)(int); diff --git a/tests/unit/fn_ptr_stable_sort.cpp b/tests/unit/fn_ptr_stable_sort.cpp index 16b0f31f0..8361b5a68 100644 --- a/tests/unit/fn_ptr_stable_sort.cpp +++ b/tests/unit/fn_ptr_stable_sort.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include #include #include diff --git a/tests/unit/fn_ptr_struct.cpp b/tests/unit/fn_ptr_struct.cpp index ccfa106d2..55216e7f3 100644 --- a/tests/unit/fn_ptr_struct.cpp +++ b/tests/unit/fn_ptr_struct.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include typedef int (*handler_t)(int); diff --git a/tests/unit/fn_ptr_void_return.cpp b/tests/unit/fn_ptr_void_return.cpp index bcd3fed4c..3ae221a97 100644 --- a/tests/unit/fn_ptr_void_return.cpp +++ b/tests/unit/fn_ptr_void_return.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include typedef void (*action_t)(int *); diff --git a/tests/unit/fn_ptr_vtable.cpp b/tests/unit/fn_ptr_vtable.cpp index 6a75da968..8d318a5cd 100644 --- a/tests/unit/fn_ptr_vtable.cpp +++ b/tests/unit/fn_ptr_vtable.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include typedef void *(*create_fn)(int); diff --git a/tests/unit/fopen.cpp b/tests/unit/fopen.cpp index 248eb8c53..9875272a5 100644 --- a/tests/unit/fopen.cpp +++ b/tests/unit/fopen.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include int main() { diff --git a/tests/unit/foreach.cpp b/tests/unit/foreach.cpp index d17bd2a18..9ae471d1f 100644 --- a/tests/unit/foreach.cpp +++ b/tests/unit/foreach.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include #include diff --git a/tests/unit/foreach_disjoint_field_borrow.cpp b/tests/unit/foreach_disjoint_field_borrow.cpp index 598ac916f..4e4cf36fa 100644 --- a/tests/unit/foreach_disjoint_field_borrow.cpp +++ b/tests/unit/foreach_disjoint_field_borrow.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - // Test that iterating over one struct field while mutating another // does not cause a refcell double borrow error. #include diff --git a/tests/unit/foreach_double.cpp b/tests/unit/foreach_double.cpp index 459e04960..42dc5e6f2 100644 --- a/tests/unit/foreach_double.cpp +++ b/tests/unit/foreach_double.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include #include diff --git a/tests/unit/foreach_map.cpp b/tests/unit/foreach_map.cpp index 208316986..6dfaf13cb 100644 --- a/tests/unit/foreach_map.cpp +++ b/tests/unit/foreach_map.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include #include diff --git a/tests/unit/foreach_mut.cpp b/tests/unit/foreach_mut.cpp index 5631d752d..fa130674d 100644 --- a/tests/unit/foreach_mut.cpp +++ b/tests/unit/foreach_mut.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include #include diff --git a/tests/unit/function_call.cpp b/tests/unit/function_call.cpp index bf13f594b..40ad67791 100644 --- a/tests/unit/function_call.cpp +++ b/tests/unit/function_call.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include int function(int y, int z) { diff --git a/tests/unit/function_overloading.cpp b/tests/unit/function_overloading.cpp index 19fc68fdb..92a989362 100644 --- a/tests/unit/function_overloading.cpp +++ b/tests/unit/function_overloading.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include int foo(int x) { return x; } diff --git a/tests/unit/huffman.cpp b/tests/unit/huffman.cpp index 33d71808b..1be9245a8 100644 --- a/tests/unit/huffman.cpp +++ b/tests/unit/huffman.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include #include diff --git a/tests/unit/ignored_rule.cpp b/tests/unit/ignored_rule.cpp index ad1333130..997de0b26 100644 --- a/tests/unit/ignored_rule.cpp +++ b/tests/unit/ignored_rule.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - int main() { int a[2][2] = {{1, 2}, {3, 4}}; return 0; diff --git a/tests/unit/immutable-deref-on-func-call.cpp b/tests/unit/immutable-deref-on-func-call.cpp index 6de07b77e..2699a5722 100644 --- a/tests/unit/immutable-deref-on-func-call.cpp +++ b/tests/unit/immutable-deref-on-func-call.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include struct Item { diff --git a/tests/unit/immutable_unsigned_arithmetic.cpp b/tests/unit/immutable_unsigned_arithmetic.cpp index 2f79d8deb..bc0dcb623 100644 --- a/tests/unit/immutable_unsigned_arithmetic.cpp +++ b/tests/unit/immutable_unsigned_arithmetic.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - int main() { unsigned a = 0; unsigned *p = &a; diff --git a/tests/unit/init.cpp b/tests/unit/init.cpp index af38bf111..8f342a7ea 100644 --- a/tests/unit/init.cpp +++ b/tests/unit/init.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - struct X { int x; }; diff --git a/tests/unit/init_list.cpp b/tests/unit/init_list.cpp index 66ad54eb1..9826ed9f0 100644 --- a/tests/unit/init_list.cpp +++ b/tests/unit/init_list.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include #include #include diff --git a/tests/unit/iterator_freshness.cpp b/tests/unit/iterator_freshness.cpp index 47be94f31..1bb3c3ba6 100644 --- a/tests/unit/iterator_freshness.cpp +++ b/tests/unit/iterator_freshness.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include void foo(std::vector::iterator a0) {} diff --git a/tests/unit/iterators.cpp b/tests/unit/iterators.cpp index 643fa68f8..9b519bef7 100644 --- a/tests/unit/iterators.cpp +++ b/tests/unit/iterators.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include #include diff --git a/tests/unit/keywords.cpp b/tests/unit/keywords.cpp index 3cefd5cff..62527f586 100644 --- a/tests/unit/keywords.cpp +++ b/tests/unit/keywords.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include int main() { diff --git a/tests/unit/kruskal.cpp b/tests/unit/kruskal.cpp index d6c4036bd..34a6ccaa3 100644 --- a/tests/unit/kruskal.cpp +++ b/tests/unit/kruskal.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include #include diff --git a/tests/unit/lambda_capture_pass.cpp b/tests/unit/lambda_capture_pass.cpp index d9b2a05ea..439b128c1 100644 --- a/tests/unit/lambda_capture_pass.cpp +++ b/tests/unit/lambda_capture_pass.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include template int apply(F fn, int x) { return fn(x); } diff --git a/tests/unit/lambda_nested.cpp b/tests/unit/lambda_nested.cpp index 14b0287bb..f7f26e93d 100644 --- a/tests/unit/lambda_nested.cpp +++ b/tests/unit/lambda_nested.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include int main() { diff --git a/tests/unit/linked_list.cpp b/tests/unit/linked_list.cpp index bd3908157..d12a5c64b 100644 --- a/tests/unit/linked_list.cpp +++ b/tests/unit/linked_list.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include struct Node { diff --git a/tests/unit/loop_with_postfix_inc.cpp b/tests/unit/loop_with_postfix_inc.cpp index 4d15a9d62..44271f7f5 100644 --- a/tests/unit/loop_with_postfix_inc.cpp +++ b/tests/unit/loop_with_postfix_inc.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include int main() { diff --git a/tests/unit/main.cpp b/tests/unit/main.cpp index 48db99cc8..abc33d08d 100644 --- a/tests/unit/main.cpp +++ b/tests/unit/main.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include #include int main(int argc, char *argv[]) { diff --git a/tests/unit/map-reallocation.cpp b/tests/unit/map-reallocation.cpp index 48fcd42b1..0df543a24 100644 --- a/tests/unit/map-reallocation.cpp +++ b/tests/unit/map-reallocation.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include #include diff --git a/tests/unit/map.cpp b/tests/unit/map.cpp index 2faab6f72..3d153c255 100644 --- a/tests/unit/map.cpp +++ b/tests/unit/map.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include #include #include diff --git a/tests/unit/matmul.cpp b/tests/unit/matmul.cpp index 1a5f7d779..9407baebf 100644 --- a/tests/unit/matmul.cpp +++ b/tests/unit/matmul.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include #include diff --git a/tests/unit/max.cpp b/tests/unit/max.cpp index ccc30f051..bb550a468 100644 --- a/tests/unit/max.cpp +++ b/tests/unit/max.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include #include diff --git a/tests/unit/memset.cpp b/tests/unit/memset.cpp index c53185bf6..3cd3ca771 100644 --- a/tests/unit/memset.cpp +++ b/tests/unit/memset.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include #include diff --git a/tests/unit/min_max_ptr2ptr.cpp b/tests/unit/min_max_ptr2ptr.cpp index 592fd9025..fbd0523ce 100644 --- a/tests/unit/min_max_ptr2ptr.cpp +++ b/tests/unit/min_max_ptr2ptr.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include #include diff --git a/tests/unit/nested_structs.cpp b/tests/unit/nested_structs.cpp index c3f2a5111..3fd9e1534 100644 --- a/tests/unit/nested_structs.cpp +++ b/tests/unit/nested_structs.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - struct Level0 { struct Level1_1 { int x1; diff --git a/tests/unit/new.cpp b/tests/unit/new.cpp index ff77858a1..30f42be01 100644 --- a/tests/unit/new.cpp +++ b/tests/unit/new.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include int main() { diff --git a/tests/unit/new_alloc_array.cpp b/tests/unit/new_alloc_array.cpp index b5509a490..847c436db 100644 --- a/tests/unit/new_alloc_array.cpp +++ b/tests/unit/new_alloc_array.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include #include diff --git a/tests/unit/new_array.cpp b/tests/unit/new_array.cpp index 9cdc39b45..96d29ac6b 100644 --- a/tests/unit/new_array.cpp +++ b/tests/unit/new_array.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - int main() { int *array = new int[100]; delete[] array; diff --git a/tests/unit/new_array_var_size.cpp b/tests/unit/new_array_var_size.cpp index f05372fdb..93c6459ff 100644 --- a/tests/unit/new_array_var_size.cpp +++ b/tests/unit/new_array_var_size.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - int main() { int N = 5; int *A = new int[N]; diff --git a/tests/unit/new_bst.cpp b/tests/unit/new_bst.cpp index 31d1969a3..4cafacba3 100644 --- a/tests/unit/new_bst.cpp +++ b/tests/unit/new_bst.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include struct node_t { diff --git a/tests/unit/new_struct.cpp b/tests/unit/new_struct.cpp index a6d85117d..3a4c03247 100644 --- a/tests/unit/new_struct.cpp +++ b/tests/unit/new_struct.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include struct Pair { diff --git a/tests/unit/no_direct_callee.cpp b/tests/unit/no_direct_callee.cpp index 4535eb909..084451d3b 100644 --- a/tests/unit/no_direct_callee.cpp +++ b/tests/unit/no_direct_callee.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include bool test1() { return false; } diff --git a/tests/unit/operator_less_than.cpp b/tests/unit/operator_less_than.cpp index 7ba781979..11f0f1ad6 100644 --- a/tests/unit/operator_less_than.cpp +++ b/tests/unit/operator_less_than.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include struct Pair { diff --git a/tests/unit/pair.cpp b/tests/unit/pair.cpp index cbbb3470c..c8cb58e6d 100644 --- a/tests/unit/pair.cpp +++ b/tests/unit/pair.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include #include diff --git a/tests/unit/pod.cpp b/tests/unit/pod.cpp index 57cb4c295..3eec7a975 100644 --- a/tests/unit/pod.cpp +++ b/tests/unit/pod.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include struct POD { diff --git a/tests/unit/pointer_arithmetic.cpp b/tests/unit/pointer_arithmetic.cpp index 15eab371e..a3db883da 100644 --- a/tests/unit/pointer_arithmetic.cpp +++ b/tests/unit/pointer_arithmetic.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include int main() { diff --git a/tests/unit/pointer_array.cpp b/tests/unit/pointer_array.cpp index 6cfcc612d..c972176b4 100644 --- a/tests/unit/pointer_array.cpp +++ b/tests/unit/pointer_array.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include struct StackArray { diff --git a/tests/unit/pointer_call_offset.cpp b/tests/unit/pointer_call_offset.cpp index 71fb95dd4..753de4374 100644 --- a/tests/unit/pointer_call_offset.cpp +++ b/tests/unit/pointer_call_offset.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include int *foo(int *p) { return &p[5]; } diff --git a/tests/unit/pointer_diff.cpp b/tests/unit/pointer_diff.cpp index 973ebb226..50bd89911 100644 --- a/tests/unit/pointer_diff.cpp +++ b/tests/unit/pointer_diff.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include int main() { diff --git a/tests/unit/pointer_eq.cpp b/tests/unit/pointer_eq.cpp index 37020a81b..0ffb164d6 100644 --- a/tests/unit/pointer_eq.cpp +++ b/tests/unit/pointer_eq.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include #include diff --git a/tests/unit/pointer_neq.cpp b/tests/unit/pointer_neq.cpp index ae9d72bfa..8f467ad80 100644 --- a/tests/unit/pointer_neq.cpp +++ b/tests/unit/pointer_neq.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include int main() { diff --git a/tests/unit/pointer_offset.cpp b/tests/unit/pointer_offset.cpp index 209bfe764..b0d230051 100644 --- a/tests/unit/pointer_offset.cpp +++ b/tests/unit/pointer_offset.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include int main() { diff --git a/tests/unit/pointer_printf.cpp b/tests/unit/pointer_printf.cpp index 6237c4abf..999076f7e 100644 --- a/tests/unit/pointer_printf.cpp +++ b/tests/unit/pointer_printf.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include int main() { int a = 1; diff --git a/tests/unit/pointer_to_boolean.cpp b/tests/unit/pointer_to_boolean.cpp index 0d733033d..7e3c838e1 100644 --- a/tests/unit/pointer_to_boolean.cpp +++ b/tests/unit/pointer_to_boolean.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include int main() { diff --git a/tests/unit/pointers.cpp b/tests/unit/pointers.cpp index 683c2ad27..b96c21d64 100644 --- a/tests/unit/pointers.cpp +++ b/tests/unit/pointers.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include struct Test { diff --git a/tests/unit/polymorphism.cpp b/tests/unit/polymorphism.cpp index 815933841..4b3db5976 100644 --- a/tests/unit/polymorphism.cpp +++ b/tests/unit/polymorphism.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include class Animal { diff --git a/tests/unit/printfs.cpp b/tests/unit/printfs.cpp index ee4157f16..7ff8f6fd5 100644 --- a/tests/unit/printfs.cpp +++ b/tests/unit/printfs.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include #include #include diff --git a/tests/unit/prvalue-as-lvalue.cpp b/tests/unit/prvalue-as-lvalue.cpp index 24263dadd..4064c09d5 100644 --- a/tests/unit/prvalue-as-lvalue.cpp +++ b/tests/unit/prvalue-as-lvalue.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include const int &foo(const int &a) { return a; } diff --git a/tests/unit/ptr2ptr.cpp b/tests/unit/ptr2ptr.cpp index 7ffe6a05f..90ed979fd 100644 --- a/tests/unit/ptr2ptr.cpp +++ b/tests/unit/ptr2ptr.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - int main() { int out = 0; int x = 0; diff --git a/tests/unit/push_emplace_back.cpp b/tests/unit/push_emplace_back.cpp index 99c041914..84286d88c 100644 --- a/tests/unit/push_emplace_back.cpp +++ b/tests/unit/push_emplace_back.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include #include #include diff --git a/tests/unit/random.cpp b/tests/unit/random.cpp index 60a3bc844..3140eb4b8 100644 --- a/tests/unit/random.cpp +++ b/tests/unit/random.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - struct Pair { int x; int y; diff --git a/tests/unit/rebind.cpp b/tests/unit/rebind.cpp index 1dad3206d..873d381af 100644 --- a/tests/unit/rebind.cpp +++ b/tests/unit/rebind.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include int main() { diff --git a/tests/unit/ref_calls.cpp b/tests/unit/ref_calls.cpp index 6f91963bb..e45106339 100644 --- a/tests/unit/ref_calls.cpp +++ b/tests/unit/ref_calls.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include int bar() { return 1; } diff --git a/tests/unit/reference_wrapper.cpp b/tests/unit/reference_wrapper.cpp index 77cfabb5c..483f035c2 100644 --- a/tests/unit/reference_wrapper.cpp +++ b/tests/unit/reference_wrapper.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include #include diff --git a/tests/unit/references.cpp b/tests/unit/references.cpp index 4bfb9353b..9c9ad9a33 100644 --- a/tests/unit/references.cpp +++ b/tests/unit/references.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include int main() { diff --git a/tests/unit/references2.cpp b/tests/unit/references2.cpp index bb8f57e6f..d8ad9e95a 100644 --- a/tests/unit/references2.cpp +++ b/tests/unit/references2.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include #include diff --git a/tests/unit/refs_as_args.cpp b/tests/unit/refs_as_args.cpp index acf04e2d5..065a279b1 100644 --- a/tests/unit/refs_as_args.cpp +++ b/tests/unit/refs_as_args.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include void more_refs(int x1, int x2, int &r1, const int &r2) { diff --git a/tests/unit/reinterpret_cast.cpp b/tests/unit/reinterpret_cast.cpp index 343b21d59..2d699cdba 100644 --- a/tests/unit/reinterpret_cast.cpp +++ b/tests/unit/reinterpret_cast.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include #include diff --git a/tests/unit/reinterpret_cast_aliased.cpp b/tests/unit/reinterpret_cast_aliased.cpp index f18f6c196..06b1a0258 100644 --- a/tests/unit/reinterpret_cast_aliased.cpp +++ b/tests/unit/reinterpret_cast_aliased.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include #include diff --git a/tests/unit/reinterpret_cast_array_write.cpp b/tests/unit/reinterpret_cast_array_write.cpp index 7a4a03d72..1da49c01f 100644 --- a/tests/unit/reinterpret_cast_array_write.cpp +++ b/tests/unit/reinterpret_cast_array_write.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include #include diff --git a/tests/unit/reinterpret_cast_chain.cpp b/tests/unit/reinterpret_cast_chain.cpp index 9393cff75..83cad970d 100644 --- a/tests/unit/reinterpret_cast_chain.cpp +++ b/tests/unit/reinterpret_cast_chain.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include #include diff --git a/tests/unit/reinterpret_cast_double.cpp b/tests/unit/reinterpret_cast_double.cpp index e2987cb1d..84ba52f14 100644 --- a/tests/unit/reinterpret_cast_double.cpp +++ b/tests/unit/reinterpret_cast_double.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include #include diff --git a/tests/unit/reinterpret_cast_empty_vec.cpp b/tests/unit/reinterpret_cast_empty_vec.cpp index 910a2a93f..a66acc345 100644 --- a/tests/unit/reinterpret_cast_empty_vec.cpp +++ b/tests/unit/reinterpret_cast_empty_vec.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include #include diff --git a/tests/unit/reinterpret_cast_float.cpp b/tests/unit/reinterpret_cast_float.cpp index 0032e24e9..023b7d569 100644 --- a/tests/unit/reinterpret_cast_float.cpp +++ b/tests/unit/reinterpret_cast_float.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include #include diff --git a/tests/unit/reinterpret_cast_i16_u16.cpp b/tests/unit/reinterpret_cast_i16_u16.cpp index b6b4abba9..1cfdd5140 100644 --- a/tests/unit/reinterpret_cast_i16_u16.cpp +++ b/tests/unit/reinterpret_cast_i16_u16.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include #include diff --git a/tests/unit/reinterpret_cast_identity.cpp b/tests/unit/reinterpret_cast_identity.cpp index 7df046ed2..5c5c6d36a 100644 --- a/tests/unit/reinterpret_cast_identity.cpp +++ b/tests/unit/reinterpret_cast_identity.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include #include diff --git a/tests/unit/reinterpret_cast_iterate.cpp b/tests/unit/reinterpret_cast_iterate.cpp index 9fd6653bb..7b47a3563 100644 --- a/tests/unit/reinterpret_cast_iterate.cpp +++ b/tests/unit/reinterpret_cast_iterate.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include #include diff --git a/tests/unit/reinterpret_cast_large_array.cpp b/tests/unit/reinterpret_cast_large_array.cpp index a0c46e832..e2681c3da 100644 --- a/tests/unit/reinterpret_cast_large_array.cpp +++ b/tests/unit/reinterpret_cast_large_array.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include #include diff --git a/tests/unit/reinterpret_cast_new.cpp b/tests/unit/reinterpret_cast_new.cpp index 0585e675b..d830bb52f 100644 --- a/tests/unit/reinterpret_cast_new.cpp +++ b/tests/unit/reinterpret_cast_new.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include #include diff --git a/tests/unit/reinterpret_cast_new_array.cpp b/tests/unit/reinterpret_cast_new_array.cpp index de761d9e0..9f8262f09 100644 --- a/tests/unit/reinterpret_cast_new_array.cpp +++ b/tests/unit/reinterpret_cast_new_array.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include #include diff --git a/tests/unit/reinterpret_cast_oob_read.cpp b/tests/unit/reinterpret_cast_oob_read.cpp index 816ec182e..b07b9cb6a 100644 --- a/tests/unit/reinterpret_cast_oob_read.cpp +++ b/tests/unit/reinterpret_cast_oob_read.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - // panic: refcount #include diff --git a/tests/unit/reinterpret_cast_oob_write.cpp b/tests/unit/reinterpret_cast_oob_write.cpp index de4e60e85..5ccda2a28 100644 --- a/tests/unit/reinterpret_cast_oob_write.cpp +++ b/tests/unit/reinterpret_cast_oob_write.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - // panic: refcount #include diff --git a/tests/unit/reinterpret_cast_partial_overlap.cpp b/tests/unit/reinterpret_cast_partial_overlap.cpp index b3816e3ea..6484917ad 100644 --- a/tests/unit/reinterpret_cast_partial_overlap.cpp +++ b/tests/unit/reinterpret_cast_partial_overlap.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include #include diff --git a/tests/unit/reinterpret_cast_roundtrip.cpp b/tests/unit/reinterpret_cast_roundtrip.cpp index 1299af919..159bd514f 100644 --- a/tests/unit/reinterpret_cast_roundtrip.cpp +++ b/tests/unit/reinterpret_cast_roundtrip.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include #include diff --git a/tests/unit/reinterpret_cast_same_type.cpp b/tests/unit/reinterpret_cast_same_type.cpp index 8f673775b..1a88b68e9 100644 --- a/tests/unit/reinterpret_cast_same_type.cpp +++ b/tests/unit/reinterpret_cast_same_type.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include #include diff --git a/tests/unit/reinterpret_cast_signed.cpp b/tests/unit/reinterpret_cast_signed.cpp index b1a6ae7e7..097b2ccde 100644 --- a/tests/unit/reinterpret_cast_signed.cpp +++ b/tests/unit/reinterpret_cast_signed.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include #include diff --git a/tests/unit/reinterpret_cast_string.cpp b/tests/unit/reinterpret_cast_string.cpp index a85f3056d..4328aa42a 100644 --- a/tests/unit/reinterpret_cast_string.cpp +++ b/tests/unit/reinterpret_cast_string.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include #include #include diff --git a/tests/unit/reinterpret_cast_struct.cpp b/tests/unit/reinterpret_cast_struct.cpp index d037ff28f..3c09c365f 100644 --- a/tests/unit/reinterpret_cast_struct.cpp +++ b/tests/unit/reinterpret_cast_struct.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include #include diff --git a/tests/unit/reinterpret_cast_struct_to_struct.cpp b/tests/unit/reinterpret_cast_struct_to_struct.cpp index 79ec41915..e01adc19b 100644 --- a/tests/unit/reinterpret_cast_struct_to_struct.cpp +++ b/tests/unit/reinterpret_cast_struct_to_struct.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - // panic: refcount #include #include diff --git a/tests/unit/reinterpret_cast_u32_from_u8.cpp b/tests/unit/reinterpret_cast_u32_from_u8.cpp index c62afa653..5f25ecf3b 100644 --- a/tests/unit/reinterpret_cast_u32_from_u8.cpp +++ b/tests/unit/reinterpret_cast_u32_from_u8.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include #include diff --git a/tests/unit/reinterpret_cast_undersize.cpp b/tests/unit/reinterpret_cast_undersize.cpp index 9e18a8bd1..94897b55f 100644 --- a/tests/unit/reinterpret_cast_undersize.cpp +++ b/tests/unit/reinterpret_cast_undersize.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - // panic: refcount #include diff --git a/tests/unit/reinterpret_cast_vec_write.cpp b/tests/unit/reinterpret_cast_vec_write.cpp index 4d6a276cc..1182ac40b 100644 --- a/tests/unit/reinterpret_cast_vec_write.cpp +++ b/tests/unit/reinterpret_cast_vec_write.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include #include #include diff --git a/tests/unit/reinterpret_cast_zero_init.cpp b/tests/unit/reinterpret_cast_zero_init.cpp index 162b3eff5..bfce65e13 100644 --- a/tests/unit/reinterpret_cast_zero_init.cpp +++ b/tests/unit/reinterpret_cast_zero_init.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include #include diff --git a/tests/unit/reserved_keywords.cpp b/tests/unit/reserved_keywords.cpp index ef74030c7..d9c512839 100644 --- a/tests/unit/reserved_keywords.cpp +++ b/tests/unit/reserved_keywords.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - // https://doc.rust-lang.org/reference/keywords.html #define KW(X) \ X(as) \ diff --git a/tests/unit/simple_function.cpp b/tests/unit/simple_function.cpp index ef690078a..95e18f938 100644 --- a/tests/unit/simple_function.cpp +++ b/tests/unit/simple_function.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include int foo() { return 0; } diff --git a/tests/unit/simple_index.cpp b/tests/unit/simple_index.cpp index 66c28a845..afb16abc9 100644 --- a/tests/unit/simple_index.cpp +++ b/tests/unit/simple_index.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include #include diff --git a/tests/unit/sort.cpp b/tests/unit/sort.cpp index 17faeb695..1f431c81b 100644 --- a/tests/unit/sort.cpp +++ b/tests/unit/sort.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include #include #include diff --git a/tests/unit/split_binop_aliased_borrows.cpp b/tests/unit/split_binop_aliased_borrows.cpp index f3c4a8691..0d65b1e31 100644 --- a/tests/unit/split_binop_aliased_borrows.cpp +++ b/tests/unit/split_binop_aliased_borrows.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include #include diff --git a/tests/unit/stable_sort.cpp b/tests/unit/stable_sort.cpp index f2e5875e2..2a013a89e 100644 --- a/tests/unit/stable_sort.cpp +++ b/tests/unit/stable_sort.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include int main() { diff --git a/tests/unit/static_local.cpp b/tests/unit/static_local.cpp index 9e827d67b..bf1fe07ee 100644 --- a/tests/unit/static_local.cpp +++ b/tests/unit/static_local.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include int foo() { diff --git a/tests/unit/stdcopy.cpp b/tests/unit/stdcopy.cpp index 223364de0..739897079 100644 --- a/tests/unit/stdcopy.cpp +++ b/tests/unit/stdcopy.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include int main() { diff --git a/tests/unit/stdmin_fpoint.cpp b/tests/unit/stdmin_fpoint.cpp index fcb051d4d..bb88a71d1 100644 --- a/tests/unit/stdmin_fpoint.cpp +++ b/tests/unit/stdmin_fpoint.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include int main() { diff --git a/tests/unit/string.cpp b/tests/unit/string.cpp index 5a0788db3..26384c910 100644 --- a/tests/unit/string.cpp +++ b/tests/unit/string.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include #include #include diff --git a/tests/unit/string2.cpp b/tests/unit/string2.cpp index 9e8915c53..0e4885080 100644 --- a/tests/unit/string2.cpp +++ b/tests/unit/string2.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include #include diff --git a/tests/unit/strlen.cpp b/tests/unit/strlen.cpp index ce5eef266..cf4459162 100644 --- a/tests/unit/strlen.cpp +++ b/tests/unit/strlen.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include unsigned strlen(char *ptr) { diff --git a/tests/unit/strlen_diff.cpp b/tests/unit/strlen_diff.cpp index 413a47d79..31b16e2d5 100644 --- a/tests/unit/strlen_diff.cpp +++ b/tests/unit/strlen_diff.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include #include diff --git a/tests/unit/strlen_rec.cpp b/tests/unit/strlen_rec.cpp index c78758ad8..1e3397e5b 100644 --- a/tests/unit/strlen_rec.cpp +++ b/tests/unit/strlen_rec.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include int strlen(const char *s, int n) { return *s ? strlen(s + 1, n + 1) : n; } diff --git a/tests/unit/struct_ctor.cpp b/tests/unit/struct_ctor.cpp index 0e36ea6ce..9afd5d997 100644 --- a/tests/unit/struct_ctor.cpp +++ b/tests/unit/struct_ctor.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include struct StructWithCtor { diff --git a/tests/unit/struct_ptr.cpp b/tests/unit/struct_ptr.cpp index 4f72bc949..ff7b4a3ff 100644 --- a/tests/unit/struct_ptr.cpp +++ b/tests/unit/struct_ptr.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include struct XX { diff --git a/tests/unit/swap.cpp b/tests/unit/swap.cpp index 28e160381..489be7322 100644 --- a/tests/unit/swap.cpp +++ b/tests/unit/swap.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include int identity(int x) { return x; } diff --git a/tests/unit/swap_extended.cpp b/tests/unit/swap_extended.cpp index ab049d055..6c75b7b48 100644 --- a/tests/unit/swap_extended.cpp +++ b/tests/unit/swap_extended.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include #include #include diff --git a/tests/unit/templates.cpp b/tests/unit/templates.cpp index e6cb7e16f..c0af5c3c6 100644 --- a/tests/unit/templates.cpp +++ b/tests/unit/templates.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include template T foo(T x) { return x; } diff --git a/tests/unit/unary.cpp b/tests/unit/unary.cpp index 7da43f09b..c759eb357 100644 --- a/tests/unit/unary.cpp +++ b/tests/unit/unary.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include int main() { diff --git a/tests/unit/unique_ptr.cpp b/tests/unit/unique_ptr.cpp index 106c9777a..2686a2eb8 100644 --- a/tests/unit/unique_ptr.cpp +++ b/tests/unit/unique_ptr.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include #include diff --git a/tests/unit/unique_ptr_const_deref.cpp b/tests/unit/unique_ptr_const_deref.cpp index 876b943cb..13da3a94d 100644 --- a/tests/unit/unique_ptr_const_deref.cpp +++ b/tests/unit/unique_ptr_const_deref.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - // Tests deref of unique_ptr field through const raw pointer (read and write). #include #include diff --git a/tests/unit/unique_ptr_deref_ops.cpp b/tests/unit/unique_ptr_deref_ops.cpp index aa26152b5..f4e2ed6cd 100644 --- a/tests/unit/unique_ptr_deref_ops.cpp +++ b/tests/unit/unique_ptr_deref_ops.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - // Tests compound assignment through deref and multiple derefs in one // expression. #include diff --git a/tests/unit/unique_ptr_nested.cpp b/tests/unit/unique_ptr_nested.cpp index 80104b6f9..ed10a2a62 100644 --- a/tests/unit/unique_ptr_nested.cpp +++ b/tests/unit/unique_ptr_nested.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - // Tests chained arrow through nested unique_ptrs and cross-deref assignment. #include #include diff --git a/tests/unit/unique_ptr_small.cpp b/tests/unit/unique_ptr_small.cpp index c802c6143..b252661e3 100644 --- a/tests/unit/unique_ptr_small.cpp +++ b/tests/unit/unique_ptr_small.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include #include diff --git a/tests/unit/unique_ptr_struct.cpp b/tests/unit/unique_ptr_struct.cpp index 87e58dc51..75e1665cc 100644 --- a/tests/unit/unique_ptr_struct.cpp +++ b/tests/unit/unique_ptr_struct.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - // Tests arrow compound assignment, arrow read+write, and passing *ptr by value. #include #include diff --git a/tests/unit/unsigned.cpp b/tests/unit/unsigned.cpp index b58b3926f..7f5454a7e 100644 --- a/tests/unit/unsigned.cpp +++ b/tests/unit/unsigned.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include #include diff --git a/tests/unit/vector.cpp b/tests/unit/vector.cpp index af513a9ca..4425eee29 100644 --- a/tests/unit/vector.cpp +++ b/tests/unit/vector.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include #include diff --git a/tests/unit/vector2.cpp b/tests/unit/vector2.cpp index 68218c5d3..8705f3a83 100644 --- a/tests/unit/vector2.cpp +++ b/tests/unit/vector2.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include #include diff --git a/tests/unit/vector3.cpp b/tests/unit/vector3.cpp index 06e1f02cc..5ea3eee37 100644 --- a/tests/unit/vector3.cpp +++ b/tests/unit/vector3.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include #include diff --git a/tests/unit/vector_with_allocator.cpp b/tests/unit/vector_with_allocator.cpp index b596b2d25..e00a1d6c3 100644 --- a/tests/unit/vector_with_allocator.cpp +++ b/tests/unit/vector_with_allocator.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include #include #include diff --git a/tests/unit/void_return.cpp b/tests/unit/void_return.cpp index 08e0f31d9..6d50e1d23 100644 --- a/tests/unit/void_return.cpp +++ b/tests/unit/void_return.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include #include diff --git a/tests/unit/z_bit_cast.cpp b/tests/unit/z_bit_cast.cpp index 40f24cc81..053531a5c 100644 --- a/tests/unit/z_bit_cast.cpp +++ b/tests/unit/z_bit_cast.cpp @@ -1,6 +1,3 @@ -// Copyright (c) 2022-present INESC-ID. -// Distributed under the MIT license that can be found in the LICENSE file. - #include void decay_cast(unsigned int *a1) {} void bit_cast(const void *p) {}