]> granicus.if.org Git - clang/commitdiff
Fix test: config.h is not guaranteed to exist at the location in
authorEli Friedman <eli.friedman@gmail.com>
Wed, 18 Feb 2009 01:02:14 +0000 (01:02 +0000)
committerEli Friedman <eli.friedman@gmail.com>
Wed, 18 Feb 2009 01:02:14 +0000 (01:02 +0000)
question.  Use __builtin_alloca instead, which is guaranteed to mean the right
thing without any includes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64868 91177308-0d34-0410-b5e6-96231b3b80d8

test/Analysis/stack-addr-ps.c

index 3516fee0a4e9db3f6c106a99ebd215c2e1bb5172..3ee2063e2460bfa89c135a483e024ef7a84e9b48 100644 (file)
@@ -3,10 +3,6 @@
 // RUN: clang -analyze -checker-cfref -analyzer-store=region -verify %s
 
 #include <stdlib.h>
-#include "../../../../include/llvm/Config/config.h"
-#ifdef HAVE_ALLOCA_H
-# include <alloca.h>
-#endif
 
 int* f1() {
   int x = 0;
@@ -42,7 +38,7 @@ void* compound_literal(int x, int y) {
 }
 
 void* alloca_test() {
-  void* p = alloca(10);
+  void* p = __builtin_alloca(10);
   return p; // expected-warning{{Address of stack memory}}
 }