r278891 - Add missing close brace to fix Windows bots. Oops :(

2016-08-16 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Aug 16 21:22:39 2016 New Revision: 278891 URL: http://llvm.org/viewvc/llvm-project?rev=278891&view=rev Log: Add missing close brace to fix Windows bots. Oops :( Modified: cfe/trunk/tools/driver/cc1_main.cpp Modified: cfe/trunk/tools/driver/cc1_main.cpp URL: http://l

Re: [PATCH] D23492: Make function local tags visible.

2016-08-17 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: lib/Sema/SemaTemplateInstantiateDecl.cpp:3597-3599 @@ -3595,4 +3596,5 @@ // FIXME: Check that the definition is visible before trying to instantiate // it. This requires us to track the instantiation stack in order to know // wh

Re: [PATCH] D23492: Make function local tags visible.

2016-08-17 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: lib/Sema/SemaTemplateInstantiateDecl.cpp:3608-3609 @@ -3600,1 +3607,4 @@ + + // TODO: Check if we could sink these diagnostics in + // DiagnoseUninstantiableTemplate. if (!Pattern && !PatternDecl->isDefaulted()) { If

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

2016-08-17 Thread Richard Smith via cfe-commits
rsmith accepted this revision. This revision is now accepted and ready to land. Comment at: unittests/libclang/LibclangTest.cpp:16-20 @@ -15,4 +15,7 @@ #include "gtest/gtest.h" #include #include +#include +#include +#include #define DEBUG_TYPE "libclang-test"

r278983 - PR18417: Increase -ftemplate-depth to the value 1024 recommended by the C++

2016-08-17 Thread Richard Smith via cfe-commits
Author: rsmith Date: Wed Aug 17 16:41:45 2016 New Revision: 278983 URL: http://llvm.org/viewvc/llvm-project?rev=278983&view=rev Log: PR18417: Increase -ftemplate-depth to the value 1024 recommended by the C++ standard's Annex B. We now attempt to increase the process's stack rlimit to 8MiB on star

r278984 - Add test missed from r278983.

2016-08-17 Thread Richard Smith via cfe-commits
Author: rsmith Date: Wed Aug 17 16:42:10 2016 New Revision: 278984 URL: http://llvm.org/viewvc/llvm-project?rev=278984&view=rev Log: Add test missed from r278983. Added: cfe/trunk/test/SemaTemplate/instantiation-depth-default.cpp Added: cfe/trunk/test/SemaTemplate/instantiation-depth-default

Re: [PATCH] D23125: Modules: add command line option to support loading prebuilt modules on demand, without parsing any module map

2016-08-17 Thread Richard Smith via cfe-commits
rsmith added a comment. Just a couple of things, but this basically LGTM. Comment at: docs/Modules.rst:217 @@ +216,3 @@ +``-fprebuilt-module-path=`` + Specify the path to the prebuilt modules. If specified, we will look for modules in this directory for a given top-level modul

Re: [PATCH] D23493: Fix PR28366: Teach the const-expression evaluator to be more fault tolerant with non-const enclosing local variables, or otherwise fold them if const.

2016-08-17 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: lib/AST/ExprConstant.cpp:4795-4797 @@ +4794,5 @@ + if (VD->hasLocalStorage() && Info.CurrentCall->Index > 1) { +// Only if the DeclContext of VD is the same as the called function do we +// set the Frame to the Current CallStackFr

Re: [PATCH] D23125: Modules: add command line option to support loading prebuilt modules on demand, without parsing any module map

2016-08-17 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: lib/Frontend/CompilerInstance.cpp:1502 @@ +1501,3 @@ +Module = PP->getHeaderSearchInfo().lookupModule(ModuleName); +if (!Module) { + getDiagnostics().Report(ModuleNameLoc, diag::err_module_prebuilt) ---

Re: [PATCH] D23125: Modules: add command line option to support loading prebuilt modules on demand, without parsing any module map

2016-08-17 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: lib/Frontend/CompilerInstance.cpp:1503 @@ +1502,3 @@ +if (!Module || !Module->getASTFile() || +std::string(Module->getASTFile()->getName()) != ModuleFileName) { + // Error out if Module does not refer to the fi

r279024 - PR28438: Update the information on an identifier with local definitions before

2016-08-17 Thread Richard Smith via cfe-commits
Author: rsmith Date: Wed Aug 17 20:16:55 2016 New Revision: 279024 URL: http://llvm.org/viewvc/llvm-project?rev=279024&view=rev Log: PR28438: Update the information on an identifier with local definitions before trying to write out its macro graph, in case we imported a module that added another m

r279034 - Remove debugging aids from this test and fix its expectations.

2016-08-17 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Aug 18 01:15:19 2016 New Revision: 279034 URL: http://llvm.org/viewvc/llvm-project?rev=279034&view=rev Log: Remove debugging aids from this test and fix its expectations. Modified: cfe/trunk/test/Modules/pr28438.cpp Modified: cfe/trunk/test/Modules/pr28438.cpp URL:

Re: r279035 - [Driver] Use llvm-config.h, not config.h to unbreak out-of-tree builds

2016-08-18 Thread Richard Smith via cfe-commits
This doesn't work at all, llvm-config.h does not provide the relevant configuration macros. On 17 Aug 2016 11:56 p.m., "Vedant Kumar via cfe-commits" < cfe-commits@lists.llvm.org> wrote: > Author: vedantk > Date: Thu Aug 18 01:43:07 2016 > New Revision: 279035 > > URL: http://llvm.org/viewvc/llvm

Re: r279035 - [Driver] Use llvm-config.h, not config.h to unbreak out-of-tree builds

2016-08-18 Thread Richard Smith via cfe-commits
define the same macros in clang/include/clang/Config/config.h.cmake. Perhaps the best thing would be to move this functionality into LLVM and just call it from clang. > On Thu, Aug 18, 2016 at 9:25 AM, Richard Smith via cfe-commits < cfe-commits@lists.llvm.org> wrote: >> >> This do

r279112 - Use __has_include rather than a configure-time macro to determine if

2016-08-18 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Aug 18 13:22:22 2016 New Revision: 279112 URL: http://llvm.org/viewvc/llvm-project?rev=279112&view=rev Log: Use __has_include rather than a configure-time macro to determine if is available. This should fix out-of-tree builds, at the cost of not providing the higher rlimi

Re: r278882 - If possible, set the stack rlimit to at least 8MiB on cc1 startup, and work

2016-08-18 Thread Richard Smith via cfe-commits
stead? I'm trying that > now... > > > > ~Will > > > > On Wed, Aug 17, 2016 at 8:36 AM Joerg Sonnenberger via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > > On Wed, Aug 17, 2016 at 01:05:08AM -, Richard Smith via cfe-commits > wrote: > > >

Re: r278882 - If possible, set the stack rlimit to at least 8MiB on cc1 startup, and work

2016-08-18 Thread Richard Smith via cfe-commits
On Wed, Aug 17, 2016 at 6:35 AM, Joerg Sonnenberger via cfe-commits < cfe-commits@lists.llvm.org> wrote: > On Wed, Aug 17, 2016 at 01:05:08AM -, Richard Smith via cfe-commits > wrote: > > Author: rsmith > > Date: Tue Aug 16 20:05:07 2016 > > New Revision: 27888

Re: [PATCH] D22910: Add support for CXXOperatorCallExpr in Expr::HasSideEffects

2016-08-18 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: lib/AST/Expr.cpp:2865-2867 @@ +2864,5 @@ + case CXXOperatorCallExprClass: { +// If it is an operator call expr it can have side effects when the +// underlaying operator is of assignment kind. +// Othrwise fall through the res

Re: [PATCH] D23692: Interpret strlen as constexpr for GCC Compatibility

2016-08-18 Thread Richard Smith via cfe-commits
rsmith requested changes to this revision. rsmith added a comment. This revision now requires changes to proceed. This is not a conforming extension. We are explicitly not allowed to make standard library functions `constexpr` if the standard doesn't say they are; see [constexpr.functions] (17.6

Re: [PATCH] D23492: Make function local tags visible.

2016-08-18 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: lib/Sema/SemaTemplateInstantiateDecl.cpp:3598-3603 @@ -3599,1 +3597,8 @@ + // FIXME: We need to track the instantiation stack in order to know which + // definitions should be visible within this instantiation. + if (DiagnoseUninstantia

Re: [PATCH] D23684: Resolve ambiguity in a declaration if global nested name specifier is used

2016-08-18 Thread Richard Smith via cfe-commits
PR28422 is invalid. Giving better diagnostics in this case seems reasonable, but we should not accept the ill-formed code. On 18 Aug 2016 11:41 a.m., "Serge Pavlov" wrote: > sepavloff created this revision. > sepavloff added reviewers: rsmith, doug.gregor. > sepavloff added a subscriber: cfe-com

r279163 - C++ Modules TS: Add parsing support for module import declaration.

2016-08-18 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Aug 18 16:59:42 2016 New Revision: 279163 URL: http://llvm.org/viewvc/llvm-project?rev=279163&view=rev Log: C++ Modules TS: Add parsing support for module import declaration. Added: cfe/trunk/test/Parser/cxx-modules-import.cpp Modified: cfe/trunk/include/clang/Bas

r279196 - C++ Modules TS: support parsing the 'module' declaration (including extensions

2016-08-18 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Aug 18 20:43:06 2016 New Revision: 279196 URL: http://llvm.org/viewvc/llvm-project?rev=279196&view=rev Log: C++ Modules TS: support parsing the 'module' declaration (including extensions from p0273r0 approved by EWG). We'll eventually need to handle this from the lexer as

Re: [PATCH] D23719: [libc++] Use C11 for atomics check

2016-08-19 Thread Richard Smith via cfe-commits
rsmith added a subscriber: rsmith. rsmith added a comment. Are we really guaranteed that the C and C++ compiler behave the same way here? I don't see why that would necessarily be the case. https://reviews.llvm.org/D23719 ___ cfe-commits mailing li

Re: [PATCH] D23719: [libc++] Use C11 for atomics check

2016-08-19 Thread Richard Smith via cfe-commits
rsmith added a comment. In https://reviews.llvm.org/D23719#520954, @bcraig wrote: > In https://reviews.llvm.org/D23719#520952, @rsmith wrote: > > > Are we really guaranteed that the C and C++ compiler behave the same way > > here? I don't see why that would necessarily be the case. > > > For lib

Re: r278882 - If possible, set the stack rlimit to at least 8MiB on cc1 startup, and work

2016-08-19 Thread Richard Smith via cfe-commits
On Fri, Aug 19, 2016 at 12:58 PM, Joerg Sonnenberger via cfe-commits < cfe-commits@lists.llvm.org> wrote: > On Thu, Aug 18, 2016 at 11:33:49AM -0700, Richard Smith wrote: > > On Wed, Aug 17, 2016 at 6:35 AM, Joerg Sonnenberger via cfe-commits < > > cfe-commits@lists.llvm.

Re: r278882 - If possible, set the stack rlimit to at least 8MiB on cc1 startup, and work

2016-08-19 Thread Richard Smith via cfe-commits
On Fri, Aug 19, 2016 at 1:10 PM, Joerg Sonnenberger via cfe-commits < cfe-commits@lists.llvm.org> wrote: > On Fri, Aug 19, 2016 at 01:03:51PM -0700, Richard Smith wrote: > > On Fri, Aug 19, 2016 at 12:58 PM, Joerg Sonnenberger via cfe-commits < > > cfe-commits@lists.llvm.

Re: [PATCH] D23719: [libc++] Use C11 for atomics check

2016-08-19 Thread Richard Smith via cfe-commits
rsmith added a comment. I have to admit to not understanding the motivation for this change. It claims that this is removing a reliance on having an existing C++ standard library, but it doesn't appear to affect that: this test explicitly passes `-nostdinc++` to avoid using a system standard li

Re: r278882 - If possible, set the stack rlimit to at least 8MiB on cc1 startup, and work

2016-08-19 Thread Richard Smith via cfe-commits
On Fri, Aug 19, 2016 at 1:43 PM, Joerg Sonnenberger via cfe-commits < cfe-commits@lists.llvm.org> wrote: > On Fri, Aug 19, 2016 at 01:16:59PM -0700, Richard Smith wrote: > > On Fri, Aug 19, 2016 at 1:10 PM, Joerg Sonnenberger via cfe-commits < > > cfe-commits@lists.llvm.

Re: [PATCH] D23719: [libc++] Use C11 for atomics check

2016-08-19 Thread Richard Smith via cfe-commits
rsmith added a comment. In https://reviews.llvm.org/D23719#521233, @smeenai wrote: > I'm thinking the best way to accomplish this is to globally add > `-nodefaultlib` to `CMAKE_REQUIRED_FLAGS`, and then globally set > `CMAKE_REQUIRED_LIBRARIES` to the required set of libraries, similar to what

Re: r279348 - [Driver] Remove unused #include of llvm/Support/config.h

2016-08-19 Thread Richard Smith via cfe-commits
Oops, thanks! :) On Fri, Aug 19, 2016 at 4:15 PM, Vedant Kumar via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: vedantk > Date: Fri Aug 19 18:15:35 2016 > New Revision: 279348 > > URL: http://llvm.org/viewvc/llvm-project?rev=279348&view=rev > Log: > [Driver] Remove unused #include o

r279486 - Fix regression introduced by r279164: only pass definitions as the PatternDef

2016-08-22 Thread Richard Smith via cfe-commits
Author: rsmith Date: Mon Aug 22 17:25:03 2016 New Revision: 279486 URL: http://llvm.org/viewvc/llvm-project?rev=279486&view=rev Log: Fix regression introduced by r279164: only pass definitions as the PatternDef to DiagnoseUninstantiableTemplate, teach hasVisibleDefinition to correctly determine wh

Re: [PATCH] D23492: Make function local tags visible.

2016-08-22 Thread Richard Smith via cfe-commits
rsmith added a comment. Should be fixed in r279486, which also incorporates the updates to this change since it landed (sinking diagnostics into `DiagnoseUninstantiableTemplate`). Comment at: lib/Sema/SemaTemplate.cpp:494-495 @@ +493,4 @@ +// Say nothing + } + else if (Fu

Re: [PATCH] D23493: Fix PR28366: Teach the const-expression evaluator to be more fault tolerant with non-const enclosing local variables, or otherwise fold them if const.

2016-08-22 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! Comment at: test/SemaCXX/constant-expression-cxx11.cpp:2091 @@ +2090,3 @@ + }; + static_assert(X::f() == c + d,""); +} I would use `'c' + 'd'`

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

2016-08-23 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: lib/Sema/SemaDecl.cpp:8657-8658 @@ +8656,4 @@ + DeclContext *SemanticDC = D->getDeclContext(); + if (SemanticDC->isDependentContext()) +return false; + // Get here only for out-of-line declarations: lexical context is dependent, ---

r279557 - Fix regression introduced by r279164: only pass definitions as the PatternDef

2016-08-23 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Aug 23 14:41:39 2016 New Revision: 279557 URL: http://llvm.org/viewvc/llvm-project?rev=279557&view=rev Log: Fix regression introduced by r279164: only pass definitions as the PatternDef to DiagnoseUninstantiableTemplate, teach hasVisibleDefinition to correctly determine wh

Re: r279486 - Fix regression introduced by r279164: only pass definitions as the PatternDef

2016-08-23 Thread Richard Smith via cfe-commits
Thanks. Fixed and reapplied as r279557. On Mon, Aug 22, 2016 at 7:08 PM, Chandler Carruth wrote: > Reverted this per Richard's request in r279500. > > > On Mon, Aug 22, 2016 at 3:33 PM Richard Smith via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > >>

r279571 - Fix member call on null pointer, found by sanitizer buildbot.

2016-08-23 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Aug 23 16:12:54 2016 New Revision: 279571 URL: http://llvm.org/viewvc/llvm-project?rev=279571&view=rev Log: Fix member call on null pointer, found by sanitizer buildbot. Modified: cfe/trunk/lib/Sema/SemaTemplateInstantiateDecl.cpp Modified: cfe/trunk/lib/Sema/SemaTem

Re: [PATCH] D23820: Do not warn about format strings that are indexed string literals.

2016-08-23 Thread Richard Smith via cfe-commits
rsmith added a comment. Please also handle expressions of the form `&"str"[i]`. We warn (under `-Wstring-plus-int`) for `"str" + i` and suggest rewriting into that form, so we should also handle that form here. Comment at: lib/Sema/SemaChecking.cpp:3864 @@ -3864,1 +3863,3 @@ +

Re: [PATCH] D21502: Fix heuristics skipping invalid ctor-initializers with C++11

2016-08-24 Thread Richard Smith via cfe-commits
rsmith added a comment. Please produce patches with more lines of context in future; phabricator only lets us comment on lines that are included in the patch, and in this case some of the relevant parts of the function are not in the context. (The equivalent of diff -U1000 is a common approach

r279668 - Disable test under asan: it uses a lot of stack, and asan increases the

2016-08-24 Thread Richard Smith via cfe-commits
Author: rsmith Date: Wed Aug 24 16:30:00 2016 New Revision: 279668 URL: http://llvm.org/viewvc/llvm-project?rev=279668&view=rev Log: Disable test under asan: it uses a lot of stack, and asan increases the per-frame stack usage enough to cause it to hit our stack limit. This is not ideal; we should

Re: r278984 - Add test missed from r278983.

2016-08-24 Thread Richard Smith via cfe-commits
ang-stage2-cmake-RgSan_check/2277/ >> >> > On Aug 17, 2016, at 2:42 PM, Richard Smith via cfe-commits < >> cfe-commits@lists.llvm.org> wrote: >> > >> > Author: rsmith >> > Date: Wed Aug 17 16:42:10 2016 >> > New Revision: 278984 >

r279694 - Lazily load the ContextDecl for a lambda's DefinitionData, to fix a

2016-08-24 Thread Richard Smith via cfe-commits
Author: rsmith Date: Wed Aug 24 19:34:00 2016 New Revision: 279694 URL: http://llvm.org/viewvc/llvm-project?rev=279694&view=rev Log: Lazily load the ContextDecl for a lambda's DefinitionData, to fix a deserialization cycle caused by the ContextDecl recursively importing members of the lambda's clo

r279766 - Refactor to remove the assumption that we know the name of the module we're emitting at the point when we create a PCHGenerator (with the C++ modules TS, we find that out part way through pa

2016-08-25 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Aug 25 13:26:30 2016 New Revision: 279766 URL: http://llvm.org/viewvc/llvm-project?rev=279766&view=rev Log: Refactor to remove the assumption that we know the name of the module we're emitting at the point when we create a PCHGenerator (with the C++ modules TS, we find t

Re: [PATCH] D23858: Don't diagnose non-modular includes when we are not compiling a module

2016-08-25 Thread Richard Smith via cfe-commits
rsmith added a comment. It seems to me like this is papering over an issue rather than fixing it. `diagnoseHeaderInclusion` calls `isHeaderInUmbrellaDirs` here, which is presumably failing to determine that `Nonmodular/A.h` is in the umbrella directory for the `Nonmodular` module. My first gues

Re: [PATCH] D23871: [Modules] Add 'freestanding' to the 'requires-declaration' feature-list.

2016-08-25 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. I imagine this would also be useful for libc++. Comment at: lib/Headers/module.modulemap:66 @@ -65,2 +65,3 @@ explicit module mm_malloc { + requir

Re: [PATCH] D23816: Add support for -fdiagnostics-abs-path: printing absolute paths in diagnostics

2016-08-25 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: include/clang/Driver/Options.td:994 @@ -993,1 +993,3 @@ Flags<[CC1Option]>, HelpText<"Do not include source location information with diagnostics">; +def fdiagnostics_abs_path : Flag<["-"], "fdiagnostics-abs-path">, Group, + Flags<[C

Re: [PATCH] D23858: Don't diagnose non-modular includes when we are not compiling a module

2016-08-25 Thread Richard Smith via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. OK, if this unblocks you and you're working towards properly handling umbrella headers in the VFS, I'm happy to go ahead with this. Please either rename the variable or move that part of the c

Re: [PATCH] D23816: Add support for -fdiagnostics-abs-path: printing absolute paths in diagnostics

2016-08-25 Thread Richard Smith via cfe-commits
rsmith accepted this revision. Comment at: lib/Frontend/TextDiagnostic.cpp:770-777 @@ +769,10 @@ + if (DiagOpts->AbsolutePath) { +const DirectoryEntry *Dir = SM.getFileManager().getDirectory( +llvm::sys::path::parent_path(Filename)); +if (Dir) { + StringRef D

r279794 - C++ Modules TS: add frontend support for building pcm files from module

2016-08-25 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Aug 25 19:14:38 2016 New Revision: 279794 URL: http://llvm.org/viewvc/llvm-project?rev=279794&view=rev Log: C++ Modules TS: add frontend support for building pcm files from module interface files. At the moment, all declarations (and no macros) are exported, and 'export' d

Re: [PATCH] D23816: Add support for -fdiagnostics-abs-path: printing absolute paths in diagnostics

2016-08-25 Thread Richard Smith via cfe-commits
On Thu, Aug 25, 2016 at 5:22 PM, Hans Wennborg wrote: > hans added inline comments. > > > Comment at: lib/Frontend/TextDiagnostic.cpp:770-777 > @@ +769,10 @@ > + if (DiagOpts->AbsolutePath) { > +const DirectoryEntry *Dir = SM.getFileManager().getDirectory( > +llvm::s

Re: [PATCH] D23895: [ms] Add support for parsing uuid as a MS attribute

2016-08-25 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: include/clang/Basic/Attr.td:201 @@ -200,2 +200,3 @@ class Declspec : Spelling; +class MS : Spelling; class CXX11 Is there some better description for this than MS? `__declspec` is also an MS attribute. Is it fair to cal

r279799 - Sort list of driver-known file extensions. It was previously approximately

2016-08-25 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Aug 25 19:41:59 2016 New Revision: 279799 URL: http://llvm.org/viewvc/llvm-project?rev=279799&view=rev Log: Sort list of driver-known file extensions. It was previously approximately ordered by length then alphabetically; apply that order consistently. Modified: cfe/t

Re: r253647 - [Myriad]: handle Preprocess job action (-E)

2016-08-25 Thread Richard Smith via cfe-commits
On Thu, Nov 19, 2015 at 8:58 PM, Douglas Katzman via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: dougk > Date: Thu Nov 19 22:58:12 2015 > New Revision: 253647 > > URL: http://llvm.org/viewvc/llvm-project?rev=253647&view=rev > Log: > [Myriad]: handle Preprocess job action (-E) > > Mo

Re: [PATCH] D23895: [ms] Add support for parsing uuid as a MS attribute

2016-08-25 Thread Richard Smith via cfe-commits
On Thu, Aug 25, 2016 at 5:46 PM, Reid Kleckner wrote: > rnk added a comment. > > I think these are known as "IDL attributes": > https://msdn.microsoft.com/en-us/library/8tesw2eh.aspx > > Let's update the naming to use that terminology, so AS_MS should be > AS_IDL, and MaybeParseMicrosoftAttribute

Re: [PATCH] D23905: [Modules] Add 'gnuinlineasm' to the 'requires-declaration' feature-list.

2016-08-25 Thread Richard Smith via cfe-commits
On 25 Aug 2016 7:37 p.m., "Bruno Cardoso Lopes" wrote: bruno created this revision. bruno added a reviewer: rsmith. bruno added subscribers: cfe-commits, eladcohen. This adds support for modules that require (no-)gnu-inline-asm environment, such as the compiler builtin cpuid submodule. This is

Re: [PATCH] D23999: [libc++] Minimal std::tuple fix for PR29123

2016-08-29 Thread Richard Smith via cfe-commits
rsmith added a comment. Ouch. This testcase is horrible. Note that we find two different ways to convert `Optional>` to itself: the obvious way, and `Optional> -> dynamic -> std::tuple -> Optional>` (because `tuple`'s conversion happens inside its converting constructor, this sidesteps the "at

r280035 - C++ Modules TS: driver support for building modules.

2016-08-29 Thread Richard Smith via cfe-commits
Author: rsmith Date: Mon Aug 29 19:44:54 2016 New Revision: 280035 URL: http://llvm.org/viewvc/llvm-project?rev=280035&view=rev Log: C++ Modules TS: driver support for building modules. This works as follows: we add --precompile to the existing gamut of options for specifying how far to go when c

r280057 - Combine two FileCheck patterns to prevent overzealous matching of .*

2016-08-29 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Aug 30 00:14:38 2016 New Revision: 280057 URL: http://llvm.org/viewvc/llvm-project?rev=280057&view=rev Log: Combine two FileCheck patterns to prevent overzealous matching of .* Modified: cfe/trunk/test/Driver/modules-ts.cpp Modified: cfe/trunk/test/Driver/modules-ts.

RE: r280057 - Combine two FileCheck patterns to prevent overzealous matching of .*

2016-08-30 Thread Richard Smith via cfe-commits
On 30 Aug 2016 9:45 am, "Robinson, Paul" wrote: > -Original Message- > From: cfe-commits [mailto:cfe-commits-boun...@lists.llvm.org] On Behalf Of > Richard Smith via cfe-commits > Sent: Monday, August 29, 2016 10:15 PM > To: cfe-commits@lists.llvm.org > Su

Re: [PATCH] D23492: Make function local tags visible.

2016-08-30 Thread Richard Smith via cfe-commits
Yes please On 30 Aug 2016 10:33 am, "Vassil Vassilev" wrote: > v.g.vassilev added a comment. > > Thanks! Shall I close this? > > > https://reviews.llvm.org/D23492 > > > > ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi

r280133 - PR30195: Fix clang-cl attempting to precompile bogus (non-precompilable) input types.

2016-08-30 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Aug 30 13:55:16 2016 New Revision: 280133 URL: http://llvm.org/viewvc/llvm-project?rev=280133&view=rev Log: PR30195: Fix clang-cl attempting to precompile bogus (non-precompilable) input types. Modified: cfe/trunk/include/clang/Driver/Types.h cfe/trunk/lib/Driver

Re: r280104 - Disable clang/test/SemaTemplate/instantiation-depth-default.cpp temporarily for targeting mingw32. It crashes. Investigating.

2016-08-30 Thread Richard Smith via cfe-commits
On Tue, Aug 30, 2016 at 8:38 AM, NAKAMURA Takumi via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: chapuni > Date: Tue Aug 30 10:38:18 2016 > New Revision: 280104 > > URL: http://llvm.org/viewvc/llvm-project?rev=280104&view=rev > Log: > Disable clang/test/SemaTemplate/instantiation-de

r280134 - Unrevert r280035 now that the clang-cl bug it exposed has been fixed by

2016-08-30 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Aug 30 14:06:26 2016 New Revision: 280134 URL: http://llvm.org/viewvc/llvm-project?rev=280134&view=rev Log: Unrevert r280035 now that the clang-cl bug it exposed has been fixed by r280133. Original commit message: C++ Modules TS: driver support for building modules. This

r280136 - PR29166: when merging declarations with typedef names for linkage purposes,

2016-08-30 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Aug 30 14:13:18 2016 New Revision: 280136 URL: http://llvm.org/viewvc/llvm-project?rev=280136&view=rev Log: PR29166: when merging declarations with typedef names for linkage purposes, don't assume that the anonymous struct will be part of the most recent declaration of the

Re: [PATCH] D23905: [Modules] Add 'gnuinlineasm' to the 'requires-declaration' feature-list.

2016-08-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, thanks! https://reviews.llvm.org/D23905 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listi

r280178 - Don't try to run a test that generates code for x86 if it's not a registered target.

2016-08-30 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Aug 30 18:53:34 2016 New Revision: 280178 URL: http://llvm.org/viewvc/llvm-project?rev=280178&view=rev Log: Don't try to run a test that generates code for x86 if it's not a registered target. Modified: cfe/trunk/test/Driver/cl-pch.c Modified: cfe/trunk/test/Driver/

Re: r280133 - PR30195: Fix clang-cl attempting to precompile bogus (non-precompilable) input types.

2016-08-30 Thread Richard Smith via cfe-commits
Hopefully r280178 should fix this. On Tue, Aug 30, 2016 at 4:00 PM, Renato Golin wrote: > On 30 August 2016 at 22:44, Renato Golin wrote: > > This breakage was hidden by Duncan's build breakage: > > > > http://lab.llvm.org:8011/builders/clang-cmake-aarch64-42vma/builds/11172 > > Also, http://la

Re: [PATCH] D23385: Implement __attribute__((require_constant_initialization)) for safe static initialization.

2016-08-30 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: include/clang/Basic/AttrDocs.td:836 @@ +835,3 @@ + let Content = [{ +This attribute specifies that the variable to which it is attached is intended +to have a `constant initializer

Re: [PATCH] D23325: [WIP] Binding of references to packed fields

2016-08-30 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: include/clang/AST/Expr.h:441 @@ +440,3 @@ + /// Likewise bitfields, we model gl-values referring to packed-fields as + /// an aspect of the value-kind type system. + bool refersToPackedField() const { return getObjectKind() == OK_Packed

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

2016-08-30 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: lib/Sema/SemaChecking.cpp:11054 @@ +11053,3 @@ + auto AlignRecord = Context.getTypeAlignInChars(BaseType); + if ((RequiredAlignment > AlignRecord) || + ((Context.toCharUnitsFromBits( Suppose I have this:

r280190 - PR12298 et al: don't recursively instantiate a template specialization from

2016-08-30 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Aug 30 21:15:21 2016 New Revision: 280190 URL: http://llvm.org/viewvc/llvm-project?rev=280190&view=rev Log: PR12298 et al: don't recursively instantiate a template specialization from within the instantiation of that same specialization. This could previously happen for ea

Re: r280104 - Disable clang/test/SemaTemplate/instantiation-depth-default.cpp temporarily for targeting mingw32. It crashes. Investigating.

2016-08-30 Thread Richard Smith via cfe-commits
good idea. See HandleLLVMOptions.cmake and TableGen.cmake. On Wed, Aug 31, 2016 at 4:12 AM Richard Smith wrote: > On Tue, Aug 30, 2016 at 8:38 AM, NAKAMURA Takumi via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > >> Author: chapuni >> Date: Tue Aug 30 10:38:18 2

r280288 - Fix mishandling of deletedness for assignment operators of classes with

2016-08-31 Thread Richard Smith via cfe-commits
Author: rsmith Date: Wed Aug 31 15:37:39 2016 New Revision: 280288 URL: http://llvm.org/viewvc/llvm-project?rev=280288&view=rev Log: Fix mishandling of deletedness for assignment operators of classes with indirect virtual bases. We don't need to be able to invoke such an assignment operator from t

r280289 - Don't diagnoes a mismatch between implicit and explicit exception

2016-08-31 Thread Richard Smith via cfe-commits
Author: rsmith Date: Wed Aug 31 15:38:32 2016 New Revision: 280289 URL: http://llvm.org/viewvc/llvm-project?rev=280289&view=rev Log: Don't diagnoes a mismatch between implicit and explicit exception specifications under -fno-exceptions, just as we don't diagnose other exception specification misma

Re: [PATCH] D24097: Add testcases for PR30188

2016-08-31 Thread Richard Smith via cfe-commits
rsmith added a subscriber: rsmith. rsmith requested changes to this revision. rsmith added a reviewer: rsmith. rsmith added a comment. This revision now requires changes to proceed. This belongs in LLVM's test suite, not Clang's. https://reviews.llvm.org/D24097 ___

r280308 - DR259: Demote the pedantic error for an explicit instantiation after an

2016-08-31 Thread Richard Smith via cfe-commits
Author: rsmith Date: Wed Aug 31 18:23:25 2016 New Revision: 280308 URL: http://llvm.org/viewvc/llvm-project?rev=280308&view=rev Log: DR259: Demote the pedantic error for an explicit instantiation after an explicit specialization to a warning for C++98 mode (this is a defect report resolution, so p

r280309 - Fix all tests under test/CXX (and test/Analysis) to pass if clang's default

2016-08-31 Thread Richard Smith via cfe-commits
Author: rsmith Date: Wed Aug 31 18:24:08 2016 New Revision: 280309 URL: http://llvm.org/viewvc/llvm-project?rev=280309&view=rev Log: Fix all tests under test/CXX (and test/Analysis) to pass if clang's default C++ language standard is not C++98. Modified: cfe/trunk/test/Analysis/misc-ps-region

Re: [PATCH] D24110: [Sema] Don't diagnose an array type mismatch when the new or previous declaration has a dependent type

2016-08-31 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: lib/Sema/SemaDecl.cpp:3370-3374 @@ -3369,7 +3369,7 @@ // mismatch. - if (!NewArray->isIncompleteArrayType()) { + if (!NewArray->isIncompleteArrayType() && !NewArray->isDependentType()) { for (VarDecl *PrevVD = Old

Re: [PATCH] D24110: [Sema] Don't diagnose an array type mismatch when the new or previous declaration has a dependent type

2016-08-31 Thread Richard Smith via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. LGTM as-is, but one suggestion if you want to still allow diagnosing a few more cases. Comment at: lib/Sema/SemaDecl.cpp:3377-3378 @@ -3376,4 +3376,4 @@ if (!Con

Re: [PATCH] D24110: [Sema] Don't diagnose an array type mismatch when the new or previous declaration has a dependent type

2016-08-31 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: lib/Sema/SemaDecl.cpp:3377-3378 @@ -3376,4 +3376,4 @@ if (!Context.hasSameType(NewArray, PrevVDTy)) return diagnoseVarDeclTypeMismatch(*this, New, PrevVD); } ahatanak wrote: > rsmith wrot

r280409 - When we reach the end of a #include of a header of a local submodule that we

2016-09-01 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Sep 1 15:15:25 2016 New Revision: 280409 URL: http://llvm.org/viewvc/llvm-project?rev=280409&view=rev Log: When we reach the end of a #include of a header of a local submodule that we textually included, create an ImportDecl just as we would if we reached a #include of an

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

2016-09-01 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: lib/Sema/SemaDecl.cpp:8652 @@ +8651,3 @@ +/// +bool Sema::shouldLinkDependentDeclWithPrevious(Decl *D, Decl *PrevDecl) { + DeclContext *LexicalDC = D->getLexicalDeclContext(); Most of the logic in this function can be rep

Re: [PATCH] D23895: [ms] Add support for parsing uuid as a MS attribute

2016-09-01 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: include/clang/Basic/Attr.td:201 @@ -200,2 +200,3 @@ class Declspec : Spelling; +class Microsoft : Spelling; class CXX11 Given that MS have deprecated this syntax and are trying to move away from it towards `__declspec`,

r280434 - Refactor to avoid holding a reference to a container element that could go away

2016-09-01 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Sep 1 19:10:28 2016 New Revision: 280434 URL: http://llvm.org/viewvc/llvm-project?rev=280434&view=rev Log: Refactor to avoid holding a reference to a container element that could go away during this function, and to avoid rolling back changes to the module manager's data

r280436 - Clean up handling of reading module files from stdin. Don't bother trying to

2016-09-01 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Sep 1 19:18:05 2016 New Revision: 280436 URL: http://llvm.org/viewvc/llvm-project?rev=280436&view=rev Log: Clean up handling of reading module files from stdin. Don't bother trying to look for a corresponding file, since we're not going to read it anyway. No observable b

Re: [PATCH] D24152: Support the overloadable attribute with _Generic expressions

2016-09-01 Thread Richard Smith via cfe-commits
rsmith added a comment. Lgtm other than George's nit. https://reviews.llvm.org/D24152 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D23895: [ms] Add support for parsing uuid as a MS attribute

2016-09-02 Thread Richard Smith via cfe-commits
rsmith accepted this revision. rsmith added a comment. For submit, can you separate the changes to generally support `[]` attribute syntax and the changes to parse `[uuid(...)]` into distinct commits? (I'm OK with the `Microsoft` attribute support piece landing with no tests since the `uuid` pa

Re: [PATCH] D24113: Allow implicit conversions between incompatible pointer types in overload resolution in C.

2016-09-02 Thread Richard Smith via cfe-commits
rsmith accepted this revision. This revision is now accepted and ready to land. Comment at: lib/Sema/SemaOverload.cpp:1813-1815 @@ -1795,5 +1812,5 @@ // and we don't know what conversions it may overlap with. - SCS.First = ICK_C_Only_Conversion; - SCS.Second = ICK_C_Only_Conv

Re: r280607 - PR 27200: Fix names of the atomic lock-free macros.

2016-09-03 Thread Richard Smith via cfe-commits
On 3 Sep 2016 5:52 p.m., "Joerg Sonnenberger via cfe-commits" < cfe-commits@lists.llvm.org> wrote: Author: joerg Date: Sat Sep 3 19:44:10 2016 New Revision: 280607 URL: http://llvm.org/viewvc/llvm-project?rev=280607&view=rev Log: PR 27200: Fix names of the atomic lock-free macros. Modified:

Re: r280607 - PR 27200: Fix names of the atomic lock-free macros.

2016-09-03 Thread Richard Smith via cfe-commits
On 3 Sep 2016 6:01 p.m., "Joerg Sonnenberger via cfe-commits" < cfe-commits@lists.llvm.org> wrote: On Sat, Sep 03, 2016 at 05:56:43PM -0700, Richard Smith wrote: > /* 7.17.2 Initialization */ > > #define ATOMIC_VAR_INIT(value) (value) > #define atomic_init __c1

Re: [PATCH] D23284: Add -Rpass-with-hotness

2016-09-06 Thread Richard Smith via cfe-commits
rsmith added a comment. Sorry I missed this until now. I think this should not be an -R option at all; like -W flags, the idea is for -R to only act as a filter for which diagnostics are shown. This option seems much more closely related to options like -fdiagnostics-show-option and -fdiagnost

Re: [PATCH] D24268: Traversing template paramter lists of DeclaratorDecls and/or TagDecls.

2016-09-06 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: include/clang/AST/RecursiveASTVisitor.h:487-489 @@ +486,5 @@ + // Traverses template parameter lists of either a DeclaratorDecl or TagDecl. + template ::value || + std::is_base_of::value>::type> + bool TraverseDeclTemplateParameter

Re: [PATCH] D23284: Add -Rpass-with-hotness

2016-09-06 Thread Richard Smith via cfe-commits
rsmith added a comment. In https://reviews.llvm.org/D23284#534919, @anemet wrote: > In https://reviews.llvm.org/D23284#534879, @rsmith wrote: > > > I think this should not be an -R option at all; like -W flags, the idea is > > for -R to only act as a filter for which diagnostics are shown. This

Re: [PATCH] D24268: Traversing template paramter lists of DeclaratorDecls and/or TagDecls.

2016-09-06 Thread Richard Smith via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. This patch looks great, thank you! Do you have an SVN account or do you need someone to commit this for you? Comment at: unittests/ASTMatchers/ASTMatchersTraversalTest.cpp:72

Re: [PATCH] D24268: Traversing template paramter lists of DeclaratorDecls and/or TagDecls.

2016-09-06 Thread Richard Smith via cfe-commits
On Tue, Sep 6, 2016 at 3:47 PM, Ɓukasz Anforowicz wrote: > lukasza added inline comments. > > > Comment at: include/clang/AST/RecursiveASTVisitor.h:487-489 > @@ +486,5 @@ > + // Traverses template parameter lists of either a DeclaratorDecl or > TagDecl. > + template + std

Re: r280728 - Modules: Fix an assertion in DeclContext::buildLookup.

2016-09-06 Thread Richard Smith via cfe-commits
On Tue, Sep 6, 2016 at 11:16 AM, Manman Ren via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: mren > Date: Tue Sep 6 13:16:54 2016 > New Revision: 280728 > > URL: http://llvm.org/viewvc/llvm-project?rev=280728&view=rev > Log: > Modules: Fix an assertion in DeclContext::buildLookup. >

Re: [PATCH] D24158: Try contextually converting condition of constexpr if to Boolean value

2016-09-06 Thread Richard Smith via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. Thanks, LGTM. If you're looking for more issues in this area -- in passing I noticed that we fail to apply the "contextually converted constant expression of type bool" rules properly in the

Re: [PATCH] D24158: Try contextually converting condition of constexpr if to Boolean value

2016-09-06 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: test/CodeGenCXX/cxx1z-constexpr-if.cpp:26-29 @@ -17,2 +25,6 @@ } + if constexpr (A()) +should_be_used_3(); + else +should_not_be_used(); } Please also add a test that we reject expressions that are contextual

r280776 - Fix clang's handling of the copy performed in the second phase of class

2016-09-06 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Sep 6 21:14:33 2016 New Revision: 280776 URL: http://llvm.org/viewvc/llvm-project?rev=280776&view=rev Log: Fix clang's handling of the copy performed in the second phase of class copy-initialization. We previously got this wrong in a couple of ways: - we only looked for

<    15   16   17   18   19   20   21   22   23   24   >