r187199 - Fix tests on targets that don't support thread_local

Pavel Labath labath at google.com
Fri Jul 26 05:50:30 PDT 2013


Author: labath
Date: Fri Jul 26 07:50:30 2013
New Revision: 187199

URL: http://llvm.org/viewvc/llvm-project?rev=187199&view=rev
Log:
Fix tests on targets that don't support thread_local

This also reverts r187197.

Modified:
    cfe/trunk/test/Analysis/temporaries.cpp

Modified: cfe/trunk/test/Analysis/temporaries.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/temporaries.cpp?rev=187199&r1=187198&r2=187199&view=diff
==============================================================================
--- cfe/trunk/test/Analysis/temporaries.cpp (original)
+++ cfe/trunk/test/Analysis/temporaries.cpp Fri Jul 26 07:50:30 2013
@@ -1,5 +1,5 @@
 // RUN: %clang_cc1 -analyze -analyzer-checker=core,debug.ExprInspection -verify -w -std=c++03 %s
-// RUN: %clang_cc1 -triple x86_64-pc-linux -analyze -analyzer-checker=core,debug.ExprInspection -verify -w -std=c++11 %s
+// RUN: %clang_cc1 -analyze -analyzer-checker=core,debug.ExprInspection -verify -w -std=c++11 %s
 
 extern bool clang_analyzer_eval(bool);
 
@@ -149,7 +149,7 @@ void testStaticMaterializeTemporaryExpr(
   static const Trivial &directRef = Trivial(42);
   clang_analyzer_eval(directRef.value == 42); // expected-warning{{TRUE}}
 
-#if __cplusplus >= 201103L
+#if __has_feature(cxx_thread_local)
   thread_local static const Trivial &threadRef = getTrivial();
   clang_analyzer_eval(threadRef.value == 42); // expected-warning{{TRUE}}
 





More information about the cfe-commits mailing list