From 9a2df95d8500418b1072859af37dd5da71af6269 Mon Sep 17 00:00:00 2001 From: Faisal Vali Date: Tue, 2 May 2017 21:02:46 +0000 Subject: [PATCH] [NFC] Add original test that triggered crash post r301735 - this is added just for completeness sake (though the general case should be represented by the test added in the revision to that patch: https://reviews.llvm.org/rL301972 ) llvm-svn: 301973 --- clang/test/SemaCXX/warn-thread-safety-parsing.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/clang/test/SemaCXX/warn-thread-safety-parsing.cpp b/clang/test/SemaCXX/warn-thread-safety-parsing.cpp index b43e24a..ae32bfe 100644 --- a/clang/test/SemaCXX/warn-thread-safety-parsing.cpp +++ b/clang/test/SemaCXX/warn-thread-safety-parsing.cpp @@ -1,6 +1,6 @@ // RUN: %clang_cc1 -fsyntax-only -verify -Wthread-safety %s // RUN: %clang_cc1 -fsyntax-only -verify -Wthread-safety -std=c++98 %s -// RUN: %clang_cc1 -fsyntax-only -verify -Wthread-safety -std=c++11 %s +// RUN: %clang_cc1 -fsyntax-only -verify -Wthread-safety -std=c++11 %s -D CPP11 #define LOCKABLE __attribute__ ((lockable)) #define SCOPED_LOCKABLE __attribute__ ((scoped_lockable)) @@ -1513,3 +1513,15 @@ public: } // end namespace FunctionAttributesInsideClass_ICE_Test + +#ifdef CPP11 +namespace CRASH_POST_R301735 { + class SomeClass { + public: + void foo() { + auto l = [this] { auto l = [] () EXCLUSIVE_LOCKS_REQUIRED(mu_) {}; }; + } + Mutex mu_; + }; +} +#endif \ No newline at end of file -- 2.7.4