Re: [PATCH] D23284: Add -fdiagnostics-show-hotness

2016-09-07 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: lib/Frontend/CompilerInvocation.cpp:844 @@ +843,3 @@ + Args.hasFlag(options::OPT_fdiagnostics_show_hotness, + options::OPT_fno_diagnostics_show_hotness, + /*default*/ false); You sh

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

2016-09-07 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: test/CodeGenCXX/cxx1z-constexpr-if.cpp:2 @@ -1,2 +1,3 @@ // RUN: %clang_cc1 -std=c++1z %s -emit-llvm -o - | FileCheck %s --implicit-check-not=should_not_be_used +// RUN: %clang_cc1 -std=c++1z %s -DCHECK_CONVERSION -verify %s --

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

2016-09-07 Thread Richard Smith via cfe-commits
On Tue, Sep 6, 2016 at 10:55 PM, George Burgess IV < george.burgess...@gmail.com> wrote: > george.burgess.iv added a comment. > > > Although I think that users will expect atomic_add(unsigned int *, 5) to > work.without error > > > Totally agree; I was just making sure that I understood the proble

Re: [PATCH] D24054: Do not validate pch when -fno-validate-pch is set

2016-09-07 Thread Richard Smith via cfe-commits
rsmith accepted this revision. rsmith added a comment. It's pretty gross that we're computing `SuggestedPredefines` in the `ASTReaderListener`, but sure, this seems OK for now. https://reviews.llvm.org/D24054 ___ cfe-commits mailing list cfe-commit

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

2016-09-07 Thread Richard Smith via cfe-commits
On Wed, Sep 7, 2016 at 12:45 PM, Manman Ren wrote: > On Tue, Sep 6, 2016 at 6:54 PM, Richard Smith > wrote: > >> On Tue, Sep 6, 2016 at 11:16 AM, Manman Ren via cfe-commits < >> cfe-commits@lists.llvm.org> wrote: >> >>> Author: mren >>> Date

Re: [PATCH] D22642: CodeGen: Clean up implementation of vtable initializer builder. NFC.

2016-09-07 Thread Richard Smith via cfe-commits
rsmith accepted this revision. This revision is now accepted and ready to land. Comment at: include/clang/AST/VTableBuilder.h:222-225 @@ -221,6 +221,6 @@ typedef const VTableComponent *vtable_component_iterator; typedef const VTableThunkTy *vtable_thunk_iterator; typede

Re: [PATCH] D24048: [Driver] [Darwin] Add sanitizer libraries even if -nodefaultlibs is passed

2016-09-07 Thread Richard Smith via cfe-commits
rsmith added a subscriber: rsmith. rsmith added a comment. My 2c: `-nodefaultlibs` means "don't link against any libraries I didn't explicitly tell you to". `-fsanitize=*` as a driver argument *when linking* is an explicit request to link against the sanitizer runtimes. So that should win. If y

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

2016-09-07 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: lib/Sema/SemaChecking.cpp:4089-4090 @@ +4088,4 @@ +if (BinOp->isAdditiveOp()) { + bool LIsInt = BinOp->getLHS()->EvaluateAsInt(LResult, S.Context); + bool RIsInt = BinOp->getRHS()->EvaluateAsInt(RResult, S.Context); + ---

Re: [PATCH] D22642: CodeGen: Clean up implementation of vtable initializer builder. NFC.

2016-09-07 Thread Richard Smith via cfe-commits
On 7 Sep 2016 6:23 pm, "Peter Collingbourne" wrote: pcc marked 4 inline comments as done. Comment at: lib/CodeGen/CGVTables.cpp:588 @@ +587,3 @@ +if (auto *F = dyn_cast(Cache)) + F->setUnnamedAddr(llvm::GlobalValue::UnnamedAddr::Global); +Cache = llvm::C

Re: [PATCH] D22642: CodeGen: Clean up implementation of vtable initializer builder. NFC.

2016-09-07 Thread Richard Smith via cfe-commits
On 7 Sep 2016 6:59 pm, "Peter Collingbourne" wrote: On Wed, Sep 7, 2016 at 6:44 PM, Richard Smith wrote: > On 7 Sep 2016 6:23 pm, "Peter Collingbourne" wrote: > > pcc marked 4 inline comments as done. > > > Comment at: lib

Re: [PATCH] D24048: [Driver] [Darwin] Add sanitizer libraries even if -nodefaultlibs is passed

2016-09-08 Thread Richard Smith via cfe-commits
rsmith added a comment. In https://reviews.llvm.org/D24048#537257, @beanz wrote: > @kubabrecka, I can understand where you're coming from about the option > starting with `-fsanitize`, but I disagree for two reasons. First, I think > that it is more important for the option to be concise and cl

Re: [PATCH] D24330: Add some MS aliases for existing intrinsics

2016-09-08 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: include/clang/Basic/BuiltinsX86.def:304 @@ -303,2 +303,3 @@ TARGET_BUILTIN(__builtin_ia32_ldmxcsr, "vUi", "", "sse") +TARGET_BUILTIN(_mm_setcsr, "vUi", "", "sse") TARGET_BUILTIN(__builtin_ia32_stmxcsr, "Ui", "", "sse") m

Re: [PATCH] D22642: CodeGen: Clean up implementation of vtable initializer builder. NFC.

2016-09-08 Thread Richard Smith via cfe-commits
On Wed, Sep 7, 2016 at 7:14 PM, Richard Smith wrote: > On 7 Sep 2016 6:59 pm, "Peter Collingbourne" wrote: > > On Wed, Sep 7, 2016 at 6:44 PM, Richard Smith > wrote: > >> On 7 Sep 2016 6:23 pm, "Peter Collingbourne" wrote: &

Re: [PATCH] D24048: [Driver] [Darwin] Add sanitizer libraries even if -nodefaultlibs is passed

2016-09-08 Thread Richard Smith via cfe-commits
On Thu, Sep 8, 2016 at 11:19 AM, Anna Zaks wrote: > zaks.anna added a comment. > > > I don't see the point of adding another flag to control this when we > already have a perfectly good set of > > > flags that already do the right thing -- that takes us three levels > deep in flags overriding th

Re: [PATCH] D24048: [Driver] [Darwin] Add sanitizer libraries even if -nodefaultlibs is passed

2016-09-08 Thread Richard Smith via cfe-commits
On Thu, Sep 8, 2016 at 12:06 PM, Filipe Cabecinhas < filcab+llvm.phabrica...@gmail.com> wrote: > It seems some people on this thread (I'm sorry if everyone is taking this > into account, but it seemed to me that this was going unnoticed, I want to > make sure everyone is on the same page) is only

r280999 - C++ Modules TS: Add parsing and some semantic analysis support for

2016-09-08 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Sep 8 18:14:54 2016 New Revision: 280999 URL: http://llvm.org/viewvc/llvm-project?rev=280999&view=rev Log: C++ Modules TS: Add parsing and some semantic analysis support for export-declarations. These don't yet have an effect on name visibility; we still export everything

Re: [PATCH] D24378: [CodeGen] Provide an appropriate alignment for dynamic allocas

2016-09-09 Thread Richard Smith via cfe-commits
There's an (unconvincing to me) explanation for why gcc does this here: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=19131 On 9 Sep 2016 10:14 am, "Eli Friedman" wrote: > efriedma added a comment. > > This is probably going to lead to someone complaining about clang > realigning the stack on 32-

Re: [PATCH] D24378: [CodeGen] Provide an appropriate alignment for dynamic allocas

2016-09-09 Thread Richard Smith via cfe-commits
On Fri, Sep 9, 2016 at 10:45 AM, Friedman, Eli via cfe-commits < cfe-commits@lists.llvm.org> wrote: > It probably makes sense to say that alloca should have the same alignment > as the default stack alignment, simply because it's hard to do anything > useful with completely unaligned memory. That

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

2016-09-09 Thread Richard Smith via cfe-commits
On Fri, Sep 9, 2016 at 11:29 AM, Manman Ren via cfe-commits < cfe-commits@lists.llvm.org> wrote: > On Wed, Sep 7, 2016 at 4:44 PM, Richard Smith > wrote: > >> On Wed, Sep 7, 2016 at 12:45 PM, Manman Ren wrote: >> >>> On Tue, Sep 6, 2016 at 6:54 PM, Richard Sm

Re: [PATCH] D24372: [libcxx] Sprinkle constexpr over compressed_pair

2016-09-09 Thread Richard Smith via cfe-commits
rsmith added a subscriber: rsmith. Comment at: test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/constinit.pass.cpp:19-23 @@ +18,6 @@ + +_LIBCPP_SAFE_STATIC static std::unique_ptr a; + +int main() { +assert(a == nullptr); +} This

Re: [PATCH] D24371: Add diagnostics to require_constant_initialization

2016-09-09 Thread Richard Smith via cfe-commits
rsmith added a comment. There's no way for `-verify` to test for a diagnostic with an invalid location at the moment. Maybe add a FIXME and disable that portion of the test for C++11? Comment at: lib/Sema/SemaDecl.cpp:10535-10538 @@ -10534,1 +10534,6 @@ << attr->getR

Re: [PATCH] D24371: Add diagnostics to require_constant_initialization

2016-09-09 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: lib/Sema/SemaDecl.cpp:10535-10538 @@ -10534,1 +10534,6 @@ << attr->getRange(); +APValue Value; +SmallVector Notes; +cast(var->ensureEvaluatedStmt()->Value)->EvaluateAsInitializer( + Value, getAST

r281194 - Attempt to placate MSVC.

2016-09-11 Thread Richard Smith via cfe-commits
Author: rsmith Date: Mon Sep 12 01:13:44 2016 New Revision: 281194 URL: http://llvm.org/viewvc/llvm-project?rev=281194&view=rev Log: Attempt to placate MSVC. Modified: cfe/trunk/utils/TableGen/ClangDiagnosticsEmitter.cpp Modified: cfe/trunk/utils/TableGen/ClangDiagnosticsEmitter.cpp URL: ht

r281195 - Attempt #2 to placate MSVC

2016-09-11 Thread Richard Smith via cfe-commits
Author: rsmith Date: Mon Sep 12 01:23:26 2016 New Revision: 281195 URL: http://llvm.org/viewvc/llvm-project?rev=281195&view=rev Log: Attempt #2 to placate MSVC Modified: cfe/trunk/utils/TableGen/ClangDiagnosticsEmitter.cpp Modified: cfe/trunk/utils/TableGen/ClangDiagnosticsEmitter.cpp URL:

r281197 - Attempt #3 to placate MSVC.

2016-09-11 Thread Richard Smith via cfe-commits
Author: rsmith Date: Mon Sep 12 01:38:31 2016 New Revision: 281197 URL: http://llvm.org/viewvc/llvm-project?rev=281197&view=rev Log: Attempt #3 to placate MSVC. Modified: cfe/trunk/utils/TableGen/ClangDiagnosticsEmitter.cpp Modified: cfe/trunk/utils/TableGen/ClangDiagnosticsEmitter.cpp URL:

r281198 - Add virtual destructor (necessary due to the switch to shared_ptr).

2016-09-12 Thread Richard Smith via cfe-commits
Author: rsmith Date: Mon Sep 12 01:51:11 2016 New Revision: 281198 URL: http://llvm.org/viewvc/llvm-project?rev=281198&view=rev Log: Add virtual destructor (necessary due to the switch to shared_ptr). Modified: cfe/trunk/utils/TableGen/ClangDiagnosticsEmitter.cpp Modified: cfe/trunk/utils/Ta

Re: r281198 - Add virtual destructor (necessary due to the switch to shared_ptr).

2016-09-12 Thread Richard Smith via cfe-commits
point (once I've figured out why MSVC rejected it) and at that point we'll need the virtual destructor. But I can understand that it's perhaps nice to do even if we could thread > that delicate needle. Just curious. > > On Sun, Sep 11, 2016 at 11:59 PM Richard Smith via cfe-c

r281241 - Diagnostics reference: "error:" should be red, not orange.

2016-09-12 Thread Richard Smith via cfe-commits
Author: rsmith Date: Mon Sep 12 12:55:49 2016 New Revision: 281241 URL: http://llvm.org/viewvc/llvm-project?rev=281241&view=rev Log: Diagnostics reference: "error:" should be red, not orange. Modified: cfe/trunk/docs/DiagnosticsReference.rst cfe/trunk/include/clang/Basic/DiagnosticDocs.td

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

2016-09-12 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: lib/Sema/SemaChecking.cpp:3842-3843 @@ -3841,2 +3841,4 @@ -static void CheckFormatString(Sema &S, const StringLiteral *FExpr, +static void reckonUpOffset(llvm::APSInt &Offset, llvm::APSInt Addend, + BinaryOperat

r281258 - [modules] When we merge two definitions of a function, mark the retained

2016-09-12 Thread Richard Smith via cfe-commits
Author: rsmith Date: Mon Sep 12 16:06:40 2016 New Revision: 281258 URL: http://llvm.org/viewvc/llvm-project?rev=281258&view=rev Log: [modules] When we merge two definitions of a function, mark the retained definition as visible in the discarded definition's module, as we do for other kinds of defi

r281259 - Add a couple of test files missed in r281258.

2016-09-12 Thread Richard Smith via cfe-commits
Author: rsmith Date: Mon Sep 12 16:07:09 2016 New Revision: 281259 URL: http://llvm.org/viewvc/llvm-project?rev=281259&view=rev Log: Add a couple of test files missed in r281258. Added: cfe/trunk/test/Modules/Inputs/merge-template-pattern-visibility/c.h cfe/trunk/test/Modules/Inputs/merge

r281363 - Work around a GCC 4.7-specific issue: due to implementing older rules for

2016-09-13 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Sep 13 13:35:34 2016 New Revision: 281363 URL: http://llvm.org/viewvc/llvm-project?rev=281363&view=rev Log: Work around a GCC 4.7-specific issue: due to implementing older rules for implicit declarations of move operations, GCC 4.7 would find that SelectPiece has neither a

Re: [PATCH] D24488: Simplify Clang's version number configuration in CMake.

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

Re: r281277 - [Sema] Fix PR30346: relax __builtin_object_size checks.

2016-09-13 Thread Richard Smith via cfe-commits
On Tue, Sep 13, 2016 at 10:44 AM, Joerg Sonnenberger via cfe-commits < cfe-commits@lists.llvm.org> wrote: > On Mon, Sep 12, 2016 at 11:50:36PM -, George Burgess IV via > cfe-commits wrote: > > Author: gbiv > > Date: Mon Sep 12 18:50:35 2016 > > New Revision: 281277 > > > > URL: http://llvm.org

r281382 - Work around MSVC 2013's inability to default move special members.

2016-09-13 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Sep 13 15:00:02 2016 New Revision: 281382 URL: http://llvm.org/viewvc/llvm-project?rev=281382&view=rev Log: Work around MSVC 2013's inability to default move special members. Modified: cfe/trunk/utils/TableGen/ClangDiagnosticsEmitter.cpp Modified: cfe/trunk/utils/Tab

Re: [PATCH] D24508: PR28752: Do not instantiate var decls which are not visible.

2016-09-13 Thread Richard Smith via cfe-commits
rsmith added a comment. I expect this patch to cause problems if the two definitions of the variable template come from different modules, because at deserialization time we don't merge the definitions together sensibly (it looks like we end up with a redeclaration chain with multiple declarati

r281412 - Warning flag updates:

2016-09-13 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Sep 13 17:51:09 2016 New Revision: 281412 URL: http://llvm.org/viewvc/llvm-project?rev=281412&view=rev Log: Warning flag updates: -Wdiv-by-zero may as well be an alias for -Wdivision-by-zero rather than a GCC-compatibility no-op. -Wno-shadow should disable -Wshadow-ivar.

r281415 - Missed update from r281412.

2016-09-13 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Sep 13 18:03:41 2016 New Revision: 281415 URL: http://llvm.org/viewvc/llvm-project?rev=281415&view=rev Log: Missed update from r281412. Modified: cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td Modified: cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td URL:

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

2016-09-13 Thread Richard Smith via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. This basically looks fine to me now. I'm not 100% sold on `sumUpStringLiteralOffset` being the best name, but I think we have better things to worry about, and it's good enough. Just a couple

r281427 - Color warnings purple rather than orange, to match actual Clang output.

2016-09-13 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Sep 13 19:35:56 2016 New Revision: 281427 URL: http://llvm.org/viewvc/llvm-project?rev=281427&view=rev Log: Color warnings purple rather than orange, to match actual Clang output. Modified: cfe/trunk/docs/DiagnosticsReference.rst cfe/trunk/include/clang/Basic/Diag

r281429 - [modules] When merging one definition into another, propagate the list of

2016-09-13 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Sep 13 20:05:35 2016 New Revision: 281429 URL: http://llvm.org/viewvc/llvm-project?rev=281429&view=rev Log: [modules] When merging one definition into another, propagate the list of re-exporting modules from the discarded definition to the retained definition. Modified:

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

2016-09-13 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: lib/Sema/SemaChecking.cpp:3864-3867 @@ +3863,6 @@ +ResOffset = Offset.sadd_ov(Addend, Ov); + else if (AddendIsRight && BinOpKind == BO_Sub) +ResOffset = Offset.ssub_ov(Addend, Ov); + else +assert(AddendIsRight && BinOpKind ==

r281433 - Update DiagnosticsReference and fix emitter to emit -Wpedantic diagnostics and groups in a deterministic order.

2016-09-13 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Sep 13 20:51:10 2016 New Revision: 281433 URL: http://llvm.org/viewvc/llvm-project?rev=281433&view=rev Log: Update DiagnosticsReference and fix emitter to emit -Wpedantic diagnostics and groups in a deterministic order. Modified: cfe/trunk/docs/DiagnosticsReference.r

r281434 - [docs] Order diagnostic cross-references alphabetically rather than based on

2016-09-13 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Sep 13 20:55:42 2016 New Revision: 281434 URL: http://llvm.org/viewvc/llvm-project?rev=281434&view=rev Log: [docs] Order diagnostic cross-references alphabetically rather than based on order in the .td file. Modified: cfe/trunk/docs/DiagnosticsReference.rst cfe/tr

r281436 - [docs] Fix formatting of   characters so that tables line up properly. Add

2016-09-13 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Sep 13 21:24:50 2016 New Revision: 281436 URL: http://llvm.org/viewvc/llvm-project?rev=281436&view=rev Log: [docs] Fix formatting of   characters so that tables line up properly. Add padding around table cells so the borders of adjacent tables don't run into each other (no

Re: [PATCH] D24508: PR28752: Do not instantiate var decls which are not visible.

2016-09-14 Thread Richard Smith via cfe-commits
rsmith added a comment. I think you'll also need to update the `ASTDeclReader` to merge `VarDecl` definitions together if it reads a definition and there already is one in the AST. I note that right now `Sema::AddInitializerToDecl` permits multiple definitions of a `VarDecl`, which doesn't seem

Re: [PATCH] D23921: Remove va_start diagnostic false positive with enumerations

2016-09-14 Thread Richard Smith via cfe-commits
LGTM On 14 Sep 2016 2:36 pm, "Dimitry Andric" wrote: dim added a comment. FWIW, I have already imported this fix into FreeBSD two weeks ago: https://svnweb.freebsd.org/changeset/base/304960 It has been working fine for us. https://reviews.llvm.org/D23921 __

Re: [PATCH] D23765: Fix for clang PR 29087

2016-09-15 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: lib/Sema/SemaExprCXX.cpp:4227 @@ -4226,1 +4226,3 @@ continue; +// Using(Shadow)Decl itself is not a constructor +if (isa(ND) || isa(ND)) This isn't really right: a `UsingShadowDecl` whose underly

Re: [PATCH] D24639: [Sema] Warn when returning a lambda that captures a local variable by reference

2016-09-15 Thread Richard Smith via cfe-commits
rsmith added a comment. > But not here, because we would have to verify that the pointer in lam wasn't > mutated in a previous call of the lambda: Isn't that guaranteed, because the lambda is not marked `mutable`? Comment at: lib/Sema/SemaChecking.cpp:6594 @@ -6590,1 +6593,3

r281797 - Fix a couple of wrong-code bugs in switch-on-constant optimization:

2016-09-16 Thread Richard Smith via cfe-commits
Author: rsmith Date: Fri Sep 16 18:30:39 2016 New Revision: 281797 URL: http://llvm.org/viewvc/llvm-project?rev=281797&view=rev Log: Fix a couple of wrong-code bugs in switch-on-constant optimization: * recurse through intermediate LabelStmts and AttributedStmts when checking whether a statem

Re: [PATCH] D24361: hasDeclaration(qualType(...)) matcher should unwrap ElaboratedType and TemplateSpecializationType

2016-09-16 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: include/clang/ASTMatchers/ASTMatchersInternal.h:752 @@ -749,1 +751,3 @@ +else if (auto *TST = Node->getAs()) + return matchesSpecialized(*TST, Finder, Builder); else if (auto *TT = Node->getAs()) lukasza wrot

r298299 - Bump __cplusplus for C++17 to 201703L per the C++17 DIS.

2017-03-20 Thread Richard Smith via cfe-commits
Author: rsmith Date: Mon Mar 20 15:12:48 2017 New Revision: 298299 URL: http://llvm.org/viewvc/llvm-project?rev=298299&view=rev Log: Bump __cplusplus for C++17 to 201703L per the C++17 DIS. Modified: cfe/trunk/lib/Frontend/InitPreprocessor.cpp cfe/trunk/test/Preprocessor/init.c Modified:

r298300 - Avoid these headers looking like the same file on a content-addressed file system.

2017-03-20 Thread Richard Smith via cfe-commits
Author: rsmith Date: Mon Mar 20 15:14:03 2017 New Revision: 298300 URL: http://llvm.org/viewvc/llvm-project?rev=298300&view=rev Log: Avoid these headers looking like the same file on a content-addressed file system. Modified: cfe/trunk/test/Modules/Inputs/system-out-of-date/X.h cfe/trunk

Re: [clang-tools-extra] r298421 - Prevent cppcoreguidelines-pro-bounds-array-to-pointer-decay from diagnosing array to pointer decay stemming from system macros.

2017-03-21 Thread Richard Smith via cfe-commits
On 21 March 2017 at 12:01, Aaron Ballman via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: aaronballman > Date: Tue Mar 21 14:01:17 2017 > New Revision: 298421 > > URL: http://llvm.org/viewvc/llvm-project?rev=298421&view=rev > Log: > Prevent cppcoreguidelines-pro-bounds-array-to-point

Re: [clang-tools-extra] r298421 - Prevent cppcoreguidelines-pro-bounds-array-to-pointer-decay from diagnosing array to pointer decay stemming from system macros.

2017-03-21 Thread Richard Smith via cfe-commits
Thank you! On 21 March 2017 at 18:22, Aaron Ballman wrote: > On Tue, Mar 21, 2017 at 9:15 PM, Richard Smith > wrote: > > On 21 March 2017 at 12:01, Aaron Ballman via cfe-commits > > wrote: > >> > >> Author: aaronballman > >> Date: Tue M

r298477 - Suppress warning on unreachable [[clang::fallthrough]] within a template instantiation.

2017-03-21 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Mar 21 20:49:19 2017 New Revision: 298477 URL: http://llvm.org/viewvc/llvm-project?rev=298477&view=rev Log: Suppress warning on unreachable [[clang::fallthrough]] within a template instantiation. We don't know whether some other instantiation of the template might be abl

Re: [clang-tools-extra] r298421 - Prevent cppcoreguidelines-pro-bounds-array-to-pointer-decay from diagnosing array to pointer decay stemming from system macros.

2017-03-21 Thread Richard Smith via cfe-commits
erever we're currently checking for StringLiteral. > Thanks! > > Breno G. > > > > > On Tue, Mar 21, 2017 at 10:36 PM, Richard Smith via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > >> Thank you! >> >> On 21 March 2017 at 18

Re: [clang-tools-extra] r298421 - Prevent cppcoreguidelines-pro-bounds-array-to-pointer-decay from diagnosing array to pointer decay stemming from system macros.

2017-03-22 Thread Richard Smith via cfe-commits
anges produce, and we can judge on the concrete > case what makes more sense. > > Is that reasonable? > Sure, sounds good. > Best Regards, > Breno G. > > > > > On Tue, Mar 21, 2017 at 11:37 PM, Richard Smith > wrote: > >> On 21 March 2017 at 18:57, Br

r298657 - Remove all uses of std::mem_fun and std::bind1st removed in C++17.

2017-03-23 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Mar 23 18:17:58 2017 New Revision: 298657 URL: http://llvm.org/viewvc/llvm-project?rev=298657&view=rev Log: Remove all uses of std::mem_fun and std::bind1st removed in C++17. Modified: cfe/trunk/include/clang/AST/DeclContextInternals.h cfe/trunk/include/clang/AST/

r298663 - Remove uses of std::binary_function, removed in C++17.

2017-03-23 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Mar 23 18:32:03 2017 New Revision: 298663 URL: http://llvm.org/viewvc/llvm-project?rev=298663&view=rev Log: Remove uses of std::binary_function, removed in C++17. Modified: cfe/trunk/include/clang/AST/TypeOrdering.h cfe/trunk/include/clang/Basic/SourceLocation.h

r298676 - Fix handling of initialization from parenthesized initializer list.

2017-03-23 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Mar 23 20:14:25 2017 New Revision: 298676 URL: http://llvm.org/viewvc/llvm-project?rev=298676&view=rev Log: Fix handling of initialization from parenthesized initializer list. This change fixes a crash on initialization of a reference from ({}) during template instantiati

Re: r298676 - Fix handling of initialization from parenthesized initializer list.

2017-03-27 Thread Richard Smith via cfe-commits
> Cheers, > Daniel > > On Fri, Mar 24, 2017 at 2:14 AM, Richard Smith via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > >> Author: rsmith >> Date: Thu Mar 23 20:14:25 2017 >> New Revision: 298676 >> >> URL: http://llvm.org/viewvc/llvm-proj

Re: [libcxx] r299385 - suppress GCC warning about noexcept functions changing mangling

2017-04-03 Thread Richard Smith via cfe-commits
On 3 April 2017 at 13:53, Eric Fiselier via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: ericwf > Date: Mon Apr 3 15:53:15 2017 > New Revision: 299385 > > URL: http://llvm.org/viewvc/llvm-project?rev=299385&view=rev > Log: > suppress GCC warning about noexcept functions changing man

Re: [libcxx] r299385 - suppress GCC warning about noexcept functions changing mangling

2017-04-03 Thread Richard Smith via cfe-commits
Thanks, that makes sense, I forgot to check for noexcept function types in template arguments. (Though I think GCC's diagnostic is sort of wrong or at least missing the point in this case, which is that 't' will have a different type in C++17.) On 3 Apr 2017 1:33 pm, "Eric Fiselier" wrote: Here

Re: r299774 - Sema: prevent __declspec(naked) use on x64

2017-04-07 Thread Richard Smith via cfe-commits
On 7 Apr 2017 11:49 am, "David Majnemer via cfe-commits" < cfe-commits@lists.llvm.org> wrote: On Fri, Apr 7, 2017 at 8:30 AM, Aaron Ballman via cfe-commits < cfe-commits@lists.llvm.org> wrote: > On Fri, Apr 7, 2017 at 11:13 AM, Saleem Abdulrasool via cfe-commits > wrote: > > Author: compnerd >

Re: r299774 - Sema: prevent __declspec(naked) use on x64

2017-04-07 Thread Richard Smith via cfe-commits
On 7 April 2017 at 12:06, Aaron Ballman wrote: > On Fri, Apr 7, 2017 at 2:53 PM, Richard Smith > wrote: > > On 7 Apr 2017 11:49 am, "David Majnemer via cfe-commits" > > wrote: > > > > > > > > On Fri, Apr 7, 2017 at 8:30 AM, Aaron Ballman

Re: [PATCH] D29877: Warn about unused static file scope function template declarations.

2017-04-11 Thread Richard Smith via cfe-commits
On 11 April 2017 at 08:35, Marshall Clow via Phabricator via cfe-commits < cfe-commits@lists.llvm.org> wrote: > mclow.lists added a comment. > > Complete reproducer: > > // Tested with with: clang++ -std=c++14 -Wunused-function > UnusedFVassily.cpp > // > // UnusedFVassily.cpp:8:39: warning: unus

Re: r300001 - Revert r298824 & r298816, recommit r298742 & r298754

2017-04-11 Thread Richard Smith via cfe-commits
Either this or your other ODR hash change seems to have broken the modules buildbot: http://lab.llvm.org:8011/builders/clang-x86_64-linux-selfhost-modules-2/builds/6274/steps/compile.llvm.stage2/logs/stdio On 11 April 2017 at 15:32, Richard Trieu via cfe-commits < cfe-commits@lists.llvm.org> wrot

r300136 - Update to match LLVM r300135.

2017-04-12 Thread Richard Smith via cfe-commits
Author: rsmith Date: Wed Apr 12 18:21:25 2017 New Revision: 300136 URL: http://llvm.org/viewvc/llvm-project?rev=300136&view=rev Log: Update to match LLVM r300135. Remove "REQUIRES: long_tests" from test/Driver/response-file.c since it is now about 10x faster. (We can add that back if it's still

r300151 - Fix broken test. We can't assume that 2MB of args is enough to require a response file.

2017-04-12 Thread Richard Smith via cfe-commits
Author: rsmith Date: Wed Apr 12 19:46:50 2017 New Revision: 300151 URL: http://llvm.org/viewvc/llvm-project?rev=300151&view=rev Log: Fix broken test. We can't assume that 2MB of args is enough to require a response file. This test has apparently been broken for years, but we never noticed before

r300262 - PR32185: Revert r291512 and add a testcase for PR32185.

2017-04-13 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Apr 13 16:37:24 2017 New Revision: 300262 URL: http://llvm.org/viewvc/llvm-project?rev=300262&view=rev Log: PR32185: Revert r291512 and add a testcase for PR32185. This reverts an attempt to check that types match when matching a dependently-typed non-type template parame

r300264 - Diagnose attempt to take address of bitfield members in anonymous structs.

2017-04-13 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Apr 13 16:49:46 2017 New Revision: 300264 URL: http://llvm.org/viewvc/llvm-project?rev=300264&view=rev Log: Diagnose attempt to take address of bitfield members in anonymous structs. Patch by Jacob Young! Differential Revision: https://reviews.llvm.org/D27263 Modified:

r300266 - Add test for anonymous struct containing an implicitly private data member.

2017-04-13 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Apr 13 16:51:04 2017 New Revision: 300266 URL: http://llvm.org/viewvc/llvm-project?rev=300266&view=rev Log: Add test for anonymous struct containing an implicitly private data member. Patch by Jacob Young! Modified: cfe/trunk/test/SemaCXX/anonymous-struct.cpp Modifi

r300270 - [docs] Fix a couple of typos in command line flag help text and regenerate documentation.

2017-04-13 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Apr 13 17:39:49 2017 New Revision: 300270 URL: http://llvm.org/viewvc/llvm-project?rev=300270&view=rev Log: [docs] Fix a couple of typos in command line flag help text and regenerate documentation. Modified: cfe/trunk/docs/ClangCommandLineReference.rst cfe/trunk/

r300271 - [docs] Regenerate diagnostics reference.

2017-04-13 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Apr 13 17:44:22 2017 New Revision: 300271 URL: http://llvm.org/viewvc/llvm-project?rev=300271&view=rev Log: [docs] Regenerate diagnostics reference. Modified: cfe/trunk/docs/DiagnosticsReference.rst Modified: cfe/trunk/docs/DiagnosticsReference.rst URL: http://llvm.

r300296 - Remove empty test directory for nonexistent standard clause.

2017-04-13 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Apr 13 21:04:44 2017 New Revision: 300296 URL: http://llvm.org/viewvc/llvm-project?rev=300296&view=rev Log: Remove empty test directory for nonexistent standard clause. Removed: cfe/trunk/test/CXX/garbage.collection/ ___ cf

Re: Canonical param types and restrict array index qualifiers

2017-04-17 Thread Richard Smith via cfe-commits
C11 6.7.6.3p15: "In the determination of type compatibility and of a composite type, each parameter declared with function or array type is taken as having the adjusted type and each parameter declared with qualified type is taken as having the unqualified version of its declared type." So "int f(

Re: r300443 - Address http://bugs.llvm.org/pr30994 so that a non-friend can properly replace a friend, and a visible friend can properly replace an invisible friend but not vice verse, and definitions

2017-04-17 Thread Richard Smith via cfe-commits
tly expected to be consistent. But I don't know why redeclaration lookup in the second module would ever find a non-inline declaration. > On 17/04/17 23:10, Benjamin Kramer via cfe-commits wrote: > > This broke our internal build of libc++ with modules. Reduced test > case attached

r300515 - Fix mishandling of escaped newlines followed by newlines or nuls.

2017-04-17 Thread Richard Smith via cfe-commits
Author: rsmith Date: Mon Apr 17 18:44:51 2017 New Revision: 300515 URL: http://llvm.org/viewvc/llvm-project?rev=300515&view=rev Log: Fix mishandling of escaped newlines followed by newlines or nuls. Previously, if an escaped newline was followed by a newline or a nul, we'd lex the escaped newline

r300609 - Do not warn about whitespace between ??/ trigraph and newline in line comments if trigraphs are disabled in the current language.

2017-04-18 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Apr 18 16:45:04 2017 New Revision: 300609 URL: http://llvm.org/viewvc/llvm-project?rev=300609&view=rev Log: Do not warn about whitespace between ??/ trigraph and newline in line comments if trigraphs are disabled in the current language. Modified: cfe/trunk/lib/Lex/L

r300611 - [modules-ts] Fold together -x c++ and -x c++-module at -cc1 level.

2017-04-18 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Apr 18 16:55:37 2017 New Revision: 300611 URL: http://llvm.org/viewvc/llvm-project?rev=300611&view=rev Log: [modules-ts] Fold together -x c++ and -x c++-module at -cc1 level. The driver needs to know whether it's building a module interface or implementation unit because

r300650 - [modules] Properly look up the owning module for an instantiation of a merged template.

2017-04-18 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Apr 18 20:36:43 2017 New Revision: 300650 URL: http://llvm.org/viewvc/llvm-project?rev=300650&view=rev Log: [modules] Properly look up the owning module for an instantiation of a merged template. When looking for the template instantiation pattern of a templated entity,

r300653 - Fix member function call with null 'this' pointer.

2017-04-18 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Apr 18 21:19:21 2017 New Revision: 300653 URL: http://llvm.org/viewvc/llvm-project?rev=300653&view=rev Log: Fix member function call with null 'this' pointer. Modified: cfe/trunk/lib/AST/Decl.cpp Modified: cfe/trunk/lib/AST/Decl.cpp URL: http://llvm.org/viewvc/llvm-

Re: r300650 - [modules] Properly look up the owning module for an instantiation of a merged template.

2017-04-18 Thread Richard Smith via cfe-commits
27;m >> going to revert this temporarily to unbreak our modules builds using this >> version of libstdc++. >> >> On Tue, Apr 18, 2017 at 8:14 PM Chandler Carruth >> wrote: >> >>> This appears to break a pretty straightforward use of things like >>&g

r291865 - Improve handling of instantiated thread_local variables in Itanium C++ ABI.

2017-01-12 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Jan 12 18:43:31 2017 New Revision: 291865 URL: http://llvm.org/viewvc/llvm-project?rev=291865&view=rev Log: Improve handling of instantiated thread_local variables in Itanium C++ ABI. * Do not initialize these variables when initializing the rest of the thread_locals

r291871 - Update C++ status pages for Clang 4 branch:

2017-01-12 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Jan 12 18:57:54 2017 New Revision: 291871 URL: http://llvm.org/viewvc/llvm-project?rev=291871&view=rev Log: Update C++ status pages for Clang 4 branch: * Update version number in DR tests from 4.0 to 4 * Teach make_cxx_dr_status script about version numbers that don't c

r291880 - Implement DR1265 (wg21.link/cwg1265).

2017-01-12 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Jan 12 20:22:01 2017 New Revision: 291880 URL: http://llvm.org/viewvc/llvm-project?rev=291880&view=rev Log: Implement DR1265 (wg21.link/cwg1265). Diasllow a declaration using the 'auto' type specifier from using two different meanings of it at once, or from declaring mult

Re: r284890 - DR583, DR1512: Implement a rewrite to C++'s 'composite pointer type' rules.

2017-01-13 Thread Richard Smith via cfe-commits
On 13 Jan 2017 4:40 am, "Dimitry Andric via cfe-commits" < cfe-commits@lists.llvm.org> wrote: On 22 Oct 2016, at 00:00, Richard Smith via cfe-commits < cfe-commits@lists.llvm.org> wrote: > > Author: rsmith > Date: Fri Oct 21 17:00:42 2016 > New Revision: 2848

r291955 - PR31606: Generalize our tentative DR resolution for inheriting copy/move

2017-01-13 Thread Richard Smith via cfe-commits
Author: rsmith Date: Fri Jan 13 14:46:54 2017 New Revision: 291955 URL: http://llvm.org/viewvc/llvm-project?rev=291955&view=rev Log: PR31606: Generalize our tentative DR resolution for inheriting copy/move constructors to better match the pre-P0136R1 behavior. Modified: cfe/trunk/include/clan

r291964 - PR31631: fix bad CFG (and bogus warnings) when an if-statement has an init-statement and has binary operator as its condition.

2017-01-13 Thread Richard Smith via cfe-commits
Author: rsmith Date: Fri Jan 13 16:16:41 2017 New Revision: 291964 URL: http://llvm.org/viewvc/llvm-project?rev=291964&view=rev Log: PR31631: fix bad CFG (and bogus warnings) when an if-statement has an init-statement and has binary operator as its condition. Modified: cfe/trunk/lib/Analysis

r291988 - Give more accurate descriptions of what kind of template we found in diagnostics.

2017-01-13 Thread Richard Smith via cfe-commits
Author: rsmith Date: Fri Jan 13 20:19:59 2017 New Revision: 291988 URL: http://llvm.org/viewvc/llvm-project?rev=291988&view=rev Log: Give more accurate descriptions of what kind of template we found in diagnostics. We were previouly assuming that every type template was a class template, which i

r292183 - Partial revert of r290511.

2017-01-16 Thread Richard Smith via cfe-commits
Author: rsmith Date: Mon Jan 16 20:14:37 2017 New Revision: 292183 URL: http://llvm.org/viewvc/llvm-project?rev=292183&view=rev Log: Partial revert of r290511. The rules around typechecking deduced template arguments during partial ordering are not clear, and while the prior behavior does not see

Re: r291955 - PR31606: Generalize our tentative DR resolution for inheriting copy/move

2017-01-17 Thread Richard Smith via cfe-commits
Yes, let's. On 17 Jan 2017 9:11 pm, "Hans Wennborg" wrote: What do you think; time to merge it? On Fri, Jan 13, 2017 at 1:21 PM, Richard Smith wrote: > I'd like to wait a bit to see how the dust settles on this one, but this is > a bugfix for a previous bugfix for a

Re: [libcxxabi] r292418 - Revert r286788

2017-01-18 Thread Richard Smith via cfe-commits
On 18 January 2017 at 10:12, Jonathan Roelofs via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: jroelofs > Date: Wed Jan 18 12:12:39 2017 > New Revision: 292418 > > URL: http://llvm.org/viewvc/llvm-project?rev=292418&view=rev > Log: > Revert r286788 > > The Itanium ABI [1] specifies t

r292426 - PR9551: Implement DR1004 (http://wg21.link/cwg1004).

2017-01-18 Thread Richard Smith via cfe-commits
Author: rsmith Date: Wed Jan 18 13:19:22 2017 New Revision: 292426 URL: http://llvm.org/viewvc/llvm-project?rev=292426&view=rev Log: PR9551: Implement DR1004 (http://wg21.link/cwg1004). This rule permits the injected-class-name of a class template to be used as both a template type argument and a

r292518 - PR13403 (+duplicates): implement C++ DR1310 (http://wg21.link/cwg1310).

2017-01-19 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Jan 19 15:00:13 2017 New Revision: 292518 URL: http://llvm.org/viewvc/llvm-project?rev=292518&view=rev Log: PR13403 (+duplicates): implement C++ DR1310 (http://wg21.link/cwg1310). Under this defect resolution, the injected-class-name of a class or class template cannot be

Re: r292508 - Module: Improve diagnostic message when cxx modules are disabled and @import is used in Objective CXX.

2017-01-19 Thread Richard Smith via cfe-commits
On 19 Jan 2017 11:16 am, "Manman Ren via cfe-commits" < cfe-commits@lists.llvm.org> wrote: Author: mren Date: Thu Jan 19 13:05:55 2017 New Revision: 292508 URL: http://llvm.org/viewvc/llvm-project?rev=292508&view=rev Log: Module: Improve diagnostic message when cxx modules are disabled and @impor

Re: r292508 - Module: Improve diagnostic message when cxx modules are disabled and @import is used in Objective CXX.

2017-01-19 Thread Richard Smith via cfe-commits
On 19 Jan 2017 11:16 am, "Manman Ren via cfe-commits" < cfe-commits@lists.llvm.org> wrote: Author: mren Date: Thu Jan 19 13:05:55 2017 New Revision: 292508 URL: http://llvm.org/viewvc/llvm-project?rev=292508&view=rev Log: Module: Improve diagnostic message when cxx modules are disabled and @impor

r292545 - Finish implementation of C++ DR1310 (http://wg21.link/cwg1310).

2017-01-19 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Jan 19 18:20:39 2017 New Revision: 292545 URL: http://llvm.org/viewvc/llvm-project?rev=292545&view=rev Log: Finish implementation of C++ DR1310 (http://wg21.link/cwg1310). Diagnose the case when a dependent template name instantiates to an injected-class-name outside a ne

r292555 - P0426: Make the library implementation of constexpr char_traits a little easier

2017-01-19 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Jan 19 18:45:35 2017 New Revision: 292555 URL: http://llvm.org/viewvc/llvm-project?rev=292555&view=rev Log: P0426: Make the library implementation of constexpr char_traits a little easier by providing a memchr builtin that returns char* instead of void*. Also add a __has_

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