Re: [PATCH] D9888: [OPENMP] Driver support for OpenMP offloading

2016-03-19 Thread Richard Smith via cfe-commits
rsmith added a comment. @echristo, you asked for time to review this; if you still want to, please can you do so? @tra, it looks like you're happy with this design (and with moving the CUDA offloading support in this direction), please let us know if not! Comment at: include/c

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

2016-03-19 Thread Richard Smith via cfe-commits
rsmith added a comment. Can we instead not add the function to the redeclaration chain until it's instantiated (like we do if it's dependent)? http://reviews.llvm.org/D16989 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.

Re: [PATCH] D15332: new clang-tidy checker readability-non-const-parameter

2016-03-19 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: test/clang-tidy/readability-non-const-parameter.cpp:116-134 @@ +115,21 @@ + +// CHECK-MESSAGES: :[[@LINE+1]]:18: warning: parameter 'p' can be const +int return1(int *p) { + // CHECK-FIXES: {{^}}int return1(const int *p) {{{$}} + return

Re: [PATCH] D13643: [Sema] Warn on ternary comparison

2016-03-19 Thread Richard Smith via cfe-commits
rsmith added a comment. Once this lands, we should also consider the corresponding case from a //fold-expression//: template bool f(T ...t) { return (t < ...); } // warn if sizeof...(T) != 2 and we use built-in operator <. bool k = f(1.0, 2.0, 3.0); http://reviews.llvm.org/D13643 _

Re: [PATCH] D18011: [modules] Diagnose insufficient privileges when trying to load the modulemap

2016-03-19 Thread Richard Smith via cfe-commits
rsmith added a comment. I would prefer that we solve this problem generically for all files that Clang tries to open, not just for module map files. (Note, for instance, that PR20468 concerns files referenced by module map files, such as their nominated headers, not the module map files themsel

Re: [PATCH] D17701: [Sema] Teach SemaCast to allow reinterpret_casts of overloaded functions with only one addressable candidate

2016-03-19 Thread Richard Smith via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. OK, though I'm hoping either there aren't many more of these cases or we can treat them more generally somehow. Comment at: lib/Sema/SemaCast.cpp:1771-1782 @@ +1770,14 @@ + +

Re: [PATCH] D16396: Warn if variable cannot be implicitly instantiated

2016-03-19 Thread Richard Smith via cfe-commits
rsmith added a comment. Are you planning on extending this to also cover templated functions? Comment at: include/clang/Basic/DiagnosticGroups.td:78 @@ -77,2 +77,3 @@ DiagGroup<"gnu-string-literal-operator-template">; +def UnavailableTemplate : DiagGroup<"unavailable-template

Re: [PATCH] D16965: Fix for Bug 14644 - clang confuses scope operator for global namespace giving extra qualification on member

2016-03-20 Thread Richard Smith via cfe-commits
rsmith added a comment. Note that the diagnostic wording has already been fixed compared with the diagnostic reported in that bug report. Do we actually need more changes here? http://reviews.llvm.org/D16965 ___ cfe-commits mailing list cfe-commits

r263895 - P0184R0: Allow types of 'begin' and 'end' expressions in range-based for loops to differ.

2016-03-20 Thread Richard Smith via cfe-commits
Author: rsmith Date: Sun Mar 20 05:33:40 2016 New Revision: 263895 URL: http://llvm.org/viewvc/llvm-project?rev=263895&view=rev Log: P0184R0: Allow types of 'begin' and 'end' expressions in range-based for loops to differ. Modified: cfe/trunk/include/clang/AST/StmtCXX.h cfe/trunk/include

r263896 - Mark C++ features implemented in Clang 3.8 as done now that 3.8 has released.

2016-03-20 Thread Richard Smith via cfe-commits
Author: rsmith Date: Sun Mar 20 05:37:12 2016 New Revision: 263896 URL: http://llvm.org/viewvc/llvm-project?rev=263896&view=rev Log: Mark C++ features implemented in Clang 3.8 as done now that 3.8 has released. Modified: cfe/trunk/www/cxx_status.html Modified: cfe/trunk/www/cxx_status.html U

Re: r263895 - P0184R0: Allow types of 'begin' and 'end' expressions in range-based for loops to differ.

2016-03-20 Thread Richard Smith via cfe-commits
On Sun, Mar 20, 2016 at 7:05 AM, Renato Golin wrote: > On 20 March 2016 at 11:33, Richard Smith via cfe-commits > wrote: >> Author: rsmith >> Date: Sun Mar 20 05:33:40 2016 >> New Revision: 263895 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=263895&

Re: [PATCH] D17746: Fix PR26741 -- __builtin_object_size is not consistently conservative with C++ inheritance

2016-03-20 Thread Richard Smith via cfe-commits
On Sun, Mar 20, 2016 at 6:25 AM, Joerg Sonnenberger via cfe-commits wrote: > On Fri, Mar 18, 2016 at 05:11:19PM +0000, Richard Smith via cfe-commits wrote: >> rsmith added a comment. >> >> Can you explain a bit more about the problem? It seems to me that if I have

Fwd: r202683 - Introduce '-fmodules-user-build-path' which accepts the "canonical" path to a user workspace build.

2016-03-21 Thread Richard Smith via cfe-commits
[Resend to new ML] What is this option for? This seems, in effect, to provide a way to use a distinct module cache. Why would someone use this rather than specifying a module cache path? On Mon, Mar 3, 2014 at 12:12 AM, Argyrios Kyrtzidis wrote: > Author: akirtzidis > Date: Mon Mar 3 02:12:05 2

r263970 - [modules] Don't invent a module cache path unless implicit module builds are enabled.

2016-03-21 Thread Richard Smith via cfe-commits
Author: rsmith Date: Mon Mar 21 14:06:06 2016 New Revision: 263970 URL: http://llvm.org/viewvc/llvm-project?rev=263970&view=rev Log: [modules] Don't invent a module cache path unless implicit module builds are enabled. Modified: cfe/trunk/lib/Driver/Tools.cpp cfe/trunk/test/Modules/no-im

r263989 - [modules] Renumber DECL_UPDATES from 30 to 50, so it no longer collides with

2016-03-21 Thread Richard Smith via cfe-commits
Author: rsmith Date: Mon Mar 21 16:16:01 2016 New Revision: 263989 URL: http://llvm.org/viewvc/llvm-project?rev=263989&view=rev Log: [modules] Renumber DECL_UPDATES from 30 to 50, so it no longer collides with TYPE_TEMPLATE_SPECIALIZATION. This was fine in practice because both record kinds are on

Re: [PATCH] D18328: [CUDA] Add option to mark most functions inside as host+device.

2016-03-21 Thread Richard Smith via cfe-commits
rsmith added a subscriber: rsmith. rsmith added a comment. I would much prefer for us to, say, provide a header that wraps the system one and does something like // #pragma clang cuda_implicit_host_device { #include_next #pragma clang cuda_implicit_host_device } or to provide an expl

Re: [PATCH] D18328: [CUDA] Add option to mark most functions inside as host+device.

2016-03-21 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: include/clang/Driver/Options.td:383-384 @@ -382,2 +382,4 @@ HelpText<"Enable device-side debug info generation. Disables ptxas optimizations.">; +def cuda_allow_std_complex : Flag<["--"], "cuda-allow-std-complex">, + HelpText<"Allow C

r263996 - [modules] Store mangling numbers in a deterministic order so they don't cause the resulting .pcm files to be nondeterministic.

2016-03-21 Thread Richard Smith via cfe-commits
Author: rsmith Date: Mon Mar 21 17:33:02 2016 New Revision: 263996 URL: http://llvm.org/viewvc/llvm-project?rev=263996&view=rev Log: [modules] Store mangling numbers in a deterministic order so they don't cause the resulting .pcm files to be nondeterministic. Modified: cfe/trunk/include/clan

Re: [PATCH] D18328: [CUDA] Add option to mark most functions inside as host+device.

2016-03-21 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: lib/Sema/SemaCUDA.cpp:479-481 @@ +478,5 @@ +return false; + StringRef Filename = FE->getName(); + if (Filename != "complex" && !Filename.endswith("/complex")) +return false; + jlebar wrote: > rsmith wrote: > > I

Re: [PATCH] D18328: [CUDA] Add option to mark most functions inside as host+device.

2016-03-21 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: lib/Sema/SemaCUDA.cpp:464-465 @@ +463,4 @@ +// without passing -fcuda-allow-std-complex. +// TODO: Output a nvcc-compat warning if you try to use a non-constexpr function +// from -- nvcc only lets you use constexpr functions. +bool Sem

Re: [PATCH] D17950: Implement is_always_lock_free

2016-03-21 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: lib/Frontend/InitPreprocessor.cpp:465 @@ +464,3 @@ + if (LangOpts.CPlusPlus1z) { +Builder.defineMacro("__cpp_lib_atomic_is_always_lock_free", "201603"); + } This should be defined by the relevant library header, not

Re: r263974 - clang-cl: With -fmsc-version=1900, use MSVS2015 diag formatting.

2016-03-21 Thread Richard Smith via cfe-commits
Seems to have caused a bot failure: http://lab.llvm.org:8011/builders/clang-x86-win2008-selfhost/builds/7039 The NOTRIPLE test appears to be picking up the version of MSVC from that installed on the system, so this passes or fails depending on which version of MSVC we find. On Mon, Mar 21, 2016

Re: [PATCH] D17950: Implement is_always_lock_free

2016-03-21 Thread Richard Smith via cfe-commits
On Mon, Mar 21, 2016 at 4:46 PM, JF Bastien via cfe-commits wrote: > jfb added inline comments. > > > Comment at: lib/Frontend/InitPreprocessor.cpp:465 > @@ +464,3 @@ > + if (LangOpts.CPlusPlus1z) { > +Builder.defineMacro("__cpp_lib_atomic_is_always_lock_free", "201603"); > +

Re: [PATCH] D18325: export additional header modules from xmmintrin

2016-03-21 Thread Richard Smith via cfe-commits
rsmith added a subscriber: rsmith. Comment at: lib/Headers/module.modulemap:48 @@ -47,3 +47,1 @@ - export mmx - export sse2 // note: for hackish dependency header "xmmintrin.h" Did you intentionally remove this comment? Comment

Re: [PATCH] D18325: export additional header modules from xmmintrin

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

Re: [PATCH] D17462: Fix a codegen bug for variadic functions with pass_object_size params

2016-03-22 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: lib/CodeGen/CGCall.cpp:142-143 @@ -132,1 +141,4 @@ + appendParameterTypes(CGT, prefix, FTP, FD, &SynthesizedParams); + RequiredArgs Required = + RequiredArgs::forPrototypePlus(FTP, StartParams + SynthesizedParams); CanQualType re

Re: [Diffusion] rL244063: Add missing atomic libcall support.

2016-03-22 Thread Richard Smith via cfe-commits
rsmith resigned from this audit. Users: jyknight (Author, Auditor) 3.7-release (Auditor) cfe-commits (Auditor) tstellarAMD (Auditor) compnerd (Auditor) majnemer (Auditor) rsmith (Auditor) dim (Auditor) http://reviews.llvm.org/rL244063 ___

Re: [PATCH] D13704: [Fix] Allow implicit conversions of the address of overloadable functions in C + docs update

2016-03-22 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:10419 @@ -10418,3 +10429,1 @@ - ResultTy) || - (!S.getLangOpts().CPlusPlus && TargetType->isVoidPointerType())) {

Re: [PATCH] D16993: Add missing __builtin_bitreverse8

2016-03-23 Thread Richard Smith via cfe-commits
rsmith added a subscriber: rsmith. rsmith accepted this revision. rsmith added a reviewer: rsmith. This revision is now accepted and ready to land. Comment at: docs/LanguageExtensions.rst:1533 @@ +1532,3 @@ +the bitpattern of an integer value; for example ``0b1234567`` becomes +``

Re: [PATCH] D17762: Fix an assertion failure in setPointOfInstantiation.

2016-03-23 Thread Richard Smith via cfe-commits
rsmith added a comment. It seems to me that the bug is that we're producing an invalid source location, not how we handle that downstream. Typo correction should be able to preserve the source location of whatever expression it was correcting. Comment at: lib/Sema/SemaExpr.cpp

Re: [PATCH] D18401: clang-cl: Include /FI headers in /showIncludes output.

2016-03-23 Thread Richard Smith via cfe-commits
rsmith added a subscriber: rsmith. rsmith accepted this revision. rsmith added a reviewer: rsmith. This revision is now accepted and ready to land. Comment at: lib/Frontend/HeaderIncludeGen.cpp:155-156 @@ -151,3 +154,4 @@ // Dump the header include information we are past the

Re: [PATCH] D18380: [CUDA] Implement -fcuda-relaxed-constexpr, and enable it by default.

2016-03-23 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: include/clang/Driver/CC1Options.td:702-703 @@ -701,2 +701,4 @@ HelpText<"Allow variadic functions in CUDA device code.">; +def fcuda_relaxed_constexpr : Flag<["-"], "fcuda-relaxed-constexpr">, + HelpText<"Treat constexpr functions as _

Re: [PATCH] D18271: Avoid -Wshadow warnings about constructor parameters named after fields

2016-03-23 Thread Richard Smith via cfe-commits
rsmith added a comment. I think a reasonable approach would be: "do not warn on shadowing if the idiom of naming a constructor parameter after a class member is used, and the class member is initialized from that constructor parameter, and all uses of the parameter in the constructor body would

Re: [PATCH] D18380: [CUDA] Implement -fcuda-relaxed-constexpr, and enable it by default.

2016-03-23 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: include/clang/Driver/CC1Options.td:702-703 @@ -701,2 +701,4 @@ HelpText<"Allow variadic functions in CUDA device code.">; +def fcuda_relaxed_constexpr : Flag<["-"], "fcuda-relaxed-constexpr">, + HelpText<"Treat constexpr functions as _

r264184 - Make sure to perform dependent access checks when instantiating a

2016-03-23 Thread Richard Smith via cfe-commits
Author: rsmith Date: Wed Mar 23 15:07:07 2016 New Revision: 264184 URL: http://llvm.org/viewvc/llvm-project?rev=264184&view=rev Log: Make sure to perform dependent access checks when instantiating a lambda-expression. We don't actually instantiate the closure type / operator() in the template in o

r264189 - Make SemaAccess smarter about determining when a dependent class might

2016-03-23 Thread Richard Smith via cfe-commits
Author: rsmith Date: Wed Mar 23 15:39:06 2016 New Revision: 264189 URL: http://llvm.org/viewvc/llvm-project?rev=264189&view=rev Log: Make SemaAccess smarter about determining when a dependent class might instantiate to match a friend class declaration. It's still pretty dumb, though. Modified:

Re: [PATCH] D17444: PR26672: [MSVC] Clang does not recognize "static_assert" keyword in C mode

2016-03-24 Thread Richard Smith via cfe-commits
On Thu, Mar 24, 2016 at 9:23 AM, David Majnemer wrote: > > > On Thu, Mar 24, 2016 at 9:09 AM, Aaron Ballman > wrote: >> >> On Thu, Mar 24, 2016 at 11:49 AM, Reid Kleckner wrote: >> > On Thu, Mar 3, 2016 at 10:40 AM, Aaron Ballman >> > wrote: >> >> >> >> That was what I meant by "justification".

Re: [PATCH] D18380: [CUDA] Implement -fcuda-relaxed-constexpr, and enable it by default.

2016-03-24 Thread Richard Smith via cfe-commits
rsmith accepted this revision. rsmith added a reviewer: rsmith. rsmith added a comment. The change to allow `__host__ __device__` functions to be overloaded with other combinations of target attributes appears to be separable from the `constexpr` change; please split it out and commit it first.

Re: [PATCH] D16797: Update clang support on recent Haiku

2016-03-24 Thread Richard Smith via cfe-commits
rsmith added a comment. Do you need someone to commit this for you? Repository: rL LLVM http://reviews.llvm.org/D16797 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D17444: PR26672: [MSVC] Clang does not recognize "static_assert" keyword in C mode

2016-03-24 Thread Richard Smith via cfe-commits
On Thu, Mar 24, 2016 at 11:29 AM, Aaron Ballman wrote: > On Thu, Mar 24, 2016 at 12:23 PM, David Majnemer > wrote: >> >> >> On Thu, Mar 24, 2016 at 9:09 AM, Aaron Ballman >> wrote: >>> >>> On Thu, Mar 24, 2016 at 11:49 AM, Reid Kleckner wrote: >>> > On Thu, Mar 3, 2016 at 10:40 AM, Aaron Ballma

r264323 - Change ADL to produce lookup results in a deterministic order. This fixes some

2016-03-24 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Mar 24 14:12:22 2016 New Revision: 264323 URL: http://llvm.org/viewvc/llvm-project?rev=264323&view=rev Log: Change ADL to produce lookup results in a deterministic order. This fixes some rare issues with nondeterministic diagnostic order, and some very common issues with n

Re: [PATCH] D16797: Update clang support on recent Haiku

2016-03-24 Thread Richard Smith via cfe-commits
rsmith requested changes to this revision. rsmith added a comment. This revision now requires changes to proceed. Please rebase against trunk. I'm surprised that no tests need updating due to this. Can you add some, please? Comment at: lib/Basic/Targets.cpp:387 @@ +386,3 @@ +

r264359 - [modules] Store offset to LOCAL_REDECLARATIONS record relative to the current

2016-03-24 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Mar 24 18:41:14 2016 New Revision: 264359 URL: http://llvm.org/viewvc/llvm-project?rev=264359&view=rev Log: [modules] Store offset to LOCAL_REDECLARATIONS record relative to the current record rather than relative to the start of the bitcode file. Saves a couple of bytes p

r264363 - Fix nondeterminism in computation of builtin operator overload sets.

2016-03-24 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Mar 24 19:08:53 2016 New Revision: 264363 URL: http://llvm.org/viewvc/llvm-project?rev=264363&view=rev Log: Fix nondeterminism in computation of builtin operator overload sets. Modified: cfe/trunk/lib/Sema/SemaOverload.cpp cfe/trunk/test/SemaCXX/diagnostic-order.c

Re: [PATCH] D5041: Fix for clang_Cursor_getSpellingNameRange() reportage of C++ functions

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

Re: [PATCH] D18458: [CUDA] Mangle __host__ __device__ functions differently than __host__ or __device__ functions.

2016-03-24 Thread Richard Smith via cfe-commits
rsmith added a comment. This makes the "`constexpr` implies `__host__` `__device__`" patch look slightly questionable: two translation units defining the same `constexpr` function will mangle that function differently depending on whether the translation unit is built with CUDA support enabled.

r264377 - [modules] Store a local offset to DeclContext lexical and visible contents. Saves a few bytes for each primary DeclContext.

2016-03-24 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Mar 24 20:17:43 2016 New Revision: 264377 URL: http://llvm.org/viewvc/llvm-project?rev=264377&view=rev Log: [modules] Store a local offset to DeclContext lexical and visible contents. Saves a few bytes for each primary DeclContext. Modified: cfe/trunk/lib/Serializati

Re: [PATCH] D18458: [CUDA] Mangle __host__ __device__ functions differently than __host__ or __device__ functions.

2016-03-25 Thread Richard Smith via cfe-commits
rsmith added a comment. It seems like we have the following constraint: on host, no attributes must mangle the same as `__host__ __device__` and `constexpr` (and probably `__global__`?). Are there any others? What do we need to do to be ABI-compatible with NVCC? (And is that possible if we all

r264464 - Delete dead variable.

2016-03-25 Thread Richard Smith via cfe-commits
Author: rsmith Date: Fri Mar 25 16:46:44 2016 New Revision: 264464 URL: http://llvm.org/viewvc/llvm-project?rev=264464&view=rev Log: Delete dead variable. Modified: cfe/trunk/lib/Frontend/ASTUnit.cpp Modified: cfe/trunk/lib/Frontend/ASTUnit.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/t

r264466 - Store list of undefined-but-used objects in a deterministic order to fix

2016-03-25 Thread Richard Smith via cfe-commits
Author: rsmith Date: Fri Mar 25 16:49:43 2016 New Revision: 264466 URL: http://llvm.org/viewvc/llvm-project?rev=264466&view=rev Log: Store list of undefined-but-used objects in a deterministic order to fix non-deterministic diagnostics (and non-deterministic PCH files). Check these when building a

r264471 - Don't warn on "use" of undefined inline function that isn't actually an ODR

2016-03-25 Thread Richard Smith via cfe-commits
Author: rsmith Date: Fri Mar 25 17:29:27 2016 New Revision: 264471 URL: http://llvm.org/viewvc/llvm-project?rev=264471&view=rev Log: Don't warn on "use" of undefined inline function that isn't actually an ODR use. In order for this to fire, the function needed to be a templated function marked 'co

Re: [PATCH] D18458: [CUDA] Mangle __host__ __device__ functions differently than __host__ or __device__ functions.

2016-03-25 Thread Richard Smith via cfe-commits
rsmith added a comment. In http://reviews.llvm.org/D18458#383755, @jlebar wrote: > In http://reviews.llvm.org/D18458#383719, @rsmith wrote: > > > It seems like we have the following constraint: on host, no attributes must > > mangle the same as `__host__ __device__` and `constexpr` (and probably

Re: r264428 - [ASTMatchers] Fix build for VariadicFunction.

2016-03-25 Thread Richard Smith via cfe-commits
On Fri, Mar 25, 2016 at 10:55 AM, David Blaikie via cfe-commits wrote: > > > On Fri, Mar 25, 2016 at 10:46 AM, Samuel Benzaquen via cfe-commits > wrote: >> >> Author: sbenza >> Date: Fri Mar 25 12:46:02 2016 >> New Revision: 264428 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=264428&view=re

Re: [PATCH] D14905: [constexpr-lambda] Support parsing of constexpr specifier (and its inference) on lambda expressions

2016-03-25 Thread Richard Smith via cfe-commits
rsmith accepted this revision. This revision is now accepted and ready to land. Comment at: include/clang/Basic/DiagnosticParseKinds.td:769 @@ +768,3 @@ + "attribute specifier|'constexpr'}0">; +def err_lambda_declspecifier_repeated : Error< + "%select{'mutable'|'constexpr'}0 can

Re: r264522 - [NFC] Tweak diagnostic for template template arguments, to include template aliases.

2016-03-26 Thread Richard Smith via cfe-commits
On 26 Mar 2016 1:52 p.m., "Faisal Vali via cfe-commits" < cfe-commits@lists.llvm.org> wrote: > > Author: faisalv > Date: Sat Mar 26 15:46:45 2016 > New Revision: 264522 > > URL: http://llvm.org/viewvc/llvm-project?rev=264522&view=rev > Log: > [NFC] For future reference, a change to diagnostic word

Re: [PATCH] D18495: Check default arguments of template template parameters for compatibility.

2016-03-26 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: lib/Sema/SemaTemplate.cpp:793-800 @@ -792,10 +792,2 @@ if (!Default.isInvalid()) { -// Check only that we have a template template argument. We don't want to -// try to check well-formedness now, because our template template p

r264533 - Remove unused support for replacing declarations from chained AST files.

2016-03-26 Thread Richard Smith via cfe-commits
Author: rsmith Date: Sun Mar 27 00:52:25 2016 New Revision: 264533 URL: http://llvm.org/viewvc/llvm-project?rev=264533&view=rev Log: Remove unused support for replacing declarations from chained AST files. Modified: cfe/trunk/include/clang/Serialization/ASTBitCodes.h cfe/trunk/include/cla

Re: r264529 - Improve the representation of CXXUuidofExpr

2016-03-27 Thread Richard Smith via cfe-commits
On Sat, Mar 26, 2016 at 9:46 PM, David Majnemer via cfe-commits wrote: > Author: majnemer > Date: Sat Mar 26 23:46:07 2016 > New Revision: 264529 > > URL: http://llvm.org/viewvc/llvm-project?rev=264529&view=rev > Log: > Improve the representation of CXXUuidofExpr > > Keep a pointer to the UuidAttr

r264534 - Encapsulate a couple of on-disk structures a little more.

2016-03-27 Thread Richard Smith via cfe-commits
Author: rsmith Date: Sun Mar 27 02:28:06 2016 New Revision: 264534 URL: http://llvm.org/viewvc/llvm-project?rev=264534&view=rev Log: Encapsulate a couple of on-disk structures a little more. Modified: cfe/trunk/include/clang/Serialization/ASTBitCodes.h cfe/trunk/include/clang/Serializatio

r264540 - [modules] When encoding SourceLocations in bitcode, rotate the 'is macro' flag

2016-03-27 Thread Richard Smith via cfe-commits
Author: rsmith Date: Sun Mar 27 15:13:24 2016 New Revision: 264540 URL: http://llvm.org/viewvc/llvm-project?rev=264540&view=rev Log: [modules] When encoding SourceLocations in bitcode, rotate the 'is macro' flag bit from the top bit to the bottom bit, so that we don't need 6 VBR6 hunks for each ma

r264564 - P0138R2: Allow direct-list-initialization of an enumeration from an integral

2016-03-27 Thread Richard Smith via cfe-commits
Author: rsmith Date: Mon Mar 28 01:08:37 2016 New Revision: 264564 URL: http://llvm.org/viewvc/llvm-project?rev=264564&view=rev Log: P0138R2: Allow direct-list-initialization of an enumeration from an integral value that can convert to the enum's underlying type. Added: cfe/trunk/test/CXX/dcl

Re: [PATCH] D18458: [CUDA] Mangle __host__ __device__ functions differently than __host__ or __device__ functions.

2016-03-28 Thread Richard Smith via cfe-commits
On 27 Mar 2016 9:56 a.m., "Justin Lebar via cfe-commits" < cfe-commits@lists.llvm.org> wrote: > > jlebar added a comment. > > > OK, so the question for you is, how much ABI compatibility with NVCC are you prepared to give up in order to allow HD / D overloading and HD / H overloading? > > > At the

Re: [PATCH] D18296: [Sema] Handle UTF-8 invalid format string specifiers

2016-03-28 Thread Richard Smith via cfe-commits
rsmith added a comment. This patch builds a length-1 `ConversionSpecifier` but includes the complete code point in the length of the overall format specifier, which is inconsistent. Please either treat the trailing bytes as part of the `ConversionSpecifier` or revert the changes to `ParsePrintf

r264664 - [modules] If both a module file and a module map for the same module are

2016-03-28 Thread Richard Smith via cfe-commits
Author: rsmith Date: Mon Mar 28 16:31:09 2016 New Revision: 264664 URL: http://llvm.org/viewvc/llvm-project?rev=264664&view=rev Log: [modules] If both a module file and a module map for the same module are explicitly provided, and the module map lists a header that does not exist, unmark the modul

Re: [PATCH] D17407: [Sema] PR25755 Fix crash when initializing out-of-order struct references

2016-03-28 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: lib/Sema/SemaInit.cpp:1818-1823 @@ +1817,8 @@ + RecordDecl::field_iterator FieldStart = Field; + unsigned FieldSize = [FieldStart, FieldEnd]() mutable -> unsigned { +unsigned i = 0; +for (; FieldStart != FieldEnd; ++FieldStart, +

Re: [PATCH] D18296: [Sema] Handle UTF-8 invalid format string specifiers

2016-03-28 Thread Richard Smith via cfe-commits
rsmith accepted this revision. This revision is now accepted and ready to land. Comment at: lib/Analysis/FormatString.cpp:276 @@ +275,3 @@ + // UTF-8 sequence. If that's the case, adjust the length accordingly. + if (llvm::sys::locale::isPrint(FirstByte)) +return false;

r256529 - Revert r93378, which is incorrect but currently unobservable (because the

2015-12-28 Thread Richard Smith via cfe-commits
Author: rsmith Date: Mon Dec 28 19:02:53 2015 New Revision: 256529 URL: http://llvm.org/viewvc/llvm-project?rev=256529&view=rev Log: Revert r93378, which is incorrect but currently unobservable (because the underlying declaration of a NamedDecl happens to always have the same name and identifier n

r256575 - Teach typo correction to properly handle mapping declarations to their

2015-12-29 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Dec 29 13:43:10 2015 New Revision: 256575 URL: http://llvm.org/viewvc/llvm-project?rev=256575&view=rev Log: Teach typo correction to properly handle mapping declarations to their underlying decls. Preserve the found declaration throughout, and only map to the underlying de

r256587 - Use consistent types for all bit-field members in the same bit-field so that MSVC's bit-field packing algorithm packs them properly.

2015-12-29 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Dec 29 16:19:20 2015 New Revision: 256587 URL: http://llvm.org/viewvc/llvm-project?rev=256587&view=rev Log: Use consistent types for all bit-field members in the same bit-field so that MSVC's bit-field packing algorithm packs them properly. Modified: cfe/trunk/includ

Re: r256595 - Emit a -Wmicrosoft warning when pasting /##/ into a comment token in MS mode.

2015-12-29 Thread Richard Smith via cfe-commits
On Tue, Dec 29, 2015 at 3:06 PM, Nico Weber via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: nico > Date: Tue Dec 29 17:06:17 2015 > New Revision: 256595 > > URL: http://llvm.org/viewvc/llvm-project?rev=256595&view=rev > Log: > Emit a -Wmicrosoft warning when pasting /##/ into a comm

Re: r256595 - Emit a -Wmicrosoft warning when pasting /##/ into a comment token in MS mode.

2015-12-29 Thread Richard Smith via cfe-commits
On Tue, Dec 29, 2015 at 3:23 PM, Nico Weber wrote: > On Tue, Dec 29, 2015 at 6:16 PM, Richard Smith via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > >> On Tue, Dec 29, 2015 at 3:06 PM, Nico Weber via cfe-commits < >> cfe-commits@lists.llvm.org> wrote:

Re: [PATCH] D15814: Implicit conversion from float->bool

2015-12-29 Thread Richard Smith via cfe-commits
rsmith accepted this revision. This revision is now accepted and ready to land. Comment at: test/SemaCXX/warn-literal-conversion.cpp:49-50 @@ +48,4 @@ + // values. + bool b3 = 0.0f; + bool b4 = 0.0; +} What about bool b5 = 1.0; bool b6 = 2.0; ? Arguably a

r256601 - Model NamespaceAliasDecls as having their nominated namespace as an underlying

2015-12-29 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Dec 29 17:34:32 2015 New Revision: 256601 URL: http://llvm.org/viewvc/llvm-project?rev=256601&view=rev Log: Model NamespaceAliasDecls as having their nominated namespace as an underlying declaration. This fixes an issue where we would reject (due to a claimed ambiguity) a

r256602 - When a namespace alias redeclares a using declaration, point the diagnostic at

2015-12-29 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Dec 29 17:42:34 2015 New Revision: 256602 URL: http://llvm.org/viewvc/llvm-project?rev=256602&view=rev Log: When a namespace alias redeclares a using declaration, point the diagnostic at the using declaration not at the thing it's using. Modified: cfe/trunk/lib/Sema/S

r256607 - Clean up this code, NFC.

2015-12-29 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Dec 29 19:06:52 2015 New Revision: 256607 URL: http://llvm.org/viewvc/llvm-project?rev=256607&view=rev Log: Clean up this code, NFC. Modified: cfe/trunk/lib/Sema/SemaChecking.cpp Modified: cfe/trunk/lib/Sema/SemaChecking.cpp URL: http://llvm.org/viewvc/llvm-project/

Re: [PATCH] D15814: Implicit conversion from float->bool

2015-12-30 Thread Richard Smith via cfe-commits
On Dec 30, 2015 6:34 AM, "Aaron Ballman" wrote: > > aaron.ballman closed this revision. > aaron.ballman added a comment. > > Thanks! I've commit in r256643. > > > > Comment at: test/SemaCXX/warn-literal-conversion.cpp:49-50 > @@ +48,4 @@ > + // values. > + bool b3 = 0.0f; > + b

r256651 - Implement [temp.deduct.type]p6: if the nested-name-specifier of a type is

2015-12-30 Thread Richard Smith via cfe-commits
Author: rsmith Date: Wed Dec 30 14:56:05 2015 New Revision: 256651 URL: http://llvm.org/viewvc/llvm-project?rev=256651&view=rev Log: Implement [temp.deduct.type]p6: if the nested-name-specifier of a type is dependent, the type is a non-deduced context. Modified: cfe/trunk/include/clang/AST/De

Re: [PATCH] D15814: Implicit conversion from float->bool

2015-12-30 Thread Richard Smith via cfe-commits
On Dec 30, 2015 11:53 AM, "Aaron Ballman" wrote: > > On Wed, Dec 30, 2015 at 12:30 PM, Richard Smith wrote: > > On Dec 30, 2015 6:34 AM, "Aaron Ballman" wrote: > >> > >> aaron.ballman closed this revision. > >> aaron.ballman added a comment. > >> > >> Thanks! I've commit in r256643. > >> > >> >

Re: [libcxx] r249798 - Split out of .

2015-12-30 Thread Richard Smith via cfe-commits
path for a C89 compilation? > On Tue, Oct 13, 2015 at 7:34 PM, Richard Smith via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > >> On Tue, Oct 13, 2015 at 3:26 PM, Eric Fiselier wrote: >> >>> This change LGTM. Let's hold off on the using "_Stat

r256657 - Improve diagnostic for the case where a function template candidate is rejected

2015-12-30 Thread Richard Smith via cfe-commits
Author: rsmith Date: Wed Dec 30 20:02:54 2015 New Revision: 256657 URL: http://llvm.org/viewvc/llvm-project?rev=256657&view=rev Log: Improve diagnostic for the case where a function template candidate is rejected by overload resolution because deduction succeeds, but the substituted parameter type

Re: [PATCH] D15861: Support fully-qualified names for all QualTypes

2016-01-04 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: include/clang/Tooling/Core/QualTypeNames.h:32 @@ +31,3 @@ +namespace TypeName { +///\brief Convert the type into one with fully qualified template +/// arguments. Please ensure there's a space between each `/// ` and the c

r256803 - Avoid walking all the declarations in the TU when a tag is declared in function

2016-01-04 Thread Richard Smith via cfe-commits
Author: rsmith Date: Mon Jan 4 19:21:53 2016 New Revision: 256803 URL: http://llvm.org/viewvc/llvm-project?rev=256803&view=rev Log: Avoid walking all the declarations in the TU when a tag is declared in function prototype scope in a function definition. Modified: cfe/trunk/lib/Sema/SemaDecl.

Re: r252960 - [modules] Simplify and generalize the existing rule for finding hidden

2016-01-05 Thread Richard Smith via cfe-commits
On Tue, Jan 5, 2016 at 1:32 PM, Adrian Prantl via cfe-commits < cfe-commits@lists.llvm.org> wrote: > > On Dec 16, 2015, at 5:19 PM, Bob Wilson via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > >> On Nov 12, 2015, at 2:19 PM, Richard Smith via cfe-commits

r256907 - [modules] When a tag type that was imported from a module is referenced via an

2016-01-05 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Jan 5 21:52:10 2016 New Revision: 256907 URL: http://llvm.org/viewvc/llvm-project?rev=256907&view=rev Log: [modules] When a tag type that was imported from a module is referenced via an elaborated-type-specifier, create a declaration of it to track that the current module

Re: [PATCH] D15858: Warn undeclared identifiers in CUDA kernel calls

2016-01-06 Thread Richard Smith via cfe-commits
rsmith added a subscriber: rsmith. Comment at: include/clang/AST/ExprCXX.h:175 @@ +174,3 @@ + void setConfig(CallExpr *E) { +setPreArg(CONFIG, E); +setInstantiationDependent(isInstantiationDependent() || Can you assert that the argument is only set once h

r256979 - Fix half of PR26048. We don't yet diagnose the case where the anonymous union member is declared first and the tag name is declared second.

2016-01-06 Thread Richard Smith via cfe-commits
Author: rsmith Date: Wed Jan 6 15:54:29 2016 New Revision: 256979 URL: http://llvm.org/viewvc/llvm-project?rev=256979&view=rev Log: Fix half of PR26048. We don't yet diagnose the case where the anonymous union member is declared first and the tag name is declared second. Added: cfe/trunk/te

Re: [PATCH] D15858: Warn undeclared identifiers in CUDA kernel calls

2016-01-06 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: include/clang/AST/ExprCXX.h:181 @@ +180,3 @@ +assert( +!IsConfigSet && +"CUDAKernelCallExpr.setConfig can only be called once per instance."); Perhaps `assert(!getPreArg(CONFIG))` instead of storing a s

r256985 - PR26048, PR26050: put non-type template parameters and indirect field decls

2016-01-06 Thread Richard Smith via cfe-commits
Author: rsmith Date: Wed Jan 6 16:49:11 2016 New Revision: 256985 URL: http://llvm.org/viewvc/llvm-project?rev=256985&view=rev Log: PR26048, PR26050: put non-type template parameters and indirect field decls into IDNS_Tag in C++, because they conflict with redeclarations of tags. (This doesn't af

Re: [PATCH] D15456: [PATCH] New diagnostic for non-idiomatic copy or move operations (v2)

2016-01-06 Thread Richard Smith via cfe-commits
rsmith added a comment. I'm unconvinced this meets the bar for an on-by-default warning. Your suggested workaround for correct-but-diagnosed code doesn't seem to work: if I have struct X { X(const volatile X&); }; ... adding X(const X&) = delete; or a private "normal" copy construct

Re: r256996 - Properly bind up any cleanups in an ExprWithCleanups after

2016-01-06 Thread Richard Smith via cfe-commits
On Wed, Jan 6, 2016 at 3:34 PM, John McCall via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: rjmccall > Date: Wed Jan 6 17:34:20 2016 > New Revision: 256996 > > URL: http://llvm.org/viewvc/llvm-project?rev=256996&view=rev > Log: > Properly bind up any cleanups in an ExprWithCleanups

r257008 - Improve documentation comments for IdentifierNamespace values.

2016-01-06 Thread Richard Smith via cfe-commits
Author: rsmith Date: Wed Jan 6 19:17:43 2016 New Revision: 257008 URL: http://llvm.org/viewvc/llvm-project?rev=257008&view=rev Log: Improve documentation comments for IdentifierNamespace values. Modified: cfe/trunk/include/clang/AST/DeclBase.h Modified: cfe/trunk/include/clang/AST/DeclBase.

Re: [PATCH] D14877: Fix ICE on lowering of constexpr vector splats

2016-01-06 Thread Richard Smith via cfe-commits
rsmith added a comment. Maybe we could remove `CK_BooleanToSignedFloating` and model that conversion as a sequence of `CK_BooleanToSignedIntegral` followed by `CK_IntegralToFloating`? I don't imagine it's a common operation, so the simpler AST representation is probably worth more than the mino

Re: [PATCH] D15858: Warn undeclared identifiers in CUDA kernel calls

2016-01-06 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: include/clang/AST/ExprCXX.h:180 @@ +179,3 @@ +assert( +!getConfig() && +"CUDAKernelCallExpr.setConfig can only be called once per instance."); My preference would be to pass the `CallExpr` constructor a

Re: [PATCH] D15173: [Preprocessor] Fix assertion in AnnotatePreviousCachedTokens

2016-01-07 Thread Richard Smith via cfe-commits
On Wed, Jan 6, 2016 at 4:22 PM, Bruno Cardoso Lopes wrote: > bruno updated this revision to Diff 44180. > bruno added a comment. > > Hi Richard, > > Thanks for the comments. Updated the patch! > > In http://reviews.llvm.org/D15173#313235, @rsmith wrote: > > > I think that this will leave us with

Re: [PATCH] D15958: u8 character literals

2016-01-07 Thread Richard Smith via cfe-commits
rsmith added a comment. Thanks! You also need to update ASTWriterDecl.cpp's construction of `CharacterLiteralAbbrev` to allow three bits of `Kind` rather than two. (You should be able to repro this with a PCH test pretty-printing a `U'x'` literal.) Comment at: lib/Sema/SemaTe

Re: [PATCH] D15958: u8 character literals

2016-01-07 Thread Richard Smith via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. For posterity :) http://reviews.llvm.org/D15958 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/lis

Re: [PATCH] D15305: [CUDA] Do not allow dynamic initialization of global device side variables.

2016-01-07 Thread Richard Smith via cfe-commits
rsmith added a comment. This should be checked and diagnosed in Sema, not in CodeGen. Comment at: lib/CodeGen/CGDeclCXX.cpp:323-324 @@ +322,4 @@ + + // The constructor function has no parameters, + if (CD->getNumParams() != 0) +return false; What if the co

r257222 - [modules] Make sure we always include the contents of private headers when

2016-01-08 Thread Richard Smith via cfe-commits
Author: rsmith Date: Fri Jan 8 16:36:45 2016 New Revision: 257222 URL: http://llvm.org/viewvc/llvm-project?rev=257222&view=rev Log: [modules] Make sure we always include the contents of private headers when building a module. Prior to this change, the private header's content would only be includ

Re: [libcxx] Reinstate and fix overload sets to be const-correct wherever possible

2016-01-08 Thread Richard Smith via cfe-commits
Ping, is this OK to commit? On Thu, Dec 10, 2015 at 3:32 PM, Richard Smith wrote: > On Thu, Dec 10, 2015 at 11:45 AM, Marshall Clow > wrote: > >> On Tue, Dec 8, 2015 at 3:52 PM, Richard Smith >>> wrote: >>> Ping. >>> >> Sorry about that. >> Completely missed this in my email flood. >

Re: r256049 - Split RequireCompleteType into a function that actually requires that the type

2016-01-08 Thread Richard Smith via cfe-commits
On Thu, Jan 7, 2016 at 6:00 PM, David Blaikie wrote: > On Fri, Dec 18, 2015 at 2:40 PM, Richard Smith via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > >> Author: rsmith >> Date: Fri Dec 18 16:40:25 2015 >> New Revision: 256049 >> >> URL: h

<    32   33   34   35   36   37   38   39   40   41   >