Re: Need to use function "getAsCXXRecordDecl" of ASTMatchFinder.cpp in a clang-tidy check

2016-02-09 Thread Richard Smith via cfe-commits
On Tue, Feb 9, 2016 at 9:03 AM, Cong Liu via cfe-commits wrote: > Hi Richard, > > I need to use the function (line 747 of ASTMatchFinder.cpp): > > static CXXRecordDecl *getAsCXXRecordDecl(const Type *TypeNode) > > in the misc-virtual-near-miss check of clang-tidy, because it can correctly > get

Re: Patch for Bug 26283: float.h is missing mandatory C11 fp macros like DBL_DECIMAL_DIG and LDBL_DECIMAL_DIG

2016-02-09 Thread Richard Smith via cfe-commits
Patch looks good. Please also add a testcase to test/Headers. On Tue, Feb 9, 2016 at 12:08 PM, Hubert Tong via cfe-commits wrote: > I see no immediate issue with this patch, but I am not one of the usual > reviewers for this part of the code base. > > -- HT > > > On Tue, Feb 9, 2016 at 2:56 PM, J

r260277 - Simplify and rename ASTMatchFinder's getCXXRecordDecl to make it more obvious

2016-02-09 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Feb 9 14:59:05 2016 New Revision: 260277 URL: http://llvm.org/viewvc/llvm-project?rev=260277&view=rev Log: Simplify and rename ASTMatchFinder's getCXXRecordDecl to make it more obvious what it's actually trying to do. Modified: cfe/trunk/lib/ASTMatchers/ASTMatchFinde

r260278 - Add Tooling functionality to get a name for a QualType that can be used to name

2016-02-09 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Feb 9 15:04:04 2016 New Revision: 260278 URL: http://llvm.org/viewvc/llvm-project?rev=260278&view=rev Log: Add Tooling functionality to get a name for a QualType that can be used to name that type from the global scope. Patch by Sterling Augustine, derived (with permissi

Re: [PATCH] D15861: Support fully-qualified names for all QualTypes

2016-02-09 Thread Richard Smith via cfe-commits
rsmith closed this revision. rsmith added a comment. In r260278. http://reviews.llvm.org/D15861 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r260307 - PR26349: correctly check whether a digit sequence is empty in the presence of digit separators.

2016-02-09 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Feb 9 16:34:35 2016 New Revision: 260307 URL: http://llvm.org/viewvc/llvm-project?rev=260307&view=rev Log: PR26349: correctly check whether a digit sequence is empty in the presence of digit separators. Modified: cfe/trunk/include/clang/Lex/LiteralSupport.h cfe/

r260311 - Update documentation to reflect that libc++abi provides __cxa_thread_atexit (and has for quite a while). Also document that we have not yet implemented the new inheriting constructor rules.

2016-02-09 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Feb 9 16:48:14 2016 New Revision: 260311 URL: http://llvm.org/viewvc/llvm-project?rev=260311&view=rev Log: Update documentation to reflect that libc++abi provides __cxa_thread_atexit (and has for quite a while). Also document that we have not yet implemented the new inh

Re: Patch for Bug 26283: float.h is missing mandatory C11 fp macros like DBL_DECIMAL_DIG and LDBL_DECIMAL_DIG

2016-02-09 Thread Richard Smith via cfe-commits
__LDBL_DECIMAL_DIG__ is the right value, so you could test the values are correct by checking that LDBL_DECIMAL_DIG == __LDBL_DECIMAL_DIG__. > JT > > On Tue, Feb 9, 2016 at 3:58 PM, Richard Smith wrote: >> Patch looks good. Please also add a testcase to test/Headers. >> >>

[libcxx] r260337 - Fix overload sets of strchr, strpbrk, strrchr, memchr and strstr from

2016-02-09 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Feb 9 18:59:02 2016 New Revision: 260337 URL: http://llvm.org/viewvc/llvm-project?rev=260337&view=rev Log: Fix overload sets of strchr, strpbrk, strrchr, memchr and strstr from and wcschr, wcspbrk, wcsrchr, wmemchr, and wcsstr from to provide a const-correct overload se

Re: [libcxx] Reinstate and fix overload sets to be const-correct wherever possible

2016-02-09 Thread Richard Smith via cfe-commits
n 8, 2016 at 5:45 PM, Duncan P. N. Exon Smith > wrote: >> >> No one is waiting for me on this, are they? FWIW, this seems like >> a good solution to me. I'll see what I can do internally (I filed >> a radar), but other platforms will likely need this anyway. >&g

Re: [libcxx] r259842 - Fix the search path for CMake files

2016-02-09 Thread Richard Smith via cfe-commits
On Thu, Feb 4, 2016 at 3:17 PM, Niels Ole Salscheider via cfe-commits wrote: > Author: olesalscheider > Date: Thu Feb 4 17:17:20 2016 > New Revision: 259842 > > URL: http://llvm.org/viewvc/llvm-project?rev=259842&view=rev > Log: > Fix the search path for CMake files > > This allows to find the LL

Re: Need to use function "getAsCXXRecordDecl" of ASTMatchFinder.cpp in a clang-tidy check

2016-02-09 Thread Richard Smith via cfe-commits
On Tue, Feb 9, 2016 at 4:15 PM, Cong Liu wrote: > Hi Richard, > > Thank you for your reply. Yes, the case I need to deal with is like what you > said: >> >> If you want to make the assumption that the primary template will be >> used for an unknown specialization, you'll need something like that >

Re: [PATCH] D15920: [CMake] Add option to switch default C++ stdlib

2016-02-09 Thread Richard Smith via cfe-commits
rsmith added a subscriber: rsmith. rsmith added a comment. The direction here generally seems fine to me. Comment at: lib/Driver/ToolChain.cpp:538 @@ -536,7 +537,3 @@ ToolChain::CXXStdlibType ToolChain::GetCXXStdlibType(const ArgList &Args) const{ - if (Arg *A = Args.getLastA

Re: [libcxx] r260337 - Fix overload sets of strchr, strpbrk, strrchr, memchr and strstr from

2016-02-10 Thread Richard Smith via cfe-commits
On Wed, Feb 10, 2016 at 10:32 AM, Tim Northover wrote: > Hi Richard, > > On 9 February 2016 at 16:59, Richard Smith via cfe-commits > wrote: >> Fix overload sets of strchr, strpbrk, strrchr, memchr and strstr from >> and wcschr, wcspbrk, wcsrchr, wmemchr, and wcsstr f

Re: [libcxx] r260337 - Fix overload sets of strchr, strpbrk, strrchr, memchr and strstr from

2016-02-10 Thread Richard Smith via cfe-commits
OK, got the build working. This should be fixed in r260425. Please let me know if you're still seeing failures. On Wed, Feb 10, 2016 at 11:59 AM, Richard Smith wrote: > On Wed, Feb 10, 2016 at 10:32 AM, Tim Northover > wrote: >> Hi Richard, >> >> On 9 February 201

Re: [PATCH] D15095: Accept "-Weverything" in pragma clang diagnostic ...

2016-02-10 Thread Richard Smith via cfe-commits
rsmith added a comment. There seem to be two principled approaches here: 1. `DiagnosticsEngine` has a `Group` named `"everything"` (all of its interface supports that group, and from the point of view of someone using `DiagnosticsEngine` it behaves like any other group), or 2. There is no such

Re: [PATCH] D17043: Check that the result of a library call w/o side effects is used

2016-02-10 Thread Richard Smith via cfe-commits
On Wed, Feb 10, 2016 at 5:05 PM, Joerg Sonnenberger via cfe-commits wrote: > On Wed, Feb 10, 2016 at 04:21:02PM +, Alexander Kornienko via cfe-commits > wrote: >> alexfh added a comment. >> >> Thank you for working on this check! >> >> I'd like to note that there is a library-side way to miti

Re: [libcxx] r260337 - Fix overload sets of strchr, strpbrk, strrchr, memchr and strstr from

2016-02-11 Thread Richard Smith via cfe-commits
Argh, the glibc folks broke their string.h and wchar.h prototypes in this commit: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=8e2e833ac4d6509b152d6b8d74d388725717c56f On Thu, Feb 11, 2016 at 11:02 AM, Ismail Donmez wrote: > Hi, > > On Wed, Feb 10, 2016 at 2:59 AM, Richard Smit

[libcxx] r260570 - Work around regression in glibc 2.22: request that glibc provides the correct

2016-02-11 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Feb 11 13:40:06 2016 New Revision: 260570 URL: http://llvm.org/viewvc/llvm-project?rev=260570&view=rev Log: Work around regression in glibc 2.22: request that glibc provides the correct prototypes for functions that are converted into overload sets in C++. This matches th

Re: [libcxx] r260337 - Fix overload sets of strchr, strpbrk, strrchr, memchr and strstr from

2016-02-11 Thread Richard Smith via cfe-commits
Should be fixed in r260570. On Thu, Feb 11, 2016 at 11:28 AM, Richard Smith wrote: > Argh, the glibc folks broke their string.h and wchar.h prototypes in > this commit: > > https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=8e2e833ac4d6509b152d6b8d74d388725717c56f > > On Thu,

r260577 - In C11, provide macros FLT_DECIMAL_DIG, DBL_DECIMAL_DIG, and LDBL_DECIMAL_DIG in .

2016-02-11 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Feb 11 13:57:37 2016 New Revision: 260577 URL: http://llvm.org/viewvc/llvm-project?rev=260577&view=rev Log: In C11, provide macros FLT_DECIMAL_DIG, DBL_DECIMAL_DIG, and LDBL_DECIMAL_DIG in . Patch by Jorge Teixeira! Added: cfe/trunk/test/Headers/float.c Modified:

Re: Patch for Bug 26283: float.h is missing mandatory C11 fp macros like DBL_DECIMAL_DIG and LDBL_DECIMAL_DIG

2016-02-11 Thread Richard Smith via cfe-commits
nt the success of our tests to depend on the libc installed on the host system. > Thanks for the help, > > JT > > On Tue, Feb 9, 2016 at 5:56 PM, Richard Smith wrote: >> On Tue, Feb 9, 2016 at 2:43 PM, Jorge Teixeira >> wrote: >>> Richard, >>> >>

Re: r252114 - [modules] If we're given a module file, via -fmodule-file=, for a module, but

2016-02-11 Thread Richard Smith via cfe-commits
On Thu, Feb 11, 2016 at 11:04 AM, Ben Langmuir wrote: > FYI I changed this to early-exit again in r260563 to fix implicit builds. > It’s not safe to keep reading if we haven’t told ReadOptionsBlock to expect > failures, since it will itself early-exit, leaving the stream in the middle > of a block

r260583 - XFAIL this test for PPC64 for now. It looks like the *_MIN_EXP macros are in fact defined incorrectly for that target.

2016-02-11 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Feb 11 14:36:47 2016 New Revision: 260583 URL: http://llvm.org/viewvc/llvm-project?rev=260583&view=rev Log: XFAIL this test for PPC64 for now. It looks like the *_MIN_EXP macros are in fact defined incorrectly for that target. Modified: cfe/trunk/test/Headers/float.c

Re: [PATCH] D15095: Accept "-Weverything" in pragma clang diagnostic ...

2016-02-11 Thread Richard Smith via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. LGTM Please also add a test that a `-Weverything` on the command line can be overridden by a `#pragma clang diagnostic ignored "-Weverything"`, even for a diagnostic with no warning flag. (Th

r260610 - Remove bogus check that larger floating point types have smaller minimum

2016-02-11 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Feb 11 16:18:10 2016 New Revision: 260610 URL: http://llvm.org/viewvc/llvm-project?rev=260610&view=rev Log: Remove bogus check that larger floating point types have smaller minimum normalized exponents. That's not true for double versus double double. Modified: cfe/tr

Re: [libcxx] r260570 - Work around regression in glibc 2.22: request that glibc provides the correct

2016-02-11 Thread Richard Smith via cfe-commits
/usr/include/string.h:81:1: error: unknown type name > '__extern_always_inline' > __extern_always_inline void * > ^ > /usr/include/string.h:81:24: error: expected unqualified-id > __extern_always_inline void * >^ > > On Thu, Feb 11, 2016 at

[libcxx] r260622 - Instead of asking glibc to provide correct C++ signatures for

2016-02-11 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Feb 11 17:51:02 2016 New Revision: 260622 URL: http://llvm.org/viewvc/llvm-project?rev=260622&view=rev Log: Instead of asking glibc to provide correct C++ signatures for functions, ask it whether it did provide them after the fact. Some versions of glibc fail to compile i

Re: [libcxx] r260570 - Work around regression in glibc 2.22: request that glibc provides the correct

2016-02-11 Thread Richard Smith via cfe-commits
This should be less broken in r260622. We no longer assume that glibc provides non-broken declarations of the functions. =( On Thu, Feb 11, 2016 at 3:50 PM, Richard Smith wrote: > The problem here is that your version of glibc has broken clang > support -- see https://sourceware.org/ml

Re: Patch for Bug 26283: float.h is missing mandatory C11 fp macros like DBL_DECIMAL_DIG and LDBL_DECIMAL_DIG

2016-02-11 Thread Richard Smith via cfe-commits
t; standard without a big performance penalty - the diag should be > suppressible with some special cmd line argument. > Thus, I added the tests back and the FAIL for PPC64 for the time > being, with a comment. If you know of a way to skip only the specific > *_MIN_EXP and *_MIN_10_EXP te

r260639 - : do not define DECIMAL_DIG in -std=c89 mode; this macro was added in C99.

2016-02-11 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Feb 11 19:15:33 2016 New Revision: 260639 URL: http://llvm.org/viewvc/llvm-project?rev=260639&view=rev Log: : do not define DECIMAL_DIG in -std=c89 mode; this macro was added in C99. Patch by Jorge Teixeira! Modified: cfe/trunk/lib/Headers/float.h cfe/trunk/test

Re: Patch for Bug 26283: float.h is missing mandatory C11 fp macros like DBL_DECIMAL_DIG and LDBL_DECIMAL_DIG

2016-02-11 Thread Richard Smith via cfe-commits
) >>> issue a diagnostic saying that that arch cannot meet the desired C >>> standard without a big performance penalty - the diag should be >>> suppressible with some special cmd line argument. >>> Thus, I added the tests back and the FAIL for PPC64 for the time

Re: [PATCH] D17149: Consolidate and improve the handling of built-in feature-like macros

2016-02-11 Thread Richard Smith via cfe-commits
rsmith added a subscriber: rsmith. Comment at: lib/Lex/PPMacroExpansion.cpp:1438-1440 @@ -1432,3 +1437,5 @@ - // Get the module name. - PP.LexNonComment(Tok); + // It is possible that the macro invocation has a multiple-nested argument, + // for example: __has_featureX))

Re: [PATCH] D16973: Fix ICE with constexpr and friend functions

2016-02-11 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/D16973 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listin

Re: [PATCH] D17206: Fix AST printing of ascii char literals above 127.

2016-02-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 Comment at: lib/AST/StmtPrinter.cpp:1253-1256 @@ -1252,2 +1252,6 @@ default: +// A character literal might be sign-extended, which +// would result in an inval

Re: [PATCH] D16012: Carry raw string literal information through to the AST StringLiteral representation

2016-02-12 Thread Richard Smith via cfe-commits
rsmith added a comment. In http://reviews.llvm.org/D16012#351821, @aaron.ballman wrote: > Ping. Richard, I think we've provided justification that warrants this > functionality (mostly for clang-tidy checks). I am not convinced. This flag does not seem to make sense for `StringLiteral`, becau

Re: [PATCH] D15095: Accept "-Weverything" in pragma clang diagnostic ...

2016-02-12 Thread Richard Smith via cfe-commits
rsmith added a comment. If a patch is LGTM'd and some small change is requested at the same time, that typically means "LGTM once you make the following changes, which I trust you to make with no further pre-commit review". If you'd prefer more pre-commit review, of course, that's fine too. In

Re: r258524 - Merge templated static member variables, fixes http://llvm.org/pr26179.

2016-02-16 Thread Richard Smith via cfe-commits
mprove a comment. > --Vassil > On 07/02/16 20:48, Vassil Vassilev wrote: > > Would this patch be any better? > --Vassil > On 05/02/16 21:49, Richard Smith wrote: > > This belongs in ASTDeclReader::attachPreviousDecl[Impl]. That's where we > propagate data that's

Re: RFC: Update Intel386, x86-64 and IA MCU psABIs for passing/returning empty struct

2016-02-16 Thread Richard Smith via cfe-commits
On Tue, Feb 16, 2016 at 10:24 AM, H.J. Lu wrote: > > On Fri, Feb 12, 2016 at 11:39 AM, H.J. Lu wrote: > > On Fri, Feb 12, 2016 at 6:58 AM, Matthijs van Duin > > wrote: > >> On 11 February 2016 at 16:31, H.J. Lu wrote: > >>> struct A { > >>> static void foo (void) (); > >>> static int xxx; > >>>

Re: RFC: Update Intel386, x86-64 and IA MCU psABIs for passing/returning empty struct

2016-02-16 Thread Richard Smith via cfe-commits
On Tue, Feb 16, 2016 at 12:25 PM, H.J. Lu wrote: > On Tue, Feb 16, 2016 at 12:22 PM, Richard Smith wrote: >> On Tue, Feb 16, 2016 at 10:24 AM, H.J. Lu wrote: >>> >>> On Fri, Feb 12, 2016 at 11:39 AM, H.J. Lu wrote: >>> > On Fri, Feb 12, 2016 at

Re: RFC: Update Intel386, x86-64 and IA MCU psABIs for passing/returning empty struct

2016-02-16 Thread Richard Smith via cfe-commits
On Tue, Feb 16, 2016 at 1:10 PM, H.J. Lu wrote: > On Tue, Feb 16, 2016 at 1:02 PM, Richard Smith wrote: >> On Tue, Feb 16, 2016 at 12:25 PM, H.J. Lu wrote: >>> On Tue, Feb 16, 2016 at 12:22 PM, Richard Smith >>> wrote: >>>> On Tue, Feb 16, 2016 at 10:24

Re: RFC: Update Intel386, x86-64 and IA MCU psABIs for passing/returning empty struct

2016-02-16 Thread Richard Smith via cfe-commits
On Tue, Feb 16, 2016 at 1:21 PM, H.J. Lu wrote: > On Tue, Feb 16, 2016 at 1:15 PM, Richard Smith wrote: >> On Tue, Feb 16, 2016 at 1:10 PM, H.J. Lu wrote: >>> On Tue, Feb 16, 2016 at 1:02 PM, Richard Smith >>> wrote: >>>> On Tue, Feb 16, 2016 at 12:25 P

Re: [PATCH] D16552: Let clang not error out on `const std::vector empty_vec; ` with libstdc++5.3.

2016-02-16 Thread Richard Smith via cfe-commits
rsmith added a comment. The direction here looks fine to me. Comment at: lib/Sema/SemaInit.cpp:369 @@ +368,3 @@ + ND = dyn_cast(ND->getParent())) { +if (S.getStdNamespace()->InEnclosingNamespaceSetOf(ND)) + return true; I wonder if this recursion

Re: RFC: Update Intel386, x86-64 and IA MCU psABIs for passing/returning empty struct

2016-02-16 Thread Richard Smith via cfe-commits
On Tue, Feb 16, 2016 at 1:48 PM, H.J. Lu wrote: > On Tue, Feb 16, 2016 at 1:45 PM, Richard Smith wrote: >> On Tue, Feb 16, 2016 at 1:21 PM, H.J. Lu wrote: >>> On Tue, Feb 16, 2016 at 1:15 PM, Richard Smith >>> wrote: >>>> On Tue, Feb 16, 2016 at 1:10 P

r261034 - Improve diagnostics for ill-formed literal operator declarations.

2016-02-16 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Feb 16 18:04:04 2016 New Revision: 261034 URL: http://llvm.org/viewvc/llvm-project?rev=261034&view=rev Log: Improve diagnostics for ill-formed literal operator declarations. Patch by Erik Pilkington! Modified: cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td

Re: [PATCH] D16930: Improve literal operator parameter diagnostics.

2016-02-16 Thread Richard Smith via cfe-commits
rsmith closed this revision. rsmith added a comment. Committed as r261034. http://reviews.llvm.org/D16930 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r261161 - [modules] Cache 'acceptable decl' lookups for namespaces. In projects with

2016-02-17 Thread Richard Smith via cfe-commits
Author: rsmith Date: Wed Feb 17 15:52:44 2016 New Revision: 261161 URL: http://llvm.org/viewvc/llvm-project?rev=261161&view=rev Log: [modules] Cache 'acceptable decl' lookups for namespaces. In projects with thousands of modules, each of which declares the same namespace, linearly scanning the red

Re: r258524 - Merge templated static member variables, fixes http://llvm.org/pr26179.

2016-02-17 Thread Richard Smith via cfe-commits
(And otherwise this LGTM.) On Wed, Feb 17, 2016 at 5:24 PM, Richard Smith wrote: > + // TODO: Check visibility. New is hidden but has a complete type. If > New > + // has no array bound, it should not inherit one from Old, if Old is > not > + // visible. > &g

Re: r258524 - Merge templated static member variables, fixes http://llvm.org/pr26179.

2016-02-17 Thread Richard Smith via cfe-commits
> On 16/02/16 22:20, Richard Smith wrote: > > --- a/lib/Sema/SemaLookup.cpp > +++ b/lib/Sema/SemaLookup.cpp > @@ -419,6 +419,25 @@ static bool isPreferredLookupResult(Sema &S, > Sema::LookupNameKind Kind, > } >} > > + // VarDecl can have incomplete array ty

Re: [PATCH] D16552: Implement the likely resolution of core issue 253.

2016-02-18 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: include/clang/AST/DeclCXX.h:405-416 @@ -404,1 +404,14 @@ +enum AllowConstDefInitKind { + ACDI_Unknown, + ACDI_Yes, + ACDI_No, +}; +unsigned AllowConstDefaultInit : 3; +AllowConstDefInitKind allowConstDef

Re: [PATCH] D17405: Use Backend_EmitMCNull for null codegen unit tests.

2016-02-18 Thread Richard Smith via cfe-commits
rsmith added a subscriber: rsmith. rsmith accepted this revision. rsmith added a reviewer: rsmith. rsmith added a comment. This revision is now accepted and ready to land. LGTM http://reviews.llvm.org/D17405 ___ cfe-commits mailing list cfe-commits@

Re: RFC: Update Intel386, x86-64 and IA MCU psABIs for passing/returning empty struct

2016-02-18 Thread Richard Smith via cfe-commits
On Thu, Feb 18, 2016 at 6:35 AM, Michael Matz wrote: > Hi, > > On Tue, 16 Feb 2016, H.J. Lu wrote: > >> Here is the new definition: >> >> An empty type is a type where it and all of its subobjects (recursively) >> are of class, structure, union, or array type. No memory slot nor >> register shoul

Re: [PATCH] D16552: Implement the likely resolution of core issue 253.

2016-02-18 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: lib/AST/DeclCXX.cpp:396-425 @@ -394,1 +395,32 @@ +bool CXXRecordDecl::allowConstDefaultInitSlow() const { + assert(getDefinition() && "only call this on completed records"); + if (hasUserProvidedDefaultConstructor()) { +data().setA

Re: [PATCH] D16552: Implement the likely resolution of core issue 253.

2016-02-18 Thread Richard Smith via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. Thanks, LGTM! If it's convenient, it'd be nice to check in a new cxx_dr_status.html without your change first, as a separate commit, so it's more obvious which parts of the file are changed b

Re: [PATCH] D3976: -Wcomma, a new warning for questionable uses of the comma operator

2016-02-18 Thread Richard Smith via cfe-commits
This was already fixed in r261285. On Thu, Feb 18, 2016 at 4:31 PM, Oleksiy Vyalov via cfe-commits wrote: > ovyalov added a subscriber: ovyalov. > ovyalov added a comment. > > It seems this CL broke LLDB CMake build bot - > http://lab.llvm.org:8011/builders/lldb-x86_64-ubuntu-14.04-cmake/builds/

Re: RFC: Update Intel386, x86-64 and IA MCU psABIs for passing/returning empty struct

2016-02-19 Thread Richard Smith via cfe-commits
On Fri, Feb 19, 2016 at 5:35 AM, Michael Matz wrote: > Hi, > > On Thu, 18 Feb 2016, Richard Smith wrote: > >> >> An empty type is a type where it and all of its subobjects >> >> (recursively) are of class, structure, union, or array type. No >> >>

Re: [PATCH] D17444: PR26672: [MSVC] Clang does not recognize "static_assert" keyword in C mode

2016-02-19 Thread Richard Smith via cfe-commits
rsmith added a subscriber: rsmith. rsmith added a comment. Do they treat this as a keyword or as a predefined macro? (Does `#ifdef` think `static_assert` is defined?) http://reviews.llvm.org/D17444 ___ cfe-commits mailing list cfe-commits@lists.llv

Re: r261297 - Implement the likely resolution of core issue 253.

2016-02-19 Thread Richard Smith via cfe-commits
On Thu, Feb 18, 2016 at 5:52 PM, Nico Weber via cfe-commits wrote: > Author: nico > Date: Thu Feb 18 19:52:46 2016 > New Revision: 261297 > > URL: http://llvm.org/viewvc/llvm-project?rev=261297&view=rev > Log: > Implement the likely resolution of core issue 253. > > C++11 requires const objects to

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

2016-02-19 Thread Richard Smith via cfe-commits
Author: rsmith Date: Fri Feb 19 16:25:36 2016 New Revision: 261372 URL: http://llvm.org/viewvc/llvm-project?rev=261372&view=rev Log: [modules] Flatten -fmodule-name= and -fmodule-implementation-of= into a single option. Previously these options could both be used to specify that you were compiling

r261373 - [modules] Do less scanning of macro definition chains when computing the set of

2016-02-19 Thread Richard Smith via cfe-commits
Author: rsmith Date: Fri Feb 19 16:43:58 2016 New Revision: 261373 URL: http://llvm.org/viewvc/llvm-project?rev=261373&view=rev Log: [modules] Do less scanning of macro definition chains when computing the set of exported module macros outside local submodule visibility mode. Related to PR24667.

Re: [PATCH] D16821: Add whole-program vtable optimization feature to Clang.

2016-02-19 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: lib/CodeGen/CGVTables.cpp:904-919 @@ -900,5 +903,18 @@ + +bool CodeGenModule::IsBitSetBlacklistedRecord(const CXXRecordDecl *RD) { + std::string TypeName = RD->getQualifiedNameAsString(); + auto isInBlacklist = [&](const SanitizerBlackli

Re: [libcxx] r261381 - Add stdbool.h wrapper for libc++

2016-02-19 Thread Richard Smith via cfe-commits
On Fri, Feb 19, 2016 at 4:16 PM, Eric Fiselier via cfe-commits wrote: > Author: ericwf > Date: Fri Feb 19 18:16:41 2016 > New Revision: 261381 > > URL: http://llvm.org/viewvc/llvm-project?rev=261381&view=rev > Log: > Add stdbool.h wrapper for libc++ > > Summary: > According to the C++ standard is

Re: r261297 - Implement the likely resolution of core issue 253.

2016-02-19 Thread Richard Smith via cfe-commits
On Fri, Feb 19, 2016 at 4:41 PM, Nico Weber wrote: > On Fri, Feb 19, 2016 at 4:29 PM, Richard Smith via cfe-commits > wrote: >> >> On Thu, Feb 18, 2016 at 5:52 PM, Nico Weber via cfe-commits >> wrote: >> > Author: nico >> > Date: Thu Feb 18 19:52:46 20

Re: RFC: Update Intel386, x86-64 and IA MCU psABIs for passing/returning empty struct

2016-02-20 Thread Richard Smith via cfe-commits
On 20 Feb 2016 6:54 p.m., "H.J. Lu" wrote: > > On Sat, Feb 20, 2016 at 4:57 PM, Matthijs van Duin > wrote: > > On 20 February 2016 at 23:35, H.J. Lu wrote: > >> Can a compiler tell if a copy constructor or destructor is trivial > >> from the class declaration without function body? > > > > Yes,

Re: RFC: Update Intel386, x86-64 and IA MCU psABIs for passing/returning empty struct

2016-02-20 Thread Richard Smith via cfe-commits
On 20 Feb 2016 10:01 p.m., "H.J. Lu" wrote: > > On Sat, Feb 20, 2016 at 9:47 PM, Richard Smith wrote: > > On 20 Feb 2016 6:54 p.m., "H.J. Lu" wrote: > >> > >> On Sat, Feb 20, 2016 at 4:57 PM, Matthijs van Duin > >> wrote: > &g

Re: r261506 - Fix PR24473 : Teach clang to remember to substitute into member variable templates referred to within dependent qualified ids.

2016-02-21 Thread Richard Smith via cfe-commits
On 21 Feb 2016 6:29 p.m., "Faisal Vali via cfe-commits" < cfe-commits@lists.llvm.org> wrote: > > Author: faisalv > Date: Sun Feb 21 20:24:29 2016 > New Revision: 261506 > > URL: http://llvm.org/viewvc/llvm-project?rev=261506&view=rev > Log: > Fix PR24473 : Teach clang to remember to substitute into

Re: r261506 - Fix PR24473 : Teach clang to remember to substitute into member variable templates referred to within dependent qualified ids.

2016-02-21 Thread Richard Smith via cfe-commits
On 21 Feb 2016 8:21 p.m., "Faisal Vali" wrote: > > On Sun, Feb 21, 2016 at 10:06 PM, Richard Smith wrote: > > On 21 Feb 2016 6:29 p.m., "Faisal Vali via cfe-commits" > > wrote: > >> > >> Author: faisalv > >> Date: Sun Feb 21 20:24

Re: [PATCH] D17507: The controlling expression for _Generic is unevaluated

2016-02-23 Thread Richard Smith via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. LGTM for trunk and 3.8. http://reviews.llvm.org/D17507 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mail

Re: r261297 - Implement the likely resolution of core issue 253.

2016-02-23 Thread Richard Smith via cfe-commits
On Sat, Feb 20, 2016 at 6:53 AM, Nico Weber wrote: > On Fri, Feb 19, 2016 at 10:32 PM, Nico Weber wrote: >> >> On Fri, Feb 19, 2016 at 10:02 PM, Nico Weber wrote: >>> >>> On Fri, Feb 19, 2016 at 8:01 PM, Richard Smith >>> wrote: >>>> &

r261705 - PR24667: fix quadratic runtime if textually-included modular headers define large numbers of macros.

2016-02-23 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Feb 23 17:20:51 2016 New Revision: 261705 URL: http://llvm.org/viewvc/llvm-project?rev=261705&view=rev Log: PR24667: fix quadratic runtime if textually-included modular headers define large numbers of macros. Modified: cfe/trunk/include/clang/Lex/Preprocessor.h c

Re: [PATCH] D16821: Add whole-program vtable optimization feature to Clang.

2016-02-23 Thread Richard Smith via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. OK, let's go with this as a starting point. We don't need to get maximally-precise type information in the first iteration. http://reviews.llvm.org/D16821 _

Re: [PATCH][modules][PR26237]

2016-02-23 Thread Richard Smith via cfe-commits
Calling getMostRecentDecl seems like a slightly fragile way to avoid iterator invalidation here. Instead... @@ -214,6 +212,19 @@ namespace clang { unsigned I = Record.size(); Record.push_back(0); + auto &Specializations = Common->Specializations; + auto &&PartialSpecializa

Re: RFC: Update Intel386, x86-64 and IA MCU psABIs for passing/returning empty struct

2016-02-23 Thread Richard Smith via cfe-commits
On Tue, Feb 23, 2016 at 8:28 AM, H.J. Lu wrote: > On Tue, Feb 23, 2016 at 8:15 AM, Michael Matz wrote: >> Hi, >> >> On Tue, 23 Feb 2016, H.J. Lu wrote: >> >>> I thought >>> >>> --- >>> An empty type is a type where it and all of its subobjects (recursively) >>> are of class, structure, union, or

Re: [PATCH] D17558: Add __builtin_canonicalize

2016-02-23 Thread Richard Smith via cfe-commits
rsmith added a subscriber: rsmith. rsmith accepted this revision. rsmith added a reviewer: rsmith. rsmith added a comment. This revision is now accepted and ready to land. Sure, it makes sense to expose this. Comment at: docs/LanguageExtensions.rst:1743 @@ +1742,3 @@ + +This pro

Re: r261297 - Implement the likely resolution of core issue 253.

2016-02-24 Thread Richard Smith via cfe-commits
plate returns false for __is_trivial: struct X { template X(T...); }; static_assert(!__is_trivial(X), ""); > On Tue, Feb 23, 2016 at 2:41 PM, Richard Smith > wrote: >> >> On Sat, Feb 20, 2016 at 6:53 AM, Nico Weber wrote: >> > On Fri, Feb 19, 2016 at 10:3

Re: [PATCH][modules][PR26237]

2016-02-24 Thread Richard Smith via cfe-commits
On Wed, Feb 24, 2016 at 8:10 AM, Vassil Vassilev wrote: > > On 24/02/16 02:05, Richard Smith wrote: >> >> Calling getMostRecentDecl seems like a slightly fragile way to avoid >> iterator invalidation here. Instead... >> >> @@ -214,6 +212,19 @@ namespace clang {

Re: [PATCH] D17576: Fix assertion failure on MaybeODRUseExprs.

2016-02-24 Thread Richard Smith via cfe-commits
rsmith accepted this revision. This revision is now accepted and ready to land. Comment at: lib/Sema/SemaTemplateInstantiateDecl.cpp:2114 @@ -2113,1 +2113,3 @@ +EnterExpressionEvaluationContext ConstantEvaluated(SemaRef, +

r261781 - PR26237: Fix iterator invalidation bug that occurs if serializing

2016-02-24 Thread Richard Smith via cfe-commits
Author: rsmith Date: Wed Feb 24 15:59:10 2016 New Revision: 261781 URL: http://llvm.org/viewvc/llvm-project?rev=261781&view=rev Log: PR26237: Fix iterator invalidation bug that occurs if serializing specializations of a template manages to trigger deserialization of more specializations of the sam

Re: [PATCH][modules][PR26237]

2016-02-24 Thread Richard Smith via cfe-commits
On Wed, Feb 24, 2016 at 2:01 PM, Vassil Vassilev wrote: > On 24/02/16 22:50, Richard Smith wrote: >> >> On Wed, Feb 24, 2016 at 8:10 AM, Vassil Vassilev >> wrote: >>> >>> On 24/02/16 02:05, Richard Smith wrote: >>>> >>>> Calli

Re: [PATCH] Canonicalize UnaryTransformType types when they don't have a known underlying type

2016-02-24 Thread Richard Smith via cfe-commits
A UnaryTransformType should itself be a canonical type if its BaseType is dependent -- that is, its CanonicalType should be QualType(this, 0). It should definitely not be treated as being canonically equivalent to its BaseType. On Wed, Feb 24, 2016 at 2:03 PM, Vassil Vassilev wrote: > ping... > >

Re: [clang-tools-extra] r261738 - [clang-tidy] introduce modernize-deprecated-headers check

2016-02-24 Thread Richard Smith via cfe-commits
On Wed, Feb 24, 2016 at 5:36 AM, Alexander Kornienko via cfe-commits wrote: > Author: alexfh > Date: Wed Feb 24 07:36:34 2016 > New Revision: 261738 > > URL: http://llvm.org/viewvc/llvm-project?rev=261738&view=rev > Log: > [clang-tidy] introduce modernize-deprecated-headers check > > Summary: > Th

Re: [PATCH] D17619: [MSVC Compat] Don't evaluate member base expressions w/o side effects

2016-02-25 Thread Richard Smith via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. Looks terrible, please commit :) http://reviews.llvm.org/D17619 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi

Re: [PATCH] D13980: Add "x87" in x86 target feature map

2016-02-26 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: lib/Basic/Targets.cpp:2603 @@ -2599,3 +2602,3 @@ case CK_i386: case CK_i486: case CK_i586: echristo wrote: > Waiting for rsmith to comment here. > > This seems fine to me. http://reviews.llvm.org/D13980 ___

Re: [PATCH] D19175: Fix for PR27015 (variable template initialized with a generic lambda expression)

2016-04-26 Thread Richard Smith via cfe-commits
On Tue, Apr 26, 2016 at 1:55 PM, Akira Hatanaka via cfe-commits < cfe-commits@lists.llvm.org> wrote: > ahatanak added a comment. > > I'm looking for a way to avoid the assert in > Sema::PerformDependentDiagnostics that is fired when a template parameter > doesn't have a name. > > In order to avoid

Re: r267464 - Module Debugging: Fix the condition for determining whether a template

2016-04-26 Thread Richard Smith via cfe-commits
On Tue, Apr 26, 2016 at 3:10 PM, Adrian Prantl via cfe-commits < cfe-commits@lists.llvm.org> wrote: > > On Apr 25, 2016, at 5:34 PM, Richard Smith wrote: > > On Mon, Apr 25, 2016 at 1:52 PM, Adrian Prantl via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > >

r267632 - PR27513: When determining which declaration to put into an exported lookup

2016-04-26 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Apr 26 18:40:43 2016 New Revision: 267632 URL: http://llvm.org/viewvc/llvm-project?rev=267632&view=rev Log: PR27513: When determining which declaration to put into an exported lookup table for a module / PCH, never map from a normal declaration of a class to an injected-cl

Re: [PATCH] D19327: Keep invalid function body as part of the AST

2016-04-26 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: lib/Sema/SemaDecl.cpp:5044-5045 @@ -5043,4 +5043,4 @@ // function template specialization, add it to the scope stack. - if (New->getDeclName() && AddToScope && - !(D.isRedeclaration() && New->isInvalidDecl())) { + if (New->getDe

Re: r267534 - [MSVC] PR27337: allow static_cast from private base to derived for WTL

2016-04-26 Thread Richard Smith via cfe-commits
As noted in PR27337, this only occurs in one WTL sample, and we have no evidence that it actually occurs in real code. Have you seen uses of this in the wild? We generally don't want to add compatibility for MSVC bugs unless there's some real-world motivation. On Tue, Apr 26, 2016 at 2:21 AM, Dmit

Re: [PATCH] D18641: [PP] Handle #include_next after include found relative to current one same as GCC

2016-04-26 Thread Richard Smith via cfe-commits
rsmith added a comment. I'm a little concerned about the possibility of this breaking uses of this feature on platforms where Clang is the system compiler. For instance, this pattern would be broken by your change: // stddef.h #include "stddef-helper.h" // stddef-helper.h #include_ne

Re: r267534 - [MSVC] PR27337: allow static_cast from private base to derived for WTL

2016-04-26 Thread Richard Smith via cfe-commits
ght, it's the other direction ('A *' to 'B *') that this patch is permitting. > On Tue, Apr 26, 2016 at 6:33 PM, Richard Smith via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > >> As noted in PR27337, this only occurs in one WTL sample, and we ha

Re: r267534 - [MSVC] PR27337: allow static_cast from private base to derived for WTL

2016-04-27 Thread Richard Smith via cfe-commits
On Wed, Apr 27, 2016 at 11:50 AM, Stephan T. Lavavej via cfe-commits < cfe-commits@lists.llvm.org> wrote: > [Dmitry Polukhin] > > As for 'A*' to 'B*" case, indeed it is not very common and it looks like > someone just forgot to specify 'public'. > > If we're doing something gratuitously nonconform

Re: r267534 - [MSVC] PR27337: allow static_cast from private base to derived for WTL

2016-04-27 Thread Richard Smith via cfe-commits
On Wed, Apr 27, 2016 at 11:52 AM, Richard Smith wrote: > On Wed, Apr 27, 2016 at 11:50 AM, Stephan T. Lavavej via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > >> [Dmitry Polukhin] >> > As for 'A*' to 'B*" case, indeed it is not very

Re: [PATCH] D18635: Rework interface for bitset-using features to use a notion of LTO visibility.

2016-04-27 Thread Richard Smith via cfe-commits
rsmith accepted this revision. This revision is now accepted and ready to land. Comment at: docs/ControlFlowIntegrity.rst:268-269 @@ -262,1 +267,4 @@ +Normally, the compiler will disable CFI checks for classes that do not +have hidden LTO visibility. With this flag enabled, the

Re: [PATCH] D19623: [libc++] Initialize local doubles to 0.0.

2016-04-27 Thread Richard Smith via cfe-commits
rsmith added a subscriber: rsmith. rsmith added a comment. I don't know how the libc++ folks feel about this, but our usual policy in Clang and LLVM is that we don't add bogus initializers to shut up incorrect "maybe used uninitialized" compiler warnings, because these initializers prevent tool

Re: [PATCH] D18271: Avoid -Wshadow warnings about constructor parameters named after fields

2016-04-27 Thread Richard Smith via cfe-commits
rsmith accepted this revision. This revision is now accepted and ready to land. Comment at: include/clang/Basic/DiagnosticGroups.td:341-342 @@ +340,4 @@ + +def ShadowFieldInConstructor : DiagGroup<"shadow-field-in-constructor">; +def ShadowFieldInConstructorModified : DiagGroup<"

r267802 - [modules] When diagnosing a missing module import, suggest adding a #include if

2016-04-27 Thread Richard Smith via cfe-commits
Author: rsmith Date: Wed Apr 27 16:57:05 2016 New Revision: 267802 URL: http://llvm.org/viewvc/llvm-project?rev=267802&view=rev Log: [modules] When diagnosing a missing module import, suggest adding a #include if the current language doesn't have an import syntax and we can figure out a suitable f

Re: [PATCH] D19175: Fix for PR27015 (variable template initialized with a generic lambda expression)

2016-04-27 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: lib/Parse/ParseTemplate.cpp:151-153 @@ -149,1 +150,5 @@ + if (isSpecialization) +TemplateParmScopePtr->setFlags(TemplateParmScopePtr->getFlags() ^ + Scope::TemplateParamScope); + Us

Re: [PATCH] D18271: Avoid -Wshadow warnings about constructor parameters named after fields

2016-04-27 Thread Richard Smith via cfe-commits
rsmith added a comment. LGTM http://reviews.llvm.org/D18271 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D18088: Add a new warning to notify users of mismatched SDK and deployment target

2016-04-27 Thread Richard Smith via cfe-commits
rsmith added a subscriber: rsmith. Comment at: lib/Driver/ToolChains.cpp:718-720 @@ +717,5 @@ +StringRef isysroot = A->getValue(); +// Assume SDK has path: SOME_PATH/SDKs/PlatformXX.YY.sdk +size_t BeginSDK = isysroot.rfind("SDKs/"); +size_t EndSDK = isysroot.rfind(

Re: [PATCH] D18088: Add a new warning to notify users of mismatched SDK and deployment target

2016-04-27 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: lib/Driver/ToolChains.cpp:722 @@ +721,3 @@ +if (BeginSDK != StringRef::npos && EndSDK != StringRef::npos) { + StringRef SDK = isysroot.slice(BeginSDK + 5, EndSDK); + if (!SDK.startswith(getPlatformFamily()))

<    27   28   29   30   31   32   33   34   35   36   >