summaryrefslogtreecommitdiffstats
path: root/clang/test/Index/annotate-tokens-pp.c
diff options
context:
space:
mode:
authorErich Keane <erich.keane@intel.com>2017-11-20 17:57:42 +0000
committerErich Keane <erich.keane@intel.com>2017-11-20 17:57:42 +0000
commit5c086c7626fab2617c0178a3951378bcbce2271c (patch)
treee073f8fc692b20d4dfcd8aead20817d8bf883db1 /clang/test/Index/annotate-tokens-pp.c
parent991447d6f892f4763347528290093c10806ece74 (diff)
downloadbcm5719-llvm-5c086c7626fab2617c0178a3951378bcbce2271c.tar.gz
bcm5719-llvm-5c086c7626fab2617c0178a3951378bcbce2271c.zip
For Linux/gnu compatibility, preinclude <stdc-predef.h> if the file is available
As reported in llvm bugzilla 32377. Here’s a patch to add preinclude of stdc-predef.h. The gcc documentation says “On GNU/Linux, <stdc-predef.h> is pre-included.” See https://gcc.gnu.org/gcc-4.8/porting_to.html; The preinclude is inhibited with –ffreestanding. Basically I fixed the failing test cases by adding –ffreestanding which inhibits this behavior. I fixed all the failing tests, including some in extra/test, there's a separate patch for that which is linked here Patch By: mibintc Differential Revision: https://reviews.llvm.org/D34158 llvm-svn: 318669
Diffstat (limited to 'clang/test/Index/annotate-tokens-pp.c')
-rw-r--r--clang/test/Index/annotate-tokens-pp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/test/Index/annotate-tokens-pp.c b/clang/test/Index/annotate-tokens-pp.c
index 7da2d6f5823..03ef07d894a 100644
--- a/clang/test/Index/annotate-tokens-pp.c
+++ b/clang/test/Index/annotate-tokens-pp.c
@@ -42,8 +42,8 @@ struct A
#endif
};
-// RUN: c-index-test -test-annotate-tokens=%s:2:1:44:1 -I%S/Inputs %s | FileCheck %s
-// RUN: env CINDEXTEST_EDITING=1 c-index-test -test-annotate-tokens=%s:2:1:44:1 -I%S/Inputs %s | FileCheck %s
+// RUN: c-index-test -test-annotate-tokens=%s:2:1:44:1 -I%S/Inputs -ffreestanding %s | FileCheck %s
+// RUN: env CINDEXTEST_EDITING=1 c-index-test -test-annotate-tokens=%s:2:1:44:1 -I%S/Inputs -ffreestanding %s | FileCheck %s
// CHECK: Punctuation: "#" [2:1 - 2:2] preprocessing directive=
// CHECK: Identifier: "define" [2:2 - 2:8] preprocessing directive=
// CHECK: Identifier: "STILL_NOTHING" [2:9 - 2:22] macro definition=STILL_NOTHING
OpenPOWER on IntegriCloud