Author: jdenny Date: Tue Mar 13 15:18:29 2018 New Revision: 327456 URL: http://llvm.org/viewvc/llvm-project?rev=327456&view=rev Log: [Attr] Merge two dependent tests from different directories
Suggested at: https://reviews.llvm.org/D43248 Added: cfe/trunk/test/Misc/attr-print-emit.cpp - copied, changed from r327455, cfe/trunk/test/Sema/attr-print.cpp Removed: cfe/trunk/test/Frontend/ast-attr.cpp cfe/trunk/test/Sema/attr-print.cpp Removed: cfe/trunk/test/Frontend/ast-attr.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Frontend/ast-attr.cpp?rev=327455&view=auto ============================================================================== --- cfe/trunk/test/Frontend/ast-attr.cpp (original) +++ cfe/trunk/test/Frontend/ast-attr.cpp (removed) @@ -1,5 +0,0 @@ -// RUN: %clang -emit-ast -o %t.ast %S/../Sema/attr-print.cpp -// RUN: %clang_cc1 %t.ast -ast-print | FileCheck %S/../Sema/attr-print.cpp - -// %S/../Sema/attr-print.cpp exercises many different attributes, so we reuse -// it here to check -emit-ast for attributes. Copied: cfe/trunk/test/Misc/attr-print-emit.cpp (from r327455, cfe/trunk/test/Sema/attr-print.cpp) URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Misc/attr-print-emit.cpp?p2=cfe/trunk/test/Misc/attr-print-emit.cpp&p1=cfe/trunk/test/Sema/attr-print.cpp&r1=327455&r2=327456&rev=327456&view=diff ============================================================================== --- cfe/trunk/test/Sema/attr-print.cpp (original) +++ cfe/trunk/test/Misc/attr-print-emit.cpp Tue Mar 13 15:18:29 2018 @@ -1,6 +1,6 @@ // RUN: %clang_cc1 %s -ast-print | FileCheck %s - -// This file is also used as input for %S/../Frontend/ast-attr.cpp. +// RUN: %clang -emit-ast -o %t.ast %s +// RUN: %clang_cc1 %t.ast -ast-print | FileCheck %s // CHECK: void xla(int a) __attribute__((xray_log_args(1))); void xla(int a) __attribute__((xray_log_args(1))); Removed: cfe/trunk/test/Sema/attr-print.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/attr-print.cpp?rev=327455&view=auto ============================================================================== --- cfe/trunk/test/Sema/attr-print.cpp (original) +++ cfe/trunk/test/Sema/attr-print.cpp (removed) @@ -1,69 +0,0 @@ -// RUN: %clang_cc1 %s -ast-print | FileCheck %s - -// This file is also used as input for %S/../Frontend/ast-attr.cpp. - -// CHECK: void xla(int a) __attribute__((xray_log_args(1))); -void xla(int a) __attribute__((xray_log_args(1))); - -// CHECK: void *as2(int, int) __attribute__((alloc_size(1, 2))); -void *as2(int, int) __attribute__((alloc_size(1, 2))); -// CHECK: void *as1(void *, int) __attribute__((alloc_size(2))); -void *as1(void *, int) __attribute__((alloc_size(2))); - -// CHECK: void fmt(int, const char *, ...) __attribute__((format(printf, 2, 3))); -void fmt(int, const char *, ...) __attribute__((format(printf, 2, 3))); - -// CHECK: char *fmta(int, const char *) __attribute__((format_arg(2))); -char *fmta(int, const char *) __attribute__((format_arg(2))); - -// CHECK: void nn(int *, int *) __attribute__((nonnull(1, 2))); -void nn(int *, int *) __attribute__((nonnull(1, 2))); - -// CHECK: int *aa(int i) __attribute__((alloc_align(1))); -int *aa(int i) __attribute__((alloc_align(1))); - -// CHECK: void ownt(int *, int *) __attribute__((ownership_takes(foo, 1, 2))); -void ownt(int *, int *) __attribute__((ownership_takes(foo, 1, 2))); -// CHECK: void ownh(int *, int *) __attribute__((ownership_holds(foo, 1, 2))); -void ownh(int *, int *) __attribute__((ownership_holds(foo, 1, 2))); -// CHECK: void ownr(int) __attribute__((ownership_returns(foo, 1))); -void ownr(int) __attribute__((ownership_returns(foo, 1))); - -// CHECK: void awtt(int, int, ...) __attribute__((argument_with_type_tag(foo, 3, 2))); -void awtt(int, int, ...) __attribute__((argument_with_type_tag(foo, 3, 2))); -// CHECK: void pwtt(void *, int) __attribute__((pointer_with_type_tag(foo, 1, 2))); -void pwtt(void *, int) __attribute__((pointer_with_type_tag(foo, 1, 2))); - -class C { - // CHECK: void xla(int a) __attribute__((xray_log_args(2))); - void xla(int a) __attribute__((xray_log_args(2))); - - // CHECK: void *as2(int, int) __attribute__((alloc_size(2, 3))); - void *as2(int, int) __attribute__((alloc_size(2, 3))); - // CHECK: void *as1(void *, int) __attribute__((alloc_size(3))); - void *as1(void *, int) __attribute__((alloc_size(3))); - - // CHECK: void fmt(int, const char *, ...) __attribute__((format(printf, 3, 4))); - void fmt(int, const char *, ...) __attribute__((format(printf, 3, 4))); - - // CHECK: char *fmta(int, const char *) __attribute__((format_arg(3))); - char *fmta(int, const char *) __attribute__((format_arg(3))); - - // CHECK: void nn(int *, int *) __attribute__((nonnull(2, 3))); - void nn(int *, int *) __attribute__((nonnull(2, 3))); - - // CHECK: int *aa(int i) __attribute__((alloc_align(2))); - int *aa(int i) __attribute__((alloc_align(2))); - - // CHECK: void ownt(int *, int *) __attribute__((ownership_takes(foo, 2, 3))); - void ownt(int *, int *) __attribute__((ownership_takes(foo, 2, 3))); - // CHECK: void ownh(int *, int *) __attribute__((ownership_holds(foo, 2, 3))); - void ownh(int *, int *) __attribute__((ownership_holds(foo, 2, 3))); - // CHECK: void ownr(int) __attribute__((ownership_returns(foo, 2))); - void ownr(int) __attribute__((ownership_returns(foo, 2))); - - // CHECK: void awtt(int, int, ...) __attribute__((argument_with_type_tag(foo, 4, 3))); - void awtt(int, int, ...) __attribute__((argument_with_type_tag(foo, 4, 3))); - // CHECK: void pwtt(void *, int) __attribute__((pointer_with_type_tag(foo, 2, 3))); - void pwtt(void *, int) __attribute__((pointer_with_type_tag(foo, 2, 3))); -}; _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits