Re: [PATCH] D12022: Refactored dtor sanitizing into EHScopeStack

2015-09-03 Thread Richard Smith via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. LGTM with a couple of tweaks. Comment at: lib/CodeGen/CGCXX.cpp:45-46 @@ +44,4 @@ + // an alias, unless this class owns no members. + unsigned totalFields = + std::dis

r246830 - Fix a potential APInt memory leak when using __attribute__((flag_enum)), and

2015-09-03 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Sep 3 20:03:03 2015 New Revision: 246830 URL: http://llvm.org/viewvc/llvm-project?rev=246830&view=rev Log: Fix a potential APInt memory leak when using __attribute__((flag_enum)), and simplify the implementation a bit. Modified: cfe/trunk/include/clang/Basic/Attr.td

Re: r246830 - Fix a potential APInt memory leak when using __attribute__((flag_enum)), and

2015-09-03 Thread Richard Smith via cfe-commits
ms to be failing the same way.) > Thanks > > Steven > > On Sep 3, 2015, at 6:03 PM, Richard Smith via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > > Author: rsmith > Date: Thu Sep 3 20:03:03 2015 > New Revision: 246830 > > URL: http://llvm.org

Re: r246830 - Fix a potential APInt memory leak when using __attribute__((flag_enum)), and

2015-09-03 Thread Richard Smith via cfe-commits
OK, should be fixed in r246836. On Thu, Sep 3, 2015 at 7:50 PM, Richard Smith wrote: > On Thu, Sep 3, 2015 at 6:21 PM, Steven Wu via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > >> In case you didn’t get an email from the failure because it was >> oversha

r246837 - Cleanups, no functionality change.

2015-09-03 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Sep 3 23:09:21 2015 New Revision: 246837 URL: http://llvm.org/viewvc/llvm-project?rev=246837&view=rev Log: Cleanups, no functionality change. Modified: cfe/trunk/lib/Sema/SemaDecl.cpp Modified: cfe/trunk/lib/Sema/SemaDecl.cpp URL: http://llvm.org/viewvc/llvm-projec

Re: [PATCH] D12169: Relax constexpr rules to improve __builtin_object_size's accuracy

2015-09-04 Thread Richard Smith via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. This essentially looks fine. Let me know if you want me to take another look once you've fixed the `ignorePointerCastsAndParens` bug with derived-to-base conversions, otherwise go ahead. ===

Re: [PATCH] D12624: Top-level anonymous namespaces are missing import DW_TAG_imported_module and nested anonymous namespaces are not

2015-09-04 Thread Richard Smith via cfe-commits
rsmith added a comment. I think this is fundamentally the right approach. Anonymous namespaces do inject a using directive, and we should not forget to pass it to the AST consumer. Comment at: lib/CodeGen/CGDebugInfo.cpp:3263-3264 @@ +3262,4 @@ + const NamespaceDecl *NSDecl =

Re: [PATCH] D12326: [Modules] Emit warning if module cannot instantiate static class member.

2015-09-04 Thread Richard Smith via cfe-commits
rsmith added a subscriber: rsmith. rsmith added a comment. I don't really see this as being specific to modules, nor to static data members. The natural generalization of this is: - at the end of a translation unit (including at the end of a module), warn on any implicit instantiations that are

r246881 - Fix crash on invalid if we can't find a suitable PCH file in a specified

2015-09-04 Thread Richard Smith via cfe-commits
Author: rsmith Date: Fri Sep 4 16:44:32 2015 New Revision: 246881 URL: http://llvm.org/viewvc/llvm-project?rev=246881&view=rev Log: Fix crash on invalid if we can't find a suitable PCH file in a specified directory, and our frontend action cares whether the frontend setup actually succeeded. Mod

Re: [PATCH] D12453: [CUDA] Allow function overloads based on host/device attributes.

2015-09-04 Thread Richard Smith via cfe-commits
rsmith accepted this revision. Comment at: lib/AST/ItaniumMangle.cpp:504 @@ +503,3 @@ + if (FD->hasAttr() && FD->hasAttr()) +Out << "Ua6deviceUa4host"; + If we have `enable_if` on a `__host__` `__device__` function, I think we should mangle as `Ua6deviceUa9e

Re: [PATCH] D12087: always_inline codegen rewrite

2015-09-04 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: lib/CodeGen/CodeGenModule.h:505 @@ +504,3 @@ + + llvm::SetVector AlwaysInlineFunctions; + Did you try making this a vector? It'd be nice to avoid the set overhead here if we can. Repository: rL LLVM http://reviews.l

Re: [PATCH] D12747: Implement [depr.c.headers]

2015-10-07 Thread Richard Smith via cfe-commits
Marshall: ping, does the below satisfy your concerns about the direction here? On Wed, Sep 16, 2015 at 2:04 PM, Richard Smith wrote: > On Mon, Sep 14, 2015 at 7:07 AM, Marshall Clow > wrote: > >> mclow.lists added a comment. >> >> I have two concerns about this p

Re: [libcxx] r249475 - Remove unnecessary inline functions capturing the contents of C library macros.

2015-10-07 Thread Richard Smith via cfe-commits
On Tue, Oct 6, 2015 at 3:31 PM, Jonathan Roelofs wrote: > On 10/6/15 4:03 PM, Richard Smith via cfe-commits wrote: > >> Author: rsmith >> Date: Tue Oct 6 17:03:22 2015 >> New Revision: 249475 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=249475&view=

Re: [PATCH] D13357: [Concepts] Add diagnostic; specializations of variable and function concepts

2015-10-07 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: lib/Sema/SemaDecl.cpp:5902-5915 @@ -5901,1 +5901,16 @@ + + // C++ Concepts TS [dcl.spec.concept]p7: A program shall not declare [...] + // an explicit specialization, or a partial specialization of a concept + // definitio

Re: [PATCH] D13357: [Concepts] Add diagnostic; specializations of variable and function concepts

2015-10-07 Thread Richard Smith via cfe-commits
On Wed, Oct 7, 2015 at 2:59 PM, Richard Smith via cfe-commits < cfe-commits@lists.llvm.org> wrote: > rsmith added inline comments. > > > Comment at: lib/Sema/SemaDecl.cpp:5902-5915 > @@ -5901,1 +5901,16 @@ > + > + // C++ Concepts TS [dcl.spec.conc

Re: [PATCH] D13344: Keep the IfStmt node even if the condition is invalid

2015-10-07 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: lib/Sema/SemaStmt.cpp:508-509 @@ -513,6 +507,4 @@ - DiagnoseUnusedExprResult(elseStmt); - return new (Context) IfStmt(Context, IfLoc, ConditionVar, ConditionExpr, thenStmt, ElseLoc, elseStmt); } --

Re: [PATCH] D13304: Avoid inlining in throw statement

2015-10-07 Thread Richard Smith via cfe-commits
On Wed, Oct 7, 2015 at 3:10 PM, Jun Bum Lim via cfe-commits < cfe-commits@lists.llvm.org> wrote: > junbuml added a comment. > > Thanks Richard for the comment. > > Initially, I intended to implement this in inliner by checking if a > callsite is in exception handling regions. However, I decided no

r249641 - When pretty-printing a C++11 literal operator, don't insert whitespace between

2015-10-07 Thread Richard Smith via cfe-commits
Author: rsmith Date: Wed Oct 7 19:17:59 2015 New Revision: 249641 URL: http://llvm.org/viewvc/llvm-project?rev=249641&view=rev Log: When pretty-printing a C++11 literal operator, don't insert whitespace between the "" and the suffix; that breaks names such as 'operator""if'. For symmetry, also re

Re: [PATCH] D10599: [OPENMP 4.0] Initial support for '#pragma omp declare simd' directive.

2015-10-07 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: include/clang/Basic/Attr.td:2098-2102 @@ +2097,7 @@ + let Documentation = [OMPDeclareSimdDocs]; + let AdditionalMembers = [{ + void printPrettyPragma(raw_ostream &OS, const PrintingPolicy &Policy) const { +OS << "\n"; + } + }]; +}

Re: r249721 - When mapping no_sanitize_* attributes to no_sanitize attributes, handle GNU-style formatting that involves prefix and suffix underscores. Cleans up other usages of similar functionality.

2015-10-08 Thread Richard Smith via cfe-commits
On Thu, Oct 8, 2015 at 12:24 PM, Aaron Ballman via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: aaronballman > Date: Thu Oct 8 14:24:08 2015 > New Revision: 249721 > > URL: http://llvm.org/viewvc/llvm-project?rev=249721&view=rev > Log: > When mapping no_sanitize_* attributes to no_s

Re: [PATCH] D12747: Implement [depr.c.headers]

2015-10-08 Thread Richard Smith via cfe-commits
On Thu, Oct 8, 2015 at 6:27 AM, Marshall Clow wrote: > On Wed, Oct 7, 2015 at 2:38 PM, Richard Smith > wrote: > >> Marshall: ping, does the below satisfy your concerns about the direction >> here? >> > > No, not really, because I'm worried about

Re: [PATCH] D12747: Implement [depr.c.headers]

2015-10-08 Thread Richard Smith via cfe-commits
On Thu, Oct 8, 2015 at 7:23 AM, Marshall Clow wrote: > On Tue, Oct 6, 2015 at 3:36 PM, Richard Smith > wrote: > >> Split out of . This is a big change, but the same pattern >> as the prior ones. >> >> In this patch, you replicate the #ifdef XXX, __libcpp_XX

[libcxx] r249737 - Factor definition of std::nullptr_t out of into a header that can also be used by .

2015-10-08 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Oct 8 15:34:11 2015 New Revision: 249737 URL: http://llvm.org/viewvc/llvm-project?rev=249737&view=rev Log: Factor definition of std::nullptr_t out of into a header that can also be used by . Added: libcxx/trunk/include/__nullptr - copied, changed from r249736

[libcxx] r249738 - Split out of .

2015-10-08 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Oct 8 15:36:30 2015 New Revision: 249738 URL: http://llvm.org/viewvc/llvm-project?rev=249738&view=rev Log: Split out of . Added: libcxx/trunk/include/ctype.h - copied, changed from r249736, libcxx/trunk/include/cctype Modified: libcxx/trunk/include/cctype

[libcxx] r249740 - Split out of .

2015-10-08 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Oct 8 15:37:44 2015 New Revision: 249740 URL: http://llvm.org/viewvc/llvm-project?rev=249740&view=rev Log: Split out of . Added: libcxx/trunk/include/float.h - copied, changed from r249736, libcxx/trunk/include/cfloat Modified: libcxx/trunk/include/cfloat

[libcxx] r249739 - Split out of .

2015-10-08 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Oct 8 15:37:11 2015 New Revision: 249739 URL: http://llvm.org/viewvc/llvm-project?rev=249739&view=rev Log: Split out of . Added: libcxx/trunk/include/errno.h - copied, changed from r249736, libcxx/trunk/include/cerrno Modified: libcxx/trunk/include/cerrno

[libcxx] r249741 - Split out of .

2015-10-08 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Oct 8 15:38:53 2015 New Revision: 249741 URL: http://llvm.org/viewvc/llvm-project?rev=249741&view=rev Log: Split out of . Added: libcxx/trunk/include/inttypes.h - copied, changed from r249736, libcxx/trunk/include/cinttypes Modified: libcxx/trunk/include/c

[libcxx] r249743 - Split out of .

2015-10-08 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Oct 8 15:41:26 2015 New Revision: 249743 URL: http://llvm.org/viewvc/llvm-project?rev=249743&view=rev Log: Split out of . Added: libcxx/trunk/include/setjmp.h - copied, changed from r249736, libcxx/trunk/include/csetjmp Modified: libcxx/trunk/include/csetj

Re: r249721 - When mapping no_sanitize_* attributes to no_sanitize attributes, handle GNU-style formatting that involves prefix and suffix underscores. Cleans up other usages of similar functionality.

2015-10-08 Thread Richard Smith via cfe-commits
On Thu, Oct 8, 2015 at 1:21 PM, Aaron Ballman wrote: > On Thu, Oct 8, 2015 at 4:16 PM, Richard Smith > wrote: > > On Thu, Oct 8, 2015 at 12:24 PM, Aaron Ballman via cfe-commits > > wrote: > >> > >> Author: aaronballman > >> Date: Thu Oct 8 14:24:08

Re: [PATCH] D13304: Avoid inlining in throw statement

2015-10-08 Thread Richard Smith via cfe-commits
On Thu, Oct 8, 2015 at 9:54 AM, wrote: > > I think this actually makes it less general. You would presumably perform > > different inlining for: > > > > throw f(x, y); > > > > versus > > > > auto k = f(x, y); > > throw k; > > We need to differentiate between these two. For the second case,

Re: r249721 - When mapping no_sanitize_* attributes to no_sanitize attributes, handle GNU-style formatting that involves prefix and suffix underscores. Cleans up other usages of similar functionality.

2015-10-08 Thread Richard Smith via cfe-commits
kes(__))) void f();" maybe?). The '&&' should go at the end of the previous line. Adrian > > On Oct 8, 2015, at 1:52 PM, Aaron Ballman > wrote: > > > > On Thu, Oct 8, 2015 at 4:49 PM, Richard Smith > wrote: > >> On Thu, Oct 8, 2015 at 1:21

[libcxx] r249749 - Fix incorrect file header. This is not .

2015-10-08 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Oct 8 16:17:21 2015 New Revision: 249749 URL: http://llvm.org/viewvc/llvm-project?rev=249749&view=rev Log: Fix incorrect file header. This is not . Modified: libcxx/trunk/include/cfenv Modified: libcxx/trunk/include/cfenv URL: http://llvm.org/viewvc/llvm-project/l

Re: Implict casts disappeared from syntactic init list expressions in C++

2015-10-08 Thread Richard Smith via cfe-commits
Ping^2 > > Il 12/09/2015 09:40, Abramo Bagnara ha scritto: > > Ping... > > > > Il 29/08/2015 10:01, Abramo Bagnara ha scritto: > >> Il 28/08/2015 23:27, Richard Smith ha scritto: > >>> On Tue, Aug 25, 2015 at 10:27 AM, Abramo Bagnara > >>>

Re: r249721 - When mapping no_sanitize_* attributes to no_sanitize attributes, handle GNU-style formatting that involves prefix and suffix underscores. Cleans up other usages of similar functionality.

2015-10-08 Thread Richard Smith via cfe-commits
On Thu, Oct 8, 2015 at 2:45 PM, Adrian Zgorzalek wrote: > > On Oct 8, 2015, at 2:17 PM, Richard Smith wrote: > > On Thu, Oct 8, 2015 at 2:10 PM, Adrian Zgorzalek via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > >> You are right, my bad, I thought thi

Re: [PATCH] D12821: Allow for C's "writing off the end" idiom in __builtin_object_size

2015-10-08 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: lib/AST/ExprConstant.cpp:6311-6314 @@ +6310,6 @@ + QualType BaseType; + if (auto *E = Base.dyn_cast()) +BaseType = E->getType(); + else +BaseType = Base.get()->getType(); + // The outermost BaseType may be a pointer if we got a

Re: r249721 - When mapping no_sanitize_* attributes to no_sanitize attributes, handle GNU-style formatting that involves prefix and suffix underscores. Cleans up other usages of similar functionality.

2015-10-08 Thread Richard Smith via cfe-commits
ing in C, and the diagnostic here is broken (we give the "only applies to functions" diagnostic when it's applied to a function without a prototype). =( Aaron, can I tempt you to fix that? ;) Try this one: __attribute__((ownership_takes(__, 1))) void f(void*); > On Oct 8, 2015,

[libcxx] r249761 - Split out of .

2015-10-08 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Oct 8 17:25:27 2015 New Revision: 249761 URL: http://llvm.org/viewvc/llvm-project?rev=249761&view=rev Log: Split out of . There are a bunch of macros (__need_size_t etc) that request just one piece of ; if any one of these is defined, we just directly include the underl

Re: [PATCH] D12747: Implement [depr.c.headers]

2015-10-08 Thread Richard Smith via cfe-commits
On Thu, Oct 8, 2015 at 11:50 AM, Marshall Clow wrote: > On Tue, Oct 6, 2015 at 3:57 PM, Richard Smith > wrote: > >> . This one is tricky: >> >> 1) There's an (undocumented) interface between the C standard library and >> this header, where the

Re: r249721 - When mapping no_sanitize_* attributes to no_sanitize attributes, handle GNU-style formatting that involves prefix and suffix underscores. Cleans up other usages of similar functionality.

2015-10-08 Thread Richard Smith via cfe-commits
Please add the test to some existing test file for the ownership_takes attribute, such as test/Sema/attr-ownership.c. Otherwise, LGTM. On Thu, Oct 8, 2015 at 3:25 PM, Adrian Zgorzalek wrote: > Yay! It worked, thank you! > > > On Oct 8, 2015, at 3:10 PM, Richard Smith wrote: >

Re: [PATCH] D10834: Added functions to retrieve information about variable storage in libclang and its python bindings.

2015-10-08 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: include/clang-c/Index.h:3815-3823 @@ -3814,2 +3814,11 @@ /** + * \brief Returns true if a variable with function scope is a non-static local variable. + */ +CINDEX_LINKAGE bool clang_Cursor_hasLocalStorage(CXCursor C); + +/* + * \brief

[libc++] PR25118: move include_next after #pragma system_header

2015-10-08 Thread Richard Smith via cfe-commits
Hi, As noted in PR25118, people who include libc++'s headers via a -I path with -pedantic_errors will see errors due to the use of #include_next. This patch moves the #include_next after the #pragma system_header line to suppress the error. (For the __need_* case in , I'm not checking whether pra

[libcxx] r249780 - Fix test failure in C++98 mode due to imperfect static_assert emulation.

2015-10-08 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Oct 8 18:44:26 2015 New Revision: 249780 URL: http://llvm.org/viewvc/llvm-project?rev=249780&view=rev Log: Fix test failure in C++98 mode due to imperfect static_assert emulation. Modified: libcxx/trunk/test/std/depr/depr.c.headers/stddef_h.pass.cpp Modified: libcxx

[libcxx] r249788 - PR25118: move system_header pragma before uses of include_next to avoid extension warnings for people finding libc++ headers via -I paths.

2015-10-08 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Oct 8 19:26:50 2015 New Revision: 249788 URL: http://llvm.org/viewvc/llvm-project?rev=249788&view=rev Log: PR25118: move system_header pragma before uses of include_next to avoid extension warnings for people finding libc++ headers via -I paths. Modified: libcxx/tru

[libcxx] r249798 - Split out of .

2015-10-08 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Oct 8 20:29:09 2015 New Revision: 249798 URL: http://llvm.org/viewvc/llvm-project?rev=249798&view=rev Log: Split out of . As with , skip our custom header if __need_FILE or __need___FILE is defined. Added: libcxx/trunk/include/stdio.h - copied, changed from

[libcxx] r249800 - Split out of .

2015-10-08 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Oct 8 20:41:45 2015 New Revision: 249800 URL: http://llvm.org/viewvc/llvm-project?rev=249800&view=rev Log: Split out of . Added: libcxx/trunk/include/stdlib.h - copied, changed from r249736, libcxx/trunk/include/cstdlib Modified: libcxx/trunk/include/cstdl

Re: [PATCH] D12747: Implement [depr.c.headers]

2015-10-08 Thread Richard Smith via cfe-commits
> > On Thu, Oct 8, 2015 at 6:47 PM, Eric Fiselier wrote: > >> Patch #10 LGTM. > >> > >> On Thu, Oct 8, 2015 at 4:28 PM, Richard Smith > wrote: > >>> On Thu, Oct 8, 2015 at 11:50 AM, Marshall Clow > >>> wrote: > >>>> >

Re: [PATCH] D12747: Implement [depr.c.headers]

2015-10-08 Thread Richard Smith via cfe-commits
> "-Wnonnull"" in test/std/depr/depr.c.headers/stdlib_h.pass.cpp? >> > I would like to leave it in so this test doesn't fail with older clang >> > versions. >> > >> > /Eric >> > >> > On Thu, Oct 8, 2015 at 6:47 PM, Eric Fi

Re: [PATCH] D12747: Implement [depr.c.headers]

2015-10-08 Thread Richard Smith via cfe-commits
On Thu, Oct 8, 2015 at 6:58 PM, Richard Smith wrote: > On Thu, Oct 8, 2015 at 6:25 PM, Eric Fiselier wrote: > >> Patch #12 needs revision. A bunch of function definitions were moved >> out of the std namespace and into the global. >> That change is incorrect. > &

Re: [PATCH] D13500: Improve helpfulness of assert message when number of diagnostics overflows number of available enum values.

2015-10-09 Thread Richard Smith via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. It'd be great if we could check this during compilation somehow. But anyway, LGTM. Comment at: lib/Basic/DiagnosticIDs.cpp:104 @@ -103,3 +103,3 @@ for (unsigned i = 1; i

[libcxx] r249889 - Split out of .

2015-10-09 Thread Richard Smith via cfe-commits
Author: rsmith Date: Fri Oct 9 14:56:37 2015 New Revision: 249889 URL: http://llvm.org/viewvc/llvm-project?rev=249889&view=rev Log: Split out of . Added: libcxx/trunk/include/wchar.h - copied, changed from r249736, libcxx/trunk/include/cwchar Modified: libcxx/trunk/include/cwchar

[libcxx] r249890 - Split out of .

2015-10-09 Thread Richard Smith via cfe-commits
Author: rsmith Date: Fri Oct 9 14:57:37 2015 New Revision: 249890 URL: http://llvm.org/viewvc/llvm-project?rev=249890&view=rev Log: Split out of . Added: libcxx/trunk/include/wctype.h - copied, changed from r249736, libcxx/trunk/include/cwctype Modified: libcxx/trunk/include/cwcty

Re: [PATCH] D12747: Implement [depr.c.headers]

2015-10-09 Thread Richard Smith via cfe-commits
As of r249890, all committed other than patches 12 (string.h) and 15 (more tests). On Thu, Oct 8, 2015 at 9:12 PM, Richard Smith wrote: > On Thu, Oct 8, 2015 at 6:58 PM, Richard Smith > wrote: > >> On Thu, Oct 8, 2015 at 6:25 PM, Eric Fiselier wrote: >> >>> Pat

Re: [PATCH] D13607: [Fix] Make it an error to take the address of (most) enable_if functions.

2015-10-09 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: lib/Sema/SemaExpr.cpp:10246-10253 @@ -10245,1 +10245,10 @@ + +if (RHS.get()->getType() == Context.OverloadTy) { + // As a set of extensions to C, we support overloading on functions. These + // functions need to be resolved

Re: [PATCH] D13604: Fix to allow C conversions on arguments passed to functions with __attribute__((overloadable)) in C

2015-10-09 Thread Richard Smith via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. Instead of `FixRHS`, I'd prefer either `ConvertRHS` or `PerformConversion` as your parameter name. Otherwise, LGTM, thanks! Comment at: lib/Sema/SemaOverload.cpp:1444-1445 @@

Re: r174630 - Enable overloading of OpenCL events - this is needed for the overloaded OpenCL builtin functions.

2015-10-09 Thread Richard Smith via cfe-commits
(Resending to correct mailing list address.) On Fri, Oct 9, 2015 at 3:23 PM, Richard Smith wrote: > On Thu, Feb 7, 2013 at 8:05 AM, Guy Benyei wrote: > >> Author: gbenyei >> Date: Thu Feb 7 10:05:33 2013 >> New Revision: 174630 >> >> URL: http://llvm.org

[libcxx] r249929 - Split out of .

2015-10-09 Thread Richard Smith via cfe-commits
Author: rsmith Date: Fri Oct 9 20:25:31 2015 New Revision: 249929 URL: http://llvm.org/viewvc/llvm-project?rev=249929&view=rev Log: Split out of . Also fix the overload set for the five functions whose signatures change in the case where we can fix it. This is already covered by existing tests

Re: [libcxx] r249926 - Revert r249889 due to bot failure.

2015-10-09 Thread Richard Smith via cfe-commits
On Fri, Oct 9, 2015 at 6:03 PM, Manman Ren via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: mren > Date: Fri Oct 9 20:03:55 2015 > New Revision: 249926 > > URL: http://llvm.org/viewvc/llvm-project?rev=249926&view=rev > Log: > Revert r249889 due to bot failure. > Can you provide a p

[libcxx] r249931 - Add a test that we declare the right set of C library function signatures in ::

2015-10-09 Thread Richard Smith via cfe-commits
Author: rsmith Date: Fri Oct 9 20:33:17 2015 New Revision: 249931 URL: http://llvm.org/viewvc/llvm-project?rev=249931&view=rev Log: Add a test that we declare the right set of C library function signatures in :: and std::, and that the names in :: and std:: are declaring the same entity. Added:

Re: [PATCH] D12747: Implement [depr.c.headers]

2015-10-09 Thread Richard Smith via cfe-commits
a "negative" feature macro for > > "_LIBCPP_STRING_H_HAS_CONST_OVERLOADS" because correct defaults > > shouldn't need a macro definition to be selected. (ie > > _LIBCPP_STRING_H_HAS_NO_CONST_OVERLOAD.) > > > > /Eric > > > > On

[libcxx] r249932 - Unrevert r249889, and XFAIL the test for Darwin, where the libc apparently doesn't provide a correct overload set for some functions.

2015-10-09 Thread Richard Smith via cfe-commits
Author: rsmith Date: Fri Oct 9 20:39:51 2015 New Revision: 249932 URL: http://llvm.org/viewvc/llvm-project?rev=249932&view=rev Log: Unrevert r249889, and XFAIL the test for Darwin, where the libc apparently doesn't provide a correct overload set for some functions. Added: libcxx/trunk/inclu

Re: [libcxx] r249926 - Revert r249889 due to bot failure.

2015-10-09 Thread Richard Smith via cfe-commits
On Fri, Oct 9, 2015 at 6:29 PM, Richard Smith wrote: > On Fri, Oct 9, 2015 at 6:03 PM, Manman Ren via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > >> Author: mren >> Date: Fri Oct 9 20:03:55 2015 >> New Revision: 249926 >> >> URL: http://llv

Re: [libcxx] r249936 - Get some of wchar_h.pass.cpp working on apple.

2015-10-10 Thread Richard Smith via cfe-commits
Thanks! On Oct 9, 2015 7:56 PM, "Eric Fiselier via cfe-commits" < cfe-commits@lists.llvm.org> wrote: > Author: ericwf > Date: Fri Oct 9 21:54:41 2015 > New Revision: 249936 > > URL: http://llvm.org/viewvc/llvm-project?rev=249936&view=rev > Log: > Get some of wchar_h.pass.cpp working on apple. > >

Re: [PATCH] D13344: Keep the IfStmt node even if the condition is invalid

2015-10-10 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: lib/Sema/SemaStmt.cpp:505-506 @@ -512,1 +504,4 @@ + } else { +ConditionExpr = new (Context) OpaqueValueExpr(SourceLocation(), + Context.VoidTy, VK_RValue); } Please

Re: [libcxx] r249798 - Split out of .

2015-10-12 Thread Richard Smith via cfe-commits
mode needs some massaging to cope with this. Eric, Marshall: Are you OK with the attached patch? The idea is to make <__config> be fine to include in extern "C" or extern "C++" modes (and likewise for the headers). This is something that comes up pretty often in practic

Re: [PATCH] D13664: [Fix] Don't emit multiple diagnostics for the same error

2015-10-12 Thread Richard Smith via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. LGTM, thanks! http://reviews.llvm.org/D13664 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listin

Re: [PATCH] D13607: [Fix] Make it an error to take the address of (most) enable_if functions.

2015-10-12 Thread Richard Smith via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. LGTM http://reviews.llvm.org/D13607 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co

Re: [PATCH] D12686: Add support for GCC's '__auto_type' extension.

2015-10-12 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: include/clang/Basic/DiagnosticSemaKinds.td:1726 @@ -1720,1 +1725,3 @@ +def err_auto_bitfield : Error< + "cannot pass bit-field as __auto_type initializer in C">; pass -> use Also, why not? Just because GCC messes this

r250105 - Add warning flags for #include_next and some nearby warnings.

2015-10-12 Thread Richard Smith via cfe-commits
Author: rsmith Date: Mon Oct 12 16:05:54 2015 New Revision: 250105 URL: http://llvm.org/viewvc/llvm-project?rev=250105&view=rev Log: Add warning flags for #include_next and some nearby warnings. Modified: cfe/trunk/include/clang/Basic/DiagnosticGroups.td cfe/trunk/include/clang/Basic/Diag

Re: [PATCH] D12508: [libcxx] Make it drastically simpler to link libc++.

2015-10-12 Thread Richard Smith via cfe-commits
rsmith added a comment. I think this is a good direction. I used to link libc++abi into libc++, and switched to using a hand-rolled linker script a while back. It's been working great for me. http://reviews.llvm.org/D12508 ___ cfe-commits mailing

r250137 - [modules] Allow the error on importing a C++ module within an extern "C"

2015-10-12 Thread Richard Smith via cfe-commits
Author: rsmith Date: Mon Oct 12 19:39:40 2015 New Revision: 250137 URL: http://llvm.org/viewvc/llvm-project?rev=250137&view=rev Log: [modules] Allow the error on importing a C++ module within an extern "C" context (but otherwise at the top level) to be disabled, to support use of C++ standard libr

Re: [PATCH] D12686: Add support for GCC's '__auto_type' extension.

2015-10-12 Thread Richard Smith via cfe-commits
rsmith added a comment. Thanks, this essentially looks good to me. I can't think of any other cases where C++ allows `auto` that you've not covered. Comment at: lib/Sema/SemaExprCXX.cpp:1172-1173 @@ -1171,1 +1171,4 @@ + if (D.getDeclSpec().getTypeSpecType() == DeclSpec::TST_

r250140 - [modules] Improve error message on failed module load due to a missing file to

2015-10-12 Thread Richard Smith via cfe-commits
Author: rsmith Date: Mon Oct 12 20:26:26 2015 New Revision: 250140 URL: http://llvm.org/viewvc/llvm-project?rev=250140&view=rev Log: [modules] Improve error message on failed module load due to a missing file to say which module file referenced the missing file. Modified: cfe/trunk/lib/Serial

[libcxx] r250236 - Remove __config module to avoid #include cycle when libc headers include libc++'s headers.

2015-10-13 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Oct 13 17:13:33 2015 New Revision: 250236 URL: http://llvm.org/viewvc/llvm-project?rev=250236&view=rev Log: Remove __config module to avoid #include cycle when libc headers include libc++'s headers. Modified: libcxx/trunk/include/module.modulemap Modified: libcxx/t

Re: [libcxx] r249738 - Split out of .

2015-10-13 Thread Richard Smith via cfe-commits
gt; #include <__config> > > ^ > > 3 errors generated. > > Let me know how I can help in diagnosing what’s going on here. > OK, I see what's wrong. Is this working any better for you in r250236? > Once this works, I’d like to to set up a green dragon bot that builds &g

Re: [libcxx] r249798 - Split out of .

2015-10-13 Thread Richard Smith via cfe-commits
s happens by using _Static_assert when available instead of this static_assert emulation.) > On Mon, Oct 12, 2015 at 12:27 PM, Richard Smith > wrote: > >> On Mon, Oct 12, 2015 at 9:41 AM, Steven Wu via cfe-commits < >> cfe-commits@lists.llvm.org> wrote: >> >>&

[libcxx] r250247 - Fix use of libc++ headers from within an 'extern "C"' context in C++98.

2015-10-13 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Oct 13 18:12:22 2015 New Revision: 250247 URL: http://llvm.org/viewvc/llvm-project?rev=250247&view=rev Log: Fix use of libc++ headers from within an 'extern "C"' context in C++98. Previously, this resulted in us declaring a template for static_assert emulation within th

Re: [libcxx] r249798 - Split out of .

2015-10-13 Thread Richard Smith via cfe-commits
; /Eric > > On Tue, Oct 13, 2015 at 4:19 PM, Richard Smith > wrote: > >> On Tue, Oct 13, 2015 at 2:12 PM, Eric Fiselier via cfe-commits < >> cfe-commits@lists.llvm.org> wrote: >> >>> I would rather not do this if possible but I understand why

Re: [PATCH] D6700: Diagnose UnresolvedLookupExprs that resolve to instance members in static methods

2015-10-13 Thread Richard Smith via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. LGTM Comment at: lib/Sema/TreeTransform.h:9131 @@ -9130,2 +9130,3 @@ // it's a normal declaration name. - if (!Old->hasExplicitTemplateArgs() && !TemplateKWLoc.isValid())

Re: [libcxx] r249738 - Split out of .

2015-10-13 Thread Richard Smith via cfe-commits
On Tue, Oct 13, 2015 at 5:31 PM, Sean Silva wrote: > On Tue, Oct 13, 2015 at 3:17 PM, Richard Smith via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > >> On Tue, Oct 13, 2015 at 2:10 PM, Adrian Prantl via cfe-commits < >> cfe-commits@lists.llvm.org> wrote

Re: [libcxx] r249738 - Split out of .

2015-10-13 Thread Richard Smith via cfe-commits
On Tue, Oct 13, 2015 at 6:54 PM, Sean Silva wrote: > On Tue, Oct 13, 2015 at 6:14 PM, Richard Smith > wrote: > >> On Tue, Oct 13, 2015 at 5:31 PM, Sean Silva >> wrote: >> >>> On Tue, Oct 13, 2015 at 3:17 PM, Richard Smith via cfe-commits < >>> cf

Re: [PATCH] D12747: Implement [depr.c.headers]

2015-10-14 Thread Richard Smith via cfe-commits
rsmith abandoned this revision. rsmith added a comment. Patch has been split up and the individual parts have all been committed (except the module map changes, which are currently problematic due to libc / libc++ layering issues). Repository: rL LLVM http://reviews.llvm.org/D12747 _

Re: [libcxx] r249738 - Split out of .

2015-10-14 Thread Richard Smith via cfe-commits
On Wed, Oct 14, 2015 at 2:03 PM, Adrian Prantl via cfe-commits < cfe-commits@lists.llvm.org> wrote: > On Oct 14, 2015, at 11:37 AM, Adrian Prantl via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > > On Oct 13, 2015, at 7:43 PM, Richard Smith wrote: > > On Tue,

Re: [libcxx] r249738 - Split out of .

2015-10-14 Thread Richard Smith via cfe-commits
On Wed, Oct 14, 2015 at 3:58 PM, Adrian Prantl via cfe-commits < cfe-commits@lists.llvm.org> wrote: > On Oct 14, 2015, at 3:32 PM, Richard Smith wrote: > > On Wed, Oct 14, 2015 at 2:03 PM, Adrian Prantl via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > >

Re: [libcxx] r249738 - Split out of .

2015-10-14 Thread Richard Smith via cfe-commits
On Wed, Oct 14, 2015 at 5:22 PM, Sean Silva wrote: > On Tue, Oct 13, 2015 at 7:43 PM, Richard Smith > wrote: > >> On Tue, Oct 13, 2015 at 6:54 PM, Sean Silva >> wrote: >> >>> On Tue, Oct 13, 2015 at 6:14 PM, Richard Smith >>> wrote: >>

Re: [libcxx] r249929 - Split out of .

2015-10-15 Thread Richard Smith via cfe-commits
; iOS. But it is already in our SDK. > > Do you have any suggestion on how to fix this? > > Thanks, > Manman > > > On Oct 9, 2015, at 6:25 PM, Richard Smith via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > > > > Author: rsmith > > Date: Fri O

Re: [libcxx] r249929 - Split out of .

2015-10-15 Thread Richard Smith via cfe-commits
On Thu, Oct 15, 2015 at 12:03 PM, Manman Ren via cfe-commits < cfe-commits@lists.llvm.org> wrote: > > On Oct 15, 2015, at 11:25 AM, Richard Smith wrote: > > I assume the code in question has a "using namespace std;"? > > Yes > > I don't see any way

Re: [libcxx] r249738 - Split out of .

2015-10-15 Thread Richard Smith via cfe-commits
On Thu, Oct 15, 2015 at 11:14 AM, Adrian Prantl wrote: > > On Oct 14, 2015, at 5:07 PM, Richard Smith wrote: > > Ack, there are non-modular headers in the Darwin module. =( I seem to > recall that they're not version-locked to your compiler, so we've got to > support

Re: [PATCH] D10834: Added functions to retrieve information about variable storage in libclang and its python bindings.

2015-10-15 Thread Richard Smith via cfe-commits
rsmith added a comment. Argyrios, I'd appreciate your thoughts here. Comment at: tools/libclang/CIndex.cpp:6670-6694 @@ -6669,1 +6669,27 @@ +bool clang_Cursor_hasLocalStorage(CXCursor C) { + if (C.kind != CXCursor_VarDecl) { +return false; + } + + const Decl *D = getCur

Re: [libcxx] r249738 - Split out of .

2015-10-15 Thread Richard Smith via cfe-commits
Oct 15, 2015, at 2:09 PM, Adrian Prantl via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > > > On Oct 15, 2015, at 1:42 PM, Richard Smith wrote: > > On Thu, Oct 15, 2015 at 11:14 AM, Adrian Prantl wrote: > >> >> On Oct 14, 2015, at 5:07 PM, Richard Smi

Re: [libcxx] r249738 - Split out of .

2015-10-15 Thread Richard Smith via cfe-commits
Oct 15, 2015, at 2:09 PM, Adrian Prantl via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > > > On Oct 15, 2015, at 1:42 PM, Richard Smith wrote: > > On Thu, Oct 15, 2015 at 11:14 AM, Adrian Prantl wrote: > >> >> On Oct 14, 2015, at 5:07 PM, Richard Smi

Re: [PATCH] D13790: Add "-Wc++11-inline-namespace" so that libc++ can use -pedantic in C++03.

2015-10-15 Thread Richard Smith via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. LGTM http://reviews.llvm.org/D13790 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co

Re: [PATCH] D12821: Allow for C's "writing off the end" idiom in __builtin_object_size

2015-10-15 Thread Richard Smith via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. Some minor typographical comments. Please add some tests for the union case, then this LGTM. Comment at: lib/AST/ExprConstant.cpp:6333-6336 @@ +6332,6 @@ +if (BaseType->i

Re: [PATCH] D13786: [Sema] Implement __make_integer_seq

2015-10-15 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: include/clang/AST/TemplateName.h:93-100 @@ +92,10 @@ + +/// \brief A structure for storing the information associated with an +/// builtin template name. +class BuiltinTemplateStorage : public UncommonTemplateNameStorage { + friend class

Re: [PATCH] D13795: Prefer functions with true enable_if conditions when attempting to resolve the address of an overload

2015-10-15 Thread Richard Smith via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. Looks great, thanks! Comment at: lib/Sema/SemaOverload.cpp:8413-8414 @@ +8412,4 @@ +// Cand1's first N enable_if attributes have precisely the same conditions as +// Cand2's f

r250554 - Refactor module lookup when looking up a header file, and wire through the requesting module. No functionality change.

2015-10-16 Thread Richard Smith via cfe-commits
Author: rsmith Date: Fri Oct 16 16:42:56 2015 New Revision: 250554 URL: http://llvm.org/viewvc/llvm-project?rev=250554&view=rev Log: Refactor module lookup when looking up a header file, and wire through the requesting module. No functionality change. Modified: cfe/trunk/include/clang/Lex/Di

Re: [libcxx] r249738 - Split out of .

2015-10-16 Thread Richard Smith via cfe-commits
On Thu, Oct 15, 2015 at 11:14 AM, Adrian Prantl wrote: > > On Oct 14, 2015, at 5:07 PM, Richard Smith wrote: > > Ack, there are non-modular headers in the Darwin module. =( I seem to > recall that they're not version-locked to your compiler, so we've got to > support

r250577 - [modules] Allow the error when explicitly loading an incompatible module file

2015-10-16 Thread Richard Smith via cfe-commits
Author: rsmith Date: Fri Oct 16 18:20:19 2015 New Revision: 250577 URL: http://llvm.org/viewvc/llvm-project?rev=250577&view=rev Log: [modules] Allow the error when explicitly loading an incompatible module file via -fmodule-file= to be turned off; in that case, just include the relevant files text

Re: [libcxx] r249738 - Split out of .

2015-10-16 Thread Richard Smith via cfe-commits
On Fri, Oct 16, 2015 at 4:48 PM, Adrian Prantl via cfe-commits < cfe-commits@lists.llvm.org> wrote: > On Oct 16, 2015, at 3:27 PM, Richard Smith wrote: > > On Thu, Oct 15, 2015 at 11:14 AM, Adrian Prantl wrote: > >> >> On Oct 14, 2015, at 5:07 PM, Richard Smith w

Re: [libcxx] r249738 - Split out of .

2015-10-16 Thread Richard Smith via cfe-commits
On Fri, Oct 16, 2015 at 5:17 PM, Adrian Prantl via cfe-commits < cfe-commits@lists.llvm.org> wrote: > On Oct 16, 2015, at 5:13 PM, Richard Smith wrote: > > On Fri, Oct 16, 2015 at 4:48 PM, Adrian Prantl via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > >

Re: [libcxx] r249738 - Split out of .

2015-10-16 Thread Richard Smith via cfe-commits
On Fri, Oct 16, 2015 at 5:30 PM, Adrian Prantl via cfe-commits < cfe-commits@lists.llvm.org> wrote: > > On Oct 16, 2015, at 5:28 PM, Richard Smith wrote: > > > > > Getting there :-) > > In file included from :86: > In file included from > /Volumes/Data/llv

<    24   25   26   27   28   29   30   31   32   33   >