Re: [PATCH] D21619: [Sema] Implement C++14's DR1579: Prefer moving id-expression out of functions

2016-06-28 Thread Richard Smith via cfe-commits
rsmith added a comment. Thank you for working on this! Please also add a test to test/CXX/drs/dr15xx.cpp with a "// dr1579: 3.9" comment (we have a script that turns those comments into www/cxx_dr_status.html). Comment at: include/clang/Sema/Sema.h:3473 @@ -3472,3 +3472,3 @@

Re: [PATCH] D21653: [Sema] Disallow ambiguous base-to-derived conversion in template argument deduction

2016-06-28 Thread Richard Smith via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. Please also add the testcase from PR27601. http://reviews.llvm.org/D21653 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.ll

Re: [PATCH] D21653: [Sema] Disallow ambiguous base-to-derived conversion in template argument deduction

2016-06-28 Thread Richard Smith via cfe-commits
On Thu, Jun 23, 2016 at 10:37 AM, Erik Pilkington via cfe-commits < cfe-commits@lists.llvm.org> wrote: > erik.pilkington created this revision. > erik.pilkington added reviewers: rsmith, faisalv. > erik.pilkington added a subscriber: cfe-commits. > > Previously, Clang would incorrectly accept the

Re: [PATCH] D21501: [Driver] Add support for Broadcom Vulcan core

2016-06-28 Thread Richard Smith via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. This seems fine to me. http://reviews.llvm.org/D21501 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailm

Re: [PATCH] D18035: [GCC] PR23529 Mangler part of attrbute abi_tag support

2016-06-28 Thread Richard Smith via cfe-commits
rsmith added a comment. Thank you! I'm happy with this implementation (other than some data structure improvements), and cxx-abi-dev discussion seems to be settling on this approach (mangling the return type / variable type to extract attributes) being the right one. (Minor nit: please make su

Re: [PATCH] D21653: [Sema] Disallow ambiguous base-to-derived conversion in template argument deduction

2016-06-28 Thread Richard Smith via cfe-commits
rsmith added a comment. Well OK then, commit away! :) http://reviews.llvm.org/D21653 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r274080 - Function declarations are, in fact, permitted in the init-statement of a for

2016-06-28 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Jun 28 18:26:18 2016 New Revision: 274080 URL: http://llvm.org/viewvc/llvm-project?rev=274080&view=rev Log: Function declarations are, in fact, permitted in the init-statement of a for loop. Don't confuse Sema by saying they're not. Modified: cfe/trunk/include/clang/S

r274088 - Mark inheriting constructors as deleted if the corresponding defaulted default

2016-06-28 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Jun 28 20:10:27 2016 New Revision: 274088 URL: http://llvm.org/viewvc/llvm-project?rev=274088&view=rev Log: Mark inheriting constructors as deleted if the corresponding defaulted default constructor would be; this is effectively required by P0136R1. This has the effect of

RFC: Default language standard mode policy

2016-06-29 Thread Richard Smith via cfe-commits
Hi all! I'd like to establish a policy for Clang's default language standard (if none is specified with -std), as follows: Clang defaults to the most recent published standard for the selected language that it fully implements. The practical impact of this is that clang++ will default to C++14

Re: RFC: Default language standard mode policy

2016-06-29 Thread Richard Smith via cfe-commits
or the transition in the C++ default in time for 3.9, then so be it. > On Wed, Jun 29, 2016 at 3:09 PM, Richard Smith via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > >> Hi all! >> >> I'd like to establish a policy for Clang's default language stand

Re: RFC: Default language standard mode policy

2016-06-29 Thread Richard Smith via cfe-commits
On Wed, Jun 29, 2016 at 12:30 PM, Sean Silva wrote: > > > On Wed, Jun 29, 2016 at 12:09 PM, Richard Smith via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > >> Hi all! >> >> I'd like to establish a policy for Clang's default language standar

Re: [cfe-dev] RFC: Default language standard mode policy

2016-06-29 Thread Richard Smith via cfe-commits
On Wed, Jun 29, 2016 at 12:55 PM, Hal Finkel via cfe-dev < cfe-...@lists.llvm.org> wrote: > > -- > > *From: *"Richard Smith via cfe-commits" > *To: *"cfe-commits" , "Clang Dev" < > cfe-...@lists.llvm.org> &g

Re: [PATCH] D20602: Add .rgba syntax extension to ext_vector_type types

2016-06-29 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: include/clang/Basic/DiagnosticSemaKinds.td:7907 @@ -7904,1 +7906,3 @@ +def ext_opencl_ext_vector_type_rgba_selector: ExtWarn< + "vector component name '%0' is an OpenCL version 2.2 feature">; } // end of sema category As

Re: [PATCH] D18035: [GCC] PR23529 Mangler part of attrbute abi_tag support

2016-06-29 Thread Richard Smith via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. LGTM, thank you so much for your patience and hard work on this change! http://reviews.llvm.org/D18035 ___ cfe-commits mailing list cfe-commits@l

r274165 - Switch to an RAII object to revert tentative parsing automatically.

2016-06-29 Thread Richard Smith via cfe-commits
Author: rsmith Date: Wed Jun 29 16:06:51 2016 New Revision: 274165 URL: http://llvm.org/viewvc/llvm-project?rev=274165&view=rev Log: Switch to an RAII object to revert tentative parsing automatically. Modified: cfe/trunk/include/clang/Parse/Parser.h cfe/trunk/lib/Parse/ParseTentative.cpp

r274167 - Convert another case over to RevertingTentativeParsingAction.

2016-06-29 Thread Richard Smith via cfe-commits
Author: rsmith Date: Wed Jun 29 16:12:37 2016 New Revision: 274167 URL: http://llvm.org/viewvc/llvm-project?rev=274167&view=rev Log: Convert another case over to RevertingTentativeParsingAction. Modified: cfe/trunk/lib/Parse/ParseTentative.cpp Modified: cfe/trunk/lib/Parse/ParseTentative.cpp

r274169 - P0305R1: Parsing support for init-statements in 'if' and 'switch' statements.

2016-06-29 Thread Richard Smith via cfe-commits
Author: rsmith Date: Wed Jun 29 16:17:59 2016 New Revision: 274169 URL: http://llvm.org/viewvc/llvm-project?rev=274169&view=rev Log: P0305R1: Parsing support for init-statements in 'if' and 'switch' statements. No semantic analysis yet. This is a pain to disambiguate correctly, because the parsin

Re: [PATCH] D21834: Implementing 'If statement with Initializer'

2016-06-29 Thread Richard Smith via cfe-commits
rsmith requested changes to this revision. rsmith added a comment. This revision now requires changes to proceed. The proposal has changed since the pre-meeting mailing, and now covers `switch` as well as `if`. You also need to handle the //expression-statement// form of //init-statement//. As

Re: [cfe-dev] RFC: Default language standard mode policy

2016-06-29 Thread Richard Smith via cfe-commits
On Wed, Jun 29, 2016 at 2:48 PM, Joerg Sonnenberger via cfe-commits < cfe-commits@lists.llvm.org> wrote: > On Wed, Jun 29, 2016 at 12:09:37PM -0700, Richard Smith via cfe-dev wrote: > > Hi all! > > > > I'd like to establish a policy for Clang's default language standard (if > > none is specified w

r274260 - PR28373: fix crash-on-invalid if the condition of an if-statement fails typo-correction.

2016-06-30 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Jun 30 13:36:34 2016 New Revision: 274260 URL: http://llvm.org/viewvc/llvm-project?rev=274260&view=rev Log: PR28373: fix crash-on-invalid if the condition of an if-statement fails typo-correction. Modified: cfe/trunk/lib/Sema/SemaExpr.cpp cfe/trunk/test/SemaCXX/c

Re: [PATCH] D21834: Implementing 'If statement with Initializer'

2016-06-30 Thread Richard Smith via cfe-commits
rsmith added a comment. There are a few missing pieces here: 1. Analysis/CFG.cpp needs to be taught to build a correct CFG for these. You can test this with an example like 'if (bool b; b)' which should give a -Wuninitialized warning. 2. AST/ExprConstant.cpp needs to be taught to perform consta

r274267 - Fix typo-correction crash if a typo occurs within the operand of a

2016-06-30 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Jun 30 15:24:30 2016 New Revision: 274267 URL: http://llvm.org/viewvc/llvm-project?rev=274267&view=rev Log: Fix typo-correction crash if a typo occurs within the operand of a function-style cast to a non-dependent type which is then used in an invalid way. We'd lose the "t

Re: [cfe-dev] RFC: Default language standard mode policy

2016-06-30 Thread Richard Smith via cfe-commits
On Thu, Jun 30, 2016 at 2:02 AM, David Chisnall wrote: > On 29 Jun 2016, at 23:07, Richard Smith via cfe-dev < > cfe-...@lists.llvm.org> wrote: > > > > Yes, those are real problems, but it's not reasonable for us to keep the > default at C++98/03 forever. GCC has already taken the plunge here, so

Re: [PATCH] D20499: [Temporary, Lifetime] Add lifetime marks for temporaries

2016-06-30 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: lib/CodeGen/CGExpr.cpp:438 @@ -426,1 +437,3 @@ +} EmitAnyExprToMem(E, Object, Qualifiers(), /*IsInit*/true); +if (Size) { Seems like you should push the cleanup before you emit the initializer; the cleanup sh

Re: [PATCH] D21619: [Sema] Implement C++14's DR1579: Prefer moving id-expression out of functions

2016-06-30 Thread Richard Smith via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. LGTM, thank you! http://reviews.llvm.org/D21619 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/lis

Re: [libcxx] r274403 - Work around ABI break caused by C++17 inline variables.

2016-07-01 Thread Richard Smith via cfe-commits
On Fri, Jul 1, 2016 at 4:22 PM, Eric Fiselier via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: ericwf > Date: Fri Jul 1 18:22:25 2016 > New Revision: 274403 > > URL: http://llvm.org/viewvc/llvm-project?rev=274403&view=rev > Log: > Work around ABI break caused by C++17 inline variabl

Re: [libcxx] r274403 - Work around ABI break caused by C++17 inline variables.

2016-07-01 Thread Richard Smith via cfe-commits
On Fri, Jul 1, 2016 at 4:37 PM, Eric Fiselier wrote: > The attribute is ignored unless it is placed on the in-class declaration > of the member. It has no effect when applied to the explicit definition. > Ugh, right, attributes added after the definition aren't well-treated. Seems reasonable to

Re: [PATCH] D21030: [Sema] Fix rejects-valid where parameter pack was not expanded in type alias

2016-07-01 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/D21030 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co

r274416 - PR28394: For compatibility with c++11 and c++14, if a static constexpr data

2016-07-01 Thread Richard Smith via cfe-commits
Author: rsmith Date: Fri Jul 1 20:32:16 2016 New Revision: 274416 URL: http://llvm.org/viewvc/llvm-project?rev=274416&view=rev Log: PR28394: For compatibility with c++11 and c++14, if a static constexpr data member is redundantly redeclared outside the class definition in code built in c++17 mode

Re: [PATCH] D21834: Implementing 'If statement with Initializer'

2016-07-10 Thread Richard Smith via cfe-commits
rsmith added a comment. This looks really good. Some minor comments then this is ready to commit. Comment at: include/clang/AST/Stmt.h:890 @@ -889,3 +889,3 @@ IfStmt(const ASTContext &C, SourceLocation IL, - bool IsConstexpr, VarDecl *var, Expr *cond, + bool I

Re: [PATCH] D20867: [PCH] Fix timestamp check on windows hosts.

2016-07-12 Thread Richard Smith via cfe-commits
rsmith added a comment. You have two independent functional changes in this patch: one adds a flag to control the emission of timestamps into PCH files, and the other re-enables timestamp checking on Win32. Please separate them out into distinct patches to be committed separately. Both parts o

Re: [PATCH] D22053: [Sema] Fix a C++1z bug where initializer for static constexpr data member was not instantiated

2016-07-13 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: lib/Sema/SemaTemplateInstantiateDecl.cpp:3861 @@ -3860,3 +3860,3 @@ // static data members until a definition of the variable is needed. We need - // it right away if the type contains 'auto'. + // it right away if the type contains '

Re: [PATCH] D22311: [Sema] Improve template argument deduction diagnostic for ambiguous base classes

2016-07-13 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: include/clang/Basic/DiagnosticSemaKinds.td:3227 @@ -3226,1 +3226,3 @@ +def note_ovl_candidate_ambiguous_base_classes : Note< +"candidate template ignored: ambiguous base classes of %0 match %1">; ambiguous -> multipl

r275350 - P0305R0: Semantic analysis and code generation for C++17 init-statement for 'if' and 'switch':

2016-07-13 Thread Richard Smith via cfe-commits
Author: rsmith Date: Wed Jul 13 19:11:03 2016 New Revision: 275350 URL: http://llvm.org/viewvc/llvm-project?rev=275350&view=rev Log: P0305R0: Semantic analysis and code generation for C++17 init-statement for 'if' and 'switch': if (stmt; condition) { ... } Patch by Anton Bikineev! Some minor

Re: [PATCH] D21834: Implementing 'If statement with Initializer'

2016-07-13 Thread Richard Smith via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. Thank you again! I've fixed some over-long lines and committed this as r275350. http://reviews.llvm.org/D21834 ___ cfe-commits mailing list cfe-c

r275351 - www/cxx_status: give more precise links to initialization order wording

2016-07-13 Thread Richard Smith via cfe-commits
Author: rsmith Date: Wed Jul 13 19:14:59 2016 New Revision: 275351 URL: http://llvm.org/viewvc/llvm-project?rev=275351&view=rev Log: www/cxx_status: give more precise links to initialization order wording Modified: cfe/trunk/www/cxx_status.html Modified: cfe/trunk/www/cxx_status.html URL: h

Re: r275417 - Diagnose taking address and reference binding of packed members

2016-07-14 Thread Richard Smith via cfe-commits
On Thu, Jul 14, 2016 at 10:15 AM, Nico Weber via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Hi, > > this fires on (at least) usrsctplib [1]: > > FAILED: obj/third_party/usrsctp/usrsctp/sctp_input.o > ../../third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_input.c:1708:15: > error: tak

Re: [PATCH] D19322: Concepts: Create space for requires-clause in TemplateParameterList; NFC

2016-07-14 Thread Richard Smith via cfe-commits
rsmith accepted this revision. This revision is now accepted and ready to land. Comment at: lib/AST/ASTImporter.cpp:2253-2254 @@ +2252,4 @@ + return nullptr; + } + else { +ToRequiresClause = nullptr; `else` on same line as `}` please. https://reviews.

Re: [PATCH] D21537: Frontend: Simplify ownership model for clang's output streams.

2016-07-14 Thread Richard Smith via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. Yeah, I think this makes sense on balance, even though it does create a weird situation for the `ASTPrinter` case, where we don't really want to transfer ownership of the stream. ===

r275481 - [modules] Don't pass interesting decls to the consumer for a module file that's

2016-07-14 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Jul 14 16:50:09 2016 New Revision: 275481 URL: http://llvm.org/viewvc/llvm-project?rev=275481&view=rev Log: [modules] Don't pass interesting decls to the consumer for a module file that's passed on the command line but never actually used. We consider a (top-level) module

r275490 - Add test inputs missed by r275481.

2016-07-14 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Jul 14 17:15:06 2016 New Revision: 275490 URL: http://llvm.org/viewvc/llvm-project?rev=275490&view=rev Log: Add test inputs missed by r275481. Added: cfe/trunk/test/Modules/Inputs/unused-global-init/ cfe/trunk/test/Modules/Inputs/unused-global-init/init.h cfe/

Re: [PATCH] D22113: C does not have inline variables

2016-07-14 Thread Richard Smith via cfe-commits
rsmith accepted this revision. rsmith added a comment. Thanks! https://reviews.llvm.org/D22113 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D22190: cppcoreguidelines-pro-bounds-constant-array-index: crash for value dependent index in c++03 mode

2016-07-14 Thread Richard Smith via cfe-commits
rsmith added a comment. It's not meaningful to ask whether a value-dependent expression is an integral constant expression. The answer is not knowable, so the function asserting doesn't seem unreasonable. Any value we returned from that function would be a lie. Repository: rL LLVM https://

Re: r275417 - Diagnose taking address and reference binding of packed members

2016-07-14 Thread Richard Smith via cfe-commits
On Thu, Jul 14, 2016 at 3:52 PM, Reid Kleckner via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Why did we upgrade the unaligned reference binding from a warning to an > error? That will make it hard to roll this change out across many codebases. > GCC has given an error on this since versi

Re: [PATCH] D18510: [cxx1z-constexpr-lambda] Make conversion function constexpr

2016-07-14 Thread Richard Smith via cfe-commits
rsmith added a comment. I don't see how this approach can work; the fact that we happened to ask the expression evaluator to evaluate an expression is not sufficient reason for us to issue this warning. For instance: auto a = []{}; void (*p)() = a; ... will ask the evaluator to evaluate th

Re: r275417 - Diagnose taking address and reference binding of packed members

2016-07-14 Thread Richard Smith via cfe-commits
It appears that GCC accepts that case. More generally, it looks like GCC suppresses the warning when the reference is a function parameter (any function, not just a copy constructor or similar). I'm not sure if that's an intentional feature or a bug, but it should be pretty easy for us to be compat

Re: r275417 - Diagnose taking address and reference binding of packed members

2016-07-14 Thread Richard Smith via cfe-commits
OK, actually, GCC is doing something a lot more clever here. Here's what seems to really be going on: Packed members are modeled somewhat like bitfield members: a packed member lvalue is a different kind of lvalue to which a reference cannot be bound (like a bitfield). An attempt to bind a const

r275612 - Push alias-declarations and alias-template declarations into scope even if

2016-07-15 Thread Richard Smith via cfe-commits
Author: rsmith Date: Fri Jul 15 15:53:25 2016 New Revision: 275612 URL: http://llvm.org/viewvc/llvm-project?rev=275612&view=rev Log: Push alias-declarations and alias-template declarations into scope even if they're redeclarations. This is necessary in order for name lookup to correctly find the m

r275624 - Revert r275481, r275490. This broke modules bootstrap.

2016-07-15 Thread Richard Smith via cfe-commits
Author: rsmith Date: Fri Jul 15 16:33:46 2016 New Revision: 275624 URL: http://llvm.org/viewvc/llvm-project?rev=275624&view=rev Log: Revert r275481, r275490. This broke modules bootstrap. Removed: cfe/trunk/test/Modules/Inputs/unused-global-init/ cfe/trunk/test/Modules/unused-global-init.

r275653 - Reimplement ExternalSemaSource delegation in terms of

2016-07-15 Thread Richard Smith via cfe-commits
Author: rsmith Date: Fri Jul 15 19:35:14 2016 New Revision: 275653 URL: http://llvm.org/viewvc/llvm-project?rev=275653&view=rev Log: Reimplement ExternalSemaSource delegation in terms of MultiplexExternalSemaSource to remove one of the places that needs updating every time the ExternalSemaSource i

r275727 - PR28589: attempt to work around MSVC rejects-valid.

2016-07-17 Thread Richard Smith via cfe-commits
Author: rsmith Date: Sun Jul 17 14:24:51 2016 New Revision: 275727 URL: http://llvm.org/viewvc/llvm-project?rev=275727&view=rev Log: PR28589: attempt to work around MSVC rejects-valid. Modified: cfe/trunk/lib/Frontend/ChainedIncludesSource.cpp Modified: cfe/trunk/lib/Frontend/ChainedIncludes

r275730 - Attempt to work around MSVC rejects-valid, round 2.

2016-07-17 Thread Richard Smith via cfe-commits
Author: rsmith Date: Sun Jul 17 15:00:59 2016 New Revision: 275730 URL: http://llvm.org/viewvc/llvm-project?rev=275730&view=rev Log: Attempt to work around MSVC rejects-valid, round 2. Modified: cfe/trunk/lib/Frontend/ChainedIncludesSource.cpp Modified: cfe/trunk/lib/Frontend/ChainedIncludes

Re: r275653 - Reimplement ExternalSemaSource delegation in terms of

2016-07-17 Thread Richard Smith via cfe-commits
uilders/clang-x86-win2008-selfhost/builds/9110 > > On Fri, Jul 15, 2016 at 5:35 PM, Richard Smith via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > >> Author: rsmith >> Date: Fri Jul 15 19:35:14 2016 >> New Revision: 275653 >> >> URL: http:

Re: [PATCH] D16465: [MS ABI] Prevent some expressions from evaluating to a constant

2016-02-26 Thread Richard Smith via cfe-commits
rsmith added a comment. We stand no hope of being bug-for-bug compatible with MSVC's constant expression evaluator -- we should assume there will be expressions that we evaluate as a constant and they do not, and vice versa. For reference, we have the same problem between code built by Clang an

r262105 - Fix bug in using shadow decl checking: a using shadow decl should not conflict

2016-02-26 Thread Richard Smith via cfe-commits
Author: rsmith Date: Fri Feb 26 20:36:43 2016 New Revision: 262105 URL: http://llvm.org/viewvc/llvm-project?rev=262105&view=rev Log: Fix bug in using shadow decl checking: a using shadow decl should not conflict with a prior UsingDecl -- those should not even really be found by the lookup here, ex

Re: Add hasInClassInitializer matcher

2016-03-02 Thread Richard Smith via cfe-commits
On Wed, Mar 2, 2016 at 12:06 PM, Aaron Ballman via cfe-commits wrote: > On Wed, Mar 2, 2016 at 2:01 PM, Julian Bangert via cfe-commits > wrote: >> This adds a matcher for C++ in Class initializers. >> >> --- >> include/clang/ASTMatchers/ASTMatchers.h | 14 ++ >> unittests/ASTMatche

Re: [PATCH] D11182: [OPENMP 4.0] Initial support for 'omp declare reduction' construct.

2016-03-02 Thread Richard Smith via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. Sorry for the delay, LGTM Comment at: lib/Sema/SemaExpr.cpp:377 @@ +376,3 @@ + auto *DRD = dyn_cast(CurContext); + if ((LangOpts.OpenMP != 0u) && (DRD != nullptr) && +

Re: r261372 - [modules] Flatten -fmodule-name= and -fmodule-implementation-of= into a single

2016-03-03 Thread Richard Smith via cfe-commits
On 3 Mar 2016 3:18 a.m., "Argyrios Kyrtzidis via cfe-commits" < cfe-commits@lists.llvm.org> wrote: > > Mind if we keep -fmodule-implementation-of as an alias so that we can gradually transition to -fmodule-name ? Sure, no problem. > > On Feb 19, 2016, at 2:25 PM, R

Re: [PATCH] D15120: Add support for __float128 type to be used by targets that support it

2016-03-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 Comment at: lib/Sema/SemaOverload.cpp:1966-1967 @@ -1955,4 +1965,4 @@ // C99 6.3.1.5p1: // When a float is promoted to double or long double, or a

r262743 - Update cxx_status with likely new features from Jacksonville WG21 meeting.

2016-03-04 Thread Richard Smith via cfe-commits
Author: rsmith Date: Fri Mar 4 15:01:14 2016 New Revision: 262743 URL: http://llvm.org/viewvc/llvm-project?rev=262743&view=rev Log: Update cxx_status with likely new features from Jacksonville WG21 meeting. Modified: cfe/trunk/www/cxx_status.html Modified: cfe/trunk/www/cxx_status.html URL:

cfe-commits@lists.llvm.org

2016-03-04 Thread Richard Smith via cfe-commits
Author: rsmith Date: Fri Mar 4 15:27:21 2016 New Revision: 262747 URL: http://llvm.org/viewvc/llvm-project?rev=262747&view=rev Log: Implement P0036R0: remove support for empty unary folds of +, *, |, &. Modified: cfe/trunk/lib/Sema/SemaTemplateVariadic.cpp cfe/trunk/test/SemaTemplate/cxx

r262753 - Update diagnostics now that hexadecimal literals look likely to be part of C++17.

2016-03-04 Thread Richard Smith via cfe-commits
Author: rsmith Date: Fri Mar 4 16:32:06 2016 New Revision: 262753 URL: http://llvm.org/viewvc/llvm-project?rev=262753&view=rev Log: Update diagnostics now that hexadecimal literals look likely to be part of C++17. Modified: cfe/trunk/include/clang/Basic/DiagnosticLexKinds.td cfe/trunk/i

Re: [PATCH] D14905: [constexpr-lambda] Support parsing of constexpr specifier (and its inference) on lambda expressions

2016-03-04 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: include/clang/Basic/DiagnosticParseKinds.td:772 @@ +771,3 @@ +def warn_cxx14_compat_constexpr_on_lambda : Warning< + "constexpr on lambda expressions are incompatible with C++14">, + InGroup, DefaultIgnore; are -> is ==

r262881 - P0188R1: add support for standard [[fallthrough]] attribute. This is almost

2016-03-07 Thread Richard Smith via cfe-commits
Author: rsmith Date: Mon Mar 7 18:32:55 2016 New Revision: 262881 URL: http://llvm.org/viewvc/llvm-project?rev=262881&view=rev Log: P0188R1: add support for standard [[fallthrough]] attribute. This is almost exactly the same as clang's existing [[clang::fallthrough]] attribute, which has been upd

r262882 - Add accidentally forgotten testcase from r262881.

2016-03-07 Thread Richard Smith via cfe-commits
Author: rsmith Date: Mon Mar 7 18:34:49 2016 New Revision: 262882 URL: http://llvm.org/viewvc/llvm-project?rev=262882&view=rev Log: Add accidentally forgotten testcase from r262881. Added: cfe/trunk/test/CXX/dcl.dcl/dcl.attr/dcl.attr.fallthrough/ cfe/trunk/test/CXX/dcl.dcl/dcl.attr/dcl.a

r262887 - Define __has_cpp_attribute(fallthrough) to a more reasonable value. (What year is it?!)

2016-03-07 Thread Richard Smith via cfe-commits
Author: rsmith Date: Mon Mar 7 18:40:32 2016 New Revision: 262887 URL: http://llvm.org/viewvc/llvm-project?rev=262887&view=rev Log: Define __has_cpp_attribute(fallthrough) to a more reasonable value. (What year is it?!) Modified: cfe/trunk/include/clang/Basic/Attr.td cfe/trunk/test/Prep

r262888 - Move [[nodiscard]] tests into test/CXX tree.

2016-03-07 Thread Richard Smith via cfe-commits
Author: rsmith Date: Mon Mar 7 18:44:49 2016 New Revision: 262888 URL: http://llvm.org/viewvc/llvm-project?rev=262888&view=rev Log: Move [[nodiscard]] tests into test/CXX tree. Added: cfe/trunk/test/CXX/dcl.dcl/dcl.attr/dcl.attr.nodiscard/ cfe/trunk/test/CXX/dcl.dcl/dcl.attr/dcl.attr.nod

r262889 - Use class="svn" for features with SVN status.

2016-03-07 Thread Richard Smith via cfe-commits
Author: rsmith Date: Mon Mar 7 18:45:37 2016 New Revision: 262889 URL: http://llvm.org/viewvc/llvm-project?rev=262889&view=rev Log: Use class="svn" for features with SVN status. Modified: cfe/trunk/www/cxx_status.html Modified: cfe/trunk/www/cxx_status.html URL: http://llvm.org/viewvc/llvm

Re: r262881 - P0188R1: add support for standard [[fallthrough]] attribute. This is almost

2016-03-08 Thread Richard Smith via cfe-commits
there for debug builds. I suppose this means projects now need an > UNREACHED_CASE macro that expands to assert(false) in debug and to > fallthrough in release (with clang; and to something else with other > compilers)? > > On Mon, Mar 7, 2016 at 7:32 PM, Richard Smith via cfe-commits

Re: r262881 - P0188R1: add support for standard [[fallthrough]] attribute. This is almost

2016-03-08 Thread Richard Smith via cfe-commits
projects now need an >> > UNREACHED_CASE macro that expands to assert(false) in debug and to >> > fallthrough in release (with clang; and to something else with other >> > compilers)? >> > >> > On Mon, Mar 7, 2016 at 7:32 PM, Richard Smith via cfe-commits

r262963 - P0017R1: In C++1z, an aggregate class can have (public non-virtual) base classes; these are initialized as if they were data members.

2016-03-08 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Mar 8 16:17:41 2016 New Revision: 262963 URL: http://llvm.org/viewvc/llvm-project?rev=262963&view=rev Log: P0017R1: In C++1z, an aggregate class can have (public non-virtual) base classes; these are initialized as if they were data members. Added: cfe/trunk/test/CXX

r262965 - Fix -Werror build.

2016-03-08 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Mar 8 17:16:16 2016 New Revision: 262965 URL: http://llvm.org/viewvc/llvm-project?rev=262965&view=rev Log: Fix -Werror build. Modified: cfe/trunk/lib/CodeGen/CGExprAgg.cpp Modified: cfe/trunk/lib/CodeGen/CGExprAgg.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/tr

r262966 - Fix crash in access check for aggregate initialization of base classes. It's

2016-03-08 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Mar 8 17:17:35 2016 New Revision: 262966 URL: http://llvm.org/viewvc/llvm-project?rev=262966&view=rev Log: Fix crash in access check for aggregate initialization of base classes. It's not obvious how to access-check these, so pick a conservative rule until we get feedback

r262971 - Readd testcase accidentally removed in r262888.

2016-03-08 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Mar 8 18:12:38 2016 New Revision: 262971 URL: http://llvm.org/viewvc/llvm-project?rev=262971&view=rev Log: Readd testcase accidentally removed in r262888. Modified: cfe/trunk/test/CXX/dcl.dcl/dcl.attr/dcl.attr.nodiscard/p1.cpp Modified: cfe/trunk/test/CXX/dcl.dcl/dc

Re: [PATCH] D17993: [CodeGen] Apply 'nonnull' to 'this' pointer arguments.

2016-03-09 Thread Richard Smith via cfe-commits
rsmith added a comment. `-f(no-)strict-nonnull-this` maybe? http://reviews.llvm.org/D17993 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r263155 - Add test for r263138.

2016-03-10 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Mar 10 13:22:21 2016 New Revision: 263155 URL: http://llvm.org/viewvc/llvm-project?rev=263155&view=rev Log: Add test for r263138. Added: cfe/trunk/test/SemaCXX/switch-implicit-fallthrough-off-by-default.cpp Added: cfe/trunk/test/SemaCXX/switch-implicit-fallthrough-of

Re: r262881 - P0188R1: add support for standard [[fallthrough]] attribute. This is almost

2016-03-10 Thread Richard Smith via cfe-commits
ng enabled?" and the warning >>>> group contains multiple diagnostics, we don't check them all... >>>> >>>> There's an easy fix for clang: warn_fallthrough_attr_unreachable >>>> should be marked DefaultIgnore. >>> &

Re: r263429 - [Frontend] Disable value name discarding for all sanitizers.

2016-03-14 Thread Richard Smith via cfe-commits
On 14 Mar 2016 6:28 a.m., "Benjamin Kramer via cfe-commits" < cfe-commits@lists.llvm.org> wrote: > > Author: d0k > Date: Mon Mar 14 08:23:58 2016 > New Revision: 263429 > > URL: http://llvm.org/viewvc/llvm-project?rev=263429&view=rev > Log: > [Frontend] Disable value name discarding for all sanitiz

r263449 - [modules] Don't diagnose non-modular includes from modular files that are

2016-03-14 Thread Richard Smith via cfe-commits
Author: rsmith Date: Mon Mar 14 12:52:37 2016 New Revision: 263449 URL: http://llvm.org/viewvc/llvm-project?rev=263449&view=rev Log: [modules] Don't diagnose non-modular includes from modular files that are implementation units of modules rather than interface units. Added: cfe/trunk/test/Mod

Re: r261372 - [modules] Flatten -fmodule-name= and -fmodule-implementation-of= into a single

2016-03-14 Thread Richard Smith via cfe-commits
module] > #import "blah.h" > ^ > 1 error generated. > > > > On Mar 3, 2016, at 5:28 AM, Richard Smith via cfe-commits > wrote: > > On 3 Mar 2016 3:18 a.m., "Argyrios Kyrtzidis via cfe-commits" > wrote: >> >> Mind if we keep

Re: [PATCH] D18095: Add __attribute__((linkonce_odr_linkage))

2016-03-14 Thread Richard Smith via cfe-commits
On Mon, Mar 14, 2016 at 10:45 AM, Yaxun Liu via cfe-commits wrote: > yaxunl added a comment. > > Thanks for your comments. > > It works like this, e.g. > > $ cat prog.ll > declare i32 @foo() > > define void @use_foo() { > > %a = call i32 @foo() > ret void > > } > > $ cat lib_common.ll > define

Re: [PATCH] D18139: [Cxx1z] Implement Lambda Capture of *this by Value as [=, *this] (P0018R3)

2016-03-14 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: include/clang/AST/LambdaCapture.h:41 @@ -41,3 +40,3 @@ SourceLocation EllipsisLoc; - + bool IsStarThis : 1; friend class ASTStmtReader; I'm not a fan of this representation. Please use `Capture_ByCopy` to indicate a

Re: [modules] PR24954

2016-03-15 Thread Richard Smith via cfe-commits
02/02/16 02:52, Richard Smith via cfe-commits wrote: >>> >>> On Thu, Jan 28, 2016 at 8:23 AM, Vassil Vassilev >>> wrote: >>>> >>>> Would this patch be more reasonable? It follows what >>>> RegisterTemplateSpecialization (introduced in r

Re: [PATCH] D12147: Fix typos in lib/AST

2016-03-18 Thread Richard Smith via cfe-commits
rsmith added a comment. All the changes other than 'modelled' look fine :) Do you need someone to commit this for you? Comment at: lib/AST/ASTContext.cpp:1631 @@ -1630,3 +1630,3 @@ case BuiltinType::OCLSampler: - // Samplers are modeled as integers. + // Samplers

Re: [PATCH] D17407: [Sema] PR25755 Fix crash when initializing out-of-order struct references

2016-03-18 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: lib/Sema/SemaInit.cpp:1732 @@ +1731,3 @@ + unsigned FieldIdx = 0; + std::vector SeenFields; + RecordDecl::field_iterator FieldStart = Field; Please use an `llvm::BitVector` here instead. Comment at: li

Re: [PATCH] D16579: Warn if friend function depends on template parameters.

2016-03-18 Thread Richard Smith via cfe-commits
rsmith added a subscriber: rsmith. rsmith added a comment. It seems useful to warn on this, but I'm concerned that there are valid code patterns that this will warn about where there is no reasonable way to rewrite the code that would suppress the warning. For instance: template class X {

Re: [PATCH] D17552: Pass -backend-option to LLVM when there is no target machine

2016-03-19 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/D17552 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co

Re: [PATCH] D18199: CodeGen: Implement IR generation for the relative vtable ABI (PR26723).

2016-03-19 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: lib/CodeGen/CGDebugInfo.cpp:1153 @@ -1152,3 +1152,3 @@ unsigned Virtuality = 0; - unsigned VIndex = 0; + unsigned VIndex = -1u; Is this what debug info consumers expect for the non-virtual case? http://reviews.llv

Re: [PATCH] D13704: [Fix] Allow implicit conversions of the address of overloadable functions in C + docs update

2016-03-19 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: lib/Sema/SemaOverload.cpp:10419 @@ -10418,3 +10429,1 @@ - ResultTy) || - (!S.getLangOpts().CPlusPlus && TargetType->isVoidPointerType())) { Matches.push_back(std::make_pair( ---

Re: [PATCH] D17451: PR26448: [Sema] Fix determined type of ternary operator acting on two xvalue class types

2016-03-19 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! Comment at: lib/Sema/SemaExprCXX.cpp:4698 @@ +4697,3 @@ + // constraint that in the conversion the reference must bind directly to + // E1. + // -

Re: [PATCH] D18139: [Cxx1z] Implement Lambda Capture of *this by Value as [=, *this] (P0018R3)

2016-03-19 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! Comment at: include/clang/AST/LambdaCapture.h:48 @@ +47,3 @@ + // by value or reference. + // - or, points to the VLASentinel if this represents a by VLA cap

Re: [PATCH] D17893: Sema: Add semantic analysis for the C++ ABI stability attributes and whitelist.

2016-03-19 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: include/clang/Basic/DiagnosticSemaKinds.td:8380 @@ +8379,3 @@ +def warn_unused_abi_stability_attr : Warning< + "unused C++ ABI stability attribute on non-dynamic class">, + InGroup>; How valuable is it to warn on this? I

Re: [PATCH] D18035: [GCC] PR23529 Mangler part of attrbute abi_tag support

2016-03-19 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: lib/AST/ItaniumMangle.cpp:272-299 @@ -265,1 +271,30 @@ + // abi_tag is a gcc attribute, taking one or more strings called "tags". + // + // The goal is to annotate against which version of a library an object was + // build and to be

Re: [PATCH] D14905: [constexpr-lambda] Support parsing of constexpr specifier (and its inference) on lambda expressions

2016-03-19 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: lib/AST/ExprConstant.cpp:2050 @@ +2049,3 @@ +if (!Result && isLambdaCallOperator(Frame->Callee) && +VD->getDeclContext() != Frame->Callee) { + // Assume variables referenced within a lambda's call operator that were --

Re: [PATCH] D17407: [Sema] PR25755 Fix crash when initializing out-of-order struct references

2016-03-19 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: lib/Sema/SemaInit.cpp:1815-1816 @@ -1814,1 +1814,4 @@ // worthwhile to skip over the rest of the initializer, though. + unsigned FieldIdx = 0; + unsigned MaxFieldIdx = 0; + llvm::BitVector SeenFields; You don't need

Re: [PATCH] D15591: [Bugfix] Make type deduction work more nicely with unaddressable functions

2016-03-19 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/D15591 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co

Re: [PATCH] D17299: [ASTReader] Report error when accessing corrupt record data

2016-03-19 Thread Richard Smith via cfe-commits
rsmith added a comment. Have you done any performance testing on this code? In modules-heavy builds, bitcode reading is *very* hot. http://reviews.llvm.org/D17299 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin

Re: [PATCH] D17746: Fix PR26741 -- __builtin_object_size is not consistently conservative with C++ inheritance

2016-03-19 Thread Richard Smith via cfe-commits
rsmith added a comment. Can you explain a bit more about the problem? It seems to me that if I have: struct Base { char k[1]; }; struct Derived : Base {}; ... then the 'k' subobject of a `Derived` object is known to be exactly 1 byte long -- it doesn't seem obviously appropriate for o

Re: [PATCH] D17392: Embed bitcode in object file (clang cc1 part)

2016-03-19 Thread Richard Smith via cfe-commits
rsmith added a comment. From a code standpoint, this looks fine to me, but I'd like to understand a bit more about what you aim to achieve with the various parts here. Comment at: include/clang/Frontend/CodeGenOptions.def:57 @@ -56,1 +56,3 @@ +CODEGENOPT(EmbedBitcode , 1,

Re: [PATCH] D18139: [Cxx1z] Implement Lambda Capture of *this by Value as [=, *this] (P0018R3)

2016-03-19 Thread Richard Smith via cfe-commits
rsmith added a comment. Couple more things: 1. Please add some testing to tests/CXX/expr/expr.prim/expr.prim.lambda 2. Please update cxx_status.html http://reviews.llvm.org/D18139 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists

<    31   32   33   34   35   36   37   38   39   40   >