[PATCH] D32945: clang-tidy: add IgnoreMacros option to modernize-use-default-member-init

2017-05-07 Thread Miklos Vajna via Phabricator via cfe-commits
vmiklos added a comment.

In https://reviews.llvm.org/D32945#748135, @malcolm.parsons wrote:

> Should this option be shared?


If the alternative is to make this a general clang-tidy option where all but 
these two checks ignore it, I think that's more confusing to the users. Or do 
you have an example option in mind that's shared only between a few checks?


https://reviews.llvm.org/D32945



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D32700: [clang-tidy] Add misc-suspicious-memset-usage check.

2017-05-07 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added inline comments.



Comment at: clang-tidy/misc/SuspiciousMemsetUsageCheck.cpp:21
+void SuspiciousMemsetUsageCheck::registerMatchers(MatchFinder *Finder) {
+  const auto HasCtorOrDtor =
+  eachOf(hasMethod(cxxConstructorDecl(unless(anyOf(

I think this might not be the best approach.

For example, if the constructor is compiler generated, but there is a member of 
the class with non-trivial constructor, we still want to warn. 

E.g.:

```
struct X { X() { /* something nontrivial */ } };

struct Y { X x; };
```

Maybe we should check instead whether the class is a POD? Other alternative 
might be something like 
`CXXRecordDecl::hasNonTrivialDefaultConstructor`.


https://reviews.llvm.org/D32700



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D32743: [clang-tidy] Add new cert-dcl21-cpp check.

2017-05-07 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun updated this revision to Diff 98097.
xazax.hun marked 3 inline comments as done.
xazax.hun added a comment.

- Fix alphabetical ordering of files in cmake.
- Let clang-format do its job.


https://reviews.llvm.org/D32743

Files:
  clang-tidy/cert/CERTTidyModule.cpp
  clang-tidy/cert/CMakeLists.txt
  clang-tidy/cert/PostfixOperatorCheck.cpp
  clang-tidy/cert/PostfixOperatorCheck.h
  docs/ReleaseNotes.rst
  docs/clang-tidy/checks/cert-dcl21-cpp.rst
  docs/clang-tidy/checks/list.rst
  test/clang-tidy/cert-dcl21-cpp.cpp

Index: test/clang-tidy/cert-dcl21-cpp.cpp
===
--- /dev/null
+++ test/clang-tidy/cert-dcl21-cpp.cpp
@@ -0,0 +1,78 @@
+// RUN: %check_clang_tidy %s cert-dcl21-cpp %t
+
+class A {};
+
+A operator++(A &, int);
+// CHECK-MESSAGES: :[[@LINE-1]]:1: warning: overloaded 'operator++' returns a non-constant object instead of a constant object type [cert-dcl21-cpp]
+// CHECK-FIXES: {{^}}const A operator++(A &, int);
+
+A operator--(A &, int);
+// CHECK-MESSAGES: :[[@LINE-1]]:1: warning: overloaded 'operator--' returns a no
+// CHECK-FIXES: {{^}}const A operator--(A &, int);
+
+class B {};
+
+B &operator++(B &);
+const B operator++(B &, int);
+
+B &operator--(B &);
+const B operator--(B &, int);
+
+
+class D {
+D &operator++();
+const D operator++(int);
+
+D &operator--();
+const D operator--(int);
+};
+
+class C {
+C operator++(int);
+// CHECK-MESSAGES: :[[@LINE-1]]:1: warning: overloaded 'operator++' returns a no
+// CHECK-FIXES: {{^}}const C operator++(int);
+
+C operator--(int);
+// CHECK-MESSAGES: :[[@LINE-1]]:1: warning: overloaded 'operator--' returns a no
+// CHECK-FIXES: {{^}}const C operator--(int);
+};
+
+class E {};
+
+E &operator++(E &, int);
+// CHECK-MESSAGES: :[[@LINE-1]]:1: warning: overloaded 'operator++' returns a reference instead of a constant object type [cert-dcl21-cpp]
+// CHECK-FIXES: {{^}}const E operator++(E &, int);
+
+E &operator--(E &, int);
+// CHECK-MESSAGES: :[[@LINE-1]]:1: warning: overloaded 'operator--' returns a re
+// CHECK-FIXES: {{^}}const E operator--(E &, int);
+
+class G {
+G &operator++(int);
+// CHECK-MESSAGES: :[[@LINE-1]]:1: warning: overloaded 'operator++' returns a re
+// CHECK-FIXES: {{^}}const G operator++(int);
+
+G &operator--(int);
+// CHECK-MESSAGES: :[[@LINE-1]]:1: warning: overloaded 'operator--' returns a re
+// CHECK-FIXES: {{^}}const G operator--(int);
+};
+
+class F {};
+
+const F &operator++(F &, int);
+// CHECK-MESSAGES: :[[@LINE-1]]:7: warning: overloaded 'operator++' returns a re
+// CHECK-FIXES: {{^}}const F operator++(F &, int);
+
+const F &operator--(F &, int);
+// CHECK-MESSAGES: :[[@LINE-1]]:7: warning: overloaded 'operator--' returns a re
+// CHECK-FIXES: {{^}}const F operator--(F &, int);
+
+class H {
+const H &operator++(int);
+// CHECK-MESSAGES: :[[@LINE-1]]:7: warning: overloaded 'operator++' returns a re
+// CHECK-FIXES: {{^}}const H operator++(int);
+
+const H &operator--(int);
+// CHECK-MESSAGES: :[[@LINE-1]]:7: warning: overloaded 'operator--' returns a re
+// CHECK-FIXES: {{^}}const H operator--(int);
+};
Index: docs/clang-tidy/checks/list.rst
===
--- docs/clang-tidy/checks/list.rst
+++ docs/clang-tidy/checks/list.rst
@@ -6,6 +6,7 @@
 .. toctree::
boost-use-to-string
cert-dcl03-c (redirects to misc-static-assert) 
+   cert-dcl21-cpp
cert-dcl50-cpp
cert-dcl54-cpp (redirects to misc-new-delete-overloads) 
cert-dcl58-cpp
Index: docs/clang-tidy/checks/cert-dcl21-cpp.rst
===
--- /dev/null
+++ docs/clang-tidy/checks/cert-dcl21-cpp.rst
@@ -0,0 +1,12 @@
+.. title:: clang-tidy - cert-dcl21-cpp
+
+cert-dcl21-cpp
+==
+
+This check flags postfix ``operator++`` and ``operator--`` declarations
+if the return type is not a const object. This also warns if the return type
+is a reference type.
+
+This check corresponds to the CERT C++ Coding Standard recommendation
+`DCL21-CPP. Overloaded postfix increment and decrement operators should return a const object
+`_.
Index: docs/ReleaseNotes.rst
===
--- docs/ReleaseNotes.rst
+++ docs/ReleaseNotes.rst
@@ -57,6 +57,11 @@
 Improvements to clang-tidy
 --
 
+- New `cert-dcl21-cpp
+  `_ check
+
+  Checks if the overloaded postfix ``operator++/--`` returns a constant object.
+
 - New `cert-dcl58-cpp
   `_ check
 
Index: clang-tidy/cert/PostfixOperatorCheck.h
===
--- /dev/null
+++ clang-tidy/cert/PostfixOperatorCheck.h
@@ -0,0 +1,36 @@
+//==

[PATCH] D32743: [clang-tidy] Add new cert-dcl21-cpp check.

2017-05-07 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added inline comments.



Comment at: clang-tidy/cert/PostfixOperatorCheck.cpp:72
+
+  diag(Location, "return type of overloaded %0 is not a constant type")
+  << FuncDecl << FixItHint::CreateInsertion(Location, "const ");

aaron.ballman wrote:
> aaron.ballman wrote:
> > JonasToth wrote:
> > > for clarity, this could be an else path to the if in line 69.
> > > The if could check on the negation as well, and fix only in that case. 
> > > (kinda swap the logic). I think that would be clearer.
> > Instead of using "constant type", I would use "constant object type", and 
> > reword it to be more similar to the previous diagnostic. In fact, you could 
> > even combine the two diagnostics into one with a %select, because this 
> > diagnostic should also receive the same fixit as the above one.
> > ```
> > "overloaded %0 returns a %select{reference|non-constant object}1, instead 
> > of a constant object type"
> > ```
> Is there a reason you didn't combine the two diagnostics?
Since the fixits are also different for the two cases, I think it is cleaner to 
keep the diag separate. 


https://reviews.llvm.org/D32743



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D32945: clang-tidy: add IgnoreMacros option to modernize-use-default-member-init

2017-05-07 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons added a comment.

In https://reviews.llvm.org/D32945#748166, @vmiklos wrote:

> In https://reviews.llvm.org/D32945#748135, @malcolm.parsons wrote:
>
> > Should this option be shared?
>
>
> If the alternative is to make this a general clang-tidy option where all but 
> these two checks ignore it, I think that's more confusing to the users. Or do 
> you have an example option in mind that's shared only between a few checks?


See uses of `OptionsView::getLocalOrGlobal()`.


https://reviews.llvm.org/D32945



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D32914: Introduce Wzero-as-null-pointer-constant.

2017-05-07 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment.

This warning complains about macros from system headers, e.g. 
`PTHREAD_MUTEX_INITIALIZER`:

  $ ninja -j1 -v
  [1/110] /usr/bin/cmake -E __run_iwyu --tidy=/usr/local/bin/clang-tidy 
--source=../src/librawspeed/common/DngOpcodes.cpp -- /usr/local/bin/clang++  
-DDEBUG -Isrc -I../src/librawspeed -std=c++11 -Wall -Wextra -Weverything 
-Wno-c++98-compat -Wno-c++98-compat-pedantic -Wno-conversion 
-Wno-covered-switch-default -Wno-deprecated -Wno-double-promotion 
-Wno-exit-time-destructors -Wno-global-constructors 
-Wno-gnu-zero-variadic-macro-arguments -Wno-old-style-cast -Wno-padded 
-Wno-sign-conversion -Wno-switch-enum -Wno-undefined-func-template 
-Wno-unused-macros -Wno-unused-parameter -Wno-weak-vtables -O1 
-fno-optimize-sibling-calls -fsanitize=thread -fPIC   -march=native -g3 -ggdb3 
-Werror -MD -MT src/librawspeed/CMakeFiles/rawspeed.dir/common/DngOpcodes.cpp.o 
-MF src/librawspeed/CMakeFiles/rawspeed.dir/common/DngOpcodes.cpp.o.d -o 
src/librawspeed/CMakeFiles/rawspeed.dir/common/DngOpcodes.cpp.o -c 
../src/librawspeed/common/DngOpcodes.cpp
  FAILED: src/librawspeed/CMakeFiles/rawspeed.dir/common/DngOpcodes.cpp.o 
  /usr/bin/cmake -E __run_iwyu --tidy=/usr/local/bin/clang-tidy 
--source=../src/librawspeed/common/DngOpcodes.cpp -- /usr/local/bin/clang++  
-DDEBUG -Isrc -I../src/librawspeed -std=c++11 -Wall -Wextra -Weverything 
-Wno-c++98-compat -Wno-c++98-compat-pedantic -Wno-conversion 
-Wno-covered-switch-default -Wno-deprecated -Wno-double-promotion 
-Wno-exit-time-destructors -Wno-global-constructors 
-Wno-gnu-zero-variadic-macro-arguments -Wno-old-style-cast -Wno-padded 
-Wno-sign-conversion -Wno-switch-enum -Wno-undefined-func-template 
-Wno-unused-macros -Wno-unused-parameter -Wno-weak-vtables -O1 
-fno-optimize-sibling-calls -fsanitize=thread -fPIC   -march=native -g3 -ggdb3 
-Werror -MD -MT src/librawspeed/CMakeFiles/rawspeed.dir/common/DngOpcodes.cpp.o 
-MF src/librawspeed/CMakeFiles/rawspeed.dir/common/DngOpcodes.cpp.o.d -o 
src/librawspeed/CMakeFiles/rawspeed.dir/common/DngOpcodes.cpp.o -c 
../src/librawspeed/common/DngOpcodes.cpp
  ../src/librawspeed/common/Mutex.h:98:27: error: zero as null pointer constant 
[clang-diagnostic-zero-as-null-pointer-constant]
pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
^
  /usr/include/pthread.h:87:41: note: expanded from macro 
'PTHREAD_MUTEX_INITIALIZER'
{ { 0, 0, 0, 0, 0, __PTHREAD_SPINS, { 0, 0 } } }
  ^
  In file included from ../src/librawspeed/common/DngOpcodes.cpp:25:
  ../src/librawspeed/common/Mutex.h:98:27: error: zero as null pointer constant 
[-Werror,-Wzero-as-null-pointer-constant]
pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
^
  /usr/include/pthread.h:87:41: note: expanded from macro 
'PTHREAD_MUTEX_INITIALIZER'
{ { 0, 0, 0, 0, 0, __PTHREAD_SPINS, { 0, 0 } } }
  ^
  In file included from ../src/librawspeed/common/DngOpcodes.cpp:25:
  ../src/librawspeed/common/Mutex.h:98:27: error: zero as null pointer constant 
[-Werror,-Wzero-as-null-pointer-constant]
  /usr/include/pthread.h:87:44: note: expanded from macro 
'PTHREAD_MUTEX_INITIALIZER'
{ { 0, 0, 0, 0, 0, __PTHREAD_SPINS, { 0, 0 } } }
 ^
  2 errors generated.
  ninja: build stopped: subcommand failed.


https://reviews.llvm.org/D32914



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D32914: Introduce Wzero-as-null-pointer-constant.

2017-05-07 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment.

And a lot of warnings from code using googletest, highlight:

  ../src/librawspeed/metadata/ColorFilterArrayTest.cpp:56:1: error: zero as 
null pointer constant [-Werror,-Wzero-as-null-pointer-constant]
  TEST(ColorFilterArrayTestBasic, Constructor) {
  ^
  googletest/googletest-src/googletest/include/gtest/gtest.h:2187:42: note: 
expanded from macro 'TEST'
  # define TEST(test_case_name, test_name) GTEST_TEST(test_case_name, test_name)
   ^
  googletest/googletest-src/googletest/include/gtest/gtest.h:2181:3: note: 
expanded from macro 'GTEST_TEST'
GTEST_TEST_(test_case_name, test_name, \
^
  
googletest/googletest-src/googletest/include/gtest/internal/gtest-internal.h:1228:38:
 note: expanded from macro 'GTEST_TEST_'
  #test_case_name, #test_name, NULL, NULL, \
   ^
  /usr/include/clang/5.0.0/include/stddef.h:100:18: note: expanded from macro 
'NULL'
  #define NULL __null
   ^

Perhaps it should not complain about such system headers / headers included via 
`-isystem `?


https://reviews.llvm.org/D32914



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D32945: clang-tidy: add IgnoreMacros option to modernize-use-default-member-init

2017-05-07 Thread Miklos Vajna via Phabricator via cfe-commits
vmiklos updated this revision to Diff 98108.

https://reviews.llvm.org/D32945

Files:
  clang-tidy/modernize/UseDefaultMemberInitCheck.cpp
  clang-tidy/modernize/UseDefaultMemberInitCheck.h
  docs/clang-tidy/checks/modernize-use-default-member-init.rst
  test/clang-tidy/modernize-use-default-member-init-macros.cpp
  test/clang-tidy/modernize-use-default-member-init.cpp


Index: test/clang-tidy/modernize-use-default-member-init.cpp
===
--- test/clang-tidy/modernize-use-default-member-init.cpp
+++ test/clang-tidy/modernize-use-default-member-init.cpp
@@ -380,3 +380,12 @@
 
 NegativeTemplateExisting ntei(0);
 NegativeTemplateExisting nted(0);
+
+// This resulted in a warning by default.
+#define MACRO() \
+  struct MacroS { \
+void *P; \
+MacroS() : P(nullptr) {} \
+  };
+
+MACRO();
Index: test/clang-tidy/modernize-use-default-member-init-macros.cpp
===
--- /dev/null
+++ test/clang-tidy/modernize-use-default-member-init-macros.cpp
@@ -0,0 +1,18 @@
+// RUN: %check_clang_tidy %s modernize-use-default-member-init %t -- \
+// RUN:   -config="{CheckOptions: [{key: 
modernize-use-default-member-init.IgnoreMacros, value: 0}]}" \
+// RUN:   -- -std=c++11
+
+#define MACRO() \
+  struct S { \
+void *P; \
+S() : P(nullptr) {} \
+  };
+
+MACRO();
+// CHECK-MESSAGES: :[[@LINE-1]]:1: warning: use default member initializer for 
'P'
+
+struct S2 {
+  void *P;
+  // CHECK-MESSAGES: :[[@LINE-1]]:9: warning: use default member initializer 
for 'P'
+  S2() : P(nullptr) {}
+};
Index: docs/clang-tidy/checks/modernize-use-default-member-init.rst
===
--- docs/clang-tidy/checks/modernize-use-default-member-init.rst
+++ docs/clang-tidy/checks/modernize-use-default-member-init.rst
@@ -47,3 +47,8 @@
 int i = 5;
 double j = 10.0;
   };
+
+.. option:: IgnoreMacros
+
+   If this option is set to non-zero (default is `1`), the check will not warn
+   about members declared inside macros.
Index: clang-tidy/modernize/UseDefaultMemberInitCheck.h
===
--- clang-tidy/modernize/UseDefaultMemberInitCheck.h
+++ clang-tidy/modernize/UseDefaultMemberInitCheck.h
@@ -36,6 +36,7 @@
  const CXXCtorInitializer *Init);
 
   const bool UseAssignment;
+  const bool IgnoreMacros;
 };
 
 } // namespace modernize
Index: clang-tidy/modernize/UseDefaultMemberInitCheck.cpp
===
--- clang-tidy/modernize/UseDefaultMemberInitCheck.cpp
+++ clang-tidy/modernize/UseDefaultMemberInitCheck.cpp
@@ -139,11 +139,13 @@
 UseDefaultMemberInitCheck::UseDefaultMemberInitCheck(StringRef Name,
  ClangTidyContext *Context)
 : ClangTidyCheck(Name, Context),
-  UseAssignment(Options.get("UseAssignment", 0) != 0) {}
+  UseAssignment(Options.get("UseAssignment", 0) != 0),
+  IgnoreMacros(Options.getLocalOrGlobal("IgnoreMacros", 1) != 0) {}
 
 void UseDefaultMemberInitCheck::storeOptions(
 ClangTidyOptions::OptionMap &Opts) {
   Options.store(Opts, "UseAssignment", UseAssignment);
+  Options.store(Opts, "IgnoreMacros", IgnoreMacros);
 }
 
 void UseDefaultMemberInitCheck::registerMatchers(MatchFinder *Finder) {
@@ -197,6 +199,10 @@
 const MatchFinder::MatchResult &Result, const CXXCtorInitializer *Init) {
   const FieldDecl *Field = Init->getMember();
 
+  SourceLocation StartLoc = Field->getLocStart();
+  if (StartLoc.isMacroID() && IgnoreMacros)
+return;
+
   SourceLocation FieldEnd =
   Lexer::getLocForEndOfToken(Field->getSourceRange().getEnd(), 0,
  *Result.SourceManager, getLangOpts());


Index: test/clang-tidy/modernize-use-default-member-init.cpp
===
--- test/clang-tidy/modernize-use-default-member-init.cpp
+++ test/clang-tidy/modernize-use-default-member-init.cpp
@@ -380,3 +380,12 @@
 
 NegativeTemplateExisting ntei(0);
 NegativeTemplateExisting nted(0);
+
+// This resulted in a warning by default.
+#define MACRO() \
+  struct MacroS { \
+void *P; \
+MacroS() : P(nullptr) {} \
+  };
+
+MACRO();
Index: test/clang-tidy/modernize-use-default-member-init-macros.cpp
===
--- /dev/null
+++ test/clang-tidy/modernize-use-default-member-init-macros.cpp
@@ -0,0 +1,18 @@
+// RUN: %check_clang_tidy %s modernize-use-default-member-init %t -- \
+// RUN:   -config="{CheckOptions: [{key: modernize-use-default-member-init.IgnoreMacros, value: 0}]}" \
+// RUN:   -- -std=c++11
+
+#define MACRO() \
+  struct S { \
+void *P; \
+S() : P(nullptr) {} \
+  };
+
+MACRO();
+// CHECK-MESSAGES: :[[@LINE-1]]:1: warning: use default member initializer for 'P'
+
+struct S2 {
+  void *P;
+  // CHEC

[PATCH] D32945: clang-tidy: add IgnoreMacros option to modernize-use-default-member-init

2017-05-07 Thread Miklos Vajna via Phabricator via cfe-commits
vmiklos added a comment.

In https://reviews.llvm.org/D32945#748225, @malcolm.parsons wrote:

> See uses of `OptionsView::getLocalOrGlobal()`.


Ah, I see. Then yes, I think it makes sense; e.g. for the above cppunit case 
ideally I want to avoid any kind of warning from macros, since none of them can 
be easily fixed in system headers. (And the other way around, if system headers 
are not a problem, then all kind of warnings inside macros are probably 
interesting.) The updated patch uses `getLocalOrGlobal()` for the new option.


https://reviews.llvm.org/D32945



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D32927: [libc++] Implement exception_ptr on Windows

2017-05-07 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment.

In https://reviews.llvm.org/D32927#748119, @bcraig wrote:

> libstdc++ and the Visual Studio C++ runtime have very different compatibility 
> expectations.


I only meant to imply that linking to another standard library implementation 
hasn't caused major issues
in the past.

> Is there a particular reason to go with a shorter term solution now, rather 
> than straight to the long term solution?  Is there a deadline or a particular 
> milestone we are trying to hit for clang-cl support?  Or is there a suspicion 
> that future changes will make a really good implementation possible, 
> incentivizing us to do something inexpensive for now?

My main desire is to get the test suite green so we can start detecting 
regressions. This patch reduces the remaining test failures by half, and 
although not future proof, it is correct at the moment.
Plus I would really prefer writing the more complex implementation against a 
set of tests that are already passing.

I also think this patch is a step in the right direction, regardless of the 
final implementation. The bulk of this patch is just boilerplate, setting up 
the correct declarations and definitions for implementing `exception_ptr` 
targeting Microsoft's ABI as opposed to Itanium.
It would be nice to commit these changes apart from the future implementation, 
and this seems like an OK way to do that.

@bcraig Since this patch doesn't preclude improvements in the future are you OK 
to move forward with it? I agree this shouldn't be `exception_ptr`'s final 
form, and I plan to continue working on the suggested implementation, but I 
don't want to block other Windows
progress while this is ongoing (and that's what having an un-implemented 
exception_ptr is doing).


https://reviews.llvm.org/D32927



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[libcxx] r302380 - Fix two test failures caused by Windows mangling of function types.

2017-05-07 Thread Eric Fiselier via cfe-commits
Author: ericwf
Date: Sun May  7 16:15:28 2017
New Revision: 302380

URL: http://llvm.org/viewvc/llvm-project?rev=302380&view=rev
Log:
Fix two test failures caused by Windows mangling of function types.

On Windows the function template `template  void test()` has
the same mangled name when instantiated with the distinct types `void()`
and `void() noexcept`. When this occurs Clang emits an error. This error
was causing two type-traits tests to fail.

However this can be worked around by using class templates instead of
function templates, which is what this patch does to fix the errors.

Modified:

libcxx/trunk/test/std/utilities/meta/meta.unary/meta.unary.cat/is_function.pass.cpp

libcxx/trunk/test/std/utilities/meta/meta.unary/meta.unary.cat/member_function_pointer.pass.cpp

Modified: 
libcxx/trunk/test/std/utilities/meta/meta.unary/meta.unary.cat/is_function.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/meta/meta.unary/meta.unary.cat/is_function.pass.cpp?rev=302380&r1=302379&r2=302380&view=diff
==
--- 
libcxx/trunk/test/std/utilities/meta/meta.unary/meta.unary.cat/is_function.pass.cpp
 (original)
+++ 
libcxx/trunk/test/std/utilities/meta/meta.unary/meta.unary.cat/is_function.pass.cpp
 Sun May  7 16:15:28 2017
@@ -16,9 +16,13 @@
 
 #include "test_macros.h"
 
+// NOTE: On Windows the function `test_is_function` and
+// `test_is_function has the same mangled despite being
+// a distinct instantiation. This causes Clang to emit an error. However
+// structs do not have this problem.
+
 template 
-void test_is_function()
-{
+struct test_is_function {
 static_assert( std::is_function::value, "");
 static_assert( std::is_function::value, "");
 static_assert( std::is_function::value, "");
@@ -29,11 +33,10 @@ void test_is_function()
 static_assert( std::is_function_v, "");
 static_assert( std::is_function_v, "");
 #endif
-}
+};
 
 template 
-void test_is_not_function()
-{
+struct test_is_not_function {
 static_assert(!std::is_function::value, "");
 static_assert(!std::is_function::value, "");
 static_assert(!std::is_function::value, "");
@@ -44,7 +47,7 @@ void test_is_not_function()
 static_assert(!std::is_function_v, "");
 static_assert(!std::is_function_v, "");
 #endif
-}
+};
 
 class Empty
 {

Modified: 
libcxx/trunk/test/std/utilities/meta/meta.unary/meta.unary.cat/member_function_pointer.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/meta/meta.unary/meta.unary.cat/member_function_pointer.pass.cpp?rev=302380&r1=302379&r2=302380&view=diff
==
--- 
libcxx/trunk/test/std/utilities/meta/meta.unary/meta.unary.cat/member_function_pointer.pass.cpp
 (original)
+++ 
libcxx/trunk/test/std/utilities/meta/meta.unary/meta.unary.cat/member_function_pointer.pass.cpp
 Sun May  7 16:15:28 2017
@@ -14,9 +14,12 @@
 #include 
 #include "test_macros.h"
 
+// NOTE: On Windows the function `test_is_member_function` and
+// `test_is_member_function has the same mangled despite being
+// a distinct instantiation. This causes Clang to emit an error. However
+// structs do not have this problem.
 template 
-void test_member_function_pointer_imp()
-{
+struct test_member_function_pointer_imp {
 static_assert(!std::is_void::value, "");
 #if TEST_STD_VER > 11
 static_assert(!std::is_null_pointer::value, "");
@@ -33,16 +36,16 @@ void test_member_function_pointer_imp()
 static_assert(!std::is_union::value, "");
 static_assert(!std::is_class::value, "");
 static_assert(!std::is_function::value, "");
-}
+};
 
 template 
-void test_member_function_pointer()
+struct test_member_function_pointer :
+test_member_function_pointer_imp,
+test_member_function_pointer_imp,
+test_member_function_pointer_imp,
+test_member_function_pointer_imp
 {
-test_member_function_pointer_imp();
-test_member_function_pointer_imp();
-test_member_function_pointer_imp();
-test_member_function_pointer_imp();
-}
+};
 
 class Class
 {


___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[libcxx] r302381 - Accept Windows specific output in system error tests

2017-05-07 Thread Eric Fiselier via cfe-commits
Author: ericwf
Date: Sun May  7 16:21:07 2017
New Revision: 302381

URL: http://llvm.org/viewvc/llvm-project?rev=302381&view=rev
Log:
Accept Windows specific output in system error tests

Modified:

libcxx/trunk/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.objects/generic_category.pass.cpp

libcxx/trunk/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.objects/system_category.pass.cpp

Modified: 
libcxx/trunk/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.objects/generic_category.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.objects/generic_category.pass.cpp?rev=302381&r1=302380&r2=302381&view=diff
==
--- 
libcxx/trunk/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.objects/generic_category.pass.cpp
 (original)
+++ 
libcxx/trunk/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.objects/generic_category.pass.cpp
 Sun May  7 16:21:07 2017
@@ -31,7 +31,7 @@ void test_message_for_bad_value() {
 errno = E2BIG; // something that message will never generate
 const std::error_category& e_cat1 = std::generic_category();
 const std::string msg = e_cat1.message(-1);
-LIBCPP_ASSERT(msg == "Unknown error -1");
+LIBCPP_ASSERT(msg == "Unknown error -1" || msg == "Unknown error");
 assert(errno == E2BIG);
 }
 

Modified: 
libcxx/trunk/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.objects/system_category.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.objects/system_category.pass.cpp?rev=302381&r1=302380&r2=302381&view=diff
==
--- 
libcxx/trunk/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.objects/system_category.pass.cpp
 (original)
+++ 
libcxx/trunk/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.objects/system_category.pass.cpp
 Sun May  7 16:21:07 2017
@@ -31,7 +31,7 @@ void test_message_for_bad_value() {
 errno = E2BIG; // something that message will never generate
 const std::error_category& e_cat1 = std::system_category();
 const std::string msg = e_cat1.message(-1);
-LIBCPP_ASSERT(msg == "Unknown error -1");
+LIBCPP_ASSERT(msg == "Unknown error -1" || msg == "Unknown error");
 assert(errno == E2BIG);
 }
 


___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[libcxx] r302382 - Fix Windows test failures caused by identical temp file names.

2017-05-07 Thread Eric Fiselier via cfe-commits
Author: ericwf
Date: Sun May  7 16:41:58 2017
New Revision: 302382

URL: http://llvm.org/viewvc/llvm-project?rev=302382&view=rev
Log:
Fix Windows test failures caused by identical temp file names.

This patch fixes test failures that occur on Windows because
the tests attempt to generate two distinct temp file names but
get the same name both time.

The fix for this is to create the first temp file before requesting
a second temporary file name. This ensures that the second name
will be unique.

Modified:

libcxx/trunk/test/std/input.output/file.streams/fstreams/fstream.assign/member_swap.pass.cpp

libcxx/trunk/test/std/input.output/file.streams/fstreams/fstream.assign/nonmember_swap.pass.cpp

libcxx/trunk/test/std/input.output/file.streams/fstreams/ofstream.assign/member_swap.pass.cpp

libcxx/trunk/test/std/input.output/file.streams/fstreams/ofstream.assign/nonmember_swap.pass.cpp

Modified: 
libcxx/trunk/test/std/input.output/file.streams/fstreams/fstream.assign/member_swap.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/input.output/file.streams/fstreams/fstream.assign/member_swap.pass.cpp?rev=302382&r1=302381&r2=302382&view=diff
==
--- 
libcxx/trunk/test/std/input.output/file.streams/fstreams/fstream.assign/member_swap.pass.cpp
 (original)
+++ 
libcxx/trunk/test/std/input.output/file.streams/fstreams/fstream.assign/member_swap.pass.cpp
 Sun May  7 16:41:58 2017
@@ -15,13 +15,33 @@
 // void swap(basic_fstream& rhs);
 
 #include 
+#include 
 #include 
 #include "platform_support.h"
 
+std::pair get_temp_file_names() {
+  std::pair names;
+  names.first = get_temp_file_name();
+
+  // Create the file so the next call to `get_temp_file_name()` doesn't
+  // return the same file.
+  std::FILE *fd1 = std::fopen(names.first.c_str(), "w");
+
+  names.second = get_temp_file_name();
+  assert(names.first != names.second);
+
+  std::fclose(fd1);
+  std::remove(names.first.c_str());
+
+  return names;
+}
+
 int main()
 {
-std::string temp1 = get_temp_file_name();
-std::string temp2 = get_temp_file_name();
+std::pair temp_files = get_temp_file_names();
+std::string& temp1 = temp_files.first;
+std::string& temp2 = temp_files.second;
+assert(temp1 != temp2);
 {
 std::fstream fs1(temp1.c_str(), std::ios_base::in | std::ios_base::out
   | std::ios_base::trunc);

Modified: 
libcxx/trunk/test/std/input.output/file.streams/fstreams/fstream.assign/nonmember_swap.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/input.output/file.streams/fstreams/fstream.assign/nonmember_swap.pass.cpp?rev=302382&r1=302381&r2=302382&view=diff
==
--- 
libcxx/trunk/test/std/input.output/file.streams/fstreams/fstream.assign/nonmember_swap.pass.cpp
 (original)
+++ 
libcxx/trunk/test/std/input.output/file.streams/fstreams/fstream.assign/nonmember_swap.pass.cpp
 Sun May  7 16:41:58 2017
@@ -16,13 +16,34 @@
 //   void swap(basic_fstream& x, basic_fstream& 
y);
 
 #include 
+#include 
 #include 
 #include "platform_support.h"
 
+
+std::pair get_temp_file_names() {
+  std::pair names;
+  names.first = get_temp_file_name();
+
+  // Create the file so the next call to `get_temp_file_name()` doesn't
+  // return the same file.
+  std::FILE *fd1 = std::fopen(names.first.c_str(), "w");
+
+  names.second = get_temp_file_name();
+  assert(names.first != names.second);
+
+  std::fclose(fd1);
+  std::remove(names.first.c_str());
+
+  return names;
+}
+
 int main()
 {
-std::string temp1 = get_temp_file_name();
-std::string temp2 = get_temp_file_name();
+std::pair temp_files = get_temp_file_names();
+std::string& temp1 = temp_files.first;
+std::string& temp2 = temp_files.second;
+assert(temp1 != temp2);
 {
 std::fstream fs1(temp1.c_str(), std::ios_base::in | std::ios_base::out
   | std::ios_base::trunc);

Modified: 
libcxx/trunk/test/std/input.output/file.streams/fstreams/ofstream.assign/member_swap.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/input.output/file.streams/fstreams/ofstream.assign/member_swap.pass.cpp?rev=302382&r1=302381&r2=302382&view=diff
==
--- 
libcxx/trunk/test/std/input.output/file.streams/fstreams/ofstream.assign/member_swap.pass.cpp
 (original)
+++ 
libcxx/trunk/test/std/input.output/file.streams/fstreams/ofstream.assign/member_swap.pass.cpp
 Sun May  7 16:41:58 2017
@@ -15,13 +15,33 @@
 // void swap(basic_ofstream& rhs);
 
 #include 
+#include 
 #include 
 #include "platform_support.h"
 
+std::pair get_temp_file_names() {
+  std::pair names;
+  names.first = get_temp_file_name();
+
+  // Create the file so the next call to `get_temp_file_name()` doesn't
+  // 

[libcxx] r302384 - Temporarly XFAIL aligned new/delete tests on Windows.

2017-05-07 Thread Eric Fiselier via cfe-commits
Author: ericwf
Date: Sun May  7 17:10:56 2017
New Revision: 302384

URL: http://llvm.org/viewvc/llvm-project?rev=302384&view=rev
Log:
Temporarly XFAIL aligned new/delete tests on Windows.

Libc++ doesn't provide its own definitions of new/delete on Windows,
instead using the versions provided by VCRuntime. However VCRuntime
does not yet implement aligned new/delete so these tests fail.

It might be possible for libc++ to provide its own definitions only
for aligned new/delete as long as MSVC doesn't provide it. However
before this can be done libc++ needs to figure out how to implement
std::get_new_handler.

Modified:

libcxx/trunk/test/std/language.support/support.dynamic/new.delete/new.delete.array/delete_align_val_t_replace.pass.cpp

libcxx/trunk/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t.pass.cpp

libcxx/trunk/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t_nothrow.pass.cpp

libcxx/trunk/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t_nothrow_replace.pass.cpp

libcxx/trunk/test/std/language.support/support.dynamic/new.delete/new.delete.single/delete_align_val_t_replace.pass.cpp

libcxx/trunk/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t.pass.cpp

libcxx/trunk/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t_nothrow.pass.cpp

libcxx/trunk/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t_nothrow_replace.pass.cpp

Modified: 
libcxx/trunk/test/std/language.support/support.dynamic/new.delete/new.delete.array/delete_align_val_t_replace.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/language.support/support.dynamic/new.delete/new.delete.array/delete_align_val_t_replace.pass.cpp?rev=302384&r1=302383&r2=302384&view=diff
==
--- 
libcxx/trunk/test/std/language.support/support.dynamic/new.delete/new.delete.array/delete_align_val_t_replace.pass.cpp
 (original)
+++ 
libcxx/trunk/test/std/language.support/support.dynamic/new.delete/new.delete.array/delete_align_val_t_replace.pass.cpp
 Sun May  7 17:10:56 2017
@@ -24,6 +24,11 @@
 // XFAIL: with_system_cxx_lib=macosx10.7
 // XFAIL: with_system_cxx_lib=macosx10.8
 
+// On Windows libc++ doesn't provide its own definitions for new/delete
+// but instead depends on the ones in VCRuntime. However VCRuntime does not
+// yet provide aligned new/delete definitions so this test fails to 
compile/link.
+// XFAIL: LIBCXX-WINDOWS-FIXME
+
 #include 
 #include 
 #include 

Modified: 
libcxx/trunk/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t.pass.cpp?rev=302384&r1=302383&r2=302384&view=diff
==
--- 
libcxx/trunk/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t.pass.cpp
 (original)
+++ 
libcxx/trunk/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t.pass.cpp
 Sun May  7 17:10:56 2017
@@ -22,6 +22,12 @@
 // XFAIL: with_system_cxx_lib=macosx10.7
 // XFAIL: with_system_cxx_lib=macosx10.8
 
+
+// On Windows libc++ doesn't provide its own definitions for new/delete
+// but instead depends on the ones in VCRuntime. However VCRuntime does not
+// yet provide aligned new/delete definitions so this test fails to link.
+// XFAIL: LIBCXX-WINDOWS-FIXME
+
 // test operator new
 
 #include 
@@ -36,7 +42,7 @@ constexpr auto OverAligned = alignof(std
 
 int new_handler_called = 0;
 
-void new_handler()
+void my_new_handler()
 {
 ++new_handler_called;
 std::set_new_handler(0);
@@ -52,7 +58,7 @@ struct alignas(OverAligned) A
 
 void test_throw_max_size() {
 #ifndef TEST_HAS_NO_EXCEPTIONS
-std::set_new_handler(new_handler);
+std::set_new_handler(my_new_handler);
 try
 {
 void* vp = operator new[] (std::numeric_limits::max(),

Modified: 
libcxx/trunk/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t_nothrow.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t_nothrow.pass.cpp?rev=302384&r1=302383&r2=302384&view=diff
==
--- 
libcxx/trunk/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t_nothrow.pass.cpp
 (original)
+++ 
libcxx/trunk/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t_nothrow.pass.cpp
 Sun May  7 17:10:56 2017
@@ -22,6 +22,11 @@
 // XFAIL: with_system_cxx_lib=macosx10.7
 // XFAIL: with_sys

[libcxx] r302387 - Actually remove the MSVC STL when linking and testing libc++ on Windows

2017-05-07 Thread Eric Fiselier via cfe-commits
Author: ericwf
Date: Sun May  7 18:19:14 2017
New Revision: 302387

URL: http://llvm.org/viewvc/llvm-project?rev=302387&view=rev
Log:
Actually remove the MSVC STL when linking and testing libc++ on Windows

Modified:
libcxx/trunk/utils/libcxx/test/config.py

Modified: libcxx/trunk/utils/libcxx/test/config.py
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/utils/libcxx/test/config.py?rev=302387&r1=302386&r2=302387&view=diff
==
--- libcxx/trunk/utils/libcxx/test/config.py (original)
+++ libcxx/trunk/utils/libcxx/test/config.py Sun May  7 18:19:14 2017
@@ -698,7 +698,11 @@ class Configuration(object):
 self.cxx.link_flags += ['-nodefaultlibs']
 # FIXME: Handle MSVCRT as part of the ABI library handling.
 if self.is_windows:
-self.cxx.link_flags += ['-nostdlib']
+# Prevent the MSVC STL from getting linked into the 
program.
+self.cxx.link_flags += ['-Wl,-nodefaultlib:msvcprt',
+'-Wl,-nodefaultlib:msvcprtd',
+'-Wl,-nodefaultlib:libcpmt',
+'-Wl,-nodefaultlib:libcpmtd']
 self.configure_link_flags_cxx_library()
 self.configure_link_flags_abi_library()
 self.configure_extra_library_flags()


___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[libcxx] r302389 - Revert "Actually remove the MSVC STL when linking and testing libc++ on Windows"

2017-05-07 Thread Eric Fiselier via cfe-commits
Author: ericwf
Date: Sun May  7 18:37:38 2017
New Revision: 302389

URL: http://llvm.org/viewvc/llvm-project?rev=302389&view=rev
Log:
Revert "Actually remove the MSVC STL when linking and testing libc++ on Windows"

This reverts commit r302387.

Modified:
libcxx/trunk/utils/libcxx/test/config.py

Modified: libcxx/trunk/utils/libcxx/test/config.py
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/utils/libcxx/test/config.py?rev=302389&r1=302388&r2=302389&view=diff
==
--- libcxx/trunk/utils/libcxx/test/config.py (original)
+++ libcxx/trunk/utils/libcxx/test/config.py Sun May  7 18:37:38 2017
@@ -698,11 +698,7 @@ class Configuration(object):
 self.cxx.link_flags += ['-nodefaultlibs']
 # FIXME: Handle MSVCRT as part of the ABI library handling.
 if self.is_windows:
-# Prevent the MSVC STL from getting linked into the 
program.
-self.cxx.link_flags += ['-Wl,-nodefaultlib:msvcprt',
-'-Wl,-nodefaultlib:msvcprtd',
-'-Wl,-nodefaultlib:libcpmt',
-'-Wl,-nodefaultlib:libcpmtd']
+self.cxx.link_flags += ['-nostdlib']
 self.configure_link_flags_cxx_library()
 self.configure_link_flags_abi_library()
 self.configure_extra_library_flags()


___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[libcxx] r302390 - Fix DLL import for __time_get_c_storage member functions.

2017-05-07 Thread Eric Fiselier via cfe-commits
Author: ericwf
Date: Sun May  7 19:29:32 2017
New Revision: 302390

URL: http://llvm.org/viewvc/llvm-project?rev=302390&view=rev
Log:
Fix DLL import for __time_get_c_storage member functions.

Modified:
libcxx/trunk/include/locale

Modified: libcxx/trunk/include/locale
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/locale?rev=302390&r1=302389&r2=302390&view=diff
==
--- libcxx/trunk/include/locale (original)
+++ libcxx/trunk/include/locale Sun May  7 19:29:32 2017
@@ -1689,6 +1689,22 @@ protected:
 ~__time_get_c_storage() {}
 };
 
+template <> _LIBCPP_FUNC_VIS const string* 
__time_get_c_storage::__weeks() const;
+template <> _LIBCPP_FUNC_VIS const string* 
__time_get_c_storage::__months() const;
+template <> _LIBCPP_FUNC_VIS const string* 
__time_get_c_storage::__am_pm() const;
+template <> _LIBCPP_FUNC_VIS const string& __time_get_c_storage::__c() 
const;
+template <> _LIBCPP_FUNC_VIS const string& __time_get_c_storage::__r() 
const;
+template <> _LIBCPP_FUNC_VIS const string& __time_get_c_storage::__x() 
const;
+template <> _LIBCPP_FUNC_VIS const string& __time_get_c_storage::__X() 
const;
+
+template <> _LIBCPP_FUNC_VIS const wstring* 
__time_get_c_storage::__weeks() const;
+template <> _LIBCPP_FUNC_VIS const wstring* 
__time_get_c_storage::__months() const;
+template <> _LIBCPP_FUNC_VIS const wstring* 
__time_get_c_storage::__am_pm() const;
+template <> _LIBCPP_FUNC_VIS const wstring& 
__time_get_c_storage::__c() const;
+template <> _LIBCPP_FUNC_VIS const wstring& 
__time_get_c_storage::__r() const;
+template <> _LIBCPP_FUNC_VIS const wstring& 
__time_get_c_storage::__x() const;
+template <> _LIBCPP_FUNC_VIS const wstring& 
__time_get_c_storage::__X() const;
+
 template  >
 class _LIBCPP_TEMPLATE_VIS time_get
 : public locale::facet,


___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[libcxx] r302391 - Fix DLL import/export on Win32 locale helpers

2017-05-07 Thread Eric Fiselier via cfe-commits
Author: ericwf
Date: Sun May  7 19:37:31 2017
New Revision: 302391

URL: http://llvm.org/viewvc/llvm-project?rev=302391&view=rev
Log:
Fix DLL import/export on Win32 locale helpers

Modified:
libcxx/trunk/include/support/win32/locale_win32.h

Modified: libcxx/trunk/include/support/win32/locale_win32.h
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/support/win32/locale_win32.h?rev=302391&r1=302390&r2=302391&view=diff
==
--- libcxx/trunk/include/support/win32/locale_win32.h (original)
+++ libcxx/trunk/include/support/win32/locale_win32.h Sun May  7 19:37:31 2017
@@ -11,6 +11,7 @@
 #ifndef _LIBCPP_SUPPORT_WIN32_LOCALE_WIN32_H
 #define _LIBCPP_SUPPORT_WIN32_LOCALE_WIN32_H
 
+#include <__config>
 #include "support/win32/support.h"
 #include "support/win32/locale_mgmt_win32.h"
 #include 
@@ -83,9 +84,9 @@ isupper_l(int c, _locale_t loc)
 #define sprintf_l( __s, __l, __f, ... ) _sprintf_l( __s, __f, __l, __VA_ARGS__ 
)
 #define vsprintf_l( __s, __l, __f, ... ) _vsprintf_l( __s, __f, __l, 
__VA_ARGS__ )
 #define vsnprintf_l( __s, __n, __l, __f, ... ) _vsnprintf_l( __s, __n, __f, 
__l, __VA_ARGS__ )
-int snprintf_l(char *ret, size_t n, locale_t loc, const char *format, ...);
-int asprintf_l( char **ret, locale_t loc, const char *format, ... );
-int vasprintf_l( char **ret, locale_t loc, const char *format, va_list ap );
+_LIBCPP_FUNC_VIS int snprintf_l(char *ret, size_t n, locale_t loc, const char 
*format, ...);
+_LIBCPP_FUNC_VIS int asprintf_l( char **ret, locale_t loc, const char *format, 
... );
+_LIBCPP_FUNC_VIS int vasprintf_l( char **ret, locale_t loc, const char 
*format, va_list ap );
 
 
 // not-so-pressing FIXME: use locale to determine blank characters


___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D32927: [libc++] Implement exception_ptr on Windows

2017-05-07 Thread Ben Craig via Phabricator via cfe-commits
bcraig added a comment.

Getting the test suite green sooner rather than later seems like a good reason 
to temporarily pick a 1-3 year solution rather than a 5+ year solution.  Also, 
as you mention, this isn't all throw away work, so it's still progress.

So yeah, this is fine to go in as is.  LGTM.


https://reviews.llvm.org/D32927



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D32927: [libc++] Implement exception_ptr on Windows

2017-05-07 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 98119.
EricWF added a comment.

- Remove some missed XFAILS


https://reviews.llvm.org/D32927

Files:
  include/exception
  lib/CMakeLists.txt
  src/exception.cpp
  src/support/runtime/exception_pointer_msvc.ipp
  test/libcxx/thread/futures/futures.promise/set_exception.pass.cpp
  
test/libcxx/thread/futures/futures.promise/set_exception_at_thread_exit.pass.cpp
  test/std/language.support/support.exception/except.nested/assign.pass.cpp
  test/std/language.support/support.exception/except.nested/ctor_copy.pass.cpp
  
test/std/language.support/support.exception/except.nested/ctor_default.pass.cpp
  
test/std/language.support/support.exception/except.nested/rethrow_if_nested.pass.cpp
  
test/std/language.support/support.exception/except.nested/rethrow_nested.pass.cpp
  
test/std/language.support/support.exception/except.nested/throw_with_nested.pass.cpp
  
test/std/language.support/support.exception/propagation/current_exception.pass.cpp
  test/std/language.support/support.exception/propagation/exception_ptr.pass.cpp
  
test/std/language.support/support.exception/propagation/make_exception_ptr.pass.cpp
  
test/std/language.support/support.exception/propagation/rethrow_exception.pass.cpp

Index: test/std/language.support/support.exception/propagation/rethrow_exception.pass.cpp
===
--- test/std/language.support/support.exception/propagation/rethrow_exception.pass.cpp
+++ test/std/language.support/support.exception/propagation/rethrow_exception.pass.cpp
@@ -7,9 +7,6 @@
 //
 //===--===//
 
-// exception_ptr has not been implemented on Windows
-// XFAIL: LIBCXX-WINDOWS-FIXME
-
 // UNSUPPORTED: libcpp-no-exceptions
 // 
 
@@ -49,13 +46,19 @@
 }
 catch (const A& a)
 {
+#ifndef _LIBCPP_ABI_MICROSOFT
 assert(A::constructed == 1);
+#else
+// On Windows the exception_ptr copies the exception
+assert(A::constructed == 2);
+#endif
 assert(p != nullptr);
 p = nullptr;
 assert(p == nullptr);
 assert(a.data_ == 3);
 assert(A::constructed == 1);
 }
 assert(A::constructed == 0);
 }
+assert(A::constructed == 0);
 }
Index: test/std/language.support/support.exception/propagation/make_exception_ptr.pass.cpp
===
--- test/std/language.support/support.exception/propagation/make_exception_ptr.pass.cpp
+++ test/std/language.support/support.exception/propagation/make_exception_ptr.pass.cpp
@@ -7,9 +7,6 @@
 //
 //===--===//
 
-// exception_ptr has not been implemented on Windows
-// XFAIL: LIBCXX-WINDOWS-FIXME
-
 // UNSUPPORTED: libcpp-no-exceptions
 // 
 
@@ -41,13 +38,19 @@
 }
 catch (const A& a)
 {
+#ifndef _LIBCPP_ABI_MICROSOFT
 assert(A::constructed == 1);
+#else
+// On Windows exception_ptr copies the exception
+assert(A::constructed == 2);
+#endif
 assert(p != nullptr);
 p = nullptr;
 assert(p == nullptr);
 assert(a.data_ == 5);
 assert(A::constructed == 1);
 }
 assert(A::constructed == 0);
 }
+assert(A::constructed == 0);
 }
Index: test/std/language.support/support.exception/propagation/exception_ptr.pass.cpp
===
--- test/std/language.support/support.exception/propagation/exception_ptr.pass.cpp
+++ test/std/language.support/support.exception/propagation/exception_ptr.pass.cpp
@@ -7,9 +7,6 @@
 //
 //===--===//
 
-// exception_ptr has not been implemented on Windows
-// XFAIL: LIBCXX-WINDOWS-FIXME
-
 // 
 
 // typedef unspecified exception_ptr;
Index: test/std/language.support/support.exception/propagation/current_exception.pass.cpp
===
--- test/std/language.support/support.exception/propagation/current_exception.pass.cpp
+++ test/std/language.support/support.exception/propagation/current_exception.pass.cpp
@@ -7,7 +7,8 @@
 //
 //===--===//
 
-// exception_ptr has not been implemented on Windows
+// This test needs to be rewritten for the Windows exception_ptr semantics
+// which copy the exception each time the exception_ptr is copied.
 // XFAIL: LIBCXX-WINDOWS-FIXME
 
 // UNSUPPORTED: libcpp-no-exceptions
Index: test/std/language.support/support.exception/except.nested/throw_with_nested.pass.cpp
===
--- test/std/language.support/support.exception/except.nested/throw_with_nested.pass.cpp
+++ test/std/language.support/support.except

[libcxx] r302393 - [libc++] Implement exception_ptr on Windows

2017-05-07 Thread Eric Fiselier via cfe-commits
Author: ericwf
Date: Sun May  7 20:17:50 2017
New Revision: 302393

URL: http://llvm.org/viewvc/llvm-project?rev=302393&view=rev
Log:
[libc++] Implement exception_ptr on Windows

Summary:
This patch implements exception_ptr on Windows using the `__ExceptionPtrFoo` 
functions provided by MSVC.

The `__ExceptionPtrFoo` functions are defined inside the C++ standard library, 
`msvcprt`, which is unfortunate because it requires libc++ to link to the MSVC 
STL. However this doesn't seem to cause any immediate problems. However to be 
safe I kept all usages within the libc++ dylib so that user programs wouldn't 
have to link to MSVCPRT as well.

Note there are still 2 outstanding exception_ptr/nested_exception test failures.

* `current_exception.pass.cpp` needs to be rewritten for the Windows 
exception_ptr semantics which copy the exception every time.
* `rethrow_if_nested.pass.cpp` need investigation. It hits a stack overflow, 
likely from recursion.

This patch also gets most of the `` tests passing as well.

Reviewers: mclow.lists, compnerd, bcraig, rmaprath, majnemer, BillyONeal, 
STL_MSFT

Subscribers: mgorny, cfe-commits

Differential Revision: https://reviews.llvm.org/D32927

Added:
libcxx/trunk/src/support/runtime/exception_pointer_msvc.ipp
Modified:
libcxx/trunk/include/exception
libcxx/trunk/lib/CMakeLists.txt
libcxx/trunk/src/exception.cpp

libcxx/trunk/test/libcxx/thread/futures/futures.promise/set_exception.pass.cpp

libcxx/trunk/test/libcxx/thread/futures/futures.promise/set_exception_at_thread_exit.pass.cpp

libcxx/trunk/test/std/language.support/support.exception/except.nested/assign.pass.cpp

libcxx/trunk/test/std/language.support/support.exception/except.nested/ctor_copy.pass.cpp

libcxx/trunk/test/std/language.support/support.exception/except.nested/ctor_default.pass.cpp

libcxx/trunk/test/std/language.support/support.exception/except.nested/rethrow_if_nested.pass.cpp

libcxx/trunk/test/std/language.support/support.exception/except.nested/rethrow_nested.pass.cpp

libcxx/trunk/test/std/language.support/support.exception/except.nested/throw_with_nested.pass.cpp

libcxx/trunk/test/std/language.support/support.exception/propagation/current_exception.pass.cpp

libcxx/trunk/test/std/language.support/support.exception/propagation/exception_ptr.pass.cpp

libcxx/trunk/test/std/language.support/support.exception/propagation/make_exception_ptr.pass.cpp

libcxx/trunk/test/std/language.support/support.exception/propagation/rethrow_exception.pass.cpp

Modified: libcxx/trunk/include/exception
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/exception?rev=302393&r1=302392&r2=302393&view=diff
==
--- libcxx/trunk/include/exception (original)
+++ libcxx/trunk/include/exception Sun May  7 20:17:50 2017
@@ -134,23 +134,26 @@ class _LIBCPP_TYPE_VIS exception_ptr;
 _LIBCPP_FUNC_VIS exception_ptr current_exception() _NOEXCEPT;
 _LIBCPP_NORETURN _LIBCPP_FUNC_VIS void rethrow_exception(exception_ptr);
 
+#ifndef _LIBCPP_ABI_MICROSOFT
+
 class _LIBCPP_TYPE_VIS exception_ptr
 {
 void* __ptr_;
 public:
 _LIBCPP_INLINE_VISIBILITY exception_ptr() _NOEXCEPT : __ptr_() {}
 _LIBCPP_INLINE_VISIBILITY exception_ptr(nullptr_t) _NOEXCEPT : __ptr_() {}
+
 exception_ptr(const exception_ptr&) _NOEXCEPT;
 exception_ptr& operator=(const exception_ptr&) _NOEXCEPT;
 ~exception_ptr() _NOEXCEPT;
 
-_LIBCPP_INLINE_VISIBILITY
-_LIBCPP_EXPLICIT
-operator bool() const _NOEXCEPT {return __ptr_ != nullptr;}
+_LIBCPP_INLINE_VISIBILITY _LIBCPP_EXPLICIT operator bool() const _NOEXCEPT
+{return __ptr_ != nullptr;}
 
 friend _LIBCPP_INLINE_VISIBILITY
 bool operator==(const exception_ptr& __x, const exception_ptr& __y) 
_NOEXCEPT
 {return __x.__ptr_ == __y.__ptr_;}
+
 friend _LIBCPP_INLINE_VISIBILITY
 bool operator!=(const exception_ptr& __x, const exception_ptr& __y) 
_NOEXCEPT
 {return !(__x == __y);}
@@ -178,6 +181,54 @@ make_exception_ptr(_Ep __e) _NOEXCEPT
 #endif
 }
 
+#else // _LIBCPP_ABI_MICROSOFT
+
+class _LIBCPP_TYPE_VIS exception_ptr
+{
+#if defined(__clang__)
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wunused-private-field"
+#endif
+void* __ptr1_;
+void* __ptr2_;
+#if defined(__clang__)
+#pragma clang diagnostic pop
+#endif
+public:
+exception_ptr() _NOEXCEPT;
+exception_ptr(nullptr_t) _NOEXCEPT;
+exception_ptr(const exception_ptr& __other) _NOEXCEPT;
+exception_ptr& operator=(const exception_ptr& __other) _NOEXCEPT;
+exception_ptr& operator=(nullptr_t) _NOEXCEPT;
+~exception_ptr() _NOEXCEPT;
+_LIBCPP_EXPLICIT operator bool() const _NOEXCEPT;
+};
+
+_LIBCPP_FUNC_VIS
+bool operator==(const exception_ptr& __x, const exception_ptr& __y) _NOEXCEPT;
+
+inline _LIBCPP_INLINE_VISIBILITY
+bool operator!=(const exception_ptr& __x, const exception_ptr& __y) _N

[PATCH] D32927: [libc++] Implement exception_ptr on Windows

2017-05-07 Thread Eric Fiselier via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL302393: [libc++] Implement exception_ptr on Windows 
(authored by EricWF).

Changed prior to commit:
  https://reviews.llvm.org/D32927?vs=98119&id=98120#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D32927

Files:
  libcxx/trunk/include/exception
  libcxx/trunk/lib/CMakeLists.txt
  libcxx/trunk/src/exception.cpp
  libcxx/trunk/src/support/runtime/exception_pointer_msvc.ipp
  libcxx/trunk/test/libcxx/thread/futures/futures.promise/set_exception.pass.cpp
  
libcxx/trunk/test/libcxx/thread/futures/futures.promise/set_exception_at_thread_exit.pass.cpp
  
libcxx/trunk/test/std/language.support/support.exception/except.nested/assign.pass.cpp
  
libcxx/trunk/test/std/language.support/support.exception/except.nested/ctor_copy.pass.cpp
  
libcxx/trunk/test/std/language.support/support.exception/except.nested/ctor_default.pass.cpp
  
libcxx/trunk/test/std/language.support/support.exception/except.nested/rethrow_if_nested.pass.cpp
  
libcxx/trunk/test/std/language.support/support.exception/except.nested/rethrow_nested.pass.cpp
  
libcxx/trunk/test/std/language.support/support.exception/except.nested/throw_with_nested.pass.cpp
  
libcxx/trunk/test/std/language.support/support.exception/propagation/current_exception.pass.cpp
  
libcxx/trunk/test/std/language.support/support.exception/propagation/exception_ptr.pass.cpp
  
libcxx/trunk/test/std/language.support/support.exception/propagation/make_exception_ptr.pass.cpp
  
libcxx/trunk/test/std/language.support/support.exception/propagation/rethrow_exception.pass.cpp

Index: libcxx/trunk/lib/CMakeLists.txt
===
--- libcxx/trunk/lib/CMakeLists.txt
+++ libcxx/trunk/lib/CMakeLists.txt
@@ -121,6 +121,7 @@
   add_library_flags(ucrt${LIB_SUFFIX}) # Universal C runtime
   add_library_flags(vcruntime${LIB_SUFFIX}) # C++ runtime
   add_library_flags(msvcrt${LIB_SUFFIX}) # C runtime startup files
+  add_library_flags(msvcprt${LIB_SUFFIX}) # C++ standard library. Required for exception_ptr internals.
   # Required for standards-complaint wide character formatting functions
   # (e.g. `printfw`/`scanfw`)
   add_library_flags(iso_stdio_wide_specifiers)
Index: libcxx/trunk/src/exception.cpp
===
--- libcxx/trunk/src/exception.cpp
+++ libcxx/trunk/src/exception.cpp
@@ -20,7 +20,7 @@
 
 #if defined(_LIBCPP_ABI_MICROSOFT)
 #include "support/runtime/exception_msvc.ipp"
-#include "support/runtime/exception_pointer_unimplemented.ipp"
+#include "support/runtime/exception_pointer_msvc.ipp"
 #elif defined(_LIBCPPABI_VERSION)
 #include "support/runtime/exception_libcxxabi.ipp"
 #include "support/runtime/exception_pointer_cxxabi.ipp"
Index: libcxx/trunk/src/support/runtime/exception_pointer_msvc.ipp
===
--- libcxx/trunk/src/support/runtime/exception_pointer_msvc.ipp
+++ libcxx/trunk/src/support/runtime/exception_pointer_msvc.ipp
@@ -0,0 +1,94 @@
+// -*- C++ -*-
+//===--===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===--===//
+
+#include 
+#include 
+
+_CRTIMP2_PURE void __CLRCALL_PURE_OR_CDECL __ExceptionPtrCreate(_Out_ void*);
+_CRTIMP2_PURE void __CLRCALL_PURE_OR_CDECL __ExceptionPtrDestroy(_Inout_ void*);
+_CRTIMP2_PURE void __CLRCALL_PURE_OR_CDECL __ExceptionPtrCopy(_Out_ void*,
+  _In_ const void*);
+_CRTIMP2_PURE void __CLRCALL_PURE_OR_CDECL
+__ExceptionPtrAssign(_Inout_ void*, _In_ const void*);
+_CRTIMP2_PURE bool __CLRCALL_PURE_OR_CDECL
+__ExceptionPtrCompare(_In_ const void*, _In_ const void*);
+_CRTIMP2_PURE bool __CLRCALL_PURE_OR_CDECL
+__ExceptionPtrToBool(_In_ const void*);
+_CRTIMP2_PURE void __CLRCALL_PURE_OR_CDECL __ExceptionPtrSwap(_Inout_ void*,
+  _Inout_ void*);
+_CRTIMP2_PURE void __CLRCALL_PURE_OR_CDECL
+__ExceptionPtrCurrentException(_Out_ void*);
+[[noreturn]] _CRTIMP2_PURE void __CLRCALL_PURE_OR_CDECL
+__ExceptionPtrRethrow(_In_ const void*);
+_CRTIMP2_PURE void __CLRCALL_PURE_OR_CDECL
+__ExceptionPtrCopyException(_Inout_ void*, _In_ const void*, _In_ const void*);
+
+namespace std {
+
+exception_ptr::exception_ptr() _NOEXCEPT { __ExceptionPtrCreate(this); }
+exception_ptr::exception_ptr(nullptr_t) _NOEXCEPT { __ExceptionPtrCreate(this); }
+
+exception_ptr::exception_ptr(const exception_ptr& __other) _NOEXCEPT {
+  __ExceptionPtrCopy(this, &__other);
+}
+exception_ptr& exception_ptr::operator=(const exception_ptr& __other) _NOEXCEPT {
+  __ExceptionPtrAssign(this, &__other);
+

[libcxx] r302394 - Fix shared_mutex dll import errors on Windows

2017-05-07 Thread Eric Fiselier via cfe-commits
Author: ericwf
Date: Sun May  7 20:31:50 2017
New Revision: 302394

URL: http://llvm.org/viewvc/llvm-project?rev=302394&view=rev
Log:
Fix shared_mutex dll import errors on Windows

Modified:
libcxx/trunk/include/shared_mutex

Modified: libcxx/trunk/include/shared_mutex
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/shared_mutex?rev=302394&r1=302393&r2=302394&view=diff
==
--- libcxx/trunk/include/shared_mutex (original)
+++ libcxx/trunk/include/shared_mutex Sun May  7 20:31:50 2017
@@ -177,7 +177,7 @@ class _LIBCPP_TYPE_VIS _LIBCPP_AVAILABIL
 {
 __shared_mutex_base __base;
 public:
-shared_mutex() : __base() {}
+_LIBCPP_INLINE_VISIBILITY shared_mutex() : __base() {}
 _LIBCPP_INLINE_VISIBILITY ~shared_mutex() = default;
 
 shared_mutex(const shared_mutex&) = delete;


___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[libcxx] r302396 - Fix Windows locale detection

2017-05-07 Thread Eric Fiselier via cfe-commits
Author: ericwf
Date: Sun May  7 21:09:48 2017
New Revision: 302396

URL: http://llvm.org/viewvc/llvm-project?rev=302396&view=rev
Log:
Fix Windows locale detection

Modified:
libcxx/trunk/utils/libcxx/test/target_info.py

Modified: libcxx/trunk/utils/libcxx/test/target_info.py
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/utils/libcxx/test/target_info.py?rev=302396&r1=302395&r2=302396&view=diff
==
--- libcxx/trunk/utils/libcxx/test/target_info.py (original)
+++ libcxx/trunk/utils/libcxx/test/target_info.py Sun May  7 21:09:48 2017
@@ -46,25 +46,26 @@ def test_locale(loc):
 locale.setlocale(locale.LC_ALL, default_locale)
 
 
-def add_common_locales(features, lit_config):
+def add_common_locales(features, lit_config, is_windows=False):
 # A list of locales needed by the test-suite.
 # The list uses the canonical name for the locale used in the test-suite
 # TODO: On Linux ISO8859 *may* needs to hyphenated.
 locales = [
-'en_US.UTF-8',
-'fr_FR.UTF-8',
-'ru_RU.UTF-8',
-'zh_CN.UTF-8',
-'fr_CA.ISO8859-1',
-'cs_CZ.ISO8859-2'
+('en_US.UTF-8', 'English_United States.1252'),
+('fr_FR.UTF-8', 'French_France.1252'),
+('ru_RU.UTF-8', 'Russian_Russia.1251'),
+('zh_CN.UTF-8', 'Chinese_China.936'),
+('fr_CA.ISO8859-1', 'French_Canada.1252'),
+('cs_CZ.ISO8859-2', 'Czech_Czech Republic.1250')
 ]
-for loc in locales:
-if test_locale(loc):
-features.add('locale.{0}'.format(loc))
+for loc_id, windows_loc_name in locales:
+loc_name = windows_loc_name if is_windows else loc_id
+if test_locale(loc_name):
+features.add('locale.{0}'.format(loc_id))
 else:
 lit_config.warning('The locale {0} is not supported by '
'your platform. Some tests will be '
-   'unsupported.'.format(loc))
+   'unsupported.'.format(loc_name))
 
 
 class DarwinLocalTI(DefaultTargetInfo):
@@ -251,7 +252,8 @@ class WindowsLocalTI(DefaultTargetInfo):
 super(WindowsLocalTI, self).__init__(full_config)
 
 def add_locale_features(self, features):
-add_common_locales(features, self.full_config.lit_config)
+add_common_locales(features, self.full_config.lit_config,
+   is_windows=True)
 
 def use_lit_shell_default(self):
 # Default to the internal shell on Windows, as bash on Windows is


___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D32543: [X86] Clang option -fuse-init-array has no effect when generating for MCU target

2017-05-07 Thread Craig Topper via Phabricator via cfe-commits
craig.topper accepted this revision.
craig.topper added a comment.
This revision is now accepted and ready to land.

LGTM


https://reviews.llvm.org/D32543



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D32329: [libc++abi] Disable libc++ extern templates project-wide

2017-05-07 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai added a comment.

Ping.


https://reviews.llvm.org/D32329



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D32329: [libc++abi] Disable libc++ extern templates project-wide

2017-05-07 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment.

The reason I've been punting on this is that I want to set up ABI list checks 
for libc++abi just like we do for libc++.

@smeenai If you can verify that this change doesn't affect the libc++abi export 
lists on OS X and Linux then it LGTM, but I want that to be confirmed before 
committing.


https://reviews.llvm.org/D32329



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D32329: [libc++abi] Disable libc++ extern templates project-wide

2017-05-07 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai added a comment.

Fair enough. I'll probably get to that tomorrow.


https://reviews.llvm.org/D32329



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D32329: [libc++abi] Disable libc++ extern templates project-wide

2017-05-07 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai added a comment.

Also ABI list checks for libc++abi sound awesome.


https://reviews.llvm.org/D32329



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits