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 Fri, Sep 18, 2015 at 11:17 PM, Nico Weber via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > >> On Fri, Sep 18, 2015 at 10:19 PM, Richard Smith >> wrote: >> >>> On Fri, Sep 18, 2015 at 8:49 PM, Nico Weber wrote: >>> >>>> On Fri

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

Re: [PATCH] D13317: clang_Cursor_getMangling shouldn't mangle if the declaration isn't mangled

2015-09-30 Thread Richard Smith via cfe-commits
rsmith added a subscriber: rsmith. Comment at: tools/libclang/CIndex.cpp:3895 @@ +3894,3 @@ + // Don't mangle if we don't need to. + if (!MC->shouldMangleCXXName(ND)) +return cxstring::createEmpty(); You should use `shouldMangleDeclName` here instead; this w

Re: [PATCH] D13319: Eliminate __llvm_profile_register calls

2015-09-30 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: lib/Driver/ToolChains.cpp:2191-2193 @@ +2190,5 @@ + + SmallString<128> Path(getDriver().ResourceDir); + llvm::sys::path::append(Path, "prf_data.x"); + CmdArgs.push_back(Args.MakeArgString(Path)); + return true; Please

Re: [PATCH] D13324: Fix the SSE4 byte sign extension in a cleaner way, and more thoroughly test that our intrinsics behave the same under -fsigned-char and -funsigned-char.

2015-09-30 Thread Richard Smith via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. LGTM http://reviews.llvm.org/D13324 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co

Re: [PATCH] D13322: Add -f[no-]declspec to control recognition of __declspec as a keyword

2015-09-30 Thread Richard Smith via cfe-commits
rsmith added a subscriber: rsmith. Comment at: include/clang/Basic/LangOptions.def:93 @@ -92,2 +92,3 @@ LANGOPT(WChar , 1, CPlusPlus, "wchar_t keyword") +LANGOPT(DeclSpecKeyword , 1, 0, "Microsoft __declspec keyword support") BENIGN_LANGOPT(DollarIdents , 1, 1, "

r249113 - Explicitly delete a function that is supposed to never be called.

2015-10-01 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Oct 1 19:46:58 2015 New Revision: 249113 URL: http://llvm.org/viewvc/llvm-project?rev=249113&view=rev Log: Explicitly delete a function that is supposed to never be called. Modified: cfe/trunk/include/clang/AST/TemplateBase.h Modified: cfe/trunk/include/clang/AST/Te

r249114 - PR24921: checking explicitly-specified template arguments when matching a

2015-10-01 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Oct 1 19:49:37 2015 New Revision: 249114 URL: http://llvm.org/viewvc/llvm-project?rev=249114&view=rev Log: PR24921: checking explicitly-specified template arguments when matching a partial specialization can perform conversions on the argument. Be sure we start again from

Re: r248984 - Test fix

2015-10-01 Thread Richard Smith via cfe-commits
On Thu, Oct 1, 2015 at 6:01 AM, Renato Golin via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Right, I reverted both commits on r249005. Please, let me know if you > need help testing on ARM before the next commit. This looks like it > could be tested on any 32-bit platform, though, so you s

Re: [PATCH] D13373: Emiting invariant.group.barrier for ctors bugfix

2015-10-02 Thread Richard Smith via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. LGTM, but your commit message should be more descriptive than your current summary. Something like: Ensure that the vptr store in the most-derived constructor is not behind an invariant group

r249342 - Revert r107690 (for PR7417) and add a testcase that it breaks. The approach of

2015-10-05 Thread Richard Smith via cfe-commits
Author: rsmith Date: Mon Oct 5 15:05:21 2015 New Revision: 249342 URL: http://llvm.org/viewvc/llvm-project?rev=249342&view=rev Log: Revert r107690 (for PR7417) and add a testcase that it breaks. The approach of that change turns out to not be reasonable: mutating the AST of a parsed template duri

Re: [PATCH] D13419: Fix several problems at the intersection of template instantiations and visibility

2015-10-05 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: lib/AST/Decl.cpp:1089 @@ -1086,10 +1088,3 @@ if (const FunctionDecl *fn = dyn_cast(ND)) { -// If the function is a specialization of a template with an -// explicit visibility attribute, use that. -if (FunctionTemplateSpecia

Re: r249314 - [VFS] Move class out of method so it looks less like Java.

2015-10-05 Thread Richard Smith via cfe-commits
On Mon, Oct 5, 2015 at 6:55 AM, Benjamin Kramer via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: d0k > Date: Mon Oct 5 08:55:09 2015 > New Revision: 249314 > > URL: http://llvm.org/viewvc/llvm-project?rev=249314&view=rev > Log: > [VFS] Move class out of method so it looks less like

Re: [PATCH] D13386: PR24115: Don't instantiate constexpr function templates in decltype

2015-10-05 Thread Richard Smith via cfe-commits
rsmith added a comment. Sorry, this is not OK; we need to eagerly instantiate within a `decltype` expression in some cases, and we should not be treating `decltype` as being different from any other unevaluated operand here. Example: template constexpr T f() { return 0; } decltype(char{f()}

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

2015-10-05 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: include/clang/AST/DeclOpenMP.h:95 @@ +94,3 @@ +/// #pragma omp declare reduction (foo : int,float : omp_out += omp_in) +/// initializer (omp_priv = 0) +/// \endcode I think automatic formatting has messed up your example.

Re: [PATCH] D13408: Skip NonNull sema checks in unevaluated contexts.

2015-10-05 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 reasonable. I wonder if it might be better to also suppress warnings for dynamically-unreachable code (you can do this by changing the `Diag` calls inside `CheckNonNullArguments` t

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

2015-10-06 Thread Richard Smith via cfe-commits
On Mon, Oct 5, 2015 at 7:10 PM, Eric Fiselier wrote: > EricWF added a comment. > > I think thing change will help us close a number out outstanding bugs. I > don't have any fundamental objections to this approach. However the size > of this patch scares me. I understand the changes are mostly m

[libcxx] r249475 - Remove unnecessary inline functions capturing the contents of C library macros.

2015-10-06 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Oct 6 17:03:22 2015 New Revision: 249475 URL: http://llvm.org/viewvc/llvm-project?rev=249475&view=rev Log: Remove unnecessary inline functions capturing the contents of C library macros. The C standard requires that these be provided as functions even if they're also pro

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

2015-10-06 Thread Richard Smith via cfe-commits
Next: factoring the definition of std::nullptr_t out into a separate file, so that and can both use it, without including and without providing a ::nullptr_t like does. On Tue, Oct 6, 2015 at 3:02 PM, Eric Fiselier wrote: > LGTM. > > On Tue, Oct 6, 2015 at 3:58 PM, Richard Smith

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

2015-10-06 Thread Richard Smith via cfe-commits
Split header out of On Tue, Oct 6, 2015 at 3:07 PM, Richard Smith wrote: > Next: factoring the definition of std::nullptr_t out into a separate file, > so that and can both use it, without > including and without providing a ::nullptr_t like > does. > > On Tue, Oct

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

2015-10-06 Thread Richard Smith via cfe-commits
Likewise for , , On Tue, Oct 6, 2015 at 3:20 PM, Richard Smith wrote: > Split header out of > > On Tue, Oct 6, 2015 at 3:07 PM, Richard Smith > wrote: > >> Next: factoring the definition of std::nullptr_t out into a separate >> file, so that and can both use it,

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

2015-10-06 Thread Richard Smith via cfe-commits
, an easy one. We guarantee a setjmp macro exists even if this header is somehow included from C (the C standard allows that, so it's not worth checking for __cplusplus). On Tue, Oct 6, 2015 at 3:36 PM, Richard Smith wrote: > Split out of . This is a big change, but the same pattern

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

2015-10-06 Thread Richard Smith via cfe-commits
On Tue, Oct 6, 2015 at 3:07 PM, Richard Smith wrote: > Next: factoring the definition of std::nullptr_t out into a separate file, > so that and can both use it, without > including and without providing a ::nullptr_t like > does. > Sorry, missed a couple of the hunks

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

2015-10-06 Thread Richard Smith via cfe-commits
and we duplicate the definition of max_align_t between them, in the case where the compiler's doesn't provide it. If you prefer, I could make include to avoid the duplication of the max_align_t logic. This patch depends on patch 02. On Tue, Oct 6, 2015 at 3:42 PM, Richard Smith wrote:

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

2015-10-06 Thread Richard Smith via cfe-commits
*, wchar_t, size_t)". We can't fix that, so we don't try. On Tue, Oct 6, 2015 at 3:57 PM, Richard Smith wrote: > . This one is tricky: > > 1) There's an (undocumented) interface between the C standard library and > this header, where the macros __need_ptrdiff_t, __

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

2015-10-06 Thread Richard Smith via cfe-commits
On Tue, Oct 6, 2015 at 4:11 PM, Sean Silva wrote: > +extern "C++" { > +#include <__nullptr> > +using std::nullptr_t; > +} > > Does this even compile with modules? > Yes. You're allowed to import a C++ module within an 'extern "C++"'

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

2015-10-06 Thread Richard Smith via cfe-commits
On Tue, Oct 6, 2015 at 4:16 PM, Sean Silva wrote: > On Tue, Oct 6, 2015 at 4:13 PM, Richard Smith > wrote: > >> On Tue, Oct 6, 2015 at 4:11 PM, Sean Silva wrote: >> >>> +extern "C++" { >>> +#include <__nullptr> >>> +using st

Re: [PATCH] D9898: MismatchingNewDeleteDetector uses incorrect field, and finds no initializer

2015-10-06 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/D9898 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com

Re: [PATCH] D13304: Avoid inlining in throw statement

2015-10-07 Thread Richard Smith via cfe-commits
rsmith added a subscriber: rsmith. rsmith added a comment. This seems like something that's much better handled by the inliner. We should presumably treat all the code that leads up to the throw as being cold, not just the invocation of the throw-expression itself, and it seems like it should b

r244530 - Remove some dead code.

2015-08-10 Thread Richard Smith via cfe-commits
Author: rsmith Date: Mon Aug 10 18:26:54 2015 New Revision: 244530 URL: http://llvm.org/viewvc/llvm-project?rev=244530&view=rev Log: Remove some dead code. Modified: cfe/trunk/include/clang/Serialization/ASTReader.h cfe/trunk/lib/Serialization/ASTReader.cpp Modified: cfe/trunk/include/cl

Re: r244488 - [dllimport] A non-imported class with an imported key can't have a key

2015-08-10 Thread Richard Smith via cfe-commits
On Mon, Aug 10, 2015 at 12:39 PM, Reid Kleckner via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: rnk > Date: Mon Aug 10 14:39:01 2015 > New Revision: 244488 > > URL: http://llvm.org/viewvc/llvm-project?rev=244488&view=rev > Log: > [dllimport] A non-imported class with an imported key

r244537 - Fix some tabs.

2015-08-10 Thread Richard Smith via cfe-commits
Author: rsmith Date: Mon Aug 10 19:03:28 2015 New Revision: 244537 URL: http://llvm.org/viewvc/llvm-project?rev=244537&view=rev Log: Fix some tabs. Modified: cfe/trunk/lib/Frontend/CompilerInstance.cpp Modified: cfe/trunk/lib/Frontend/CompilerInstance.cpp URL: http://llvm.org/viewvc/llvm-pr

r244538 - [modules] Properly diagnose errors in module files for which we have no

2015-08-10 Thread Richard Smith via cfe-commits
Author: rsmith Date: Mon Aug 10 19:05:21 2015 New Revision: 244538 URL: http://llvm.org/viewvc/llvm-project?rev=244538&view=rev Log: [modules] Properly diagnose errors in module files for which we have no corresponding include location (those specified on the command line). Modified: cfe/trun

Re: [PATCH] D11658: [Sema] main can't be declared as global variable

2015-08-10 Thread Richard Smith via cfe-commits
rsmith added a comment. Maybe you could refactor the check to something like: if (Name.isIdentifier() && Name.getAsIdentifierInfo()->isStr("main") NewVD->getDeclContext()->getRedeclContext()->isTranslationUnit() && !getLangOpts().Freestanding && !NewVD->getDescribedVarTemplate()) {

r244547 - [modules] Don't suggest deleting the module cache on an error if there is no module cache for this build.

2015-08-10 Thread Richard Smith via cfe-commits
Author: rsmith Date: Mon Aug 10 19:32:42 2015 New Revision: 244547 URL: http://llvm.org/viewvc/llvm-project?rev=244547&view=rev Log: [modules] Don't suggest deleting the module cache on an error if there is no module cache for this build. Modified: cfe/trunk/test/Modules/explicit-build-missi

Re: r244488 - [dllimport] A non-imported class with an imported key can't have a key

2015-08-10 Thread Richard Smith via cfe-commits
On Mon, Aug 10, 2015 at 5:43 PM, Reid Kleckner wrote: > On Mon, Aug 10, 2015 at 5:00 PM, Richard Smith > wrote: > >> On Mon, Aug 10, 2015 at 12:39 PM, Reid Kleckner via cfe-commits < >> cfe-commits@lists.llvm.org> wrote: >> >>> Author: rnk >>&

Re: r244488 - [dllimport] A non-imported class with an imported key can't have a key

2015-08-11 Thread Richard Smith via cfe-commits
On Aug 11, 2015 9:45 AM, "Reid Kleckner" wrote: > > On Mon, Aug 10, 2015 at 6:40 PM, Richard Smith wrote: >> >> On Mon, Aug 10, 2015 at 5:43 PM, Reid Kleckner wrote: >>> >>> On Mon, Aug 10, 2015 at 5:00 PM, Richard Smith wrote: >>>> &g

Re: r244413 - [modules] When building a dependency file, include module maps parsed in the

2015-08-11 Thread Richard Smith via cfe-commits
On Tue, Aug 11, 2015 at 4:57 AM, Manuel Klimek wrote: > I believe this breaks -fno-module-file-deps. > I don't think so; this affects which module map files end up in the .d file, not which .pcm files do. > On Sun, Aug 9, 2015 at 6:47 AM Richard Smith via cfe-commits &

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

2015-08-11 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: include/clang/Basic/DiagnosticParseKinds.td:1018-1019 @@ -1017,2 +1017,4 @@ "expected ';' after module name">; +def err_unexpected_module_end : Error<"unexpected module end">; +def err_unexpected_module_start : Error<"submodule cannot b

Re: r244413 - [modules] When building a dependency file, include module maps parsed in the

2015-08-11 Thread Richard Smith via cfe-commits
some higher-level notion that we should instead be capturing here.) On Tue, Aug 11, 2015 at 11:27 AM, Manuel Klimek wrote: > Ah, so we need a flag -fno-module-map-file-deps, I assume... > > On Tue, Aug 11, 2015 at 8:12 PM Richard Smith > wrote: > >> On Tue, Aug 11, 2015

Fwd: r232721 - Add option to switch off putting header modules into the dependency file.

2015-08-11 Thread Richard Smith via cfe-commits
On Thu, Mar 19, 2015 at 5:00 AM, Manuel Klimek wrote: > Author: klimek > Date: Thu Mar 19 07:00:22 2015 > New Revision: 232721 > > URL: http://llvm.org/viewvc/llvm-project?rev=232721&view=rev > Log: > Add option to switch off putting header modules into the dependency file. > Why? It is not corr

Re: r232721 - Add option to switch off putting header modules into the dependency file.

2015-08-11 Thread Richard Smith via cfe-commits
ng the frontend to include .pcm files in the produced .d file. The only effect of the flag added here was to turn off this bugfix for PCH files; I don't think this is a useful flag. On Tue, Aug 11, 2015 at 8:41 PM Richard Smith wrote: > >> On Thu, Mar 19, 2015 at 5:00 AM, Manuel K

Re: [PATCH] D3583: Sema: Implement DR244

2015-08-11 Thread Richard Smith via cfe-commits
rsmith added a comment. This will be in 3.7. Repository: rL LLVM http://reviews.llvm.org/D3583 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D11928: Small fixup

2015-08-11 Thread Richard Smith via cfe-commits
rsmith added a comment. Reid, do you remember what this FIXME was for? (Added in r198462.) http://reviews.llvm.org/D11928 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r244671 - Add an assert to catch lexical decl deserialization bugs.

2015-08-11 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Aug 11 16:21:20 2015 New Revision: 244671 URL: http://llvm.org/viewvc/llvm-project?rev=244671&view=rev Log: Add an assert to catch lexical decl deserialization bugs. Modified: cfe/trunk/lib/Serialization/ASTReader.cpp Modified: cfe/trunk/lib/Serialization/ASTReader.c

Re: [PATCH] D11928: Small fixup

2015-08-11 Thread Richard Smith via cfe-commits
rsmith added a comment. This change now disables the move constructor and move assignment. I think just removing the comment is better. http://reviews.llvm.org/D11928 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi

Re: r244670 - Fixing a few C++0x comments to be C++11; NFC.

2015-08-11 Thread Richard Smith via cfe-commits
On Tue, Aug 11, 2015 at 2:17 PM, Aaron Ballman via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: aaronballman > Date: Tue Aug 11 16:17:53 2015 > New Revision: 244670 > > URL: http://llvm.org/viewvc/llvm-project?rev=244670&view=rev > Log: > Fixing a few C++0x comments to be C++11; NFC.

Re: [PATCH] D11916: [CONCEPTS] Add diagnostic; invalid tag when concept specified

2015-08-11 Thread Richard Smith via cfe-commits
On Tue, Aug 11, 2015 at 2:46 PM, Nathan Wilson wrote: > Okay, I'll make the change. > > Hmm, do you guys have any suggestions as far as renaming > err_concept_decl_non_template? > How about err_concept_specifier_non_template? > Maybe err_concept_wrong_decl_kind? > We'd have to keep in mind th

r244682 - [modules] When instantiating the contents of an imported CXXRecordDecl, we can

2015-08-11 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Aug 11 17:00:24 2015 New Revision: 244682 URL: http://llvm.org/viewvc/llvm-project?rev=244682&view=rev Log: [modules] When instantiating the contents of an imported CXXRecordDecl, we can emit lexical contents for a declaration for another module. Track which module those c

Re: [PATCH] D11916: [CONCEPTS] Add diagnostic; invalid tag when concept specified

2015-08-11 Thread Richard Smith via cfe-commits
On Tue, Aug 11, 2015 at 3:35 PM, Nathan Wilson wrote: > > > On Tue, Aug 11, 2015 at 4:54 PM, Richard Smith > wrote: > >> On Tue, Aug 11, 2015 at 2:46 PM, Nathan Wilson >> wrote: >> >>> Okay, I'll make the change. >>> >

r244714 - [modules] Fix thread safety analysis to cope with merging of FieldDecls across modules.

2015-08-11 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Aug 11 21:17:52 2015 New Revision: 244714 URL: http://llvm.org/viewvc/llvm-project?rev=244714&view=rev Log: [modules] Fix thread safety analysis to cope with merging of FieldDecls across modules. Added: cfe/trunk/test/Modules/Inputs/thread-safety/ cfe/trunk/test/

Re: [PATCH] D11403: [Modules] Add Darwin-specific compatibility module map parsing hacks

2015-08-12 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, go ahead once you're satisfied that the performance is OK for the `requires excluded` / umbrella dir hack. Comment at: include/clang/Basic/Module.h:363 @@ +362,3

Re: [PATCH] D11944: Nativize filename in FileManager::getFile().

2015-08-12 Thread Richard Smith via cfe-commits
rsmith added a comment. In principle, normalizing slashes on Windows makes sense here. But we shouldn't use `llvm::sys::path::native`, because it's just too broken. Comment at: lib/Basic/FileManager.cpp:221-222 @@ -220,1 +220,4 @@ + SmallString<1024> NativeFilename; + llvm:

Re: [PATCH] D11968: Add sanitizer blacklists to the rules generated with -M/-MM/-MD/-MMD.

2015-08-12 Thread Richard Smith via cfe-commits
rsmith added a subscriber: rsmith. rsmith added a comment. LGTM http://reviews.llvm.org/D11968 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2015-08-12 Thread Richard Smith via cfe-commits
On Wed, Aug 12, 2015 at 12:08 AM, Sean Silva wrote: > silvas added a subscriber: silvas. > > > Comment at: lib/Parse/Parser.cpp:2003 > @@ +2002,3 @@ > +Diag(Tok, diag::err_unexpected_module_start); > +// Recover by skipping content of the included submodule. > +unsign

Re: [PATCH] RE: [cfe-dev] missing return statement for non-void functions in C++

2015-08-12 Thread Richard Smith via cfe-commits
d.mei...@arm.com > ] > *Sent:* 03 August 2015 11:40 > *To:* 'Richard Smith' > *Cc:* Hal Finkel; Marshall Clow; cfe-...@cs.uiuc.edu Developers; cfe > commits > *Subject:* RE: [PATCH] RE: [cfe-dev] missing return statement for > non-void functions in C++ > > &g

r244822 - [modules] If loading a .pcm file would cause us to run out of source locations, attempt to fail more gracefully. (No test; this requires >= 4GB of preprocessed input...)

2015-08-12 Thread Richard Smith via cfe-commits
Author: rsmith Date: Wed Aug 12 17:25:24 2015 New Revision: 244822 URL: http://llvm.org/viewvc/llvm-project?rev=244822&view=rev Log: [modules] If loading a .pcm file would cause us to run out of source locations, attempt to fail more gracefully. (No test; this requires >= 4GB of preprocessed inp

Re: [PATCH] D11658: [Sema] main can't be declared as global variable

2015-08-12 Thread Richard Smith via cfe-commits
rsmith added a comment. Looks good other than the diagnostic wording. Comment at: include/clang/Basic/DiagnosticSemaKinds.td:513 @@ -512,1 +512,3 @@ "platform-specific data}0) must be of type %1">; +def err_main_global_variable : Error<"main can't be declared as global var

r244852 - Add SourceManager::dump() to dump the current set of SLocEntries.

2015-08-12 Thread Richard Smith via cfe-commits
Author: rsmith Date: Wed Aug 12 19:45:11 2015 New Revision: 244852 URL: http://llvm.org/viewvc/llvm-project?rev=244852&view=rev Log: Add SourceManager::dump() to dump the current set of SLocEntries. Modified: cfe/trunk/include/clang/Basic/SourceManager.h cfe/trunk/lib/Basic/SourceManager.

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

2015-08-12 Thread Richard Smith via cfe-commits
On Wed, Aug 12, 2015 at 6:00 PM, Sean Silva wrote: > > > On Wed, Aug 12, 2015 at 2:43 PM, Richard Smith > wrote: > >> On Wed, Aug 12, 2015 at 12:08 AM, Sean Silva >> wrote: >> >>> silvas added a subscriber: silvas. >>> >>>

Re: [PATCH] D11944: Nativize filename in FileManager::getFile().

2015-08-13 Thread Richard Smith via cfe-commits
rsmith added a comment. I would think most Windows users would be surprised if we showed them paths with /s instead of \s, but I'm fine with us using / internally if it doesn't leak out to the user. klimek: if we want to nativize, I think the right thing to do is to remove the wrong "normaliza

r244923 - [modules] Change the way we deal with .d output for explicitly-specified module

2015-08-13 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Aug 13 12:57:10 2015 New Revision: 244923 URL: http://llvm.org/viewvc/llvm-project?rev=244923&view=rev Log: [modules] Change the way we deal with .d output for explicitly-specified module files: include the .pcm file itself in the .d output, rather than including its own i

Re: [PATCH] D11859: Generating vptr assume loads

2015-08-13 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: lib/CodeGen/CGCXXABI.h:349-357 @@ -348,1 +348,11 @@ + virtual bool + isVirtualOffsetNeededForVTableField(CodeGenFunction &CGF, + const CXXRecordDecl *NearestVBase) = 0; + + virtual bool canInitiali

r244927 - Fix wrong expected test output in r244923.

2015-08-13 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Aug 13 13:11:20 2015 New Revision: 244927 URL: http://llvm.org/viewvc/llvm-project?rev=244927&view=rev Log: Fix wrong expected test output in r244923. Modified: cfe/trunk/test/Modules/dependency-gen.modulemap Modified: cfe/trunk/test/Modules/dependency-gen.modulemap

Re: r244926 - Try to fix the build after r244923

2015-08-13 Thread Richard Smith via cfe-commits
On Thu, Aug 13, 2015 at 11:10 AM, Reid Kleckner via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: rnk > Date: Thu Aug 13 13:10:34 2015 > New Revision: 244926 > > URL: http://llvm.org/viewvc/llvm-project?rev=244926&view=rev > Log: > Try to fix the build after r244923 > Thanks! I thoug

Re: [PATCH] RE: [cfe-dev] missing return statement for non-void functions in C++

2015-08-13 Thread Richard Smith via cfe-commits
draw here? This patch still doesn't make sense to me. This flag is only meaningful when compiling as C++. You ignore it when compiling as C but produce a warning that says it's ignored when compiling as C++. > Cheers. > > > > *From:* meta...@gmail.com [mailto:meta...@gma

r244931 - [modules] For explicit module file dependencies, only list direct dependency module files.

2015-08-13 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Aug 13 13:30:25 2015 New Revision: 244931 URL: http://llvm.org/viewvc/llvm-project?rev=244931&view=rev Log: [modules] For explicit module file dependencies, only list direct dependency module files. Modified: cfe/trunk/lib/Frontend/CompilerInvocation.cpp cfe/trun

Re: [PATCH] D11629: APValues and Constants and MaterializedTemporaryExpr need to have stable maps

2015-08-13 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: include/clang/AST/ASTContext.h:180 @@ -179,3 +179,3 @@ /// that appear in constant initializers to their evaluated values. - llvm::DenseMap + std::map MaterializedTemporaryValues; I would prefer a `DenseMap`, wit

Re: [PATCH] D11629: APValues and Constants and MaterializedTemporaryExpr need to have stable maps

2015-08-13 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: lib/AST/ASTContext.cpp:8557 @@ +8556,3 @@ + if (MayCreate) { +auto *MTVI = &MaterializedTemporaryValues[E]; +if (*MTVI == nullptr) { Maybe use a reference here rather than a pointer. Comment at:

Re: [PATCH] D11629: APValues and Constants and MaterializedTemporaryExpr need to have stable maps

2015-08-13 Thread Richard Smith via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. LGTM http://reviews.llvm.org/D11629 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co

r244988 - [modules] When writing a module file built with -fmodule-map-file-home-is-cwd,

2015-08-13 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Aug 13 18:47:44 2015 New Revision: 244988 URL: http://llvm.org/viewvc/llvm-project?rev=244988&view=rev Log: [modules] When writing a module file built with -fmodule-map-file-home-is-cwd, via a module map found by -fmodule-map-file=, the home directory of the module is the

r244991 - This test was still failing for me after r244925, fix it harder.

2015-08-13 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Aug 13 19:16:05 2015 New Revision: 244991 URL: http://llvm.org/viewvc/llvm-project?rev=244991&view=rev Log: This test was still failing for me after r244925, fix it harder. Modified: cfe/trunk/test/CodeGenCXX/new.cpp Modified: cfe/trunk/test/CodeGenCXX/new.cpp URL:

Re: [PATCH] D11859: Generating vptr assume loads

2015-08-13 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: lib/CodeGen/CGClass.cpp:1832 @@ +1831,3 @@ + // Generate vtable assumptions if we are calling dynamic class ctor + // and we are not in another ctor. + if (CGM.getCodeGenOpts().OptimizationLevel > 0 && Prazek wrote: > h

Re: [PATCH] D11859: Generating vptr assume loads

2015-08-13 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: lib/CodeGen/CGClass.cpp:1832 @@ +1831,3 @@ + // Generate vtable assumptions if we are calling dynamic class ctor + // and we are not in another ctor. + if (CGM.getCodeGenOpts().OptimizationLevel > 0 && Prazek wrote: > r

r245028 - [modules] Add an experimental -cc1 feature to embed the contents of an input

2015-08-13 Thread Richard Smith via cfe-commits
Author: rsmith Date: Fri Aug 14 00:02:58 2015 New Revision: 245028 URL: http://llvm.org/viewvc/llvm-project?rev=245028&view=rev Log: [modules] Add an experimental -cc1 feature to embed the contents of an input file in the .pcm files. This allows a smaller set of files to be sent to a remote build

Re: r244193 - [ObjC] Circular containers: add support of subclasses

2015-08-14 Thread Richard Smith via cfe-commits
Sorry for the delay, this LGTM for branch. On Wed, Aug 12, 2015 at 1:09 AM, AlexDenisov <1101.deb...@gmail.com> wrote: > Ping > -- > AlexDenisov > Software Engineer, http://lowlevelbits.org > > > On 06 Aug 2015, at 18:15, Hans Wennborg wrote: > > > > Hi Alex, > > > > What crash is that? I don't

Re: [PATCH] D11850: Delay emitting members of dllexport classes until the class is fully parsed (PR23542)

2015-08-14 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: lib/Sema/SemaDeclCXX.cpp:4700-4703 @@ +4699,6 @@ +if (Member->getAttr()) { + if (TSK == TSK_ExplicitInstantiationDeclaration) +// Don't go any further if this is just an explicit instantiation +// declaration. +

Re: [PATCH] D11850: Delay emitting members of dllexport classes until the class is fully parsed (PR23542)

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

Re: [PATCH] D11789: Modify DeclaratorChuck::getFunction to be passed an Exception Specification SourceRange

2015-08-14 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: include/clang/Sema/DeclSpec.h:1262 @@ -1260,1 +1261,3 @@ +/// \brief The end location of the exception specifier, if any. +unsigned ExceptionSpecLocEnd; nwilson wrote: > Please let me know if there is still an is

Re: [PATCH] D11658: [Sema] main can't be declared as global variable

2015-08-14 Thread Richard Smith via cfe-commits
On Fri, Aug 14, 2015 at 7:15 AM, Davide Italiano wrote: > davide added a comment. > > Oops, I uploaded the wrong diff. Anyway, I changed can't to cannot and > committed this as r245051. > While looking at DiagnosticSemaKind.td I noticed there are still 7 > diagnostics that use can't instead of ca

Re: [PATCH] D12000: Bugfix - Clang handles __builtin_object_size in wrong way

2015-08-14 Thread Richard Smith via cfe-commits
rsmith added a subscriber: rsmith. Comment at: lib/AST/ExprConstant.cpp:6221-6223 @@ +6220,5 @@ + // + // extern struct X { char buff[32]; int a, b, c; } *p; + // int a = __builtin_object_size(p->buff + 4, 3); // returns 28 + // int b = __builtin_object_size(p->buff + 4,

r245136 - [modules] Stop dropping 'module.timestamp' files into the current directory

2015-08-14 Thread Richard Smith via cfe-commits
Author: rsmith Date: Fri Aug 14 19:34:15 2015 New Revision: 245136 URL: http://llvm.org/viewvc/llvm-project?rev=245136&view=rev Log: [modules] Stop dropping 'module.timestamp' files into the current directory when building with implicit modules disabled. Added: cfe/trunk/test/Modules/explicit

r245199 - [modules] When explicitly building a module file, don't include timestamps in

2015-08-17 Thread Richard Smith via cfe-commits
Author: rsmith Date: Mon Aug 17 02:13:32 2015 New Revision: 245199 URL: http://llvm.org/viewvc/llvm-project?rev=245199&view=rev Log: [modules] When explicitly building a module file, don't include timestamps in the produced pcm file for stable file creation across distributed build systems. Modif

Re: [PATCH] D12087: always_inline codegen rewrite

2015-08-17 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: lib/CodeGen/CodeGenModule.cpp:447-448 @@ +446,4 @@ + C->handleOperandChange(GV, IndirectReplacement, &U); +} else if (!isa(U.getUser()) && + !isa(U.getUser())) { + U.set(IndirectReplacement); Do

Re: Second Lit tests C++11 compatibility patch: using preprocessor to filter expected-error

2015-08-17 Thread Richard Smith via cfe-commits
On Mon, Aug 17, 2015 at 9:56 AM, Li, Charles via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Hi Clang developers, > > > > We here at Sony are continuing to update the Lit tests for C++ dialects > compatibility. > > Attached is the second patch. (As a reference, here is the link to the > dis

Re: [PATCH] D12000: Bugfix - Clang handles __builtin_object_size in wrong way

2015-08-17 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 with one more testcase :) Comment at: lib/AST/ExprConstant.cpp:6243-6245 @@ +6242,5 @@ + } else if (End.Designator.IsOnePastTheEnd) { +

r245236 - [modules] When parsing the base specifiers of a parse-merged class, the current

2015-08-17 Thread Richard Smith via cfe-commits
Author: rsmith Date: Mon Aug 17 15:24:17 2015 New Revision: 245236 URL: http://llvm.org/viewvc/llvm-project?rev=245236&view=rev Log: [modules] When parsing the base specifiers of a parse-merged class, the current context is the class itself but lookups should be performed starting with the lookup

Re: [PATCH] D12087: always_inline codegen rewrite

2015-08-17 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: lib/CodeGen/CodeGenModule.cpp:513 @@ +512,3 @@ +void CodeGenModule::RewriteAlwaysInlineFunctions() { + for (llvm::Function *Fn : AlwaysInlineFunctions) +RewriteAlwaysInlineFunction(Fn); Does it matter that this traver

Re: [PATCH] D11194: Instantiate function declarations in instantiated functions.

2015-08-17 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: lib/AST/DeclBase.cpp:273 @@ +272,3 @@ +return true; + if (const CXXRecordDecl *ClassD = dyn_cast(LDC)) +return ClassD->isLocalClass() && !ClassD->isLambda();; It's not necessary for this change, but to match its d

Re: [PATCH] D12087: always_inline codegen rewrite

2015-08-17 Thread Richard Smith via cfe-commits
ction body** >> } >> and, depending on the function visibility, either >> b1. declare F() >> or >> b2. define external F() { musttail call F.inlinefunction() } >> >> Frontend ensures that all direct calls go to F.inlinefunction(). >> >> Th

Re: [PATCH] D10431: PR21174 - clang only searches current working directory for precompiled include file

2015-08-17 Thread Richard Smith via cfe-commits
On Mon, Aug 17, 2015 at 9:24 AM, Nico Weber wrote: > thakis added a subscriber: thakis. > > > Comment at: lib/Driver/Tools.cpp:398 > @@ +397,3 @@ > + FoundPTH = !UsePCH; > +} > + } > > kimgr wrote: > > kimgr wrote: > > > kimgr wr

Re: Second Lit tests C++11 compatibility patch: using preprocessor to filter expected-error

2015-08-17 Thread Richard Smith via cfe-commits
you can do this: case blah: #if __cplusplus >= 201103L // expected-error@-2 {{error 2 lines above}} #else // expected-error@-4 {{error 4 lines above}} #endif > Please let me know how you feel about this patch. > > > > Sincerely, > > Charles > > > > > >

Re: Second Lit tests C++11 compatibility patch: using preprocessor to filter expected-error

2015-08-17 Thread Richard Smith via cfe-commits
can simplify that to: #if __cplusplus <= 199711L __cplusplus will expand to 0 inside a #if in C (as will any un#defined identifier). Otherwise, this LGTM. Cheers, > > Charles > > > > > > *From:* meta...@gmail.com [mailto:meta...@gmail.com] *On Behalf Of *Richard > Smith >

Re: [PATCH] D11859: Generating vptr assume loads

2015-08-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 Comment at: test/CodeGenCXX/vtable-assume-load.cpp:24 @@ +23,3 @@ +// CHECK1-LABEL: define void @_ZN5test14fooAEv() +// CHECK1: call void @_ZN5test11AC1Ev(%"struct.test1:

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