Re: r322813 - Fix Scope::dump()

2018-01-19 Thread Richard Smith via cfe-commits
Sounds like a good idea to me. On 19 Jan 2018 15:23, "Richard Trieu via cfe-commits" < cfe-commits@lists.llvm.org> wrote: > Hans, > > I recommend merging this revision into the release. It fixes an infinite > loop in Scope::dump() > > Richard > > On Wed, Jan 17, 2018 at 8:28 PM, Richard Trieu vi

r323935 - PR36181: Teach CodeGen to properly ignore requests to emit dependent entities.

2018-01-31 Thread Richard Smith via cfe-commits
Author: rsmith Date: Wed Jan 31 16:28:36 2018 New Revision: 323935 URL: http://llvm.org/viewvc/llvm-project?rev=323935&view=rev Log: PR36181: Teach CodeGen to properly ignore requests to emit dependent entities. Previously, friend function definitions within class templates slipped through the ga

Re: r323935 - PR36181: Teach CodeGen to properly ignore requests to emit dependent entities.

2018-01-31 Thread Richard Smith via cfe-commits
.org/show_bug.cgi?id=35473, and > https://bugs.llvm.org/show_bug.cgi?id=35939. > I'd be OK with that once it's had a few days to work its way through various automated build systems. > > *From: *cfe-commits on behalf of > Richard Smith via cfe-commits > *Reply-To:

r323998 - PR36157: When injecting an implicit function declaration in C89, find the right

2018-02-01 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Feb 1 12:01:49 2018 New Revision: 323998 URL: http://llvm.org/viewvc/llvm-project?rev=323998&view=rev Log: PR36157: When injecting an implicit function declaration in C89, find the right DeclContext rather than injecting it wherever we happen to be. This avoids creating

[libcxx] r324020 - Make std::get_temporary_buffer respect overaligned types when possible

2018-02-01 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Feb 1 14:24:45 2018 New Revision: 324020 URL: http://llvm.org/viewvc/llvm-project?rev=324020&view=rev Log: Make std::get_temporary_buffer respect overaligned types when possible Patch by Chris Kennelly! Differential Revision: https://reviews.llvm.org/D41746 Added:

[libcxx] r324033 - Disable test in C++<11 mode due to use of alignas.

2018-02-01 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Feb 1 15:31:22 2018 New Revision: 324033 URL: http://llvm.org/viewvc/llvm-project?rev=324033&view=rev Log: Disable test in C++<11 mode due to use of alignas. Modified: libcxx/trunk/test/std/utilities/memory/temporary.buffer/overaligned.pass.cpp Modified: libcxx/tru

r324151 - Add missing direct-init / parameter-declaration-clause disambiguation when

2018-02-02 Thread Richard Smith via cfe-commits
Author: rsmith Date: Fri Feb 2 14:24:54 2018 New Revision: 324151 URL: http://llvm.org/viewvc/llvm-project?rev=324151&view=rev Log: Add missing direct-init / parameter-declaration-clause disambiguation when parsing a trailing-return-type of a (function pointer) variable declaration. Modified:

r324160 - Fix crash when trying to pack-expand a GNU statement expression.

2018-02-02 Thread Richard Smith via cfe-commits
Author: rsmith Date: Fri Feb 2 16:44:57 2018 New Revision: 324160 URL: http://llvm.org/viewvc/llvm-project?rev=324160&view=rev Log: Fix crash when trying to pack-expand a GNU statement expression. We could in principle support such pack expansion, using techniques similar to what we do for pack

r294700 - [c++1z] In class template argument deduction, all declarators must deduce the same type (just like with auto deduction).

2017-02-09 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Feb 9 21:27:13 2017 New Revision: 294700 URL: http://llvm.org/viewvc/llvm-project?rev=294700&view=rev Log: [c++1z] In class template argument deduction, all declarators must deduce the same type (just like with auto deduction). Added: cfe/trunk/test/CXX/dcl.dcl/dcl.

r294773 - [c++1z] Disallow deduction guides with deduced types that don't syntactically match the template being deduced.

2017-02-10 Thread Richard Smith via cfe-commits
Author: rsmith Date: Fri Feb 10 13:49:50 2017 New Revision: 294773 URL: http://llvm.org/viewvc/llvm-project?rev=294773&view=rev Log: [c++1z] Disallow deduction guides with deduced types that don't syntactically match the template being deduced. Modified: cfe/trunk/include/clang/Basic/Diagnos

r294778 - [c++1z] Enforce restriction that deduction guide is declared in the same scope as its template.

2017-02-10 Thread Richard Smith via cfe-commits
Author: rsmith Date: Fri Feb 10 14:39:58 2017 New Revision: 294778 URL: http://llvm.org/viewvc/llvm-project?rev=294778&view=rev Log: [c++1z] Enforce restriction that deduction guide is declared in the same scope as its template. Modified: cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td

r294785 - [c++1z] Require an initializer for deduced class template specialization types.

2017-02-10 Thread Richard Smith via cfe-commits
Author: rsmith Date: Fri Feb 10 15:40:29 2017 New Revision: 294785 URL: http://llvm.org/viewvc/llvm-project?rev=294785&view=rev Log: [c++1z] Require an initializer for deduced class template specialization types. It's actually meaningful and useful to allow such variables to have no initializer,

r294796 - [c++1z] Diagnose attempts to use variables with deduced class template

2017-02-10 Thread Richard Smith via cfe-commits
Author: rsmith Date: Fri Feb 10 16:35:37 2017 New Revision: 294796 URL: http://llvm.org/viewvc/llvm-project?rev=294796&view=rev Log: [c++1z] Diagnose attempts to use variables with deduced class template specialization types from within their own initializers. Added: cfe/trunk/test/CXX/dcl.dc

r294802 - [c++1z] Tests for class template argument deduction in dependent contexts.

2017-02-10 Thread Richard Smith via cfe-commits
Author: rsmith Date: Fri Feb 10 17:10:17 2017 New Revision: 294802 URL: http://llvm.org/viewvc/llvm-project?rev=294802&view=rev Log: [c++1z] Tests for class template argument deduction in dependent contexts. Modified: cfe/trunk/test/SemaCXX/cxx1z-class-template-argument-deduction.cpp Modifie

r295007 - [c++1z] Synthesize implicit deduction guides from constructors on demand. Rank

2017-02-13 Thread Richard Smith via cfe-commits
Author: rsmith Date: Mon Feb 13 18:25:28 2017 New Revision: 295007 URL: http://llvm.org/viewvc/llvm-project?rev=295007&view=rev Log: [c++1z] Synthesize implicit deduction guides from constructors on demand. Rank such guides below explicit ones, and ensure that references to the class's template pa

r295011 - [c++1z] Add some more tests for class template argument deduction, add

2017-02-13 Thread Richard Smith via cfe-commits
Author: rsmith Date: Mon Feb 13 18:55:25 2017 New Revision: 295011 URL: http://llvm.org/viewvc/llvm-project?rev=295011&view=rev Log: [c++1z] Add some more tests for class template argument deduction, add feature-test macro, and mark feature as done on status page. Modified: cfe/trunk/lib/Fron

r295016 - Canonicalize implicit deduction guide parameter types when forming a deduction

2017-02-13 Thread Richard Smith via cfe-commits
Author: rsmith Date: Mon Feb 13 19:49:59 2017 New Revision: 295016 URL: http://llvm.org/viewvc/llvm-project?rev=295016&view=rev Log: Canonicalize implicit deduction guide parameter types when forming a deduction guide from a constructor. The purpose of this change is to avoid triggering instantia

r295113 - [Driver] Report available language standards on user error

2017-02-14 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Feb 14 16:44:20 2017 New Revision: 295113 URL: http://llvm.org/viewvc/llvm-project?rev=295113&view=rev Log: [Driver] Report available language standards on user error In case user did not provide valid standard name for -std option, available values (with short descriptio

r295118 - Do not implicitly instantiate the definition of a class template specialization

2017-02-14 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Feb 14 17:27:44 2017 New Revision: 295118 URL: http://llvm.org/viewvc/llvm-project?rev=295118&view=rev Log: Do not implicitly instantiate the definition of a class template specialization that has been explicitly specialized! We assume in various places that we can tell t

r295122 - Stop asserting when a meaningless -std= flag is passed for a non-compilation

2017-02-14 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Feb 14 17:41:38 2017 New Revision: 295122 URL: http://llvm.org/viewvc/llvm-project?rev=295122&view=rev Log: Stop asserting when a meaningless -std= flag is passed for a non-compilation input kind; go back to silently ignoring the flag. Added: cfe/trunk/test/Driver/unk

r295139 - Refactor GCC lib directory detection to make it easier to add lib directories

2017-02-14 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Feb 14 19:13:54 2017 New Revision: 295139 URL: http://llvm.org/viewvc/llvm-project?rev=295139&view=rev Log: Refactor GCC lib directory detection to make it easier to add lib directories that are only checked for some targets. Modified: cfe/trunk/lib/Driver/ToolChains.

r295140 - Don't look for GCC versions in /usr/lib/ except when is a

2017-02-14 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Feb 14 19:16:48 2017 New Revision: 295140 URL: http://llvm.org/viewvc/llvm-project?rev=295140&view=rev Log: Don't look for GCC versions in /usr/lib/ except when is a freescale triple. On multiarch systems, this previously caused us to stat every file in /usr/lib/ (typica

Re: [cfe-commits] r164177 - in /cfe/trunk: lib/Driver/ test/Driver/ test/Driver/Inputs/freescale_ppc_tree/ test/Driver/Inputs/freescale_ppc_tree/lib/ test/Driver/Inputs/freescale_ppc_tree/usr/ test/Dr

2017-02-14 Thread Richard Smith via cfe-commits
On 9 February 2017 at 16:15, Hal Finkel via cfe-commits < cfe-commits@lists.llvm.org> wrote: > On 02/09/2017 04:58 PM, Chandler Carruth wrote: > > On Thu, Feb 9, 2017 at 2:46 PM Tobias von Koch > wrote: > >> On Wed, Feb 8, 2017 at 7:21 PM, Chandler Carruth >> wrote: >> >> >> +// The Freescal

r295146 - Speculatively revert r295118 to see if it's what's causing the modules selfhost buildbots to fail.

2017-02-14 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Feb 14 21:29:24 2017 New Revision: 295146 URL: http://llvm.org/viewvc/llvm-project?rev=295146&view=rev Log: Speculatively revert r295118 to see if it's what's causing the modules selfhost buildbots to fail. Modified: cfe/trunk/lib/AST/Type.cpp cfe/trunk/test/Sema

Re: r291955 - PR31606: Generalize our tentative DR resolution for inheriting copy/move

2017-02-14 Thread Richard Smith via cfe-commits
urceLocation()s in Sema::LookupSpecialMember. > The patch I have now just checks whether PointOfInstantiation.isValid() > returns true before calling Spec->setPointOfInstantiation at > SemaTemplateInstantiate.cpp:1938. > > On Jan 13, 2017, at 12:46 PM, Richard Smith via cfe-c

r295149 - Fix assertion failure due to implicit special member lookup lacking a source location.

2017-02-14 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Feb 14 22:18:23 2017 New Revision: 295149 URL: http://llvm.org/viewvc/llvm-project?rev=295149&view=rev Log: Fix assertion failure due to implicit special member lookup lacking a source location. Modified: cfe/trunk/lib/Sema/SemaLookup.cpp cfe/trunk/test/SemaCXX/c

Re: r291955 - PR31606: Generalize our tentative DR resolution for inheriting copy/move

2017-02-14 Thread Richard Smith via cfe-commits
On 14 February 2017 at 19:48, Richard Smith wrote: > On 14 February 2017 at 18:14, Akira Hatanaka wrote: > >> Hi Richard, >> >> It looks like this commit causes an assertion failure when the following >> code is compiled: >> >> $ cat test1.cpp >&

r295224 - PR24440: Do not silently discard a fold-expression appearing as the operand of a cast-expression.

2017-02-15 Thread Richard Smith via cfe-commits
Author: rsmith Date: Wed Feb 15 13:57:10 2017 New Revision: 295224 URL: http://llvm.org/viewvc/llvm-project?rev=295224&view=rev Log: PR24440: Do not silently discard a fold-expression appearing as the operand of a cast-expression. Modified: cfe/trunk/lib/Parse/ParseExpr.cpp cfe/trunk/lib

Re: r295149 - Fix assertion failure due to implicit special member lookup lacking a source location.

2017-02-15 Thread Richard Smith via cfe-commits
On 15 February 2017 at 11:39, Hans Wennborg wrote: > IIUC, this is a follow-up to r291955, which was merged to 4.0. Should > this one be merged also? > Yes, please. > Cheers, > Hans > > On Tue, Feb 14, 2017 at 8:18 PM, Richard Smith via cfe-commits > wrote: > >

Re: r295224 - PR24440: Do not silently discard a fold-expression appearing as the operand of a cast-expression.

2017-02-15 Thread Richard Smith via cfe-commits
Hans, this would be a good candidate for Clang 4. The bug in question is not a regression, but it is an accepts-invalid / wrong-code bug. On 15 February 2017 at 11:57, Richard Smith via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: rsmith > Date: Wed Feb 15 13:57:1

Re: r295150 - [Sema] Disallow returning a __block variable via a move.

2017-02-15 Thread Richard Smith via cfe-commits
On 15 February 2017 at 11:50, Hans Wennborg wrote: > +Richard for risk/reward analysis. > This is an extremely safe change, and fixes what amounts to a subtle miscompile. I think we should take it. > r274291 was also in 3.9, so this isn't strictly speaking a regression. > > On Wed, Feb 15, 201

Re: r291905 - [Sema] Add warning for unused lambda captures

2017-02-15 Thread Richard Smith via cfe-commits
https://bugs.llvm.org/show_bug.cgi?id=31977 makes the good point that this is warning on a certain idiomatic use of capture-by-value to extend the lifetime of an RAII object; consider: shared_ptr p = /*...*/; int *q = &p->n; return [=, p] { return *q++; } Here, we'll warn that the capture o

r295264 - [c++1z] Diagnose non-deducible template parameters in deduction guide templates, per [temp.param]p11.

2017-02-15 Thread Richard Smith via cfe-commits
Author: rsmith Date: Wed Feb 15 18:36:47 2017 New Revision: 295264 URL: http://llvm.org/viewvc/llvm-project?rev=295264&view=rev Log: [c++1z] Diagnose non-deducible template parameters in deduction guide templates, per [temp.param]p11. Modified: cfe/trunk/include/clang/Basic/DiagnosticSemaKin

Re: r295252 - [Modules] Consider enable_if attrs in isSameEntity.

2017-02-15 Thread Richard Smith via cfe-commits
On 15 February 2017 at 14:43, George Burgess IV via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: gbiv > Date: Wed Feb 15 16:43:27 2017 > New Revision: 295252 > > URL: http://llvm.org/viewvc/llvm-project?rev=295252&view=rev > Log: > [Modules] Consider enable_if attrs in isSameEntity.

Re: r295252 - [Modules] Consider enable_if attrs in isSameEntity.

2017-02-15 Thread Richard Smith via cfe-commits
or instance, merging default arguments for function parameters may require us to have already merged the function itself into its redeclaration chain (we don't currently model that quite correctly, so we probably won't hit it today). > On Wed, Feb 15, 2017 at 4:55 PM, Richard Smith &

Re: [PATCH] D30009: Add support for '#pragma clang attribute'

2017-02-15 Thread Richard Smith via cfe-commits
On 15 February 2017 at 17:45, Hal Finkel via Phabricator via cfe-commits < cfe-commits@lists.llvm.org> wrote: > hfinkel added a comment. > > I don't understand why it only supports some attributes. Is there some > handling that needs to take place (I don't see anything obvious in this > patch)? If

r295277 - Add missing "deduced A == A" check for function template partial ordering.

2017-02-15 Thread Richard Smith via cfe-commits
Author: rsmith Date: Wed Feb 15 21:49:44 2017 New Revision: 295277 URL: http://llvm.org/viewvc/llvm-project?rev=295277&view=rev Log: Add missing "deduced A == A" check for function template partial ordering. This appears to be the only template argument deduction context where we were missing thi

Re: r295279 - [cxx1z-constexpr-lambda] Implement captures - thus completing implementation of constexpr lambdas.

2017-02-15 Thread Richard Smith via cfe-commits
FieldDecl LValue (an Lvalue-to-Rvalue conversion on this > LValue representation then determines the right rvalue when needed). > > Thanks to Richard Smith and Hubert Tong for their review and feedback! > Awesome, thanks Faisal! Want to bump our value for __cpp_constexpr to 201603 in

r295281 - Revert r295277 to fix buildbot.

2017-02-15 Thread Richard Smith via cfe-commits
Author: rsmith Date: Wed Feb 15 22:22:56 2017 New Revision: 295281 URL: http://llvm.org/viewvc/llvm-project?rev=295281&view=rev Log: Revert r295277 to fix buildbot. Modified: cfe/trunk/include/clang/Basic/Diagnostic.h cfe/trunk/include/clang/Sema/Sema.h cfe/trunk/lib/Sema/SemaTemplate

r295379 - Properly set up the DeclContext for parameters of implicit deduction guides;

2017-02-16 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Feb 16 15:29:21 2017 New Revision: 295379 URL: http://llvm.org/viewvc/llvm-project?rev=295379&view=rev Log: Properly set up the DeclContext for parameters of implicit deduction guides; this is needed for deferred instantiation of default arguments. Modified: cfe/trunk

r295491 - Add an explicit derived class of FunctionDecl to model deduction guides rather

2017-02-17 Thread Richard Smith via cfe-commits
Author: rsmith Date: Fri Feb 17 14:05:37 2017 New Revision: 295491 URL: http://llvm.org/viewvc/llvm-project?rev=295491&view=rev Log: Add an explicit derived class of FunctionDecl to model deduction guides rather than just treating them as FunctionDecls with a funny name. No functionality change i

r295517 - [modules] Load the ModuleOffsetMap from the module header lazily.

2017-02-17 Thread Richard Smith via cfe-commits
Author: rsmith Date: Fri Feb 17 18:32:02 2017 New Revision: 295517 URL: http://llvm.org/viewvc/llvm-project?rev=295517&view=rev Log: [modules] Load the ModuleOffsetMap from the module header lazily. If we never need to map any ID within the module to its global ID, we don't need the module offset

r295521 - Handle deduction guides better in -ast-print.

2017-02-17 Thread Richard Smith via cfe-commits
Author: rsmith Date: Fri Feb 17 19:01:48 2017 New Revision: 295521 URL: http://llvm.org/viewvc/llvm-project?rev=295521&view=rev Log: Handle deduction guides better in -ast-print. Modified: cfe/trunk/lib/AST/DeclPrinter.cpp cfe/trunk/test/Misc/ast-dump-templates.cpp Modified: cfe/trunk/li

r295524 - Cleanup: use range-based for rather than separate calls to begin and end.

2017-02-17 Thread Richard Smith via cfe-commits
Author: rsmith Date: Fri Feb 17 19:14:43 2017 New Revision: 295524 URL: http://llvm.org/viewvc/llvm-project?rev=295524&view=rev Log: Cleanup: use range-based for rather than separate calls to begin and end. Modified: cfe/trunk/lib/Driver/Driver.cpp cfe/trunk/tools/driver/cc1as_main.cpp M

Re: r276514 - [cxx1z-constexpr-lambda] Make a lambda's closure type eligible as a literal-type in C++1z

2017-02-17 Thread Richard Smith via cfe-commits
da's more > directly in CXXRecordDecl::isLiteral(). > > One additional small step towards implementing constexpr-lambdas. > I don't know if this problem started with this change, but we now accept this invalid code in C++14 mode: constexpr auto a = [] {}; > Thanks to Richa

r295686 - Factor out function to determine whether we're performing a template

2017-02-20 Thread Richard Smith via cfe-commits
Author: rsmith Date: Mon Feb 20 19:17:38 2017 New Revision: 295686 URL: http://llvm.org/viewvc/llvm-project?rev=295686&view=rev Log: Factor out function to determine whether we're performing a template instantiation. In preparation for converting the template stack to a more general context stack

r295689 - Add template parameter depth and index to -ast-dump output.

2017-02-20 Thread Richard Smith via cfe-commits
Author: rsmith Date: Mon Feb 20 20:04:03 2017 New Revision: 295689 URL: http://llvm.org/viewvc/llvm-project?rev=295689&view=rev Log: Add template parameter depth and index to -ast-dump output. Modified: cfe/trunk/lib/AST/ASTDumper.cpp cfe/trunk/test/Misc/ast-dump-decl.cpp cfe/trunk/te

r295696 - PR32010: Fix template argument depth mixup when forming implicit constructor

2017-02-20 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Feb 21 00:30:38 2017 New Revision: 295696 URL: http://llvm.org/viewvc/llvm-project?rev=295696&view=rev Log: PR32010: Fix template argument depth mixup when forming implicit constructor template deduction guides for class template argument deduction. Ensure that we have a

r295698 - When deducing an array bound from the length of an initializer list, don't

2017-02-20 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Feb 21 01:22:31 2017 New Revision: 295698 URL: http://llvm.org/viewvc/llvm-project?rev=295698&view=rev Log: When deducing an array bound from the length of an initializer list, don't assume the bound has a non-dependent integral type. Modified: cfe/trunk/lib/Sema/Sema

r295710 - Fix lookup through injected-class-names in implicit deduction guides in the

2017-02-21 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Feb 21 02:42:39 2017 New Revision: 295710 URL: http://llvm.org/viewvc/llvm-project?rev=295710&view=rev Log: Fix lookup through injected-class-names in implicit deduction guides in the case where the class template has a parameter pack. Checking of the template arguments e

r295790 - Fix deduction of type of pack-expanded non-type template parameter.

2017-02-21 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Feb 21 17:49:18 2017 New Revision: 295790 URL: http://llvm.org/viewvc/llvm-project?rev=295790&view=rev Log: Fix deduction of type of pack-expanded non-type template parameter. We need to look through the PackExpansionType in the parameter type when deducing, and we need t

r295791 - [c++1z] Mark constexpr lambdas as done on status page and start advertising

2017-02-21 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Feb 21 17:58:29 2017 New Revision: 295791 URL: http://llvm.org/viewvc/llvm-project?rev=295791&view=rev Log: [c++1z] Mark constexpr lambdas as done on status page and start advertising them via feature test macro __cpp_constexpr. Thanks to Faisal for implementing this feat

Re: r295279 - [cxx1z-constexpr-lambda] Implement captures - thus completing implementation of constexpr lambdas.

2017-02-21 Thread Richard Smith via cfe-commits
Timeout -- committed r295791 on your behalf. On 16 February 2017 at 05:04, Faisal Vali wrote: > Of course Richard - I'll be happy to bump that value for C++1z > hopefully later today. > Thanks! > Faisal Vali > > > > On Wed, Feb 15, 2017 at 10:30 PM, Richard Smith

r295794 - Fix assertion failure when generating debug information for a variable

2017-02-21 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Feb 21 18:13:14 2017 New Revision: 295794 URL: http://llvm.org/viewvc/llvm-project?rev=295794&view=rev Log: Fix assertion failure when generating debug information for a variable declaration declared using class template argument deduction. Patch by Eric Fiselier (who is

r295866 - Improve support for 'decltype(auto)' in template template parameter matching.

2017-02-22 Thread Richard Smith via cfe-commits
Author: rsmith Date: Wed Feb 22 14:01:55 2017 New Revision: 295866 URL: http://llvm.org/viewvc/llvm-project?rev=295866&view=rev Log: Improve support for 'decltype(auto)' in template template parameter matching. A 'decltype(auto)' parameter can match any other kind of non-type template parameter,

r295886 - PR32034: Evaluate _Atomic(T) in-place when T is a class or array type.

2017-02-22 Thread Richard Smith via cfe-commits
Author: rsmith Date: Wed Feb 22 16:09:50 2017 New Revision: 295886 URL: http://llvm.org/viewvc/llvm-project?rev=295886&view=rev Log: PR32034: Evaluate _Atomic(T) in-place when T is a class or array type. This is necessary in order for the evaluation of an _Atomic initializer for those types to ha

r295919 - Rename ActiveTemplateInstantiation to CodeSynthesisContext in preparation for

2017-02-22 Thread Richard Smith via cfe-commits
Author: rsmith Date: Wed Feb 22 19:43:54 2017 New Revision: 295919 URL: http://llvm.org/viewvc/llvm-project?rev=295919&view=rev Log: Rename ActiveTemplateInstantiation to CodeSynthesisContext in preparation for using it for other kinds of context (where we currently produce context notes in a high

r295921 - Fix tracking of whether the previous template instantiation stack matches the current one.

2017-02-22 Thread Richard Smith via cfe-commits
Author: rsmith Date: Wed Feb 22 20:09:03 2017 New Revision: 295921 URL: http://llvm.org/viewvc/llvm-project?rev=295921&view=rev Log: Fix tracking of whether the previous template instantiation stack matches the current one. Rather than attempting to compare whether the previous and current top o

r296020 - Add context note to diagnostics that occur while declaring an implicit special member function.

2017-02-23 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Feb 23 15:43:43 2017 New Revision: 296020 URL: http://llvm.org/viewvc/llvm-project?rev=296020&view=rev Log: Add context note to diagnostics that occur while declaring an implicit special member function. Modified: cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td

r296033 - PR32044: Fix some cases where we would confuse a transparent init-list expression with an aggregate init.

2017-02-23 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Feb 23 16:41:47 2017 New Revision: 296033 URL: http://llvm.org/viewvc/llvm-project?rev=296033&view=rev Log: PR32044: Fix some cases where we would confuse a transparent init-list expression with an aggregate init. Modified: cfe/trunk/lib/AST/Expr.cpp cfe/trunk/li

r296067 - Refactor computation of exception specification for special members to remove

2017-02-23 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Feb 23 19:29:42 2017 New Revision: 296067 URL: http://llvm.org/viewvc/llvm-project?rev=296067&view=rev Log: Refactor computation of exception specification for special members to remove some of the repetition. Modified: cfe/trunk/include/clang/AST/DeclCXX.h cfe/tr

r296068 - Simplify and pass a more useful source location when computing an exception

2017-02-23 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Feb 23 19:36:58 2017 New Revision: 296068 URL: http://llvm.org/viewvc/llvm-project?rev=296068&view=rev Log: Simplify and pass a more useful source location when computing an exception specification for an implicit special member. Modified: cfe/trunk/lib/Sema/SemaDeclC

r296073 - Factor out some common code between SpecialMemberExceptionSpecInfo and SpecialMemberDeletionInfo.

2017-02-23 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Feb 23 20:07:20 2017 New Revision: 296073 URL: http://llvm.org/viewvc/llvm-project?rev=296073&view=rev Log: Factor out some common code between SpecialMemberExceptionSpecInfo and SpecialMemberDeletionInfo. To simplify this, convert SpecialMemberOverloadResult to a value

r296173 - Factor out more commonality between handling of deletion and exception specifications for special member functions.

2017-02-24 Thread Richard Smith via cfe-commits
Author: rsmith Date: Fri Feb 24 15:18:47 2017 New Revision: 296173 URL: http://llvm.org/viewvc/llvm-project?rev=296173&view=rev Log: Factor out more commonality between handling of deletion and exception specifications for special member functions. Modified: cfe/trunk/lib/Sema/SemaDeclCXX.cp

r296275 - C++ DR1611, 1658, 2180: implement "potentially constructed subobject" rules for special member functions.

2017-02-25 Thread Richard Smith via cfe-commits
Author: rsmith Date: Sat Feb 25 17:53:05 2017 New Revision: 296275 URL: http://llvm.org/viewvc/llvm-project?rev=296275&view=rev Log: C++ DR1611, 1658, 2180: implement "potentially constructed subobject" rules for special member functions. Essentially, as a base class constructor does not constru

r296276 - Update cxx_dr_status page.

2017-02-25 Thread Richard Smith via cfe-commits
Author: rsmith Date: Sat Feb 25 17:54:18 2017 New Revision: 296276 URL: http://llvm.org/viewvc/llvm-project?rev=296276&view=rev Log: Update cxx_dr_status page. Modified: cfe/trunk/www/cxx_dr_status.html Modified: cfe/trunk/www/cxx_dr_status.html URL: http://llvm.org/viewvc/llvm-project/cfe/

Re: r297084 - Don't assume cleanup emission preserves dominance in expr evaluation

2017-03-06 Thread Richard Smith via cfe-commits
On 6 March 2017 at 14:18, Reid Kleckner via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: rnk > Date: Mon Mar 6 16:18:34 2017 > New Revision: 297084 > > URL: http://llvm.org/viewvc/llvm-project?rev=297084&view=rev > Log: > Don't assume cleanup emission preserves dominance in expr eva

r297316 - Take into account C++17's noexcept function types during merging -- it should

2017-03-08 Thread Richard Smith via cfe-commits
Author: rsmith Date: Wed Mar 8 17:00:26 2017 New Revision: 297316 URL: http://llvm.org/viewvc/llvm-project?rev=297316&view=rev Log: Take into account C++17's noexcept function types during merging -- it should be possible to merge a declaration with an unresolved function type against one with a

r297349 - Fix handling of -fmodule-map-file=X where X has no directory component.

2017-03-08 Thread Richard Smith via cfe-commits
Author: rsmith Date: Wed Mar 8 18:58:22 2017 New Revision: 297349 URL: http://llvm.org/viewvc/llvm-project?rev=297349&view=rev Log: Fix handling of -fmodule-map-file=X where X has no directory component. Added: cfe/trunk/test/Modules/module_map_cwd.c Modified: cfe/trunk/lib/Lex/HeaderSea

r297412 - Add -cc1 flag -ast-dump-all to perform an AST dump including entities that haven't yet been deserialized.

2017-03-09 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Mar 9 16:00:01 2017 New Revision: 297412 URL: http://llvm.org/viewvc/llvm-project?rev=297412&view=rev Log: Add -cc1 flag -ast-dump-all to perform an AST dump including entities that haven't yet been deserialized. Modified: cfe/trunk/include/clang/AST/DeclBase.h

[PATCH] D26667: Teach clang that 'sv' is a fine literal suffix

2016-11-15 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: lib/Lex/LiteralSupport.cpp:768 .Cases("il", "i", "if", true) + .Case("sv", true) .Default(false); aaron.ballman wrote: > mclow.lists wrote: > > aaron.ballman wrote: > > > malcolm.parsons wrote: > > > >

r287057 - PR23281: Fix implementation of DR1891 to implement the intent: that is, a

2016-11-15 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Nov 15 18:03:24 2016 New Revision: 287057 URL: http://llvm.org/viewvc/llvm-project?rev=287057&view=rev Log: PR23281: Fix implementation of DR1891 to implement the intent: that is, a lambda-expression does not have a move-assignment operator. Modified: cfe/trunk/includ

Re: [PATCH] Warning for main returning a bool.

2016-11-15 Thread Richard Smith via cfe-commits
On Tue, Nov 15, 2016 at 2:55 PM, Aaron Ballman via cfe-commits < cfe-commits@lists.llvm.org> wrote: > On Tue, Nov 15, 2016 at 5:44 PM, Hal Finkel wrote: > > - Original Message - > >> From: "Aaron Ballman" > >> To: "Hal Finkel" > >> Cc: "cfe-commits" , "Joshua Hurwitz" < > hurwi...@googl

r287066 - Outline evaluation of calls to builtins to avoid inflating stack usage for the

2016-11-15 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Nov 15 18:57:23 2016 New Revision: 287066 URL: http://llvm.org/viewvc/llvm-project?rev=287066&view=rev Log: Outline evaluation of calls to builtins to avoid inflating stack usage for the common case of a call to a non-builtin, particularly for unoptimized ASan builds (wher

Re: r286699 - [c++1z] Support constant folding for __builtin_strchr and __builtin_memchr.

2016-11-15 Thread Richard Smith via cfe-commits
builds. I've outlined the handling of calls to builtin functions in r287066; hopefully that will sufficiently reduce the stack usage for unoptimized builds, but there's a chance the ASan build will just inline it again and we'll need to try harder... > thanks, > vedant >

Re: [PATCH] D26559: Insert a type check before reading vtable.

2016-11-15 Thread Richard Smith via cfe-commits
On Fri, Nov 11, 2016 at 3:02 PM, Ivan Krasin via cfe-commits < cfe-commits@lists.llvm.org> wrote: > krasin added a comment. > > Small correction: all UBSan type checks tests live in compiler-rt. Actually, most of the UBSan tests live in test/CodeGenCXX/catch-undef-behavior.cpp in Clang; the comp

Re: [PATCH] D26559: Insert a type check before reading vtable.

2016-11-15 Thread Richard Smith via cfe-commits
is getting unwieldy, so a separate test file doesn't seem like a bad thing. > On Tue, Nov 15, 2016 at 5:51 PM, Richard Smith > wrote: > >> On Fri, Nov 11, 2016 at 3:02 PM, Ivan Krasin via cfe-commits < >> cfe-commits@lists.llvm.org> wrote: >> >>> krasi

[PATCH] D26376: Undef stdatomic.h macro definitions that are defining functions provided in libc++

2016-11-16 Thread Richard Smith via cfe-commits
rsmith added a comment. Hmm, this won't help when building libc++ as a module, and we don't have a wrapper header to hold these undefs since is not part of c++. So either that combination of includes gives a broken or a broken , or we do something nonstandard like reimplementing the latter in

Re: [PATCH] D26376: Undef stdatomic.h macro definitions that are defining functions provided in libc++

2016-11-16 Thread Richard Smith via cfe-commits
On 16 Nov 2016 10:04 am, "Marshall Clow" wrote: mclow.lists added a comment. Ok - looking just at `kill_dependency`, this was added to the C standard in C11. It's required to be a macro. `atomic_is_lock_free` appears to be a function, as does `atomic_load`. Haven't checked the rest. That's a b

[PATCH] D26735: [OpenCL] Disable && (address of label) GNU extension for OpenCL

2016-11-16 Thread Richard Smith via cfe-commits
rsmith added a comment. Please don't ban things just because you can. If there's some reason why this doesn't make sense in OpenCL, this may be fine, but generally you shouldn't be making this language mode deviate from clang's normal behaviour regarding extensions. (It would be great if we ha

[PATCH] D23325: [WIP] Binding of references to packed fields

2016-11-16 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: include/clang/AST/Expr.h:440 + /// + /// Likewise bitfields, we model gl-values referring to packed-fields as + /// an aspect of the value-kind type system. aaron.ballman wrote: > Like bitfields > glvalues "Likewise bi

[PATCH] D24933: Enable configuration files in clang

2016-11-16 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: docs/UsersManual.rst:655-656 + +Command line option `--config` can be used to specify configuration file in +a clang invocation. For instance: + Rather than inventing a new mechanism, could we extend our existing `@file`

[PATCH] D24289: Add warning when assigning enums to bitfields without an explicit unsigned underlying type

2016-11-16 Thread Richard Smith via cfe-commits
rsmith added a comment. This is causing warnings to fire for headers shared between C and C++, where the "give the enum an unsigned underlying type" advice doesn't work, and where the code in question will never be built for the MS ABI. It seems really hard to justify this being on by default.

r287193 - Remove -Wsigned-enum-bitfield from -Wmost. On a wide set of ABIs, this warning

2016-11-16 Thread Richard Smith via cfe-commits
Author: rsmith Date: Wed Nov 16 20:16:09 2016 New Revision: 287193 URL: http://llvm.org/viewvc/llvm-project?rev=287193&view=rev Log: Remove -Wsigned-enum-bitfield from -Wmost. On a wide set of ABIs, this warning is completely irrelevant, producing (effectively) false positives, and -Wmost is used

Re: [PATCH] D24289: Add warning when assigning enums to bitfields without an explicit unsigned underlying type

2016-11-16 Thread Richard Smith via cfe-commits
On 16 November 2016 at 18:38, Nico Weber via cfe-commits < cfe-commits@lists.llvm.org> wrote: > I'm a bit surprised that this landed, given that gcc bug. I can see the > motivation for the gcc bug: If you say your enum is going to need > underlying 8 bits, then warning that your bitfield where you

Re: [PATCH] D24289: Add warning when assigning enums to bitfields without an explicit unsigned underlying type

2016-11-17 Thread Richard Smith via cfe-commits
On 17 Nov 2016 8:56 am, "Reid Kleckner" wrote: rnk added a comment. In https://reviews.llvm.org/D24289#598169, @rsmith wrote: > This is causing warnings to fire for headers shared between C and C++, where the "give the enum an unsigned underlying type" advice doesn't work, and where the code in

Re: r287241 - Use unique_ptr for cached tokens for default arguments in C++.

2016-11-17 Thread Richard Smith via cfe-commits
On 17 November 2016 at 09:52, Malcolm Parsons via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: malcolm.parsons > Date: Thu Nov 17 11:52:58 2016 > New Revision: 287241 > > URL: http://llvm.org/viewvc/llvm-project?rev=287241&view=rev > Log: > Use unique_ptr for cached tokens for defaul

[PATCH] D25654: [Sema] Don't perform aggregate initialization for types with explicit constructors

2016-11-17 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: lib/AST/DeclCXX.cpp:564 +// C++1z [dcl.init.aggr]p1: +// - no user-provided, explicit, or inherited constructors, +if (getASTContext().getLangOpts().CPlusPlus1z && Constructor->isExplicit()) rsmith wrote: > D

[PATCH] D26829: [clang] Allow lexer to handle string_view literals

2016-11-18 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: include/clang/Basic/DiagnosticLexKinds.td:189-190 InGroup, DefaultIgnore; +def err_cxx1z_string_view_literal : Error< + "string_view literals are a C++1z feature">; def ext_binary_literal : Extension< I don't see a n

[PATCH] D26826: [libcxx] Implement locale.h to fix modules build

2016-11-18 Thread Richard Smith via cfe-commits
rsmith added a comment. This should only be needed if you are not using `-fmodules-local-submodule-visibility` and do not have a module map for your C standard library. Is that really a configuration we want to support? Building without `-fmodules-local-submodule-visibility` typically only work

Re: [PATCH] D26829: [clang] Allow lexer to handle string_view literals

2016-11-19 Thread Richard Smith via cfe-commits
On 19 Nov 2016 2:36 am, "Anton Bikineev" wrote: AntonBikineev added inline comments. Comment at: lib/Lex/LiteralSupport.cpp:1716-1717 +StringLiteralParser::UDSuffixResult +StringLiteralParser::isValidUDSuffix(const LangOptions &LangOpts, + St

[PATCH] D26829: [clang] Allow lexer to handle string_view literals

2016-11-21 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/Lex/Lexer.cpp:1717 + const StringRef CompleteSuffix(Buffer, Chars); + const LangOptions &LangOpts = getLangOpts(); +

Re: [PATCH] Warning for main returning a bool.

2016-11-21 Thread Richard Smith via cfe-commits
gt; I modified the patch to warn only when a bool literal is returned from > main. See attached. -Josh > > > On Tue, Nov 15, 2016 at 7:50 PM Richard Smith > wrote: > >> On Tue, Nov 15, 2016 at 2:55 PM, Aaron Ballman via cfe-commits < >> cfe-commits@lists.llvm.org

r287599 - Indicate in AST dump whether special member functions are defaulted and trivial.

2016-11-21 Thread Richard Smith via cfe-commits
Author: rsmith Date: Mon Nov 21 17:43:54 2016 New Revision: 287599 URL: http://llvm.org/viewvc/llvm-project?rev=287599&view=rev Log: Indicate in AST dump whether special member functions are defaulted and trivial. Modified: cfe/trunk/lib/AST/ASTDumper.cpp cfe/trunk/test/Misc/ast-dump-colo

r287713 - Make diagnostic for use of default member initializer before enclosing class is

2016-11-22 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Nov 22 16:55:12 2016 New Revision: 287713 URL: http://llvm.org/viewvc/llvm-project?rev=287713&view=rev Log: Make diagnostic for use of default member initializer before enclosing class is complete a little more general; it is produced in other cases than the one that it pr

[PATCH] D27007: Remove C++ default arg side table for MS ABI ctor closures

2016-11-22 Thread Richard Smith via cfe-commits
rsmith accepted this revision. rsmith added inline comments. This revision is now accepted and ready to land. Comment at: lib/Sema/SemaExprCXX.cpp:861 // friendship or any other means). Context.addCopyConstructorForExceptionObject(Subobject, CD);

[PATCH] D23765: Fix for clang PR 29087

2016-11-23 Thread Richard Smith via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. Looks good for trunk and 3.9 branch. https://reviews.llvm.org/D23765 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.or

Re: [PATCH] D27163: Introduce -f[no-]strict-return flag that controls code generation for C++'s undefined behaviour return optimisation

2016-11-28 Thread Richard Smith via cfe-commits
(Dropping Phabricator, since this isn't really about D27163...) On 28 November 2016 at 14:27, John McCall via Phabricator via cfe-commits < cfe-commits@lists.llvm.org> wrote: > In https://reviews.llvm.org/D27163#607100, @rsmith wrote: > > C has rather different and much less useful TBAA rules > >

Re: [PATCH] D27163: Introduce -f[no-]strict-return flag that controls code generation for C++'s undefined behaviour return optimisation

2016-11-28 Thread Richard Smith via cfe-commits
On 28 November 2016 at 15:33, John McCall via cfe-commits < cfe-commits@lists.llvm.org> wrote: > On Mon, Nov 28, 2016 at 2:48 PM, Richard Smith > wrote: > >> (Dropping Phabricator, since this isn't really about D27163...) >> >> On 28 November 2016 at 14:2

r288097 - Add a warning for 'main' returning 'true' or 'false'.

2016-11-28 Thread Richard Smith via cfe-commits
Author: rsmith Date: Mon Nov 28 19:35:17 2016 New Revision: 288097 URL: http://llvm.org/viewvc/llvm-project?rev=288097&view=rev Log: Add a warning for 'main' returning 'true' or 'false'. Patch by Joshua Hurwitz! Added: cfe/trunk/test/Sema/warn-main-returns-bool-literal.cpp Modified: cfe/

<    18   19   20   21   22   23   24   25   26   27   >