Re: [PATCH] D59376: [LibTooling] Add Transformer, a library for source-to-source transformations.

2019-04-03 Thread Yitzhak Mandelbaum via cfe-commits
Alexey, thanks for reverting the change. Can you expand on why a dependency from libToolingRefactor to libTooling causes a cycle in the dep graph? In particular, I can't find the reverse dependency libTooling -> libToolingRefactor. If you can expand on that (I presume its a chain rather than a dire

r357620 - Revert "[analyzer] Toning down invalidation a bit".

2019-04-03 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Wed Apr 3 11:21:16 2019 New Revision: 357620 URL: http://llvm.org/viewvc/llvm-project?rev=357620&view=rev Log: Revert "[analyzer] Toning down invalidation a bit". This reverts commit r352473. The overall idea is great, but it seems to cause unintented consequences when n

Re: [PATCH] D59376: [LibTooling] Add Transformer, a library for source-to-source transformations.

2019-04-03 Thread Yitzhak Mandelbaum via cfe-commits
Thanks. Any idea why AtomicChange.cpp's inclusion of clang/Tooling/ReplacementsYaml.h doesn't cause the same problem? https://github.com/llvm/llvm-project/blob/master/clang/lib/Tooling/Refactoring/AtomicChange.cpp On Wed, Apr 3, 2019 at 2:11 PM Alexey Bataev wrote: > The problem is that libTool

[PATCH] D58121: [analyzer][WIP] Attempt to fix traversing bindings of non-base regions in ClusterAnalysis

2019-04-03 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Reverted D57230 in rC357620 . CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58121/new/ https://reviews.llvm.org/D58121 ___ cfe-commits mailing list c

[PATCH] D60220: [CUDA][Windows] Final fix for bug 38811 (Step 3 of 3)

2019-04-03 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: clang/lib/Headers/__clang_cuda_cmath.h:81-90 +__DEVICE__ bool isinf(long double __x) { return ::__isinfl(__x); } __DEVICE__ bool isfinite(float __x) { return ::__finitef(__x); } // For inscrutable reasons, __finite(), the double-precision

[PATCH] D59321: WIP: AMDGPU: Teach toolchain to link rocm device libs

2019-04-03 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: lib/Driver/ToolChains/AMDGPU.h:25 +/// TODO: Generalize to handle libclc. +class RocmInstallationDetector { +private: I don't think we should detect ROCm installation here. We are compiling code for amdgpu not only on RO

r357625 - [OPENMP]Add codegen for lastprivate vars with allocate clause, NFC.

2019-04-03 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Wed Apr 3 12:12:47 2019 New Revision: 357625 URL: http://llvm.org/viewvc/llvm-project?rev=357625&view=rev Log: [OPENMP]Add codegen for lastprivate vars with allocate clause, NFC. Added test for the lastprivatized variables with the allocate clause. Modified: cfe/trunk/

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

2019-04-03 Thread Brian Gianforcaro via Phabricator via cfe-commits
bgianfo added a comment. Herald added subscribers: dexonsmith, jkorous. Is there a reason why this was never merged? Has the functionality been folded in in some other revision? I saw a bug recently where this warning would have been great. How can we get this merged? CHANGES SINCE LAST ACTION

[PATCH] D60201: Make clangd-fuzzer use the normal add_llvm_fuzzer() machinery

2019-04-03 Thread Benjamin Kramer via Phabricator via cfe-commits
bkramer accepted this revision. bkramer added a comment. This revision is now accepted and ready to land. lg CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60201/new/ https://reviews.llvm.org/D60201 ___ cfe-commits mailing list cfe-commits@l

[PATCH] D60225: [clang-format] [PR19056] Add support for indenting class members and methods one level under the modifiers

2019-04-03 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay created this revision. MyDeveloperDay added reviewers: klimek, djasper, JonasToth, russellmcc, reuk. MyDeveloperDay added a project: clang-tools-extra. Code::Blocks and Qt Creator code uses a style guide which recommends indenting the next line after the access modifier e.g. cla

[PATCH] D59309: [clang-format] BreakAfterReturnType ignored on functions with numeric template parameters

2019-04-03 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay marked 2 inline comments as done. MyDeveloperDay added inline comments. Comment at: clang/lib/Format/TokenAnnotator.cpp:3177-3178 return false; // Don't split tagged template literal so there is a break between the tag // identifier and template st

[PATCH] D46140: [coroutines] Add std::experimental::task type

2019-04-03 Thread Lewis Baker via Phabricator via cfe-commits
lewissbaker marked 3 inline comments as done. lewissbaker added inline comments. Comment at: include/experimental/task:160 +__get_allocator<_CharAlloc>(__pointer, __size); +_CharAlloc __allocatorOnStack = _VSTD::move(__allocatorInFrame); +__allocatorIn

[PATCH] D59797: [COFF] Reduce the size of Chunk and SectionChunk, NFC

2019-04-03 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. In D59797#1452440 , @MaskRay wrote: > > this reduces the sum of heap allocations ... These numbers exclude memory > > mapped files > > May I ask how you counted the memory usage minus memory mapped files? I'm using the Visual Studio

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

2019-04-03 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added a comment. In D24639#1453795 , @bgianfo wrote: > Is there a reason why this was never merged? > Has the functionality been folded in in some other revision? > > I saw a bug recently which would have been caught by exactly this, which

r357629 - [OPENMP]Add codegen for reduction vars with allocate clause, NFC.

2019-04-03 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Wed Apr 3 12:59:09 2019 New Revision: 357629 URL: http://llvm.org/viewvc/llvm-project?rev=357629&view=rev Log: [OPENMP]Add codegen for reduction vars with allocate clause, NFC. Added test for the reduction variables with the allocate clause. Modified: cfe/trunk/test/Op

[PATCH] D59376: [LibTooling] Add Transformer, a library for source-to-source transformations.

2019-04-03 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel reopened this revision. ymandel added a comment. This revision is now accepted and ready to land. Reopening to fix the breakage caused by previous attempt at commit. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59376/new/ https://reviews.llvm.org/D59376

[PATCH] D59321: WIP: AMDGPU: Teach toolchain to link rocm device libs

2019-04-03 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm marked an inline comment as done. arsenm added inline comments. Comment at: lib/Driver/ToolChains/AMDGPU.h:25 +/// TODO: Generalize to handle libclc. +class RocmInstallationDetector { +private: yaxunl wrote: > I don't think we should detect ROCm installati

[PATCH] D59376: [LibTooling] Add Transformer, a library for source-to-source transformations.

2019-04-03 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 193584. ymandel added a subscriber: ABataev. ymandel added a comment. Sever dependency of clangToolingRefactor on clangTooling via FixIt. Transformer used FixIt, which causes a problematic dependency. This diff copies the (minimal) code from FixIt to Transfo

[PATCH] D59376: [LibTooling] Add Transformer, a library for source-to-source transformations.

2019-04-03 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. Ilya, this diff fixes the breakage. PTAL. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59376/new/ https://reviews.llvm.org/D59376 ___ cfe-commits mailing list cfe-commits@list

[PATCH] D59347: [DebugInfo] Combine Trivial and NonTrivial flags

2019-04-03 Thread Hui Huang via Phabricator via cfe-commits
Hui added inline comments. Comment at: test/CodeGenCXX/debug-info-composite-triviality.cpp:88 - -// CHECK-DAG: !DICompositeType({{.*}}, name: "NonTrivialE",{{.*}}flags: {{.*}}DIFlagNonTrivial -struct NonTrivialE : Trivial, NonTrivial { probinson wrote: > This on

r357638 - [IR] Create new method in `Function` class (NFC)

2019-04-03 Thread Evandro Menezes via cfe-commits
Author: evandro Date: Wed Apr 3 14:27:03 2019 New Revision: 357638 URL: http://llvm.org/viewvc/llvm-project?rev=357638&view=rev Log: [IR] Create new method in `Function` class (NFC) Create method `optForNone()` testing for the function level equivalent of `-O0` and refactor appropriately. Diffe

[PATCH] D59852: [IR] Create new method in the Function class (NFC)

2019-04-03 Thread Evandro Menezes via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC357638: [IR] Create new method in `Function` class (NFC) (authored by evandro, committed by ). Herald added a project: clang. Herald added a subscriber: cfe-commits. Changed prior to commit: https://rev

[PATCH] D60161: Expose non-trivial struct helpers for Swift.

2019-04-03 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: clang/include/clang/CodeGen/CodeGenABITypes.h:93 +llvm::BasicBlock::iterator InsertPoint, llvm::Value *Dst, +CharUnits Alignment, QualType QT); + Hmm. I think it might be better to just have this return a funct

[libunwind] r357640 - [libunwind] Export the unw_* symbols as weak symbols

2019-04-03 Thread Petr Hosek via cfe-commits
Author: phosek Date: Wed Apr 3 14:50:03 2019 New Revision: 357640 URL: http://llvm.org/viewvc/llvm-project?rev=357640&view=rev Log: [libunwind] Export the unw_* symbols as weak symbols libunwind defines the _Unwind_* ABI used by libc++abi. This ABI is a stable quasi-standard common between multi

[PATCH] D60233: [clang-scan-deps] initial outline of the tool that runs preprocessor to find dependencies over a JSON compilation database

2019-04-03 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman created this revision. arphaman added a reviewer: Bigcheese. Herald added subscribers: jfb, dexonsmith, jkorous, mgorny. Herald added a project: clang. This patch introduces an outline for the `clang-scan-deps` tool that will be used to implement fast dependency discovery phase using imp

[PATCH] D55463: Introduce a source minimizer that reduces source to directives that might affect the dependency list for a compilation

2019-04-03 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. @Bigcheese Initial tool posted to https://reviews.llvm.org/D60233 . Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55463/new/ https://reviews.llvm.org/D55463 ___ cfe-commits mailing list cfe

[PATCH] D60161: Expose non-trivial struct helpers for Swift.

2019-04-03 Thread Tony Allevato via Phabricator via cfe-commits
allevato added inline comments. Comment at: clang/include/clang/CodeGen/CodeGenABITypes.h:93 +llvm::BasicBlock::iterator InsertPoint, llvm::Value *Dst, +CharUnits Alignment, QualType QT); + rjmccall wrote: > Hmm. I think it might be better to just have t

[PATCH] D60151: [clang-tidy] Add using SmallSet to LLVM.h to fix bug in typedef in llvm checkers.

2019-04-03 Thread Don Hinton via Phabricator via cfe-commits
hintonda updated this revision to Diff 193604. hintonda added a comment. Herald added subscribers: arphaman, mgorny. - Rename llvm directory to llvm_project. - Change llvm- to llvm-project-. - Rename files. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.o

[PATCH] D60235: [CMake] Disable libc++ and libc++abi new/delete definitions when built with ASan

2019-04-03 Thread Petr Hosek via Phabricator via cfe-commits
phosek created this revision. phosek added a reviewer: mcgrathr. Herald added subscribers: cfe-commits, dexonsmith, mehdi_amini, mgorny. Herald added a reviewer: EricWF. Herald added a project: clang. ASan provides its own operator new/delete to intercept all allocations and deallocations. Current

[PATCH] D60235: [CMake] Disable libc++ and libc++abi new/delete definitions when built with ASan

2019-04-03 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr accepted this revision. mcgrathr added a comment. This revision is now accepted and ready to land. IMHO the library code should use `#if !__has_feature(...)` to avoid the definitions entirely when built with a sanitizer whose runtime provides them. But this is a fine way to achieve that

[PATCH] D60236: add periods

2019-04-03 Thread Amy Huang via Phabricator via cfe-commits
akhuang created this revision. Herald added subscribers: cfe-commits, jfb. Herald added a project: clang. emit metadata for __declspec(allocator) add tests for heapallocsite metadata Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D60236 Files: clang/lib/CodeGen/CGAtomic.cpp

r357643 - add periods

2019-04-03 Thread Amy Huang via cfe-commits
Author: akhuang Date: Wed Apr 3 15:19:07 2019 New Revision: 357643 URL: http://llvm.org/viewvc/llvm-project?rev=357643&view=rev Log: add periods Modified: cfe/trunk/lib/CodeGen/CGAtomic.cpp Modified: cfe/trunk/lib/CodeGen/CGAtomic.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/

[PATCH] D60235: [CMake] Disable libc++ and libc++abi new/delete definitions when built with ASan

2019-04-03 Thread Petr Hosek via Phabricator via cfe-commits
phosek added a subscriber: ldionne. phosek added a comment. In D60235#1454152 , @mcgrathr wrote: > IMHO the library code should use `#if !__has_feature(...)` to avoid the > definitions entirely when built with a sanitizer whose runtime provides them. > B

[PATCH] D60237: [MS] Add metadata for __declspec(allocator)

2019-04-03 Thread Amy Huang via Phabricator via cfe-commits
akhuang created this revision. akhuang added a reviewer: rnk. Herald added subscribers: cfe-commits, jfb. Herald added a project: clang. Emit !heapallocsite in the metadata for calls to functions marked with __declspec(allocator). Eventually this will be emitted as S_HEAPALLOCSITE debug info in co

[PATCH] D60238: Verify that Android targets generate DWARF 4 by default.

2019-04-03 Thread Stephen Hines via Phabricator via cfe-commits
srhines created this revision. srhines added a reviewer: aprantl. Herald added a project: clang. Herald added a subscriber: cfe-commits. srhines added subscribers: pirama, chh. In the future, Android releases will support DWARF 5, but we need to ensure that older targets only have DWARF 4 generate

[PATCH] D60238: Verify that Android targets generate DWARF 4 by default.

2019-04-03 Thread Adrian Prantl via Phabricator via cfe-commits
aprantl added inline comments. Comment at: clang/test/Driver/debug-options.c:280 // G_STANDALONE: "-debug-info-kind=standalone" +// G_DWARF2: "-dwarf-version=2" // G_DWARF4: "-dwarf-version=4" What's that for? Repository: rG LLVM Github Monorepo CHANGES SI

[PATCH] D60237: [MS] Add metadata for __declspec(allocator)

2019-04-03 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added inline comments. Comment at: clang/lib/CodeGen/CGAtomic.cpp:1691 } else { -// Build new lvalue for temp address +// Build new lvalue for temp address. Address Ptr = Atomics.materializeRValue(OldRVal); I don't have an issue with these cha

[PATCH] D60238: Verify that Android targets generate DWARF 4 by default.

2019-04-03 Thread Stephen Hines via Phabricator via cfe-commits
srhines marked an inline comment as done. srhines added inline comments. Comment at: clang/test/Driver/debug-options.c:280 // G_STANDALONE: "-debug-info-kind=standalone" +// G_DWARF2: "-dwarf-version=2" // G_DWARF4: "-dwarf-version=4" aprantl wrote: > What's th

[clang-tools-extra] r357654 - Make clangd-fuzzer use the normal add_llvm_fuzzer() machinery

2019-04-03 Thread Nico Weber via cfe-commits
Author: nico Date: Wed Apr 3 17:05:53 2019 New Revision: 357654 URL: http://llvm.org/viewvc/llvm-project?rev=357654&view=rev Log: Make clangd-fuzzer use the normal add_llvm_fuzzer() machinery This allows building it even if no fuzzer is enabled. (Sadly, it only builds on Linux at the moment.) D

[PATCH] D60201: Make clangd-fuzzer use the normal add_llvm_fuzzer() machinery

2019-04-03 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE357654: Make clangd-fuzzer use the normal add_llvm_fuzzer() machinery (authored by nico, committed by ). Herald added a project: clang. Changed prior to commit: https://reviews.llvm.org/D60201?vs=1934

[PATCH] D60018: [codeview] Remove Type member from CVRecord

2019-04-03 Thread Reid Kleckner via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rLLD357658: [codeview] Remove Type member from CVRecord (authored by rnk, committed by ). Changed prior to commit: https://reviews.llvm.org/D60018?vs=193526&id=193633#toc Repository: rLLD LLVM Linker

[PATCH] D60238: Verify that Android targets generate DWARF 4 by default.

2019-04-03 Thread Adrian Prantl via Phabricator via cfe-commits
aprantl accepted this revision. aprantl added a comment. This revision is now accepted and ready to land. Good catch! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60238/new/ https://reviews.llvm.org/D60238 __

[PATCH] D59923: [Driver] Simplify -g level computation and its interaction with -gsplit-dwarf

2019-04-03 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Ping :) Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59923/new/ https://reviews.llvm.org/D59923 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman

r357667 - Revert r357452 - 'SimplifyCFG SinkCommonCodeFromPredecessors: Also sink function calls without used results (PR41259)'

2019-04-03 Thread David L. Jones via cfe-commits
Author: dlj Date: Wed Apr 3 19:27:57 2019 New Revision: 357667 URL: http://llvm.org/viewvc/llvm-project?rev=357667&view=rev Log: Revert r357452 - 'SimplifyCFG SinkCommonCodeFromPredecessors: Also sink function calls without used results (PR41259)' This revision causes tests to fail under ASAN.

[PATCH] D59802: [clang-tidy] Add new checker: llvm-prefer-isa-or-dyn-cast-in-conditionals

2019-04-03 Thread Don Hinton via Phabricator via cfe-commits
hintonda marked an inline comment as done. hintonda added inline comments. Comment at: clang-tools-extra/clang-tidy/llvm/AvoidCastInConditionalCheck.cpp:145 + +diag(MatchedDecl->getBeginLoc(), "use dyn_cast_or_null") +<< FixItHint::CreateReplacement(SourceRange(Match

[PATCH] D59744: Fix i386 ABI "__m64" type bug

2019-04-03 Thread Wei Xiao via Phabricator via cfe-commits
wxiao3 added a comment. Dear reviewers, any comments? Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59744/new/ https://reviews.llvm.org/D59744 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llv

[PATCH] D59802: [clang-tidy] Add new checker: llvm-prefer-isa-or-dyn-cast-in-conditionals

2019-04-03 Thread Don Hinton via Phabricator via cfe-commits
hintonda marked an inline comment as done. hintonda added inline comments. Comment at: clang-tools-extra/clang-tidy/llvm/AvoidCastInConditionalCheck.cpp:145 + +diag(MatchedDecl->getBeginLoc(), "use dyn_cast_or_null") +<< FixItHint::CreateReplacement(SourceRange(Match

[PATCH] D59802: [clang-tidy] Add new checker: llvm-prefer-isa-or-dyn-cast-in-conditionals

2019-04-03 Thread Don Hinton via Phabricator via cfe-commits
hintonda marked an inline comment as done. hintonda added inline comments. Comment at: clang-tools-extra/clang-tidy/llvm/AvoidCastInConditionalCheck.cpp:18 + +AST_MATCHER(Expr, isMacroID) { return Node.getExprLoc().isMacroID(); } +} // namespace ast_matchers aaro

[PATCH] D60120: check-clang-tools: Actually build and run XPC test

2019-04-03 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. ping? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60120/new/ https://reviews.llvm.org/D60120 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] r357671 - [libunwind] Export the weak alias in Mach-O

2019-04-03 Thread Petr Hosek via cfe-commits
Author: phosek Date: Wed Apr 3 20:36:35 2019 New Revision: 357671 URL: http://llvm.org/viewvc/llvm-project?rev=357671&view=rev Log: [libunwind] Export the weak alias in Mach-O This is not necessary for ELF since .globl and .weak are mutually exclusive, but is necessary for Mach-O otherwise the s

[PATCH] D59987: Add support for detection of devtoolset-8

2019-04-03 Thread Tom Stellard via Phabricator via cfe-commits
tstellar added a comment. Do you have commit access? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59987/new/ https://reviews.llvm.org/D59987 ___ cfe-commits mailing list cfe-commits@lists.llvm.org htt

[PATCH] D60247: Make SourceManager::createFileID(UnownedTag, ...) take a const llvm::MemoryBuffer*

2019-04-03 Thread Nico Weber via Phabricator via cfe-commits
thakis created this revision. thakis added a reviewer: rnk. Herald added subscribers: llvm-commits, arphaman. Herald added a project: LLVM. Requires making the llvm::MemoryBuffer* stored by SourceManager const, which in turn requires making the accessors for that return const llvm::MemoryBuffer*s

<    1   2