Skip to content

Commit f10df90

Browse files
author
Aaron Eline
authored
Fortify source workaround (#629)
* Workaround for fority source macros * Minor style/doc changes
1 parent 50077c8 commit f10df90

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

clang/test/3C/tree.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
// RUN: 3c -base-dir=%S -alltypes %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s
2-
// RUN: 3c -base-dir=%S %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s
3-
// RUN: 3c -base-dir=%S %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null -
1+
// Manually passing fortify source to avoid issues surrounding the way compiler builtins are handled. (See issue #630)
2+
// RUN: 3c -base-dir=%S -alltypes %s -- -D_FORTIFY_SOURCE=0 | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s
3+
// RUN: 3c -base-dir=%S %s -- -D_FORTIFY_SOURCE=0 | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s
4+
// RUN: 3c -base-dir=%S %s -- -D_FORTIFY_SOURCE=0 | %clang -c -fcheckedc-extension -x c -o /dev/null -
45

56
#include <stdlib.h>
67
#include <string.h>

clang/test/3C/type_params.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
// RUN: rm -rf %t*
2-
// RUN: 3c -base-dir=%S -addcr -alltypes %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s
3-
// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s
4-
// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o %t1.unused -
2+
// Manually passing fortify source to avoid issues surrounding the way compiler builtins are handled. (See issue #630)
3+
// RUN: 3c -base-dir=%S -addcr -alltypes %s -- -D_FORTIFY_SOURCE=0 | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s
4+
// RUN: 3c -base-dir=%S -addcr %s -- -D_FORTIFY_SOURCE=0 | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s
5+
// RUN: 3c -base-dir=%S -addcr %s -- -D_FORTIFY_SOURCE=0 | %clang -c -fcheckedc-extension -x c -o %t1.unused -
56

67
// General demonstration
78
_Itype_for_any(T) void *test_single(void *a

0 commit comments

Comments
 (0)