Re: [libcxx] r285382 - Add __libcpp_version file and __libcpp_library_version function.

2016-10-31 Thread Richard Smith via cfe-commits
On Mon, Oct 31, 2016 at 11:21 AM, Joerg Sonnenberger via cfe-commits < cfe-commits@lists.llvm.org> wrote: > On Mon, Oct 31, 2016 at 10:45:05AM -0700, Richard Smith via cfe-commits > wrote: > > On Sun, Oct 30, 2016 at 12:32 PM, Joerg Sonnenberger > wrote: > > > >

r285631 - Add comment explaining this mysterious macro name.

2016-10-31 Thread Richard Smith via cfe-commits
Author: rsmith Date: Mon Oct 31 15:25:52 2016 New Revision: 285631 URL: http://llvm.org/viewvc/llvm-project?rev=285631&view=rev Log: Add comment explaining this mysterious macro name. Modified: cfe/trunk/lib/Frontend/InitPreprocessor.cpp Modified: cfe/trunk/lib/Frontend/InitPreprocessor.cpp

Re: [libcxx] r285382 - Add __libcpp_version file and __libcpp_library_version function.

2016-10-31 Thread Richard Smith via cfe-commits
On Mon, Oct 31, 2016 at 2:01 PM, Joerg Sonnenberger via cfe-commits < cfe-commits@lists.llvm.org> wrote: > On Mon, Oct 31, 2016 at 01:25:19PM -0700, Richard Smith wrote: > > We could alternatively control the language features based only on the > > selected language mode, and only use version dete

Re: r285647 - [index] Fix repeated visitation of the same InitListExpr for indexing.

2016-10-31 Thread Richard Smith via cfe-commits
On Mon, Oct 31, 2016 at 3:12 PM, Argyrios Kyrtzidis via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: akirtzidis > Date: Mon Oct 31 17:12:12 2016 > New Revision: 285647 > > URL: http://llvm.org/viewvc/llvm-project?rev=285647&view=rev > Log: > [index] Fix repeated visitation of the sam

[PATCH] D26166: [Sema] Don't issue analysis-based warnings when a fatal error has occurred

2016-10-31 Thread Richard Smith via cfe-commits
rsmith added a comment. It looks like the bug is that if we hit an uncompilable error after hitting a non-uncompilable fatal error (promoted from a warning), we fail to notice that we've hit an uncompileable error. Our AST should be complete if `hasUncompilableErrorOccurred()` is not set, and i

r285663 - p0012: Teach resolving address of overloaded function with dependent exception

2016-10-31 Thread Richard Smith via cfe-commits
Author: rsmith Date: Mon Oct 31 20:31:23 2016 New Revision: 285663 URL: http://llvm.org/viewvc/llvm-project?rev=285663&view=rev Log: p0012: Teach resolving address of overloaded function with dependent exception specification to resolve the exception specification as part of the type check, in C++

r285664 - Implement ABI proposal for throwing noexcept function pointers, per discussion

2016-10-31 Thread Richard Smith via cfe-commits
Author: rsmith Date: Mon Oct 31 20:34:46 2016 New Revision: 285664 URL: http://llvm.org/viewvc/llvm-project?rev=285664&view=rev Log: Implement ABI proposal for throwing noexcept function pointers, per discussion on cxx-abi-dev (thread starting 2016-10-11). This is currently hidden behind a cc1-onl

[PATCH] D26178: [p0012] Implement ABI support for throwing a noexcept function pointer and catching as non-noexcept

2016-10-31 Thread Richard Smith via cfe-commits
rsmith created this revision. rsmith added a reviewer: EricWF. rsmith added a subscriber: cfe-commits. rsmith set the repository for this revision to rL LLVM. This implements the following proposal from cxx-abi-dev: http://sourcerytools.com/pipermail/cxx-abi-dev/2016-October/002988.html ... wh

[PATCH] D26166: [Sema] Don't issue analysis-based warnings when a fatal error has occurred

2016-10-31 Thread Richard Smith via cfe-commits
rsmith added a comment. In https://reviews.llvm.org/D26166#584285, @ahatanak wrote: > It seems to me that the root of the problem is that the template > instantiation S2 is left in an incomplete state and VarDecl s2 in the > AST, which is of type S2, is marked invalid. As I mentioned in my > p

[PATCH] D26057: [coroutines] Add CoawaitDependentExpr AST node and use it to properly build await_transform.

2016-11-01 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: include/clang/AST/ExprCXX.h:4256 +/// is dependent. +class CoawaitDependentExpr : public Expr { + SourceLocation KeywordLoc; Rename -> `DependentCoawaitExpr`, to match our other `Dependent*Expr` classes. ==

r285779 - More forcibly resolve exception specifications when checking a function

2016-11-01 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Nov 1 19:47:52 2016 New Revision: 285779 URL: http://llvm.org/viewvc/llvm-project?rev=285779&view=rev Log: More forcibly resolve exception specifications when checking a function redeclaration in C++1z mode. We need the exception specification in order for the function's

Re: r285543 - Make output of ast-print closer to C++ code

2016-11-02 Thread Richard Smith via cfe-commits
Test? On 30 Oct 2016 10:20 pm, "Serge Pavlov via cfe-commits" < cfe-commits@lists.llvm.org> wrote: > Author: sepavloff > Date: Mon Oct 31 00:11:12 2016 > New Revision: 285543 > > URL: http://llvm.org/viewvc/llvm-project?rev=285543&view=rev > Log: > Make output of ast-print closer to C++ code > >

Re: r285856 - Don't require nullability on template parameters in typedefs.

2016-11-02 Thread Richard Smith via cfe-commits
On 2 Nov 2016 1:53 pm, "Jordan Rose via cfe-commits" < cfe-commits@lists.llvm.org> wrote: Author: jrose Date: Wed Nov 2 15:44:07 2016 New Revision: 285856 URL: http://llvm.org/viewvc/llvm-project?rev=285856&view=rev Log: Don't require nullability on template parameters in typedefs. Previously t

Re: r285856 - Don't require nullability on template parameters in typedefs.

2016-11-02 Thread Richard Smith via cfe-commits
On Wed, Nov 2, 2016 at 2:34 PM, Jordan Rose via cfe-commits < cfe-commits@lists.llvm.org> wrote: > > On Nov 2, 2016, at 14:31, Richard Smith wrote: > > On 2 Nov 2016 1:53 pm, "Jordan Rose via cfe-commits" < > cfe-commits@lists.llvm.org> wrote: > > Author: jrose > Date: Wed Nov 2 15:44:07 2016 >

[PATCH] D26231: [Sema] Allow static_cast(e) to check explicit conversions for non-reference-related types.

2016-11-02 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: include/clang/Basic/DiagnosticSemaKinds.td:5946 +def err_bad_rvalue_to_rvalue_cast : Error< + "cannot cast from rvalue reference of type %1 to rvalue referen

Re: r285856 - Don't require nullability on template parameters in typedefs.

2016-11-02 Thread Richard Smith via cfe-commits
On Wed, Nov 2, 2016 at 3:51 PM, Jordan Rose via cfe-commits < cfe-commits@lists.llvm.org> wrote: > > On Nov 2, 2016, at 15:48, Richard Smith wrote: > > On Wed, Nov 2, 2016 at 2:34 PM, Jordan Rose via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > >> >> On Nov 2, 2016, at 14:31, Richard Smit

[libcxxabi] r285867 - [p0012] Implement ABI support for throwing a noexcept function pointer and

2016-11-02 Thread Richard Smith via cfe-commits
Author: rsmith Date: Wed Nov 2 18:41:51 2016 New Revision: 285867 URL: http://llvm.org/viewvc/llvm-project?rev=285867&view=rev Log: [p0012] Implement ABI support for throwing a noexcept function pointer and catching as non-noexcept This implements the following proposal from cxx-abi-dev: http:/

r285869 - Teach clang-query to dump types. I couldn't find any existing tests for clang-query's dumping functionality. =(

2016-11-02 Thread Richard Smith via cfe-commits
Author: rsmith Date: Wed Nov 2 18:57:18 2016 New Revision: 285869 URL: http://llvm.org/viewvc/llvm-project?rev=285869&view=rev Log: Teach clang-query to dump types. I couldn't find any existing tests for clang-query's dumping functionality. =( Modified: cfe/trunk/include/clang/AST/Type.h

r285870 - Update manglings for C++17 noexcept function types to match Jason Merrill's

2016-11-02 Thread Richard Smith via cfe-commits
Author: rsmith Date: Wed Nov 2 19:27:54 2016 New Revision: 285870 URL: http://llvm.org/viewvc/llvm-project?rev=285870&view=rev Log: Update manglings for C++17 noexcept function types to match Jason Merrill's proposal on cxx-abi-dev earlier today. Modified: cfe/trunk/lib/AST/ItaniumMangle.cpp

[PATCH] D26166: [Sema] Don't issue analysis-based warnings when a fatal error has occurred

2016-11-02 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/SemaTemplateInstantiate.cpp:213-214 + // Don't allow further instantiation if a fatal error and an uncompilable + // error have occcured. Any diagn

r285954 - Improve obvious-most-derived-type devirtualization:

2016-11-03 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Nov 3 13:55:18 2016 New Revision: 285954 URL: http://llvm.org/viewvc/llvm-project?rev=285954&view=rev Log: Improve obvious-most-derived-type devirtualization: * if the base is produced by a series of derived-to-base conversions, check the expression inside them whe

[PATCH] D26285: [index] Expose FriendDecl

2016-11-03 Thread Richard Smith via cfe-commits
rsmith accepted this revision. rsmith added a reviewer: rsmith. rsmith added a comment. This revision is now accepted and ready to land. LGTM https://reviews.llvm.org/D26285 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.o

[PATCH] D25311: Add FixItHint for missing #include (err_module_unimported_use_header)

2016-11-03 Thread Richard Smith via cfe-commits
rsmith added a comment. In https://reviews.llvm.org/D25311#576382, @bkramer wrote: > I think clang already depends on libclangRewrite. libclangToolingCore is > tiny, it's basically just the Replacement class and a couple of utilities. > While it would be possible to hoist just the include handl

Re: r273191 - [OpenCL] Include opencl-c.h by default as a clang module

2016-11-03 Thread Richard Smith via cfe-commits
Hi, This test (test/Headers/opencl-c-header.cl) is *extremely* slow -- it parses the 17KLoC opencl-c.h header 40 times, and on my Debug builds it's the slowest test by far, taking nearly 2 minutes to run *alone*. (For reference, the *entire clang test suite* finishes in 90s on my machine with this

Re: r276934 - [OpenMP] Add support to map member expressions with references to pointers.

2016-11-03 Thread Richard Smith via cfe-commits
On Wed, Jul 27, 2016 at 3:52 PM, Samuel Antao via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: sfantao > Date: Wed Jul 27 17:52:16 2016 > New Revision: 276934 > > URL: http://llvm.org/viewvc/llvm-project?rev=276934&view=rev > Log: > [OpenMP] Add support to map member expressions with

[PATCH] D16135: Macro Debug Info support in Clang

2016-11-03 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: include/clang/AST/ASTConsumer.h:163 + /// The caller takes ownership on the returned pointer. + virtual std::unique_ptr CreatePreprocessorCallbacks(Preprocessor &PP); }; aaboud wrote: > Richard, > I know that you sugg

[PATCH] D23657: Remove some false positives when taking the address of packed members

2016-11-07 Thread Richard Smith via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. Some minor changes then this looks good to go. Comment at: lib/Sema/SemaChecking.cpp:11348-11350 + // Not the scope of this diagnostic. + if (!AnyIsPacked) +return; ---

r286189 - Correctly ignore unnamed bit-fields when checking whether a union has fields.

2016-11-07 Thread Richard Smith via cfe-commits
Author: rsmith Date: Mon Nov 7 19:07:26 2016 New Revision: 286189 URL: http://llvm.org/viewvc/llvm-project?rev=286189&view=rev Log: Correctly ignore unnamed bit-fields when checking whether a union has fields. Modified: cfe/trunk/lib/Sema/SemaDeclCXX.cpp cfe/trunk/test/CodeGenCXX/mangle-

[PATCH] D26452: Make output of -ast-print a valid C++ code.

2016-11-09 Thread Richard Smith via cfe-commits
rsmith accepted this revision. rsmith added a reviewer: rsmith. rsmith added a comment. This revision is now accepted and ready to land. I've not looked at all of the test changes in detail, but this looks fine to me. https://reviews.llvm.org/D26452 ___

r286534 - PR30937: don't devirtualize if we find that the callee is a pure virtual

2016-11-10 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Nov 10 19:01:31 2016 New Revision: 286534 URL: http://llvm.org/viewvc/llvm-project?rev=286534&view=rev Log: PR30937: don't devirtualize if we find that the callee is a pure virtual function. In that case, there is no requirement that the callee is actually defined, and the

Re: r286534 - PR30937: don't devirtualize if we find that the callee is a pure virtual

2016-11-10 Thread Richard Smith via cfe-commits
ehdi Amini wrote: > > > > Could we emit llvm.unreachable in this case? > > > > — > > Mehdi > > > >> On Nov 10, 2016, at 5:01 PM, Richard Smith via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > >> > >> Author: rsmith >

Re: r286630 - When a DecompositionDecl is marked invalid, also set the child BindingDecl's to

2016-11-11 Thread Richard Smith via cfe-commits
Thanks. We have some code in SemaDecl(CXX?) that was trying to do the same thing; can it be removed now? On 11 Nov 2016 1:00 pm, "Richard Trieu via cfe-commits" < cfe-commits@lists.llvm.org> wrote: > Author: rtrieu > Date: Fri Nov 11 14:51:04 2016 > New Revision: 286630 > > URL: http://llvm.org/v

Re: r286630 - When a DecompositionDecl is marked invalid, also set the child BindingDecl's to

2016-11-11 Thread Richard Smith via cfe-commits
Sema::FinalizeDeclaration contains the code I was thinking about. On Fri, Nov 11, 2016 at 1:33 PM, Richard Trieu wrote: > I didn't see anything when making this patch, but I will go take a closer > look now. > > > On Fri, Nov 11, 2016 at 1:19 PM, Richard Smith > wrote: > >> Thanks. We have som

r286660 - [cxx_status] Prepare features list for WG21 motions.

2016-11-11 Thread Richard Smith via cfe-commits
Author: rsmith Date: Fri Nov 11 16:48:43 2016 New Revision: 286660 URL: http://llvm.org/viewvc/llvm-project?rev=286660&view=rev Log: [cxx_status] Prepare features list for WG21 motions. Modified: cfe/trunk/www/cxx_status.html Modified: cfe/trunk/www/cxx_status.html URL: http://llvm.org/view

r286678 - [c++1z] Add constant-folding support for strcmp, strncmp, and memcmp, to

2016-11-11 Thread Richard Smith via cfe-commits
Author: rsmith Date: Fri Nov 11 17:43:35 2016 New Revision: 286678 URL: http://llvm.org/viewvc/llvm-project?rev=286678&view=rev Log: [c++1z] Add constant-folding support for strcmp, strncmp, and memcmp, to support constexpr char_traits. Added: cfe/trunk/test/SemaCXX/constexpr-string.cpp

r286679 - [c++1z] p0522 is approved.

2016-11-11 Thread Richard Smith via cfe-commits
Author: rsmith Date: Fri Nov 11 17:46:25 2016 New Revision: 286679 URL: http://llvm.org/viewvc/llvm-project?rev=286679&view=rev Log: [c++1z] p0522 is approved. Modified: cfe/trunk/www/cxx_status.html Modified: cfe/trunk/www/cxx_status.html URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/

r286681 - [c++1z] Two more features have been accepted.

2016-11-11 Thread Richard Smith via cfe-commits
Author: rsmith Date: Fri Nov 11 17:51:47 2016 New Revision: 286681 URL: http://llvm.org/viewvc/llvm-project?rev=286681&view=rev Log: [c++1z] Two more features have been accepted. Modified: cfe/trunk/www/cxx_status.html Modified: cfe/trunk/www/cxx_status.html URL: http://llvm.org/viewvc/llvm

r286685 - [c++1z] std::byte didn't make it

2016-11-11 Thread Richard Smith via cfe-commits
Author: rsmith Date: Fri Nov 11 18:15:24 2016 New Revision: 286685 URL: http://llvm.org/viewvc/llvm-project?rev=286685&view=rev Log: [c++1z] std::byte didn't make it Modified: cfe/trunk/www/cxx_status.html Modified: cfe/trunk/www/cxx_status.html URL: http://llvm.org/viewvc/llvm-project/cfe/

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

2016-11-11 Thread Richard Smith via cfe-commits
Author: rsmith Date: Fri Nov 11 19:39:56 2016 New Revision: 286699 URL: http://llvm.org/viewvc/llvm-project?rev=286699&view=rev Log: [c++1z] Support constant folding for __builtin_strchr and __builtin_memchr. Modified: cfe/trunk/lib/AST/ExprConstant.cpp cfe/trunk/test/SemaCXX/constexpr-st

r247055 - [modules] Write the options records to a separate subblock rather than writing

2015-09-08 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Sep 8 14:40:14 2015 New Revision: 247055 URL: http://llvm.org/viewvc/llvm-project?rev=247055&view=rev Log: [modules] Write the options records to a separate subblock rather than writing them directly to the control block. These are fairly large, and in a build with lots o

Re: [PATCH] D12038: CodeGen: Introduce CodeGenModule::CreateMetadataIdentifierForType.

2015-09-08 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/D12038 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailm

Re: [PATCH] D12313: Introduce __builtin_nontemporal_store and __builtin_nontemporal_load.

2015-09-08 Thread Richard Smith via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. Looks fine to me. Comment at: lib/CodeGen/CGBuiltin.cpp:114-128 @@ -113,1 +113,17 @@ +static Value *MakeNontemporalStore(CodeGenFunction &CGF, const CallExpr *E) { + Value

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

2015-09-08 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: lib/CodeGen/CGDebugInfo.cpp:3263-3264 @@ +3262,4 @@ + const NamespaceDecl *NSDecl = UD.getNominatedNamespace(); + if (!NSDecl->isAnonymousNamespace() || + CGM.getTarget().getTriple().isPS4CPU()) { +DBuilder.createImportedModul

Re: [PATCH] D10018: C11 _Bool bitfield diagnostic

2015-09-09 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: include/clang/Basic/DiagnosticSemaKinds.td:4320-4325 @@ -4319,2 +4319,8 @@ "number of elements must be either one or match the size of the vector">; +def warn_bitfield_width_longer_than_necessary : Warning< + "size of bit-field %0 (%1

Re: r247233 - EmitRecord* API change: accepts ArrayRef instead of a SmallVector (NFC)

2015-09-10 Thread Richard Smith via cfe-commits
On Thu, Sep 10, 2015 at 9:13 AM, David Blaikie via cfe-commits < cfe-commits@lists.llvm.org> wrote: > > > On Thu, Sep 10, 2015 at 9:07 AM, Mehdi Amini > wrote: > >> >> On Sep 10, 2015, at 9:02 AM, David Blaikie wrote: >> >> >> >> On Thu, Sep 10, 2015 at 9:00 AM, Mehdi Amini >> wrote: >> >>> >>>

Re: [PATCH] D12689: [libc++][static linking] std streams are not initialized prior to their use in static object constructors

2015-09-10 Thread Richard Smith via cfe-commits
rsmith added a subscriber: rsmith. rsmith added a comment. Can we instead fix this in Clang by ensuring that libc++ is put at the right position in the static link order so that its initializers run first? libc++'s avoidance of running iostreams init code from every translation unit is a signif

Re: r247233 - EmitRecord* API change: accepts ArrayRef instead of a SmallVector (NFC)

2015-09-10 Thread Richard Smith via cfe-commits
On Thu, Sep 10, 2015 at 11:46 AM, David Blaikie wrote: > > > On Thu, Sep 10, 2015 at 11:39 AM, Richard Smith > wrote: > >> On Thu, Sep 10, 2015 at 9:13 AM, David Blaikie via cfe-commits < >> cfe-commits@lists.llvm.org> wrote: >> >>> >>> >>> On Thu, Sep 10, 2015 at 9:07 AM, Mehdi Amini >>> wrote

Re: [PATCH] D10018: C11 _Bool bitfield diagnostic

2015-09-10 Thread Richard Smith via cfe-commits
On Thu, Sep 10, 2015 at 2:17 PM, Rachel Craik wrote: > rcraik added inline comments. > > > Comment at: lib/Sema/SemaDecl.cpp:12586 > @@ -12585,3 +12585,3 @@ >if (!FieldTy->isDependentType()) { > uint64_t TypeSize = Context.getTypeSize(FieldTy); > if (Value.getZExtVa

Re: [PATCH] D12785: Document __builtin_nontemporal_load and __builtin_nontemporal_store.

2015-09-10 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: docs/LanguageExtensions.rst:1802-1807 @@ +1801,8 @@ + +For example, on AArch64 in the following code:: + + LDR X1, [X2] + LDNP X3, X4, [X1] + +the ``LDNP`` might be executed before the ``LDR``. In this case the load would +be performed f

Re: [PATCH] D12785: Document __builtin_nontemporal_load and __builtin_nontemporal_store.

2015-09-10 Thread Richard Smith via cfe-commits
On Thu, Sep 10, 2015 at 5:57 PM, Michael Zolotukhin wrote: > mzolotukhin added inline comments. > > > Comment at: docs/LanguageExtensions.rst:1802-1807 > @@ +1801,8 @@ > + > +For example, on AArch64 in the following code:: > + > + LDR X1, [X2] > + LDNP X3, X4, [X1] > + > +the `

Re: r247233 - EmitRecord* API change: accepts ArrayRef instead of a SmallVector (NFC)

2015-09-10 Thread Richard Smith via cfe-commits
On Thu, Sep 10, 2015 at 6:26 PM, David Blaikie wrote: > > > On Thu, Sep 10, 2015 at 1:34 PM, Richard Smith > wrote: > >> On Thu, Sep 10, 2015 at 11:46 AM, David Blaikie >> wrote: >> >>> >>> >>> On Thu, Sep 10, 2015 at 11:39 AM, Richard Smith >>> wrote: >>> On Thu, Sep 10, 2015 at 9:13 AM,

Re: [PATCH] D12785: Document __builtin_nontemporal_load and __builtin_nontemporal_store.

2015-09-10 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: docs/LanguageExtensions.rst:1784 @@ +1783,3 @@ + +Clang provides overloaded builtins allowing to generate non-temporal memory +accesses. to g

r247375 - [modules] Slightly defang an assert that produces false-positives on the selfhost bot.

2015-09-10 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Sep 10 21:22:03 2015 New Revision: 247375 URL: http://llvm.org/viewvc/llvm-project?rev=247375&view=rev Log: [modules] Slightly defang an assert that produces false-positives on the selfhost bot. Modified: cfe/trunk/lib/Serialization/ASTWriterDecl.cpp Modified: cfe/t

Re: [PATCH] D1623: Support __builtin_ms_va_list.

2015-09-10 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: lib/Sema/SemaExpr.cpp:11664-11672 @@ -11662,1 +11663,11 @@ + + // It might be a __builtin_ms_va_list. + if (!E->isTypeDependent() && Context.getTargetInfo().hasBuiltinMSVaList()) { +QualType MSVaListType = Context.getBuiltinMSVaListT

r247384 - [modules] Don't load files specified by -fmodule-file= when modules are

2015-09-10 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Sep 10 22:58:07 2015 New Revision: 247384 URL: http://llvm.org/viewvc/llvm-project?rev=247384&view=rev Log: [modules] Don't load files specified by -fmodule-file= when modules are disabled. (We still allow this via -cc1 / -Xclang, primarily for testing.) Modified: cfe

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

2015-09-10 Thread Richard Smith via cfe-commits
rsmith added a comment. Each of the foo.h files added here was svn cp'd from the corresponding cfoo file. The listed diffs are against the base file. Likewise, __nullptr was copied from cstddef. (Please disregard the changes to lib/buildit.) Repository: rL LLVM http://reviews.llvm.org/D127

Re: [PATCH] D10018: C11 _Bool bitfield diagnostic

2015-09-11 Thread Richard Smith via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. Looks great, please go ahead. Sorry it's taken so long to get this reviewed. http://reviews.llvm.org/D10018 ___ cfe-commits mailing list cfe-comm

Re: r247346 - [MS ABI] Make member pointers return true for isIncompleteType

2015-09-11 Thread Richard Smith via cfe-commits
On Fri, Sep 11, 2015 at 12:46 PM, David Majnemer via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Reduced it a bit: > template > void JSMethod(); > class A { > int printd(int); > void printd(); > }; > void A::printd() { JSMethod(); } > > This test case will crash clang at the revision b

Re: r246877 - Increase accuracy of __builtin_object_size.

2015-09-11 Thread Richard Smith via cfe-commits
On Fri, Sep 11, 2015 at 12:15 PM, Mikhail Zolotukhin via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Hi George, > > After this commit we started to trap on the following case: > > #include > typedef struct { > int n; > char key[1]; > } obj_t; > > char *str = "hello"; > > int main() { >

Re: r247464 - [MS ABI] Select an inheritance model in template arguments

2015-09-11 Thread Richard Smith via cfe-commits
On Fri, Sep 11, 2015 at 1:18 PM, David Majnemer via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: majnemer > Date: Fri Sep 11 15:18:09 2015 > New Revision: 247464 > > URL: http://llvm.org/viewvc/llvm-project?rev=247464&view=rev > Log: > [MS ABI] Select an inheritance model in template

Re: recordDecl() AST matcher

2015-09-11 Thread Richard Smith via cfe-commits
I don't think CXXRecordDecl is an anachronism, so much as an implementation detail; it makes sense to use a smaller class when in C mode, as we don't need most of the features and complexity that CXXRecordDecl brings with it. But... as a user of clang matchers, I don't think I'd want to care about

r247486 - [modules] When picking one of two template declarations as a lookup result,

2015-09-11 Thread Richard Smith via cfe-commits
Author: rsmith Date: Fri Sep 11 17:39:35 2015 New Revision: 247486 URL: http://llvm.org/viewvc/llvm-project?rev=247486&view=rev Log: [modules] When picking one of two template declarations as a lookup result, it's not sufficient to prefer the declaration with more default arguments, or the one tha

r247488 - Add new test file missing from r247486.

2015-09-11 Thread Richard Smith via cfe-commits
Author: rsmith Date: Fri Sep 11 17:54:01 2015 New Revision: 247488 URL: http://llvm.org/viewvc/llvm-project?rev=247488&view=rev Log: Add new test file missing from r247486. Added: cfe/trunk/test/Modules/Inputs/template-default-args/d.h Added: cfe/trunk/test/Modules/Inputs/template-default-ar

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

2015-09-11 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: lib/AST/ExprConstant.cpp:165 @@ -159,1 +164,3 @@ +/// Indicator of whether the most-derived object is an array. +bool MostDerivedIsArrayElement : 1; array -> array element. Comment at: lib/AST/E

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

2015-09-11 Thread Richard Smith via cfe-commits
rsmith added a subscriber: rsmith. Comment at: include/clang/AST/Type.h:1210 @@ +1209,3 @@ +/// Which keyword(s) were used to create an AutoType. +enum struct AutoTypeKeyword : unsigned char { + /// \brief auto Please use `enum class` here; we don't use `enum str

Re: [PATCH] D12865: Generating available_externally vtables and assume loads bugfix

2015-09-14 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/CodeGen/ItaniumCXXABI.cpp:399-400 @@ +398,4 @@ + return true; + } + else if (VtableComponent.isUsedFunctionPointerKind()) { +co

Re: r247618 - C11 _Bool bitfield diagnostic

2015-09-14 Thread Richard Smith via cfe-commits
On Mon, Sep 14, 2015 at 5:18 PM, Nico Weber via cfe-commits < cfe-commits@lists.llvm.org> wrote: > This also fires for bool in C++ files, even though the commit message > saying C11 and _Bool. Given the test changes, I suppose that's intentional? > This fires a lot on existing code, for example pr

Re: r247618 - C11 _Bool bitfield diagnostic

2015-09-14 Thread Richard Smith via cfe-commits
On Mon, Sep 14, 2015 at 5:31 PM, David Majnemer wrote: > On Mon, Sep 14, 2015 at 5:28 PM, Richard Smith via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > >> On Mon, Sep 14, 2015 at 5:18 PM, Nico Weber via cfe-commits < >> cfe-commits@lists.llvm.org> wrote

Re: r247618 - C11 _Bool bitfield diagnostic

2015-09-14 Thread Richard Smith via cfe-commits
On Mon, Sep 14, 2015 at 5:55 PM, David Majnemer wrote: > On Mon, Sep 14, 2015 at 5:40 PM, Richard Smith > wrote: > >> On Mon, Sep 14, 2015 at 5:31 PM, David Majnemer > > wrote: >> >>> On Mon, Sep 14, 2015 at 5:28 PM, Richard Smith via cfe-commits <

Re: r247651 - [MS ABI] Overwide bool bitfields should be permitted

2015-09-14 Thread Richard Smith via cfe-commits
On Mon, Sep 14, 2015 at 6:00 PM, David Majnemer via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: majnemer > Date: Mon Sep 14 20:00:55 2015 > New Revision: 247651 > > URL: http://llvm.org/viewvc/llvm-project?rev=247651&view=rev > Log: > [MS ABI] Overwide bool bitfields should be permi

r247654 - [modules] A using-declaration doesn't introduce a new entity, just a new name

2015-09-14 Thread Richard Smith via cfe-commits
Author: rsmith Date: Mon Sep 14 20:28:55 2015 New Revision: 247654 URL: http://llvm.org/viewvc/llvm-project?rev=247654&view=rev Log: [modules] A using-declaration doesn't introduce a new entity, just a new name for an existing entity, and as such a using-declaration doesn't need to conflict with a

Re: r247618 - C11 _Bool bitfield diagnostic

2015-09-14 Thread Richard Smith via cfe-commits
t;>> >>>> On Mon, Sep 14, 2015 at 5:31 PM, David Majnemer < >>>> david.majne...@gmail.com> wrote: >>>> >>>>> On Mon, Sep 14, 2015 at 5:28 PM, Richard Smith via cfe-commits < >>>>> cfe-commits@lists.llvm.org> wrote: >

Re: r247618 - C11 _Bool bitfield diagnostic

2015-09-14 Thread Richard Smith via cfe-commits
On Mon, Sep 14, 2015 at 7:07 PM, Rachel Craik wrote: > As of DR262, the C standard clarified that the width of a bit-field can > not exceed that of the specified type, and this change was primarily to > ensure that Clang correctly enforced this part of the standard. Looking at > the C++11 standar

Re: r247618 - C11 _Bool bitfield diagnostic

2015-09-14 Thread Richard Smith via cfe-commits
On Mon, Sep 14, 2015 at 7:07 PM, Rachel Craik wrote: > As of DR262, the C standard clarified that the width of a bit-field can > not exceed that of the specified type, and this change was primarily to > ensure that Clang correctly enforced this part of the standard. Looking at > the C++11 standar

Re: recordDecl() AST matcher

2015-09-15 Thread Richard Smith via cfe-commits
On Mon, Sep 14, 2015 at 2:41 PM, Manuel Klimek wrote: > > On Mon, Sep 14, 2015 at 2:29 PM Aaron Ballman > wrote: > >> On Mon, Sep 14, 2015 at 4:38 PM, Manuel Klimek wrote: >> > >> > >> > On Mon, Sep 14, 2015 at 12:26 PM Aaron Ballman >> > wrote: >> >> >> >> On Mon, Sep 14, 2015 at 2:45 PM, Dani

r247714 - [modules] Make sure we make hidden UsingShadowDecls visible to redeclaration

2015-09-15 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Sep 15 13:51:56 2015 New Revision: 247714 URL: http://llvm.org/viewvc/llvm-project?rev=247714&view=rev Log: [modules] Make sure we make hidden UsingShadowDecls visible to redeclaration lookup for the UsingShadowDecls themselves. Modified: cfe/trunk/include/clang/Sema/

Re: [PATCH] D12026: Decorating vptr load & stores with !invariant.group

2015-09-15 Thread Richard Smith via cfe-commits
rsmith accepted this revision. This revision is now accepted and ready to land. Comment at: lib/CodeGen/CodeGenModule.cpp:3859 @@ -3848,4 +3858,3 @@ } else { -InternalId = llvm::MDNode::getDistinct(getLLVMContext(), - llvm::ArrayRef

Re: r247618 - C11 _Bool bitfield diagnostic

2015-09-15 Thread Richard Smith via cfe-commits
On Tue, Sep 15, 2015 at 12:38 PM, Nico Weber wrote: > With this patch, we warn on `bool a : 4;`, yet we don't warn on `bool b` > (which has 8 bits storage, 1 bit value). Warning on `bool b` is silly of > course, but why is warning on `bool a : 4` useful? That's like 50% more > storage efficient t

r247765 - [modules] Fix a corner case in the macro override rules: properly handle overridden leaf module macros.

2015-09-15 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Sep 15 19:55:50 2015 New Revision: 247765 URL: http://llvm.org/viewvc/llvm-project?rev=247765&view=rev Log: [modules] Fix a corner case in the macro override rules: properly handle overridden leaf module macros. Modified: cfe/trunk/lib/Lex/PPMacroExpansion.cpp cf

Re: r247765 - [modules] Fix a corner case in the macro override rules: properly handle overridden leaf module macros.

2015-09-15 Thread Richard Smith via cfe-commits
On Sep 15, 2015 6:28 PM, "Sean Silva" wrote: > > > > On Tue, Sep 15, 2015 at 5:55 PM, Richard Smith via cfe-commits < cfe-commits@lists.llvm.org> wrote: >> >> Author: rsmith >> Date: Tue Sep 15 19:55:50 2015 >> New Revision: 247765 >> &

Re: [PATCH] D12839: Extend MoveConstructorInitCheck to also flag constructor arguments passed by value and can be moved assigned to fields.

2015-09-16 Thread Richard Smith via cfe-commits
On Tue, Sep 15, 2015 at 12:50 PM, Aaron Ballman wrote: > aaron.ballman added reviewers: rtrieu, rsmith. > aaron.ballman added a comment. > > There is a -Wpessimizing-move frontend warning that Richard added not too > long ago, which tells the user to remove calls to std::move() because they > pes

Re: [PATCH] D11844: [Modules] More descriptive diagnostics for misplaced import directive

2015-09-16 Thread Richard Smith via cfe-commits
rsmith added a comment. Sorry for the delay. I'm generally happy with the direction of this patch; I think this will substantially improve how we diagnose this set of problems. Comment at: include/clang/Basic/DiagnosticParseKinds.td:1016 @@ -1015,2 +1015,3 @@ "expected ';' a

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

2015-09-16 Thread Richard Smith via cfe-commits
On Mon, Sep 14, 2015 at 7:07 AM, Marshall Clow wrote: > mclow.lists added a comment. > > I have two concerns about this patch (w/o commenting on the actual code). > > 1. Until very recently, I was under the impression that C libraries > _either_ defined a macro, or had a function. I was quite sur

Re: r247618 - C11 _Bool bitfield diagnostic

2015-09-16 Thread Richard Smith via cfe-commits
On Wed, Sep 16, 2015 at 5:27 PM, Nico Weber via cfe-commits < cfe-commits@lists.llvm.org> wrote: > On Tue, Sep 15, 2015 at 5:50 PM, Richard Smith > wrote: > >> On Tue, Sep 15, 2015 at 12:38 PM, Nico Weber wrote: >> >>> With this patch, we warn on `bool a : 4;`, yet we don't warn on `bool b` >>>

Re: [PATCH] D12927: Using MD_invariant_group

2015-09-17 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/D12927 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co

Re: [PATCH] D11844: [Modules] More descriptive diagnostics for misplaced import directive

2015-09-18 Thread Richard Smith via cfe-commits
rsmith accepted this revision. rsmith added a reviewer: rsmith. Comment at: include/clang/Parse/Parser.h:2560-2562 @@ +2559,5 @@ + bool tryParseMisplacedModuleImport() { +tok::TokenKind Kind = Tok.getKind(); +if (Kind == tok::annot_module_begin || Kind == tok::annot_modul

Re: [PATCH] D11844: [Modules] More descriptive diagnostics for misplaced import directive

2015-09-18 Thread Richard Smith via cfe-commits
rsmith added a comment. A separate patch for the ObjC cases is fine. http://reviews.llvm.org/D11844 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: r248064 - Split off the binary literal warning into a subgroup of C++14 warnings

2015-09-18 Thread Richard Smith via cfe-commits
Can we arrange for this warning to also be controlled by the -Wgnu-binary-literal option, as it is outside C++ mode? On Fri, Sep 18, 2015 at 4:18 PM, Richard Trieu via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: rtrieu > Date: Fri Sep 18 18:18:39 2015 > New Revision: 248064 > > URL

Re: r247618 - C11 _Bool bitfield diagnostic

2015-09-18 Thread Richard Smith via cfe-commits
On Wed, Sep 16, 2015 at 5:33 PM, Richard Smith wrote: > On Wed, Sep 16, 2015 at 5:27 PM, Nico Weber via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > >> On Tue, Sep 15, 2015 at 5:50 PM, Richard Smith >> wrote: >> >>> On Tue, Sep 15, 2015 at 12:38 PM, Nico Weber >>> wrote: >>> With t

r248079 - Add test that we correctly allow some non-letter unicode characters in

2015-09-18 Thread Richard Smith via cfe-commits
Author: rsmith Date: Fri Sep 18 21:14:12 2015 New Revision: 248079 URL: http://llvm.org/viewvc/llvm-project?rev=248079&view=rev Log: Add test that we correctly allow some non-letter unicode characters in identifiers, and extend existing test to also cover C++. Modified: cfe/trunk/test/Lexer/u

Re: r247618 - C11 _Bool bitfield diagnostic

2015-09-18 Thread Richard Smith via cfe-commits
On Fri, Sep 18, 2015 at 8:49 PM, Nico Weber wrote: > On Fri, Sep 18, 2015 at 5:06 PM, Richard Smith > wrote: > >> On Wed, Sep 16, 2015 at 5:33 PM, Richard Smith >> wrote: >> >>> On Wed, Sep 16, 2015 at 5:27 PM, Nico Weber via cfe-commits < >>> cfe-commits@lists.llvm.org> wrote: >>> On Tue,

Re: [PATCH] D12903: Add -fplugin=name.so option to the driver

2015-09-18 Thread Richard Smith via cfe-commits
On Fri, Sep 18, 2015 at 8:22 PM, Saleem Abdulrasool via cfe-commits < cfe-commits@lists.llvm.org> wrote: > compnerd accepted this revision. > compnerd added a reviewer: compnerd. > compnerd added a comment. > This revision is now accepted and ready to land. > > Looks fine minus the one thing that

Re: r248293 - [CUDA] Add implicit __attribute__((used)) to all __global__ functions.

2015-09-22 Thread Richard Smith via cfe-commits
It seems like the real problem here is that we're giving the template instantiation the wrong linkage. It can be used from outside this llvm module, so it should be weak_odr instead of linkonce_odr. On Sep 22, 2015 10:24 AM, "Artem Belevich via cfe-commits" < cfe-commits@lists.llvm.org> wrote: > A

Re: [PATCH] D12689: [libc++][static linking] std streams are not initialized prior to their use in static object constructors

2015-09-22 Thread Richard Smith via cfe-commits
On Sep 11, 2015 4:23 AM, "Evgeny Astigeevich via cfe-commits" < cfe-commits@lists.llvm.org> wrote: > > eastig added a comment. > > In http://reviews.llvm.org/D12689#243592, @rsmith wrote: > > > Can we instead fix this in Clang by ensuring that libc++ is put at the right position in the static link

r248430 - Remove wrong implication that value-dependent implies instantiation-dependent,

2015-09-23 Thread Richard Smith via cfe-commits
Author: rsmith Date: Wed Sep 23 16:30:47 2015 New Revision: 248430 URL: http://llvm.org/viewvc/llvm-project?rev=248430&view=rev Log: Remove wrong implication that value-dependent implies instantiation-dependent, and fix the only code that was depending on this so that it sets all the relevant flag

r248431 - PR14858: Initial support for proper sizeof... handling within alias templates.

2015-09-23 Thread Richard Smith via cfe-commits
Author: rsmith Date: Wed Sep 23 16:41:42 2015 New Revision: 248431 URL: http://llvm.org/viewvc/llvm-project?rev=248431&view=rev Log: PR14858: Initial support for proper sizeof... handling within alias templates. This doesn't quite get alias template equivalence right yet, but handles the egregious

r248435 - Remove warning on over-wide bit-field of boolean type; there's no risk that

2015-09-23 Thread Richard Smith via cfe-commits
Author: rsmith Date: Wed Sep 23 17:07:44 2015 New Revision: 248435 URL: http://llvm.org/viewvc/llvm-project?rev=248435&view=rev Log: Remove warning on over-wide bit-field of boolean type; there's no risk that someone thought all the bits would be value bits in this case. Also fix the wording of t

Re: r247618 - C11 _Bool bitfield diagnostic

2015-09-23 Thread Richard Smith via cfe-commits
On Mon, Sep 21, 2015 at 3:21 PM, Alexey Samsonov wrote: > Do you plan to fix diagnostic emission for cases like "bool b : 4" in the > near future, or it makes sense to revert this change until we reach > consensus on the rules, and implementation? > Fixed in r248435. > On Fri, Sep 18, 2015 at

r248867 - Promote a warning on ill-formed code (redeclaration missing an exception

2015-09-29 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Sep 29 19:48:50 2015 New Revision: 248867 URL: http://llvm.org/viewvc/llvm-project?rev=248867&view=rev Log: Promote a warning on ill-formed code (redeclaration missing an exception specification) to an error. No compiler other than Clang seems to allow this, and it doesn't

Re: [PATCH] D13319: Eliminate __llvm_profile_register calls

2015-09-30 Thread Richard Smith via cfe-commits
rsmith added a comment. Clang changes LGTM. http://reviews.llvm.org/D13319 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

<    21   22   23   24   25   26   27   28   29   30   >