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 patch (w/o commenting on the actu

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 behavior changes with this > approach. > > #in

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_XXX, #undef XXX > dance for all the isXX

[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 2015 > >> New Revision: 249721 > >> > >> URL:

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
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 this if covers all the cases, but > part could be empty. > > Here is the fix > Please add a testcase ("__attribute__((ownership_takes(__))) void f();" maybe?).

[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
There are some other open problems in this area: - RecursiveASTVisitor on nested InitListExprs is currently worst-case exponential time because it walks the syntactic and semantic forms separately - Tools such as "find all references to this function" need the semantic form of every initializer, w

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 this if covers all the cases, but >> par

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
On Thu, Oct 8, 2015 at 2:59 PM, Adrian Zgorzalek wrote: > Same story: > warning: 'ownership_takes' attribute only applies to functions > [-Wignored-attributes] > __attribute__((ownership_takes(__))) void f(); >^ > Oh, I see, you're building in C, and the diagnostic here

[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 macros __need_ptrdiff_t, __need_size_t, >> __need_wc

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: > > On Thu, Oct 8, 2

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: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. Slightly updated version attached. I should probably explain what's going on here in more detai

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

2015-10-08 Thread Richard Smith via cfe-commits
Attached patch adds a test that all required functions from the C standard library (and any required overloads) are present with the correct types, and that the declarations in the and headers declare the same entity as required by [depr.c.headers]p2. On Thu, Oct 8, 2015 at 6:58 PM, Richard Smit

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. > > > Slightly updated version attac

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: >> >>> Patch #12 needs revision. A bunch of

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/viewvc/llvm-project?rev=174630&view=rev

[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
On Fri, Oct 9, 2015 at 3:48 PM, Eric Fiselier wrote: > Regarding Patch #15. > > 1. Tests under 'test/std' shouldn't directly include <__config> or > depend on any libc++ implementation details. We are trying to make the > test suite generic so refrain from referencing libc++ symbols. > OK, I'll

[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://llvm.org/viewvc/llvm-project?rev=249926&view=rev >

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
the header is in extern "C". >>> >> >> This was supposed to work, but apparently I only tested it when compiling >> as C++11; the static_assert emulation in C++98 mode needs some massaging to >> cope with this. >> >> Eric, Marshall: Are you OK wi

[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
; 3 errors generated. >>>>> >>>>> Because the code is actually compiled in C++, the guard in the header >>>>> failed to exclude the templates. In the meantime, I don't know if there >>>>> are >>>>> ways to detect the header is in ex

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
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-co

Re: [libcxx] r249738 - Split out of .

2015-10-14 Thread Richard Smith via cfe-commits
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 < >>>>> cfe

Re: [libcxx] r249738 - Split out of .

2015-10-14 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

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
ion >> inline _LIBCPP_INLINE_VISIBILITY const char* strrchr(const char* __s, int >> __c) {return ::strrchr(__s, __c);} >> >> It is a little strange to have "char*strrchr(const char *, int);” in >> iOS. But it is already in our SDK. >> >> Do you

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 them as-is? > > If we can't

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
On Thu, Oct 15, 2015 at 2:57 PM, Adrian Prantl via cfe-commits < cfe-commits@lists.llvm.org> wrote: > On Oct 15, 2015, at 2:51 PM, Alex Rosenberg wrote: > > On Oct 15, 2015, at 2:20 PM, Adrian Prantl via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > > > On Oct 15, 2015, at 2:09 PM, Adrian

Re: [libcxx] r249738 - Split out of .

2015-10-15 Thread Richard Smith via cfe-commits
On Thu, Oct 15, 2015 at 2:57 PM, Adrian Prantl via cfe-commits < cfe-commits@lists.llvm.org> wrote: > On Oct 15, 2015, at 2:51 PM, Alex Rosenberg wrote: > > On Oct 15, 2015, at 2:20 PM, Adrian Prantl via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > > > On Oct 15, 2015, at 2:09 PM, Adrian

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 them as-is? > > If we can't

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 wrote: >> >> Ack, there are non-m

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: > >> On Oct 16, 2015, at 3:27 PM, Richa

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/llvm/_build.ninja.release/bin/../lib/clang/

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

2015-10-16 Thread Richard Smith via cfe-commits
On Fri, Oct 16, 2015 at 4:43 PM, Sean Silva wrote: > On Fri, Oct 16, 2015 at 4:20 PM, Richard Smith via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > >> Author: rsmith >> Date: Fri Oct 16 18:20:19 2015 >> New Revision: 250577 >> >> URL: http:/

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

2015-10-16 Thread Richard Smith via cfe-commits
On Fri, Oct 16, 2015 at 6:25 PM, Sean Silva wrote: > On Fri, Oct 16, 2015 at 6:12 PM, Richard Smith > wrote: > >> On Fri, Oct 16, 2015 at 4:43 PM, Sean Silva >> wrote: >> >>> On Fri, Oct 16, 2015 at 4:20 PM, Richard Smith via cfe-commits < >>> cf

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

2015-10-16 Thread Richard Smith via cfe-commits
;> >>>> On Fri, Oct 16, 2015 at 4:43 PM, Sean Silva >>>> wrote: >>>> >>>>> On Fri, Oct 16, 2015 at 4:20 PM, Richard Smith via cfe-commits < >>>>> cfe-commits@lists.llvm.org> wrote: >>>>> >>>>>&

Re: [libcxx] r249738 - Split out of .

2015-10-19 Thread Richard Smith via cfe-commits
On Mon, Oct 19, 2015 at 1:28 PM, Adrian Prantl via cfe-commits < cfe-commits@lists.llvm.org> wrote: > > On Oct 16, 2015, at 5:47 PM, Richard Smith wrote: > > Great, looks like progress. Next you need a correct module map for libc++ > that actually covers all of its headers :) Try the attached one

Re: [libcxx] r249738 - Split out of .

2015-10-19 Thread Richard Smith via cfe-commits
Ugh, looks like I missed a submodule for stdio.h :( On Oct 19, 2015 11:34 AM, "Adrian Prantl" wrote: > While building module 'std' imported from > /Volumes/Data/llvm/_build.ninja.release/bin/../include/c++/v1/cassert:20: > While building module 'Darwin' imported from > /Volumes/Data/llvm/_build.n

r250884 - [modules] libstdc++ defines some static inline functions in its internal

2015-10-21 Thread Richard Smith via cfe-commits
Author: rsmith Date: Wed Oct 21 02:13:52 2015 New Revision: 250884 URL: http://llvm.org/viewvc/llvm-project?rev=250884&view=rev Log: [modules] libstdc++ defines some static inline functions in its internal headers. If those headers end up being textually included twice into the same module, we get

r250980 - [coroutines] Add lexer support for co_await, co_yield, and co_return keywords.

2015-10-21 Thread Richard Smith via cfe-commits
Author: rsmith Date: Wed Oct 21 22:52:15 2015 New Revision: 250980 URL: http://llvm.org/viewvc/llvm-project?rev=250980&view=rev Log: [coroutines] Add lexer support for co_await, co_yield, and co_return keywords. Add -fcoroutines flag (just for -cc1 for now) to enable the feature. Early indications

r250982 - [coroutines] Add feature-test macro for coroutines, defined to 1 to indicate

2015-10-21 Thread Richard Smith via cfe-commits
Author: rsmith Date: Wed Oct 21 23:27:47 2015 New Revision: 250982 URL: http://llvm.org/viewvc/llvm-project?rev=250982&view=rev Log: [coroutines] Add feature-test macro for coroutines, defined to 1 to indicate the implementation is incomplete. Modified: cfe/trunk/lib/Frontend/InitPreprocessor

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