r267914 - Fix use of uninitialized value exposed by r267802. Accessors of an invalid

2016-04-28 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Apr 28 13:26:32 2016 New Revision: 267914 URL: http://llvm.org/viewvc/llvm-project?rev=267914&view=rev Log: Fix use of uninitialized value exposed by r267802. Accessors of an invalid PresumedLoc should not be called. Modified: cfe/trunk/include/clang/Basic/SourceLocat

Re: [PATCH] D19666: [ubsan] Add -fubsan-strip-path-components=N

2016-04-28 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: include/clang/Driver/Options.td:1102 @@ -1101,1 +1101,3 @@ def Wlarge_by_value_copy_EQ : Joined<["-"], "Wlarge-by-value-copy=">, Flags<[CC1Option]>; +def fubsan_strip_path_components_EQ : Joined<["-"], "fubsan-strip-path-components=">,

r267926 - One more fix for use of invalid PresumedLocs missed by r267914.

2016-04-28 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Apr 28 14:54:51 2016 New Revision: 267926 URL: http://llvm.org/viewvc/llvm-project?rev=267926&view=rev Log: One more fix for use of invalid PresumedLocs missed by r267914. Modified: cfe/trunk/lib/Basic/SourceManager.cpp Modified: cfe/trunk/lib/Basic/SourceManager.cpp

Re: [PATCH] D19678: Annotated-source optimization reports (a.k.a. "listing" files)

2016-04-28 Thread Richard Smith via cfe-commits
rsmith added a comment. You give this example: > 343 | Loc = ConvertBackendLocation(D, Context->getSourceManager()); > I | ^ > I | ^ How does this look for a case like `p->Foo()->Bar()` (where one or both of the calls ar

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

2016-04-28 Thread Richard Smith via cfe-commits
On Thu, Apr 28, 2016 at 1:14 PM, Akira Hatanaka via cfe-commits < cfe-commits@lists.llvm.org> wrote: > ahatanak added a comment. > > If I try calling Init(AnyParent, F) in Scope::setFlags, clang fails to > compile the following code because it cannot find the definition of struct > "foo": > > vo

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

2016-04-28 Thread Richard Smith via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. LGTM, thanks! http://reviews.llvm.org/D19175 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listin

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

2016-04-28 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: lib/Driver/ToolChains.cpp:722-733 @@ -700,1 +721,14 @@ + + if (const Arg *A = Args.getLastArg(options::OPT_isysroot)) { +StringRef isysroot = A->getValue(); +// Assume SDK has path: SOME_PATH/SDKs/PlatformXX.YY.sdk +size_t Beg

Re: [PATCH] D19346: [CUDA] Copy host builtin types to NVPTXTargetInfo.

2016-04-28 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: lib/Basic/Targets.cpp:1648-1684 @@ +1647,39 @@ + +// Match the host's types. +PointerWidth = HostTarget->getPointerWidth(/* AddrSpace = */ 0); +PointerAlign = HostTarget->getPointerAlign(/* AddrSpace = */ 0); +BoolWidth = H

Re: [PATCH] D18823: Implementation of VlA of GNU C++ extension

2016-04-28 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/D18823 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

Re: [PATCH] D19698: [libcxx] [test] Need to include for std::unique_ptr.

2016-04-28 Thread Richard Smith via cfe-commits
rsmith added a subscriber: rsmith. rsmith added a comment. In http://reviews.llvm.org/D19698#416255, @Eugene.Zelenko wrote: > It'll be good idea to run Include What You Use > to make sure > that all dependencies are explicit. You

Re: [PATCH] D19698: [libcxx] [test] Need to include for std::unique_ptr.

2016-04-28 Thread Richard Smith via cfe-commits
rsmith added a comment. In http://reviews.llvm.org/D19698#416309, @EricWF wrote: > Most tests pretty much rely on getting dragged in indirectly, > same thing with and the bits of we actually define in > . There are also a few symbols that libc++ defines in the wrong header and then #inclu

r267969 - PR27549: fix bug that resulted in us giving a translation-unit-scope variable a

2016-04-28 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Apr 28 20:23:20 2016 New Revision: 267969 URL: http://llvm.org/viewvc/llvm-project?rev=267969&view=rev Log: PR27549: fix bug that resulted in us giving a translation-unit-scope variable a mangled name if it happened to be declared in an 'extern "C++"' context. This also ca

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

2016-04-28 Thread Richard Smith via cfe-commits
On Thu, Apr 28, 2016 at 7:34 PM, Akira Hatanaka via cfe-commits < cfe-commits@lists.llvm.org> wrote: > ahatanak added a comment. > > Thanks for the review. I committed the patch in r267956 and r267975. > > Do you think I should make setFlags(unsigned F) return early if F == Flags? I don't think

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

2016-04-29 Thread Richard Smith via cfe-commits
lue to setFlags. > What are you initializing Flags to in the constructor? > On Apr 28, 2016, at 7:38 PM, Richard Smith via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > > On Thu, Apr 28, 2016 at 7:34 PM, Akira Hatanaka via cfe-commits < > cfe-commits@lists.llvm

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

2016-04-29 Thread Richard Smith via cfe-commits
e passed to the constructor. > Right, but you're making setFlags assert (F != Flags), at which point Flags is presumably uninitialized if the constructor didn't set it itself. > On Apr 29, 2016, at 11:36 AM, Richard Smith wrote: > > On Fri, Apr 29, 2016 at 11:07 AM, Akira Hat

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

2016-04-29 Thread Richard Smith via cfe-commits
arameter (just the flag value), not the one the constructor eventually > calls. > > void setFlags(unsigned F) { assert(F != Flags); setFlags(getParent(), F); } > > On Apr 29, 2016, at 12:13 PM, Richard Smith wrote: > > On Fri, Apr 29, 2016 at 12:12 PM, Akira Hatanaka via cfe

Re: [PATCH] D19346: [CUDA] Copy host builtin types to NVPTXTargetInfo.

2016-04-29 Thread Richard Smith via cfe-commits
rsmith accepted this revision. This revision is now accepted and ready to land. Comment at: test/Preprocessor/cuda-types.cu:7-9 @@ +6,5 @@ +// RUN: %clang --cuda-device-only -nocudainc -target i386-unknown-linux-gnu -x cuda -E -dM -o - /dev/null > %T/i386-device-defines +// RUN:

Re: [PATCH] D19739: Add a loop's debug location to its llvm.loop metadata

2016-04-29 Thread Richard Smith via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. Makes sense to me. http://reviews.llvm.org/D19739 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/l

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

2016-04-29 Thread Richard Smith via cfe-commits
rsmith accepted this revision. rsmith added a reviewer: rsmith. This revision is now accepted and ready to land. Comment at: lib/Driver/ToolChains.cpp:733 @@ +732,3 @@ + StringRef SDKName = SDK.slice(0, StartVer); + if (!SDKName.startswith(getPlatformFamily())) +

Re: r268129 - [NFC] Initialize a variable to make buildbot green.

2016-04-29 Thread Richard Smith via cfe-commits
On Fri, Apr 29, 2016 at 3:50 PM, Denis Zobnin via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: dzobnin > Date: Fri Apr 29 17:50:16 2016 > New Revision: 268129 > > URL: http://llvm.org/viewvc/llvm-project?rev=268129&view=rev > Log: > [NFC] Initialize a variable to make buildbot green.

Re: r268314 - [CodeGenObjCXX] Don't rematerialize default arguments of function

2016-05-02 Thread Richard Smith via cfe-commits
On Mon, May 2, 2016 at 2:52 PM, Akira Hatanaka via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: ahatanak > Date: Mon May 2 16:52:57 2016 > New Revision: 268314 > > URL: http://llvm.org/viewvc/llvm-project?rev=268314&view=rev > Log: > [CodeGenObjCXX] Don't rematerialize default argum

Re: [PATCH] D18035: [GCC] PR23529 Mangler part of attrbute abi_tag support

2016-05-03 Thread Richard Smith via cfe-commits
On Tue, May 3, 2016 at 12:51 PM, Dmitry Polukhin via cfe-commits < cfe-commits@lists.llvm.org> wrote: > DmitryPolukhin added a comment. > > Richard, could you please share your counterexample so I could test it on > my patch and GCC? > Sure: struct __attribute__((abi_tag("X"))) Foo {}; void

r268585 - [modules] Enforce the rules that an explicit or partial specialization must be

2016-05-04 Thread Richard Smith via cfe-commits
Author: rsmith Date: Wed May 4 19:56:12 2016 New Revision: 268585 URL: http://llvm.org/viewvc/llvm-project?rev=268585&view=rev Log: [modules] Enforce the rules that an explicit or partial specialization must be declared before it is used. Because we don't use normal name lookup to find these, the

r268594 - Fix implementation of C++'s restrictions on using-declarations referring to enumerators:

2016-05-04 Thread Richard Smith via cfe-commits
Author: rsmith Date: Wed May 4 21:13:49 2016 New Revision: 268594 URL: http://llvm.org/viewvc/llvm-project?rev=268594&view=rev Log: Fix implementation of C++'s restrictions on using-declarations referring to enumerators: * an unscoped enumerator whose enumeration is a class member is itself a

r268595 - Update FIXME.

2016-05-04 Thread Richard Smith via cfe-commits
Author: rsmith Date: Wed May 4 21:14:06 2016 New Revision: 268595 URL: http://llvm.org/viewvc/llvm-project?rev=268595&view=rev Log: Update FIXME. Modified: cfe/trunk/lib/Sema/SemaLookup.cpp Modified: cfe/trunk/lib/Sema/SemaLookup.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/S

Re: [PATCH] D19851: Warn on binding reference to null in copy initialization

2016-05-04 Thread Richard Smith via cfe-commits
rsmith added a comment. In http://reviews.llvm.org/D19851#420762, @nicholas wrote: > I did not expand this to SK_BindReferenceToTemporary, please review this > decision. It's also missing missing bit-field and vector element checks that > SK_BindReference has. That's fine. SK_BindReferenceToT

r268600 - Documentation updates for recent changes to VLAs and default-initialization of const-qualified class objects.

2016-05-04 Thread Richard Smith via cfe-commits
Author: rsmith Date: Wed May 4 21:53:55 2016 New Revision: 268600 URL: http://llvm.org/viewvc/llvm-project?rev=268600&view=rev Log: Documentation updates for recent changes to VLAs and default-initialization of const-qualified class objects. Modified: cfe/trunk/www/compatibility.html Modif

Re: r268594 - Fix implementation of C++'s restrictions on using-declarations referring to enumerators:

2016-05-05 Thread Richard Smith via cfe-commits
s to be too widespread. If they are, we could trivially accept this as an extension; it seems like a pointless restriction. > On Wed, May 4, 2016 at 7:13 PM, Richard Smith via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > >> Author: rsmith >> Date: Wed May 4 21:13:

r268663 - Some release note updates for C++ language acceptance changes since Clang 3.8.

2016-05-05 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu May 5 13:40:37 2016 New Revision: 268663 URL: http://llvm.org/viewvc/llvm-project?rev=268663&view=rev Log: Some release note updates for C++ language acceptance changes since Clang 3.8. Modified: cfe/trunk/docs/ReleaseNotes.rst Modified: cfe/trunk/docs/ReleaseNotes.

Re: r268594 - Fix implementation of C++'s restrictions on using-declarations referring to enumerators:

2016-05-05 Thread Richard Smith via cfe-commits
On Thu, May 5, 2016 at 11:21 AM, Reid Kleckner wrote: > On Thu, May 5, 2016 at 11:15 AM, Richard Smith > wrote: > >> Given that GCC rejects this code (and has done for as long as it's >> accepted the Enum::Member syntax), I don't expect the problems to be too

r268664 - Add a FixItHint for the new diagnostic for a non-class-scope using-declaration that names a class-scope enumerator.

2016-05-05 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu May 5 14:16:15 2016 New Revision: 268664 URL: http://llvm.org/viewvc/llvm-project?rev=268664&view=rev Log: Add a FixItHint for the new diagnostic for a non-class-scope using-declaration that names a class-scope enumerator. Modified: cfe/trunk/include/clang/Basic/Dia

r268665 - Add forgotten test from r268594.

2016-05-05 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu May 5 14:16:58 2016 New Revision: 268665 URL: http://llvm.org/viewvc/llvm-project?rev=268665&view=rev Log: Add forgotten test from r268594. Added: cfe/trunk/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p7.cpp Added: cfe/trunk/test/CXX/dcl.dcl/basic.namespace/nam

Re: [PATCH] D19666: [ubsan] Add -fubsan-strip-path-components=N

2016-05-05 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: docs/UndefinedBehaviorSanitizer.rst:235 @@ +234,3 @@ +UndefinedBehaviorSanitizer adds static check data for each check unless it is +in trap mode. This check data includes the full file name. option +``-fsanitize-undefined-strip-path-compo

Re: [PATCH] D17392: Embed bitcode in object file (clang cc1 part)

2016-05-05 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: lib/CodeGen/BackendUtil.cpp:769-770 @@ +768,4 @@ +void clang::EmbedBitcode(llvm::Module *M, const CodeGenOptions &CGOpts, + llvm::MemoryBufferRef Buf) +{ + if (CGOpts.getEmbedBitcode() == CodeGenOptions::Embed_Off)

Re: [PATCH] D17392: Embed bitcode in object file (clang cc1 part)

2016-05-05 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: lib/CodeGen/BackendUtil.cpp:799-831 @@ +798,35 @@ + // Embed the bitcode for the llvm module. + std::string Data; + ArrayRef ModuleData; + Triple T(M->getTargetTriple()); + if (CGOpts.getEmbedBitcode() != CodeGenOptions::Embed_Marker)

Re: [PATCH] D19993: Fixed cppcoreguidelines-pro-type-member-init when checking records with indirect fields

2016-05-05 Thread Richard Smith via cfe-commits
On Thu, May 5, 2016 at 4:44 PM, Michael Miller via cfe-commits < cfe-commits@lists.llvm.org> wrote: > michael_miller added inline comments. > > > Comment at: clang-tidy/cppcoreguidelines/ProTypeMemberInitCheck.cpp:31 > @@ +30,3 @@ > +// Convenience utility to get a RecordDecl from

r268749 - More fixes to codeblock formatting in documentation.

2016-05-06 Thread Richard Smith via cfe-commits
Author: rsmith Date: Fri May 6 11:48:29 2016 New Revision: 268749 URL: http://llvm.org/viewvc/llvm-project?rev=268749&view=rev Log: More fixes to codeblock formatting in documentation. Modified: cfe/trunk/docs/ReleaseNotes.rst Modified: cfe/trunk/docs/ReleaseNotes.rst URL: http://llvm.org/

Re: [Clang] Convergent Attribute

2016-05-06 Thread Richard Smith via cfe-commits
On Wed, May 4, 2016 at 5:47 PM, Ettore Speziale via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Hello, > > > I would appreciate a bit more background on this attribute's > > semantics. How would a user know when to add this attribute to their > > function definition? Are there other attribu

Re: [Clang] Convergent Attribute

2016-05-06 Thread Richard Smith via cfe-commits
On Fri, May 6, 2016 at 1:56 PM, Ettore Speziale via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Hello, > > > In the case of foo, there could be a problem. > > If you do not mark it convergent, the LLVM sink pass push the call to > foo to the then branch of the ternary operator, hence the pr

Re: [PATCH] D19666: [ubsan] Add -fubsan-strip-path-components=N

2016-05-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/D19666 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co

Re: [Clang] Convergent Attribute

2016-05-06 Thread Richard Smith via cfe-commits
On Fri, May 6, 2016 at 2:42 PM, David Majnemer wrote: > On Fri, May 6, 2016 at 2:36 PM, Richard Smith via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > >> On Fri, May 6, 2016 at 1:56 PM, Ettore Speziale via cfe-commits < >> cfe-commits@lists.llvm.org> wrot

r268817 - [modules] Attempt to improve performance for declaration merging without a Sema

2016-05-06 Thread Richard Smith via cfe-commits
Author: rsmith Date: Fri May 6 18:14:07 2016 New Revision: 268817 URL: http://llvm.org/viewvc/llvm-project?rev=268817&view=rev Log: [modules] Attempt to improve performance for declaration merging without a Sema object in C. Rather than using the DeclContext (which is very slow because it trigger

Re: [Clang] Convergent Attribute

2016-05-06 Thread Richard Smith via cfe-commits
On Fri, May 6, 2016 at 4:20 PM, Matt Arsenault via cfe-commits < cfe-commits@lists.llvm.org> wrote: > On 05/06/2016 02:42 PM, David Majnemer via cfe-commits wrote: > >> This example looks wrong to me. It doesn't seem meaningful for a function >> to be both readonly and convergent, because converge

Re: [PATCH] D20040: Treat qualifiers on elaborated types for qualtypenames appropriately.

2016-05-09 Thread Richard Smith via cfe-commits
rsmith added a subscriber: rsmith. Comment at: lib/Tooling/Core/QualTypeNames.cpp:386 @@ -385,2 +385,3 @@ NestedNameSpecifier *Prefix = nullptr; - Qualifiers PrefixQualifiers; + // Local qualifiers are attached to the Qualtype outside of the + // elaborated type. Retrieve t

Re: [Clang] Convergent Attribute

2016-05-09 Thread Richard Smith via cfe-commits
On Sun, May 8, 2016 at 12:43 PM, Matt Arsenault via cfe-commits < cfe-commits@lists.llvm.org> wrote: > On May 6, 2016, at 18:12, Richard Smith via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > > On Fri, May 6, 2016 at 4:20 PM, Matt Arsenault via cfe-commits < &

Re: [Clang] Convergent Attribute

2016-05-09 Thread Richard Smith via cfe-commits
On Mon, May 9, 2016 at 2:43 PM, Richard Smith wrote: > On Sun, May 8, 2016 at 12:43 PM, Matt Arsenault via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > >> On May 6, 2016, at 18:12, Richard Smith via cfe-commits < >> cfe-commits@lists.llvm.org> wrote: >

Re: [PATCH] D20040: Treat qualifiers on elaborated types for qualtypenames appropriately.

2016-05-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. LGTM with a couple of minor tweaks, thanks! Comment at: lib/Tooling/Core/QualTypeNames.cpp:400-401 @@ -395,8 +399,4 @@

r268988 - When forming a fully-qualified type name, put any qualifiers outside/before the

2016-05-09 Thread Richard Smith via cfe-commits
Author: rsmith Date: Mon May 9 18:06:14 2016 New Revision: 268988 URL: http://llvm.org/viewvc/llvm-project?rev=268988&view=rev Log: When forming a fully-qualified type name, put any qualifiers outside/before the nested-name-specifier. Patch by Sterling Augustine! Modified: cfe/trunk/lib/Tool

Re: [PATCH] D20040: Treat qualifiers on elaborated types for qualtypenames appropriately.

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

Re: [PATCH] D16579: Warn if friend function depends on template parameters.

2016-05-09 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: include/clang/Basic/DiagnosticSemaKinds.td:1153 @@ +1152,3 @@ +def warn_non_template_friend : Warning<"friend declaration %q0 depends on " + "template parameter but is not a template function">, + InGroup; template func

Re: [PATCH] D20125: [libclang] Added clang_getRealSpellingLocation to compensate for clang_getSpellingLocation returning the expansion location

2016-05-10 Thread Richard Smith via cfe-commits
rsmith added a comment. Ugh. Yes. I suppose it's too late to make this actually do the right thing. @akyrtzi, what do you think? Please add a test for this (see unittests/libclang/LibclangTest.cpp). http://reviews.llvm.org/D20125 ___ cfe-commits m

Re: [PATCH] D20134: [libclang] Fixed bug where ranges in spelling locations (in macro expansions) would get mangled

2016-05-10 Thread Richard Smith via cfe-commits
rsmith added a comment. I agree that this looks wrong. Does test/Index/cindex-on-invalid.m still pass with this change? (See http://reviews.llvm.org/rL129872 in which it was added.) It looks like the problem is that we lose the information about whether we're supposed to be pointing to the sta

Re: [PATCH] D20132: [libclang] Add clang_getAllSkippedRanges function

2016-05-10 Thread Richard Smith via cfe-commits
rsmith added a comment. This looks reasonable, but please add a test. http://reviews.llvm.org/D20132 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D20131: Fixed crash during code completion in file included within declaration

2016-05-10 Thread Richard Smith via cfe-commits
rsmith added a comment. Please add a test to test/CodeCompletion. Comment at: lib/Lex/PPLexerChange.cpp:380-382 @@ -379,3 +379,5 @@ CurLexer->FormTokenWithChars(Result, CurLexer->BufferEnd, tok::eof); CurLexer.reset(); +if (CurLexerKind == CLK_Lexer) +

Re: r269224 - [tooling] Fix missing inline keyworkd, breaking build bot.

2016-05-11 Thread Richard Smith via cfe-commits
On Wed, May 11, 2016 at 1:09 PM, Etienne Bergeron via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: etienneb > Date: Wed May 11 15:09:17 2016 > New Revision: 269224 > > URL: http://llvm.org/viewvc/llvm-project?rev=269224&view=rev > Log: > [tooling] Fix missing inline keyworkd, breakin

r269231 - Preserve the FoundDecl when performing overload resolution for constructors.

2016-05-11 Thread Richard Smith via cfe-commits
Author: rsmith Date: Wed May 11 15:37:46 2016 New Revision: 269231 URL: http://llvm.org/viewvc/llvm-project?rev=269231&view=rev Log: Preserve the FoundDecl when performing overload resolution for constructors. This is in preparation for C++ P0136R1, which switches the model for inheriting construc

Re: [PATCH] D20131: Fixed crash during code completion in file included within declaration

2016-05-11 Thread Richard Smith via cfe-commits
rsmith added a comment. In http://reviews.llvm.org/D20131#427717, @cameron314 wrote: > I have no way to distinguish between a crash and the normal errors (with > hidden completions). Is there any other way to test this? If you use `// RUN: not %clang_cc1 -code-completion-at=[...]`, the test sh

Re: [PATCH] D19815: Support '#pragma once' in headers when using PCH

2016-05-12 Thread Richard Smith via cfe-commits
rsmith added a comment. Rather than threading through a new flag, can you test the existing `TUKind` field? http://reviews.llvm.org/D19815 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co

Re: [PATCH] D20207: [AST] Move operations enum to a definition file.

2016-05-12 Thread Richard Smith via cfe-commits
rsmith added a comment. In http://reviews.llvm.org/D20207#428486, @aaron.ballman wrote: > Generally, I think this looks good. It will definitely help with AST > matchers. Richard, do you have any problems with this approach? Not at all. This would be a nice improvement even if it didn't also p

r269367 - Refactor constant expression evaluation of CXXConstructExpr to reduce duplication between array and class initialization.

2016-05-12 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu May 12 17:16:28 2016 New Revision: 269367 URL: http://llvm.org/viewvc/llvm-project?rev=269367&view=rev Log: Refactor constant expression evaluation of CXXConstructExpr to reduce duplication between array and class initialization. Modified: cfe/trunk/lib/AST/ExprConst

r269382 - Preserve the FoundDecl properly in constructor overload resolution. No

2016-05-12 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu May 12 18:45:49 2016 New Revision: 269382 URL: http://llvm.org/viewvc/llvm-project?rev=269382&view=rev Log: Preserve the FoundDecl properly in constructor overload resolution. No functionality change; this information is not yet in use. Modified: cfe/trunk/include/cla

r269397 - Extend this test to also be valid in C++14.

2016-05-12 Thread Richard Smith via cfe-commits
Author: rsmith Date: Fri May 13 01:42:55 2016 New Revision: 269397 URL: http://llvm.org/viewvc/llvm-project?rev=269397&view=rev Log: Extend this test to also be valid in C++14. Modified: cfe/trunk/test/SemaCXX/constexpr-nqueens.cpp Modified: cfe/trunk/test/SemaCXX/constexpr-nqueens.cpp URL:

r269398 - Add support for derived class special members hiding functions brought in from

2016-05-12 Thread Richard Smith via cfe-commits
Author: rsmith Date: Fri May 13 01:47:56 2016 New Revision: 269398 URL: http://llvm.org/viewvc/llvm-project?rev=269398&view=rev Log: Add support for derived class special members hiding functions brought in from a base class via a using-declaration. If a class has a using-declaration declaring eit

Re: [PATCH] D20226: [AST] Add missing const qualifiers to AstContext in Type.cpp

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

r269440 - Fix module map typo in r269347.

2016-05-13 Thread Richard Smith via cfe-commits
Author: rsmith Date: Fri May 13 12:28:51 2016 New Revision: 269440 URL: http://llvm.org/viewvc/llvm-project?rev=269440&view=rev Log: Fix module map typo in r269347. Modified: cfe/trunk/include/clang/module.modulemap Modified: cfe/trunk/include/clang/module.modulemap URL: http://llvm.org/vie

Re: [PATCH] D20137: [PCH] Fixed bugs with preamble invalidation when files change (on Windows)

2016-05-13 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: lib/Basic/FileManager.cpp:304-307 @@ -303,1 +303,6 @@ + if (UFE.isVirtual()) { +UFE.Name = InterndFileName; +return &UFE; + } + It looks like this is unreachable: `IsVirtual` is only ever `true` when `IsValid`

r269457 - Use marginally more appropriate functions to detect if we should declare an

2016-05-13 Thread Richard Smith via cfe-commits
Author: rsmith Date: Fri May 13 13:48:05 2016 New Revision: 269457 URL: http://llvm.org/viewvc/llvm-project?rev=269457&view=rev Log: Use marginally more appropriate functions to detect if we should declare an implicit copy constructor/assignment, and other minor cleanups. No functionality change i

Re: r269398 - Add support for derived class special members hiding functions brought in from

2016-05-13 Thread Richard Smith via cfe-commits
back( verpair ); > ^ > /usr/lib/gcc/x86_64-redhat-linux/4.9.2/../../../../include/c++/4.9.2/new:99:10: > note: previous implicit declaration is here > struct nothrow_t { }; > > > Shall I start reducing the issues one by one or we can revert this pat

Re: [PATCH] D20137: [PCH] Fixed bugs with preamble invalidation when files change (on Windows)

2016-05-13 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: lib/Frontend/ASTUnit.cpp:1402-1406 @@ +1401,7 @@ + +vfs::Status Status; +if (FileMgr->getNoncachedStatValue(RB.first, Status)) { + AnyFileChanged = true; + break; +} + Suppose file

Re: [PATCH] D19667: [ubsan] Minimize size of data for type_mismatch

2016-05-13 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: lib/CodeGen/CGExpr.cpp:579 @@ -578,1 +578,3 @@ +// Make sure we're not losing information. Alignment needs to be a power of 2 +assert(!AlignVal || (uint64_t)1 << llvm::Log2_64(AlignVal) == AlignVal); llvm::Constant *StaticDat

r269528 - Fix some typos.

2016-05-13 Thread Richard Smith via cfe-commits
Author: rsmith Date: Fri May 13 20:21:40 2016 New Revision: 269528 URL: http://llvm.org/viewvc/llvm-project?rev=269528&view=rev Log: Fix some typos. Modified: cfe/trunk/lib/CodeGen/TargetInfo.cpp Modified: cfe/trunk/lib/CodeGen/TargetInfo.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/tru

Re: [PATCH] D19851: Warn on binding reference to null in copy initialization

2016-05-13 Thread Richard Smith via cfe-commits
rsmith accepted this revision. Comment at: include/clang/Basic/DiagnosticSemaKinds.td:5369 @@ -5368,1 +5368,3 @@ +def warn_binding_null_to_reference : Warning< + "binding null pointer to reference has undefined behavior">, InGroup; def note_indirection_through_null : Note<

r269530 - When typo-correcting a using-declaration, actually correct the name of the

2016-05-13 Thread Richard Smith via cfe-commits
Author: rsmith Date: Fri May 13 20:58:49 2016 New Revision: 269530 URL: http://llvm.org/viewvc/llvm-project?rev=269530&view=rev Log: When typo-correcting a using-declaration, actually correct the name of the UsingDecl (so that redeclaration lookup can find it). Modified: cfe/trunk/lib/Sema/Se

Re: [PATCH] D20302: Remove LazyDefinitionDataPtr and rely on getMostRecentDecl. Fixes PR27754.

2016-05-16 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: include/clang/AST/DeclCXX.h:522 @@ -545,7 +521,3 @@ - typedef LazyDefinitionDataPtr - DefinitionDataPtr; - friend class LazyDefinitionDataPtr; - - mutable DefinitionDataPtr DefinitionData; + mutable DefinitionData* DefinitionDat

r269716 - Avoid O(n^2) string analysis when handling GNU __asm__ statements.

2016-05-16 Thread Richard Smith via cfe-commits
Author: rsmith Date: Mon May 16 17:52:23 2016 New Revision: 269716 URL: http://llvm.org/viewvc/llvm-project?rev=269716&view=rev Log: Avoid O(n^2) string analysis when handling GNU __asm__ statements. Modified: cfe/trunk/lib/AST/Stmt.cpp Modified: cfe/trunk/lib/AST/Stmt.cpp URL: http://llvm.

r269717 - Switch from SmallVector to TinyPtrVector for the list of attributes on a declaration. This removes a memory allocation for the common case where the declaration has only one attribute.

2016-05-16 Thread Richard Smith via cfe-commits
Author: rsmith Date: Mon May 16 17:53:19 2016 New Revision: 269717 URL: http://llvm.org/viewvc/llvm-project?rev=269717&view=rev Log: Switch from SmallVector to TinyPtrVector for the list of attributes on a declaration. This removes a memory allocation for the common case where the declaration ha

r269720 - Try to make the buildbots green again: avoid the need for class Attr to be

2016-05-16 Thread Richard Smith via cfe-commits
Author: rsmith Date: Mon May 16 18:03:40 2016 New Revision: 269720 URL: http://llvm.org/viewvc/llvm-project?rev=269720&view=rev Log: Try to make the buildbots green again: avoid the need for class Attr to be complete for users of AttrVec. Modified: cfe/trunk/include/clang/AST/AttrIterator.h

r269721 - Less broken fix for buildbot breakage.

2016-05-16 Thread Richard Smith via cfe-commits
Author: rsmith Date: Mon May 16 18:07:58 2016 New Revision: 269721 URL: http://llvm.org/viewvc/llvm-project?rev=269721&view=rev Log: Less broken fix for buildbot breakage. Modified: cfe/trunk/include/clang/AST/AttrIterator.h Modified: cfe/trunk/include/clang/AST/AttrIterator.h URL: http://l

Re: [PATCH] D20137: [PCH] Fixed bugs with preamble invalidation when files change (on Windows)

2016-05-16 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/D20137 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co

Re: [PATCH] D19990: [CUDA] Implement __ldg using intrinsics.

2016-05-17 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: include/clang/Basic/BuiltinsNVPTX.def:569-603 @@ -568,1 +568,37 @@ +// __ldg. This is not implemented as a builtin by nvcc. +BUILTIN(__nvvm_ldg_c, "ccC*", "") +BUILTIN(__nvvm_ldg_s, "ssC*", "") +BUILTIN(__nvvm_ldg_i, "iiC*", "") +BUILTI

Re: r269717 - Switch from SmallVector to TinyPtrVector for the list of attributes on a declaration. This removes a memory allocation for the common case where the declaration has only one attribute.

2016-05-17 Thread Richard Smith via cfe-commits
On Tue, May 17, 2016 at 10:17 AM, David Blaikie via cfe-commits < cfe-commits@lists.llvm.org> wrote: > On Mon, May 16, 2016 at 3:53 PM, Richard Smith via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > >> Author: rsmith >> Date: Mon May 16 17:53:19 2016

Re: [PATCH] D16989: Change interpretation of function definition in friend declaration of template class.

2016-05-17 Thread Richard Smith via cfe-commits
rsmith added a comment. Please also add some testcases for the corresponding case for a friend function template: template void f(); template struct A { template void f() {} }; template struct B { template void f() {} }; A a; B b; // ill-formed Comment at

Re: [libcxx] r269789 - Implement LWG2576: istream_iterator and ostream_iterator should use std::addressof

2016-05-17 Thread Richard Smith via cfe-commits
Here's an istream_iterator test for this change: #include #include #include struct evil_traits : std::char_traits { template friend void operator&(T) = delete; }; struct pointless_derived_class : std::num_get> {}; int main() { std::basic_stringstream ss("1 2 3"); ss.imbue(std::loca

r269849 - Revert r269717. That change alone did not provide the intended benefit (which

2016-05-17 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue May 17 16:48:41 2016 New Revision: 269849 URL: http://llvm.org/viewvc/llvm-project?rev=269849&view=rev Log: Revert r269717. That change alone did not provide the intended benefit (which would come from changing the type of ASTContext::DeclAttrs from DenseMap to DenseMap),

r269858 - PR27754: CXXRecordDecl::data() needs to perform an update even if it's called

2016-05-17 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue May 17 17:44:15 2016 New Revision: 269858 URL: http://llvm.org/viewvc/llvm-project?rev=269858&view=rev Log: PR27754: CXXRecordDecl::data() needs to perform an update even if it's called on a declaration that already knows the location of the DefinitionData object. Added:

Re: r269858 - PR27754: CXXRecordDecl::data() needs to perform an update even if it's called

2016-05-17 Thread Richard Smith via cfe-commits
Forgot to mention in the commit message: this patch was collaboratively produced by Vassil Vassilev and myself. On Tue, May 17, 2016 at 3:44 PM, Richard Smith via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: rsmith > Date: Tue May 17 17:44:15 2016 > New Revision:

Re: [PATCH] D20302: Remove LazyDefinitionDataPtr and rely on getMostRecentDecl. Fixes PR27754.

2016-05-17 Thread Richard Smith via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. Review comments resolved and committed as r269858. Repository: rL LLVM http://reviews.llvm.org/D20302 ___ cfe-commits mailing list cfe-commits

Re: [PATCH] D20339: Update clang for D20260

2016-05-17 Thread Richard Smith via cfe-commits
rsmith added a subscriber: rsmith. Comment at: test/CodeGenOpenCL/constant-addr-space-globals.cl:3 @@ -2,3 +2,3 @@ -// CHECK: @array = addrspace({{[0-9]+}}) constant +// CHECK: @array = local_unnamed_addr addrspace({{[0-9]+}}) constant __constant float array[2] = {0.0f, 1.0f};

r269869 - Fix use-after-free ASan failures for modules / PCH files that deserialize abi_tag or no_sanitize attributes.

2016-05-17 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue May 17 19:16:51 2016 New Revision: 269869 URL: http://llvm.org/viewvc/llvm-project?rev=269869&view=rev Log: Fix use-after-free ASan failures for modules / PCH files that deserialize abi_tag or no_sanitize attributes. Modified: cfe/trunk/test/PCH/attrs.c cfe/trunk

Re: [PATCH] D19783: Fix cv-qualification of '*this' captures (and nasty bug PR27507 introduced by commit 263921 "Implement Lambda Capture of *this by Value as [=, *this]")

2016-05-18 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: lib/Sema/SemaExprCXX.cpp:898 @@ +897,3 @@ + // end of the TU) we need to be able to examine its enclosing lambdas and so + // we use the DeclContext to get a hold of the ClosureClass and query it for + // capture information. The reaso

Re: [PATCH] D19783: Fix cv-qualification of '*this' captures (and nasty bug PR27507 introduced by commit 263921 "Implement Lambda Capture of *this by Value as [=, *this]")

2016-05-18 Thread Richard Smith via cfe-commits
I'd also like to know whether there are cases that this patch addresses but Taewook Oh's patch does not, as the other patch involves a lot less complexity. On 18 May 2016 10:15 a.m., "Richard Smith via cfe-commits" < cfe-commits@lists.llvm.org> wrote: >

Re: [PATCH] D19783: Fix cv-qualification of '*this' captures (and nasty bug PR27507 introduced by commit 263921 "Implement Lambda Capture of *this by Value as [=, *this]")

2016-05-18 Thread Richard Smith via cfe-commits
rsmith added a subscriber: rsmith. rsmith added a comment. I'd also like to know whether there are cases that this patch addresses but Taewook Oh's patch does not, as the other patch involves a lot less complexity. http://reviews.llvm.org/D19783 ___

r270009 - Make Sema::getPrintingPolicy less ridiculously expensive. This used to perform

2016-05-18 Thread Richard Smith via cfe-commits
Author: rsmith Date: Wed May 18 20:39:10 2016 New Revision: 270009 URL: http://llvm.org/viewvc/llvm-project?rev=270009&view=rev Log: Make Sema::getPrintingPolicy less ridiculously expensive. This used to perform an identifier table lookup, *and* copy the LangOptions (including various std::vectors

r270010 - Revert accidentally-committed test for PR27558 (which currently fails...)

2016-05-18 Thread Richard Smith via cfe-commits
Author: rsmith Date: Wed May 18 20:41:52 2016 New Revision: 270010 URL: http://llvm.org/viewvc/llvm-project?rev=270010&view=rev Log: Revert accidentally-committed test for PR27558 (which currently fails...) Modified: cfe/trunk/test/SemaCXX/member-pointer.cpp Modified: cfe/trunk/test/SemaCXX/

Re: r270009 - Make Sema::getPrintingPolicy less ridiculously expensive. This used to perform

2016-05-18 Thread Richard Smith via cfe-commits
On Wed, May 18, 2016 at 6:49 PM, Sean Silva via cfe-commits < cfe-commits@lists.llvm.org> wrote: > On Wed, May 18, 2016 at 6:39 PM, Richard Smith via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > >> Author: rsmith >> Date: Wed May 18 20:39:10 2016 >&g

Re: r269907 - Add new intrinsic support for MONITORX and MWAITX instructions

2016-05-19 Thread Richard Smith via cfe-commits
The modules buildbot has been broken since this commit landed: http://lab.llvm.org:8011/builders/clang-x86_64-linux-selfhost-modules/builds/15761/steps/compile.llvm.stage2/logs/stdio Please fix or revert. On Wed, May 18, 2016 at 4:56 AM, Ashutosh Nema via cfe-commits < cfe-commits@lists.llvm.org

Re: [PATCH] D19990: [CUDA] Implement __ldg using intrinsics.

2016-05-19 Thread Richard Smith via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. After offline discussion: we don't know for sure whether we're going to hit the combinatorial explosion in future or not. Let's go ahead with this as-is for now, then, with the explicit acknow

Re: [PATCH] D19843: Use the name of the file on disk to issue a new diagnostic about non-portable #include and #import paths.

2016-05-19 Thread Richard Smith via cfe-commits
rsmith added a subscriber: rsmith. rsmith added a comment. Thanks for this! Sorry for the delay on the review side. Generally, the approach here looks fine, and I don't have any high-level concerns beyond a performance concern over whatever dark magic you're doing on the LLVM side to get this f

Re: r269907 - Add new intrinsic support for MONITORX and MWAITX instructions

2016-05-19 Thread Richard Smith via cfe-commits
Fixed in r270169. On Thu, May 19, 2016 at 2:13 PM, Richard Smith wrote: > The modules buildbot has been broken since this commit landed: > > > http://lab.llvm.org:8011/builders/clang-x86_64-linux-selfhost-modules/builds/15761/steps/compile.llvm.stage2/logs/stdio > > Please fix

r270169 - Revert incorrect module map changes in r269907 and replace them with the

2016-05-19 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu May 19 20:06:47 2016 New Revision: 270169 URL: http://llvm.org/viewvc/llvm-project?rev=270169&view=rev Log: Revert incorrect module map changes in r269907 and replace them with the appropriate changes. Modified: cfe/trunk/lib/Headers/module.modulemap Modified: cfe/tr

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