[PATCH] D47044: Ensure that we only visit a destructor for a reference if type information is available.

2018-05-18 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Hopefully. Repository: rC Clang https://reviews.llvm.org/D47044 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r332750 - [Support] Avoid normalization in sys::getDefaultTargetTriple

2018-05-18 Thread Petr Hosek via cfe-commits
Author: phosek Date: Fri May 18 11:33:07 2018 New Revision: 332750 URL: http://llvm.org/viewvc/llvm-project?rev=332750&view=rev Log: [Support] Avoid normalization in sys::getDefaultTargetTriple The return value of sys::getDefaultTargetTriple, which is derived from -DLLVM_DEFAULT_TRIPLE, is used t

[PATCH] D47057: [ASTImporter] Fix missing implict CXXRecordDecl in ClassTemplateSpecializationDecl

2018-05-18 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin added inline comments. Comment at: lib/AST/ASTImporter.cpp:1962 TagDecl *Definition = D->getDefinition(); - if (Definition && Definition != D) { + if (!D->isImplicit() && Definition && Definition != D) { Decl *ImportedDef = Importer.Import(Definition); ---

r332751 - Revert "Move #include manipulation code to new lib/Tooling/Inclusions."

2018-05-18 Thread Eric Liu via cfe-commits
Author: ioeric Date: Fri May 18 11:33:08 2018 New Revision: 332751 URL: http://llvm.org/viewvc/llvm-project?rev=332751&view=rev Log: Revert "Move #include manipulation code to new lib/Tooling/Inclusions." This reverts commit r332720. This break build bot with modules. Need to investigate. Revert

[clang-tools-extra] r332752 - Revert "[clangd] Adapt file migration in r332720"

2018-05-18 Thread Eric Liu via cfe-commits
Author: ioeric Date: Fri May 18 11:33:21 2018 New Revision: 332752 URL: http://llvm.org/viewvc/llvm-project?rev=332752&view=rev Log: Revert "[clangd] Adapt file migration in r332720" This reverts commit r332721 because the dependency r33270 will be reverted. Modified: clang-tools-extra/trunk

[PATCH] D46910: [Support] Avoid normalization in sys::getDefaultTargetTriple

2018-05-18 Thread Petr Hosek via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC332750: [Support] Avoid normalization in sys::getDefaultTargetTriple (authored by phosek, committed by ). Changed prior to commit: https://reviews.llvm.org/D46910?vs=147431&id=147567#toc Repository:

[PATCH] D47068: Move #include manipulation code to new lib/Tooling/Inclusions.

2018-05-18 Thread Eric Liu via Phabricator via cfe-commits
ioeric reopened this revision. ioeric added a comment. This revision is now accepted and ready to land. This was reverted in r332751 due to build bot failure with module config. I don't see how this failed as the directory setup is very similar to Tooling/Core/. Will investigate further next wee

Re: r332720 - Move #include manipulation code to new lib/Tooling/Inclusions.

2018-05-18 Thread Eric Liu via cfe-commits
So I have reverted this with r332751. I can't see how this introduced cyclic dependencies in module build, as the dependencies should be clangTooling -> clangFormat -> clangToolingInclusions. I'm wondering if there is any module configurations that I need to update to make this work. Right now, mo

[PATCH] D46911: [Fixed Point Arithmetic] Addition of the remaining fixed point types and their saturated equivalents

2018-05-18 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 147568. Repository: rC Clang https://reviews.llvm.org/D46911 Files: include/clang/AST/ASTContext.h include/clang/AST/BuiltinTypes.def include/clang/Basic/DiagnosticSemaKinds.td include/clang/Basic/Specifiers.h include/clang/Basic/TokenKinds.d

Re: r332720 - Move #include manipulation code to new lib/Tooling/Inclusions.

2018-05-18 Thread Vedant Kumar via cfe-commits
> On May 18, 2018, at 11:48 AM, Eric Liu wrote: > > So I have reverted this with r332751. Thanks! > I can't see how this introduced cyclic dependencies in module build, as the > dependencies should be clangTooling -> clangFormat -> clangToolingInclusions. > I'm wondering if there is any modu

[PATCH] D47084: Maintain PS4 ABI compatibility

2018-05-18 Thread Douglas Yung via Phabricator via cfe-commits
dyung created this revision. dyung added a reviewer: probinson. In r331136, a change was made to the compiler to fix a problem with how clang applied the packed attribute to classes. This is an ABI breaking change for the PS4 target, so this change maintains the broken behavior for the PS4 targe

[PATCH] D43281: [AMDGPU] fixes for lds f32 builtins

2018-05-18 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added a comment. I think the intent of the current code is for the address space to correspond to a "target address space" as if the user code used __attribute__((address_space(n))) to specify a pointer value. This is confusingly named, and different from the target address space selecte

Re: r332720 - Move #include manipulation code to new lib/Tooling/Inclusions.

2018-05-18 Thread Bruno Cardoso Lopes via cfe-commits
On Fri, May 18, 2018 at 11:54 AM Vedant Kumar via cfe-commits < cfe-commits@lists.llvm.org> wrote: > On May 18, 2018, at 11:48 AM, Eric Liu wrote: > > > So I have reverted this with r332751. > > > Thanks! > > > I can't see how this introduced cyclic dependencies in module build, as > the dependen

r332757 - Support: Simplify endian stream interface. NFCI.

2018-05-18 Thread Peter Collingbourne via cfe-commits
Author: pcc Date: Fri May 18 12:46:24 2018 New Revision: 332757 URL: http://llvm.org/viewvc/llvm-project?rev=332757&view=rev Log: Support: Simplify endian stream interface. NFCI. Provide some free functions to reduce verbosity of endian-writing a single value, and replace the endianness template

Re: r332470 - Add support for __declspec(code_seg("segname"))

2018-05-18 Thread Richard Smith via cfe-commits
On 16 May 2018 at 06:57, Erich Keane via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: erichkeane > Date: Wed May 16 06:57:17 2018 > New Revision: 332470 > > URL: http://llvm.org/viewvc/llvm-project?rev=332470&view=rev > Log: > Add support for __declspec(code_seg("segname")) > > Add s

Re: r332720 - Move #include manipulation code to new lib/Tooling/Inclusions.

2018-05-18 Thread Bruno Cardoso Lopes via cfe-commits
On Fri, May 18, 2018 at 12:46 PM Bruno Cardoso Lopes < bruno.card...@gmail.com> wrote: > > > On Fri, May 18, 2018 at 11:54 AM Vedant Kumar via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > >> On May 18, 2018, at 11:48 AM, Eric Liu wrote: >> >> >> So I have reverted this with r332751. >> >>

Re: r332470 - Add support for __declspec(code_seg("segname"))

2018-05-18 Thread Richard Smith via cfe-commits
Here's an example regression: https://godbolt.org/g/S72Nki I'll check that into the test suite alongside the revert once my testing finishes. On 18 May 2018 at 13:03, Richard Smith wrote: > On 16 May 2018 at 06:57, Erich Keane via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > >> Author:

[PATCH] D44539: [Sema][Objective-C] Add check to warn when property of objc type has assign attribute

2018-05-18 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. It's waiting on a discussion that's happening pretty slowly, sorry. I know this is frustrating. Repository: rC Clang https://reviews.llvm.org/D44539 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.

r332760 - Revert r332470 (and corresponding tests in r332492).

2018-05-18 Thread Richard Smith via cfe-commits
Author: rsmith Date: Fri May 18 13:18:17 2018 New Revision: 332760 URL: http://llvm.org/viewvc/llvm-project?rev=332760&view=rev Log: Revert r332470 (and corresponding tests in r332492). This regressed our support for __attribute__((section)). See added test file for example of code broken by this

RE: r332470 - Add support for __declspec(code_seg("segname"))

2018-05-18 Thread Keane, Erich via cfe-commits
Hi Richard- Thanks for the feedback. I’m copying the author of this patch on this email for further discussion if you care to. We’ll have her take another look at it. Thanks for the revert. (https://github.com/llvm-mirror/clang/commit/746b78de7812bc785fbb5207b788348040b23fa7). -Erich From: R

Re: r332720 - Move #include manipulation code to new lib/Tooling/Inclusions.

2018-05-18 Thread David Blaikie via cfe-commits
I haven't looked in detail here, but in general: Don't split an implementation and its headers into different notional libraries, as that breaks modular code generation (an implementation and its headers usually have circular dependencies - inline functions that call non-inline functions, and the o

[PATCH] D46964: Implement class deduction guides for `std::array`

2018-05-18 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF accepted this revision. EricWF added inline comments. This revision is now accepted and ready to land. Comment at: include/array:75 + template +array(T, U...) -> array; Don't we normally comment `// C++17` or similar for new features in the synops

[libcxxabi] r332763 - private_typeinfo: propagate static flags in vmi search_above_dst method

2018-05-18 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Fri May 18 13:39:57 2018 New Revision: 332763 URL: http://llvm.org/viewvc/llvm-project?rev=332763&view=rev Log: private_typeinfo: propagate static flags in vmi search_above_dst method Patch by Ryan Prichard Propagate the found_our_static_ptr and found_any_static_type flags f

[libcxxabi] r332764 - private_typeinfo: propagate static flags in vmi search_above_dst method

2018-05-18 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Fri May 18 13:42:53 2018 New Revision: 332764 URL: http://llvm.org/viewvc/llvm-project?rev=332764&view=rev Log: private_typeinfo: propagate static flags in vmi search_above_dst method This adds the test which was mistakenly not committed in r332763. Patch by Ryan Prichard P

[libcxxabi] r332767 - private_typeinfo: limit is_dst_type_derived_from_static_type optimization

2018-05-18 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Fri May 18 13:51:38 2018 New Revision: 332767 URL: http://llvm.org/viewvc/llvm-project?rev=332767&view=rev Log: private_typeinfo: limit is_dst_type_derived_from_static_type optimization Patch by Ryan Prichard If the destination type does not derive from the static type, we c

[PATCH] D46940: [ASTImporter] make sure that ACtx::getParents still works

2018-05-18 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a reviewer: rsmith. aaron.ballman added a comment. Adding Richard as he has more background in this area. In general, I think it's okay - if we invalidate too often, we do lose some performance, but the correctness should still be there. I'll let Richard provide the final sig

[PATCH] D46964: Implement class deduction guides for `std::array`

2018-05-18 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added inline comments. Comment at: include/array:75 + template +array(T, U...) -> array; EricWF wrote: > Don't we normally comment `// C++17` or similar for new features in the > synopsis? we do. Comment at: include/array:3

[libcxx] r332768 - Implement deduction guides for ; Reviewed as https://reviews.llvm.org/D46964

2018-05-18 Thread Marshall Clow via cfe-commits
Author: marshall Date: Fri May 18 14:01:04 2018 New Revision: 332768 URL: http://llvm.org/viewvc/llvm-project?rev=332768&view=rev Log: Implement deduction guides for ; Reviewed as https://reviews.llvm.org/D46964 Added: libcxx/trunk/test/std/containers/sequences/array/array.cons/deduct.fail.c

[PATCH] D46964: Implement class deduction guides for `std::array`

2018-05-18 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists closed this revision. mclow.lists added a comment. Committed as revision 332768 https://reviews.llvm.org/D46964 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D46740: [Clang Tablegen][RFC] Allow Early Textual Substitutions in `Diagnostic` messages.

2018-05-18 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF marked 2 inline comments as done. EricWF added inline comments. Comment at: utils/TableGen/ClangDiagnosticsEmitter.cpp:514 + std::vector Diags = Records.getAllDerivedDefinitions("Diagnostic"); + llvm::for_each(Diags, [&](Record *R) { substituteDiagText(R, SubsMap); });

[PATCH] D46740: [Clang Tablegen][RFC] Allow Early Textual Substitutions in `Diagnostic` messages.

2018-05-18 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 147581. EricWF marked an inline comment as done. EricWF added a comment. - Add error if a substitution and a diagnostic share the same name. Any final comments on this? https://reviews.llvm.org/D46740 Files: docs/InternalsManual.rst include/clang/Basic/

[PATCH] D44539: [Sema][Objective-C] Add check to warn when property of objc type has assign attribute

2018-05-18 Thread Yan Zhang via Phabricator via cfe-commits
Wizard added a comment. Is there any case for property of ObjC types that we should use `unsafe_unretained` or `assign` rather than `weak`? In my understanding, `weak` is for properties of ObjC types as the replacement of `unsafe_unretained` and `assign` is for properties of primitive types.

[PATCH] D47070: [CUDA] Upgrade linked bitcode to enable inlining

2018-05-18 Thread Jonas Hahnfeld via Phabricator via cfe-commits
Hahnfeld added a comment. I think that's intended because the generated code might use instructions based on that feature. If we want to ignore that, we could override `TargetTransformInfo::areInlineCompatible` for NVPTX to only compare `target-cpu` Repository: rC Clang https://reviews.llv

Re: r332720 - Move #include manipulation code to new lib/Tooling/Inclusions.

2018-05-18 Thread Eric Liu via cfe-commits
Thanks a lot for looking into this Bruno! The fix looks promising; I'll give it a try next week :D On Fri, May 18, 2018 at 10:33 PM David Blaikie via cfe-commits < cfe-commits@lists.llvm.org> wrote: > I haven't looked in detail here, but in general: Don't split an > implementation and its headers

Re: r332720 - Move #include manipulation code to new lib/Tooling/Inclusions.

2018-05-18 Thread David Blaikie via cfe-commits
On Fri, May 18, 2018 at 2:22 PM Eric Liu wrote: > Thanks a lot for looking into this Bruno! The fix looks promising; I'll > give it a try next week :D > > On Fri, May 18, 2018 at 10:33 PM David Blaikie via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > >> I haven't looked in detail here, bu

Re: r332720 - Move #include manipulation code to new lib/Tooling/Inclusions.

2018-05-18 Thread Eric Liu via cfe-commits
Sorry about the bad naming... I hope I could come up with something less confusing. Thanks for the clarification! On Fri, May 18, 2018 at 11:25 PM David Blaikie wrote: > > > On Fri, May 18, 2018 at 2:22 PM Eric Liu wrote: > >> Thanks a lot for looking into this Bruno! The fix looks promising; I

[PATCH] D47029: [X86] Remove some preprocessor feature checks from intrinsic headers

2018-05-18 Thread David Kreitzer via Phabricator via cfe-commits
DavidKreitzer added a comment. Looks right to me, Craig. https://reviews.llvm.org/D47029 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r332773 - Maintain PS4 ABI compatibility by making the fix made in r331136 not apply when the target is the PS4.

2018-05-18 Thread Douglas Yung via cfe-commits
Author: dyung Date: Fri May 18 14:51:46 2018 New Revision: 332773 URL: http://llvm.org/viewvc/llvm-project?rev=332773&view=rev Log: Maintain PS4 ABI compatibility by making the fix made in r331136 not apply when the target is the PS4. Reviewers: rsmith Subscribers: cfe-commits Differential Rev

[PATCH] D47084: Maintain PS4 ABI compatibility

2018-05-18 Thread Douglas Yung via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL332773: Maintain PS4 ABI compatibility by making the fix made in r331136 not apply when… (authored by dyung, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://rev

[PATCH] D46915: [Fixed Point Arithmetic] Set Fixed Point Precision Bits and Create Fixed Point Literals

2018-05-18 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 147595. leonardchan added a comment. formatting Repository: rC Clang https://reviews.llvm.org/D46915 Files: CMakeLists.txt cmake/modules/InitFixedPointBits.cmake include/clang/AST/Expr.h include/clang/AST/OperationKinds.def include/clang/AS

r332777 - [test] Fix run line to use correct triple

2018-05-18 Thread Shoaib Meenai via cfe-commits
Author: smeenai Date: Fri May 18 14:59:29 2018 New Revision: 332777 URL: http://llvm.org/viewvc/llvm-project?rev=332777&view=rev Log: [test] Fix run line to use correct triple objc_begin_catch/objc_end_catch are specific to the Itanium ABI, so we should be using an Itanium triple for this test.

[PATCH] D45212: [HIP] Let CUDA toolchain support HIP language mode and amdgpu

2018-05-18 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. Hi, Sorry about the long silence. I'm back to continue the reviews. I'll handle what I can today and will continue with the rest on Tuesday. It looks like patch description needs to be updated: > Use clang-offload-bindler to create binary for device ISA. I don't see anyth

[PATCH] D44539: [Sema][Objective-C] Add check to warn when property of objc type has assign attribute

2018-05-18 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. This isn't really an Objective-C user forum, but I'll try to summarize briefly. `unsafe_unretained` is an unsafe version of `weak` — it's unsafe because it can be left dangling if the object is deallocated. It's necessary for a small (and getting smaller every year)

[libcxx] r332779 - Disable 'missing-braces' warning

2018-05-18 Thread Marshall Clow via cfe-commits
Author: marshall Date: Fri May 18 15:21:33 2018 New Revision: 332779 URL: http://llvm.org/viewvc/llvm-project?rev=332779&view=rev Log: Disable 'missing-braces' warning Modified: libcxx/trunk/test/std/containers/sequences/array/array.cons/deduct.fail.cpp libcxx/trunk/test/std/containers/se

[PATCH] D47092: downgrade strong type info names to weak_odr linkage

2018-05-18 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith created this revision. rsmith added reviewers: EricWF, rjmccall, eli.friedman, jgorbe. Herald added a reviewer: javed.absar. After https://reviews.llvm.org/D46665 / https://reviews.llvm.org/rC332028, we now emit `linkonce_odr` definitions of type info names for incomplete class types. Thi

[PATCH] D46665: [Itanium] Emit type info names with external linkage.

2018-05-18 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. Please see https://reviews.llvm.org/D47092 for the `external` -> `weak_odr` change. Repository: rC Clang https://reviews.llvm.org/D46665 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bi

[PATCH] D43667: [clang-doc] Implement a YAML generator

2018-05-18 Thread Julie Hockett via Phabricator via cfe-commits
juliehockett updated this revision to Diff 147606. juliehockett marked 11 inline comments as done. juliehockett edited the summary of this revision. juliehockett added a comment. Updating for better integration with MR framework, the generator now takes in an info and an output stream and emits t

[PATCH] D46476: [HIP] Add action builder for HIP

2018-05-18 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: lib/Driver/Driver.cpp:2221 +CudaDeviceActions.clear(); +for (unsigned I = 0, E = GpuArchList.size(); I != E; ++I) { + CudaDeviceActions.push_back(UA); `for(auto Arch: GpuArchList)`

[PATCH] D43667: [clang-doc] Implement a YAML generator

2018-05-18 Thread Julie Hockett via Phabricator via cfe-commits
juliehockett added inline comments. Comment at: clang-doc/generators/Generators.h:49 + +class GeneratorFactory { +public: ioeric wrote: > ioeric wrote: > > Please add documentation and explain why this is needed. > If you plan to plugin in more generators (e.g.

[PATCH] D45212: [HIP] Let CUDA toolchain support HIP language mode and amdgpu

2018-05-18 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. One more thing -- it would be really good to add some tests to make sure your commands are constructed the way you want. https://reviews.llvm.org/D45212 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.

[PATCH] D47093: CodeGen, Driver: Start using direct split dwarf emission in clang.

2018-05-18 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc created this revision. pcc added reviewers: dblaikie, echristo. Herald added a subscriber: JDevlieghere. Fixes PR37466. Depends on https://reviews.llvm.org/D47091 https://reviews.llvm.org/D47093 Files: clang/include/clang/Driver/CC1Options.td clang/lib/CodeGen/BackendUtil.cpp clang/l

[PATCH] D47095: [clang-format/ObjC] Correctly parse Objective-C methods with 'class' in name

2018-05-18 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton created this revision. benhamilton added reviewers: djasper, jolesiak. Herald added subscribers: cfe-commits, klimek. Please take a close look at this CL. I haven't touched much of `UnwrappedLineParser` before, so I may have gotten things wrong. Previously, clang-format would incorrec

[PATCH] D47095: [clang-format/ObjC] Correctly parse Objective-C methods with 'class' in name

2018-05-18 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton updated this revision to Diff 147611. benhamilton added a comment. Format Repository: rC Clang https://reviews.llvm.org/D47095 Files: lib/Format/UnwrappedLineParser.cpp lib/Format/UnwrappedLineParser.h unittests/Format/FormatTestObjC.cpp Index: unittests/Format/FormatTestO

[PATCH] D45015: [Preprocessor] Allow libc++ to detect when aligned allocation is unavailable.

2018-05-18 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. Hmm, perhaps our strategy for handling aligned allocation on Darwin should be revisited. We shouldn't be defining `__cpp_aligned_allocation` if we believe it doesn't work -- that will break code that uses aligned allocation where available and falls back to something els

[PATCH] D47092: downgrade strong type info names to weak_odr linkage

2018-05-18 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. > This results in formal violations of LLVM's linkage rules I'm pretty sure this isn't actually a violation of LLVM's linkage rules as they are described in LangRef... at least, my understanding is that "equivalent" doesn't imply anything about linkage. (If this shoul

[PATCH] D47092: downgrade strong type info names to weak_odr linkage

2018-05-18 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Incomplete classes are a curse. I don't suppose we can just modify the language specification to make it illegal to use `typeid(Incomplete*)`? Or make equality/hashing undefined in these cases? Comment at: test/CodeGenCXX/arm64.cpp:48 void A::fo

[PATCH] D46740: [Clang Tablegen][RFC] Allow Early Textual Substitutions in `Diagnostic` messages.

2018-05-18 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: utils/TableGen/ClangDiagnosticsEmitter.cpp:514 + std::vector Diags = Records.getAllDerivedDefinitions("Diagnostic"); + llvm::for_each(Diags, [&](Record *R) { substituteDiagText(R, SubsMap); }); EricWF wrote: > rjmcc

[PATCH] D47096: CodeGen: block capture shouldn't ICE

2018-05-18 Thread JF Bastien via Phabricator via cfe-commits
jfb created this revision. jfb added a reviewer: rjmccall. Herald added subscribers: cfe-commits, aheejin. When a lambda capture captures a __block in the same statement, the compiler asserts out because isCapturedBy assumes that an Expr can only be a BlockExpr, StmtExpr, or if it's a Stmt then

[PATCH] D46472: [HIP] Support offloading by linker script

2018-05-18 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: cfe/trunk/lib/Driver/ToolChains/CommonArgs.cpp:1371-1388 + // machines. + LksStream << "/*\n"; + LksStream << " HIP Offload Linker Script\n"; + LksStream << " *** Automatically generated by Clang ***\n"; + LksStream << "*/\n"; +

[PATCH] D47092: downgrade strong type info names to weak_odr linkage

2018-05-18 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In https://reviews.llvm.org/D47092#1105317, @rjmccall wrote: > Incomplete classes are a curse. I don't suppose we can just modify the > language specification to make it illegal to use `typeid(Incomplete*)`? Or > make equality/hashing undefined in these cases? Hone

[PATCH] D46485: Add python tool to dump and construct header maps

2018-05-18 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added inline comments. Comment at: test/Preprocessor/headermap-rel.c:2-3 // This uses a headermap with this entry: // Foo.h -> Foo/Foo.h dexonsmith wrote: > Should we delete this comment now that the header map is human-readable? Sure! ===

[PATCH] D47092: downgrade strong type info names to weak_odr linkage

2018-05-18 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. Sorry @rsmith, I was just about to tackle this. Repository: rC Clang https://reviews.llvm.org/D47092 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r332784 - Do not enable RTTI with -fexceptions, for PS4

2018-05-18 Thread Sunil Srivastava via cfe-commits
Author: ssrivastava Date: Fri May 18 16:32:01 2018 New Revision: 332784 URL: http://llvm.org/viewvc/llvm-project?rev=332784&view=rev Log: Do not enable RTTI with -fexceptions, for PS4 NFC for targets other than PS4. This patch is a change in behavior for PS4, in that PS4 will no longer enable RT

[PATCH] D46982: Do not enable RTTI with -fexceptions, for PS4

2018-05-18 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL332784: Do not enable RTTI with -fexceptions, for PS4 (authored by ssrivastava, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D46982?vs=14719

[PATCH] D46472: [HIP] Support offloading by linker script

2018-05-18 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added inline comments. Comment at: cfe/trunk/lib/Driver/ToolChains/CommonArgs.cpp:1371-1388 + // machines. + LksStream << "/*\n"; + LksStream << " HIP Offload Linker Script\n"; + LksStream << " *** Automatically generated by Clang ***\n"; + LksStream << "*/\n"; +

[PATCH] D47096: CodeGen: block capture shouldn't ICE

2018-05-18 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. RecursiveASTVisitor instantiations are huge. Can you just make the function take a Stmt and then do the first few checks if it happens to be an Expr? Repository: rC Clang https://reviews.llvm.org/D47096 ___ cfe-commits

[PATCH] D47044: [analyzer] Ensure that we only visit a destructor for a reference if type information is available.

2018-05-18 Thread Matthew Voss via Phabricator via cfe-commits
ormris added a comment. This is my first static analyzer fix, so it may take me some time to figure this out. Repository: rC Clang https://reviews.llvm.org/D47044 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-

[PATCH] D45015: [Preprocessor] Allow libc++ to detect when aligned allocation is unavailable.

2018-05-18 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. In https://reviews.llvm.org/D45015#1105314, @rsmith wrote: > That is: on old Darwin, we should not define `__cpp_aligned_allocation` (even > in C++17), produce the "no aligned allocation support" warning in C++17 mode, > and then not try to call the aligned allocation f

[libcxx] r332785 - Implement deduction guides for

2018-05-18 Thread Marshall Clow via cfe-commits
Author: marshall Date: Fri May 18 16:44:13 2018 New Revision: 332785 URL: http://llvm.org/viewvc/llvm-project?rev=332785&view=rev Log: Implement deduction guides for Added: libcxx/trunk/test/std/containers/sequences/deque/deque.cons/deduct.fail.cpp libcxx/trunk/test/std/containers/sequen

[PATCH] D47090: Implement C++17 .

2018-05-18 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. I would prefer if we completed `` (according to the current standard, not the LFTS spec), and then moved it. Would you be willing to do that instead? Repository: rCXX libc++ https://reviews.llvm.org/D47090 ___ cfe-commit

[PATCH] D47096: CodeGen: block capture shouldn't ICE

2018-05-18 Thread JF Bastien via Phabricator via cfe-commits
jfb added a comment. In https://reviews.llvm.org/D47096#1105368, @rjmccall wrote: > RecursiveASTVisitor instantiations are huge. Can you just make the function > take a Stmt and then do the first few checks if it happens to be an Expr? I'm not super-familiar with the code, so I might be doing

[PATCH] D47092: downgrade strong type info names to weak_odr linkage

2018-05-18 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. In https://reviews.llvm.org/D47092#1105315, @efriedma wrote: > I'm pretty sure this isn't actually a violation of LLVM's linkage rules as > they are described in LangRef... at least, my understanding is that > "equivalent" doesn't imply anything about linkage. (If this

[PATCH] D45015: [Preprocessor] Allow libc++ to detect when aligned allocation is unavailable.

2018-05-18 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. In https://reviews.llvm.org/D45015#1105372, @vsapsai wrote: > What when compiler has `__builtin_operator_new`, `__builtin_operator_delete`? > If I build libc++ tests with recent Clang which has these builtins and run > tests with libc++.dylib from old Darwin, there are n

[PATCH] D47090: Implement C++17 .

2018-05-18 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone added a comment. > I would prefer if we completed (according to > the current standard, not the LFTS spec), and then moved it. > Would you be willing to do that instead? Let me see if I understand. libc++'s `` differs from C++17 `` in at least these ways: (A) It's missing `monoton

[PATCH] D47097: [WIP][DebugInfo] Preserve scope in auto generated StoreInst

2018-05-18 Thread Anastasis via Phabricator via cfe-commits
gramanas created this revision. gramanas added a reviewer: vsk. Herald added subscribers: JDevlieghere, aprantl. In this test there is a store instruction generated by clang for the function argument `int b` where the debug info is missing. The goal of this patch is to instruct clang to add an ar

[PATCH] D46740: [Clang Tablegen][RFC] Allow Early Textual Substitutions in `Diagnostic` messages.

2018-05-18 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. In https://reviews.llvm.org/D46740#1105063, @EricWF wrote: > Any final comments on this? I would ideally like to see one substitution added, and one set of diagnostics converted, as part of this patch, and for other diagnostics to be converted in separate changes after

[PATCH] D46917: [Fixed Point Arithmetic] Comparison and Unary Operations for Fixed Point Types

2018-05-18 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 147631. leonardchan added a comment. formatting Repository: rC Clang https://reviews.llvm.org/D46917 Files: lib/CodeGen/CGExprScalar.cpp lib/Sema/SemaExpr.cpp test/Frontend/fixed_point_declarations.c test/Frontend/fixed_point_validation.c In

[PATCH] D47044: [analyzer] Ensure that we only visit a destructor for a reference if type information is available.

2018-05-18 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Hmm, well, i guess it's not going to be a one-liner. You might have to iterate through all live variables in the scope, see if they are references, and add the trait. I think currently there's no way around scanning the current function body (i.e. `LCtx->getDecl()`, where `

[PATCH] D44238: [CFG] Fix automatic destructors when a member is bound to a reference.

2018-05-18 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 147635. NoQ added a comment. Switch to `skipRValueSubobjectAdjustments`. Yup, that's much better. Add FIXME tests for lifetime extension through non-references that are still not working - that correspond to a nearby FIXME in the code. I'm not planning to fix t

[PATCH] D47007: [analyzer] CStringChecker fix for strlcpy when no bytes are copied to the dest buffer

2018-05-18 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. @devnexen I think you should request commit access. You're already an active contributor :) Repository: rC Clang https://reviews.llvm.org/D47007 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/c

[PATCH] D44239: [analyzer] Re-enable constructor inlining when lifetime extension through fields occurs.

2018-05-18 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 147637. NoQ added a comment. Herald added a subscriber: baloghadamsoftware. Rebase. https://reviews.llvm.org/D44239 Files: include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h lib/StaticAnalyzer/Core/ExprEngineCXX.cpp lib/StaticAnalyzer/Core/ExprE

[PATCH] D47092: downgrade strong type info names to weak_odr linkage

2018-05-18 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: test/CodeGenCXX/arm64.cpp:48 void A::foo() {} - // CHECK-GLOBALS-DAG: @_ZTSN5test21AE = constant [11 x i8] + // CHECK-GLOBALS-DAG: @_ZTSN5test21AE = weak_odr constant [11 x i8] // CHECK-GLOBALS-DAG: @_ZTIN5test21AE = constant {

[PATCH] D47099: Disable casting of alloca for ActiveFlag

2018-05-18 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added a reviewer: rjmccall. ActiveFlag is a temporary variable emitted for clean up. It is defined as AllocaInst* type and there is a cast to AlllocaInst in SetActiveFlag. An alloca casted to generic pointer causes assertion in SetActiveFlag. Since there is

[PATCH] D47096: CodeGen: block capture shouldn't ICE

2018-05-18 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In https://reviews.llvm.org/D47096#1105374, @jfb wrote: > In https://reviews.llvm.org/D47096#1105368, @rjmccall wrote: > > > RecursiveASTVisitor instantiations are huge. Can you just make the > > function take a Stmt and then do the first few checks if it happens to be

[PATCH] D40218: [Clang] Add __builtin_launder

2018-05-18 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 147639. EricWF added a comment. - Handle array types as requested. - Attempt to handle incomplete class types. They are always considered in need of laundering. Including class templates who's instantiation hasn't been forced yet. @rsmith is this the correct

[PATCH] D46740: [Clang Tablegen][RFC] Allow Early Textual Substitutions in `Diagnostic` messages.

2018-05-18 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 147640. EricWF added a comment. - Remove changes to Sema, and overload resolution diagnostics. Only change the special member function diagnostics as an example. If there are no further comments, I'll commit this once I've run the test suite. https://review

[libcxx] r332797 - Remove expression '1L + INT_MAX', because it overflows on machines where int/long are the same size

2018-05-18 Thread Marshall Clow via cfe-commits
Author: marshall Date: Fri May 18 20:09:05 2018 New Revision: 332797 URL: http://llvm.org/viewvc/llvm-project?rev=332797&view=rev Log: Remove expression '1L + INT_MAX', because it overflows on machines where int/long are the same size Modified: libcxx/trunk/test/std/containers/sequences/dequ

[PATCH] D46740: [Clang Tablegen][RFC] Allow Early Textual Substitutions in `Diagnostic` messages.

2018-05-18 Thread Eric Fiselier via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rC332799: [Clang Tablegen][RFC] Allow Early Textual Substitutions in `Diagnostic`… (authored by EricWF, committed by ). Rep

r332799 - [Clang Tablegen][RFC] Allow Early Textual Substitutions in `Diagnostic` messages.

2018-05-18 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Fri May 18 20:12:04 2018 New Revision: 332799 URL: http://llvm.org/viewvc/llvm-project?rev=332799&view=rev Log: [Clang Tablegen][RFC] Allow Early Textual Substitutions in `Diagnostic` messages. Summary: There are cases where the same string or select is repeated verbatim in

r332800 - Adjust and fix failing CXX tests after r332799

2018-05-18 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Fri May 18 20:33:56 2018 New Revision: 332800 URL: http://llvm.org/viewvc/llvm-project?rev=332800&view=rev Log: Adjust and fix failing CXX tests after r332799 Modified: cfe/trunk/test/CXX/class/class.union/p1.cpp cfe/trunk/test/CXX/drs/dr5xx.cpp Modified: cfe/trunk/t

[PATCH] D47096: CodeGen: block capture shouldn't ICE

2018-05-18 Thread JF Bastien via Phabricator via cfe-commits
jfb updated this revision to Diff 147647. jfb added a comment. - Follow John's suggestion. Repository: rC Clang https://reviews.llvm.org/D47096 Files: lib/CodeGen/CGDecl.cpp test/CodeGen/block-capture.cpp Index: test/CodeGen/block-capture.cpp ===

[PATCH] D47096: CodeGen: block capture shouldn't ICE

2018-05-18 Thread JF Bastien via Phabricator via cfe-commits
jfb added a comment. In https://reviews.llvm.org/D47096#1105455, @rjmccall wrote: > `children()` is actually defined at the `Stmt` level, and if you look at how > it's implemented on e.g. `IfStmt`, you can see that it visits all of the > child `Stmt`s, including the if-condition. So it should

[PATCH] D47096: CodeGen: block capture shouldn't ICE

2018-05-18 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Test case should go in test/CodeGenCXX. Also, there already is a `blocks.cpp` there. Repository: rC Clang https://reviews.llvm.org/D47096 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cg

[PATCH] D47096: CodeGen: block capture shouldn't ICE

2018-05-18 Thread JF Bastien via Phabricator via cfe-commits
jfb updated this revision to Diff 147648. jfb added a comment. - move test Repository: rC Clang https://reviews.llvm.org/D47096 Files: lib/CodeGen/CGDecl.cpp test/CodeGenCXX/block-capture.cpp Index: test/CodeGenCXX/block-capture.cpp =

[PATCH] D47099: Disable casting of alloca for ActiveFlag

2018-05-18 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Maybe there should just be a method that makes a primitive alloca without the casting, and then you can call that in CreateTempAlloca. https://reviews.llvm.org/D47099 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D47096: CodeGen: block capture shouldn't ICE

2018-05-18 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added a comment. This revision is now accepted and ready to land. LGTM. Repository: rC Clang https://reviews.llvm.org/D47096 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/c

[PATCH] D47096: CodeGen: block capture shouldn't ICE

2018-05-18 Thread JF Bastien via Phabricator via cfe-commits
jfb added a comment. In https://reviews.llvm.org/D47096#1105492, @rjmccall wrote: > Test case should go in test/CodeGenCXX. Also, there already is a > `blocks.cpp` there. I moved it, but didn't merge with the existing block.cpp because it just checks for not crashing. I'd rather make sure th

r332801 - CodeGen: block capture shouldn't ICE

2018-05-18 Thread JF Bastien via cfe-commits
Author: jfb Date: Fri May 18 21:21:26 2018 New Revision: 332801 URL: http://llvm.org/viewvc/llvm-project?rev=332801&view=rev Log: CodeGen: block capture shouldn't ICE When a lambda capture captures a __block in the same statement, the compiler asserts out because isCapturedBy assumes that an Exp

[PATCH] D47096: CodeGen: block capture shouldn't ICE

2018-05-18 Thread JF Bastien via Phabricator via cfe-commits
jfb closed this revision. jfb added a comment. r332801 Repository: rC Clang https://reviews.llvm.org/D47096 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D47101: [Sema] Use %sub to cleanup overload diagnostics

2018-05-18 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF created this revision. EricWF added a reviewer: rsmith. This patch adds the newly added `%sub` diagnostic modifier to cleanup repetition in the overload candidate diagnostics. I think this should be good to go. @rsmith: Some of the notes now emit `function template` where they only said

<    1   2   3   >