[cfe-commits] r64868 - /cfe/trunk/test/Analysis/stack-addr-ps.c

Eli Friedman eli.friedman at gmail.com
Tue Feb 17 17:02:14 PST 2009


Author: efriedma
Date: Tue Feb 17 19:02:14 2009
New Revision: 64868

URL: http://llvm.org/viewvc/llvm-project?rev=64868&view=rev
Log:
Fix test: config.h is not guaranteed to exist at the location in 
question.  Use __builtin_alloca instead, which is guaranteed to mean the right
thing without any includes.


Modified:
    cfe/trunk/test/Analysis/stack-addr-ps.c

Modified: cfe/trunk/test/Analysis/stack-addr-ps.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/stack-addr-ps.c?rev=64868&r1=64867&r2=64868&view=diff

==============================================================================
--- cfe/trunk/test/Analysis/stack-addr-ps.c (original)
+++ cfe/trunk/test/Analysis/stack-addr-ps.c Tue Feb 17 19:02:14 2009
@@ -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* alloca_test() {
-  void* p = alloca(10);
+  void* p = __builtin_alloca(10);
   return p; // expected-warning{{Address of stack memory}}
 }
 





More information about the cfe-commits mailing list