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 > wrote:

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 6, 2015 at 3:02 PM, Er

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, without >> including and

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 > as the pr

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 for this patch. > On

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

2015-10-06 Thread Richard Smith via cfe-commits
. This one is tricky: 1) There's an (undocumented) interface between the C standard library and this header, where the macros __need_ptrdiff_t, __need_size_t, __need_wchar_t, __need_NULL, __need_wint_t request just a piece of this header rather than the whole thing. If we see any of those, just go

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

2015-10-06 Thread Richard Smith via cfe-commits
: like , this provides only pieces if __need_FILE or __need___FILE is defined : likewise, but for __need_malloc_and_calloc and are straightforward is tricky: C libraries that don't implement the right interface provide non-const-correct functions like "wchar_t *wmemchr(const wchar_t*, wchar_t, s

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
ady under `#ifdef > __cplusplus`? > People like to include C++'s headers inside 'extern "C"' blocks. We shouldn't break that if we don't have to. > -- Sean Silva > > >> >> >>> On Tue, Oct 6, 2015 at 3:57 PM, Richard

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 >>> Date: Mon Aug 10 14:39:01 2015 >>> New Revision: 244

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: On Mon, Aug 10, 2015 at 12:39 PM, Reid Kleckner via cfe-c

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
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

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
On Tue, Aug 11, 2015 at 11:49 AM, Manuel Klimek wrote: > Back in the day I'm pretty sure you agreed with the general concept :) > Yeah, I don't think I fully understood the reason for having a cc1 -module-file-deps flag at the time. http://reviews.llvm.org/D8378 > I remember that we had problem

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. >>> >>> Hmm, do you guys have any suggestions as far as renaming >>> err_concept_

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
This patch seems a bit confused. You warn that the flag is ignored in C++, but it only has an effect in C++. You have a testcase with a .c extension that is built with -x c++. On Wed, Aug 12, 2015 at 5:23 AM, Sjoerd Meijer wrote: > [ + cfe-commits@lists.llvm.org ] > > > > Hi, > > The functionali

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. >>> >>> >>> Comment at: lib/Parse/Parser.cpp:2003 >>> @@ +2002,

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
On Thu, Aug 13, 2015 at 1:52 AM, Sjoerd Meijer wrote: > Hi Richard, > > Thanks for reviewing. Agree, that was a bit confusing. More specifically, > > the warning message was confusing (i.e. wrong). This patch is for > compiling .c > > input in C++ mode. The new flag should be ignored for C++ **in

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
On Mon, Aug 17, 2015 at 1:59 PM, David Blaikie wrote: > > > On Mon, Aug 17, 2015 at 11:07 AM, Evgeniy Stepanov via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > >> eugenis created this revision. >> eugenis added reviewers: chandlerc, rsmith. >> eugenis added a subscriber: cfe-commits. >> e

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
On Mon, Aug 17, 2015 at 5:15 PM, Li, Charles via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Hi Richard and Justin, > > > > > > > What's the upside to this approach? AFAICT it makes the test harder to > read and errors less informative due to pointing at the wrong lines, but > (at least in

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 6:27 PM, Li, Charles < charles...@playstation.sony.com> wrote: > Hi Richard, > > > > I have modified the “expected-“ lines as you requested. > +#if (!defined(__cplusplus)) || (__cplusplus <= 199711L) // C or C++03 or earlier modes You can simplify that to: #if __cplusplu

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:

Re: r245267 - Revert "Generating assumption loads of vptr after ctor call (fixed)"

2015-08-17 Thread Richard Smith via cfe-commits
Are you sure it was this change and not r245265? On Aug 17, 2015 10:41 PM, "Justin Bogner via cfe-commits" < cfe-commits@lists.llvm.org> wrote: > Author: bogner > Date: Tue Aug 18 00:40:20 2015 > New Revision: 245267 > > URL: http://llvm.org/viewvc/llvm-project?rev=245267&view=rev > Log: > Revert

r245346 - Initialize the AST consumer as soon as we have both an ASTConsumer and an

2015-08-18 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Aug 18 15:39:29 2015 New Revision: 245346 URL: http://llvm.org/viewvc/llvm-project?rev=245346&view=rev Log: Initialize the AST consumer as soon as we have both an ASTConsumer and an ASTContext. Fixes some cases where we could previously initialize the AST consumer more tha

Re: r244416 - [modules] PR22534: Load files specified by -fmodule-file= eagerly. In particular, this avoids the need to re-parse module map files when using such a module.

2015-08-18 Thread Richard Smith via cfe-commits
On Tue, Aug 18, 2015 at 1:52 PM, Gábor Horváth wrote: > On 18 August 2015 at 13:41, Richard Smith wrote: > >> On Tue, Aug 18, 2015 at 12:59 PM, Gábor Horváth >> wrote: >> >>> Hi! >>> >>> In r244416 you made createModuleManager to call the Initialize method >>> of the ASTConsumer. >>> Because of

r245361 - Range-based-for-convert some loops in ASTWriter. No functionality change intended.

2015-08-18 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Aug 18 16:53:42 2015 New Revision: 245361 URL: http://llvm.org/viewvc/llvm-project?rev=245361&view=rev Log: Range-based-for-convert some loops in ASTWriter. No functionality change intended. Modified: cfe/trunk/include/clang/Basic/Module.h cfe/trunk/lib/Serializa

Re: r244266 - [ItaniumCXXABI] Don't import RTTI data for classes with key functions

2015-08-18 Thread Richard Smith via cfe-commits
On Fri, Aug 14, 2015 at 11:27 AM, Hans Wennborg via cfe-commits < cfe-commits@lists.llvm.org> wrote: > On Tue, Aug 11, 2015 at 1:41 PM, Hans Wennborg wrote: > > On Thu, Aug 6, 2015 at 1:56 PM, David Majnemer via cfe-commits > > wrote: > >> Author: majnemer > >> Date: Thu Aug 6 15:56:55 2015 > >

r245390 - [modules] Fix HeaderFileInfo serialization to store all the known owning modules for a header, not just the current favourite.

2015-08-18 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Aug 18 18:42:23 2015 New Revision: 245390 URL: http://llvm.org/viewvc/llvm-project?rev=245390&view=rev Log: [modules] Fix HeaderFileInfo serialization to store all the known owning modules for a header, not just the current favourite. Modified: cfe/trunk/include/clan

r245391 - [modules] Tests for r245390.

2015-08-18 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Aug 18 18:42:50 2015 New Revision: 245391 URL: http://llvm.org/viewvc/llvm-project?rev=245391&view=rev Log: [modules] Tests for r245390. Added: cfe/trunk/test/Modules/Inputs/explicit-build-overlap/ cfe/trunk/test/Modules/Inputs/explicit-build-overlap/a.h cfe/t

Re: r245352 - Workaround -Wdeprecated on SemDiagnosticConsumer's tricksy copy ctor.

2015-08-18 Thread Richard Smith via cfe-commits
On Tue, Aug 18, 2015 at 2:03 PM, David Blaikie wrote: > Richard, do you think there's anything we could do better here? > > It seems difficult to support proper move semantic behavior for > [Sema]DiagnosticBuilder across the two common use cases: > > DiagnosticBuilder D; > D << x; > D << y;

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