[PATCH] D66486: [LifetimeAnalysis] Detect more cases when the address of a local variable escapes

2019-08-23 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre added a comment. > Also it feels a bit weird to change the ownership semantics in a derived > class, I bet that would violate the Liskov substitution principle. And then we see that llvm::OwningArrayRef inherits from llvm::ArrayRef ... But maybe this direction (strengthening a Pointer

[PATCH] D66673: [OPENMP][NVPTX]Fix critical region codegen.

2019-08-23 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev created this revision. ABataev added a reviewer: ABataev. Herald added subscribers: cfe-commits, guansong, jholewinski. Herald added a reviewer: jdoerfert. Herald added a project: clang. Previously critical regions were emitted with the barrier making it a worksharing construct though it

[PATCH] D63325: [Support][Time profiler] Make FE codegen blocks to be inside frontend blocks

2019-08-23 Thread Nathan Chancellor via Phabricator via cfe-commits
nathanchance added a comment. > Could it be an issue with python? What is the version you are using? I would assume so... $ /usr/bin/python --version Python 3.7.4 Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63325/new/ https://reviews.llvm.org/D63325

[PATCH] D66652: [libTooling] Transformer: refine `SourceLocation` specified as anchor of changes.

2019-08-23 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 216921. ymandel marked 2 inline comments as done. ymandel added a comment. comments tweaks. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66652/new/ https://reviews.llvm.org/D66652 Files:

[PATCH] D66676: [clang-tidy] TransformerClangTidyCheck: change choice of location for diagnostic message.

2019-08-23 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel created this revision. ymandel added a reviewer: gribozavr. Herald added a subscriber: xazax.hun. Herald added a project: clang. This patch changes the location specified to the `ClangTidyCheck::diag()`. Currently, the beginning of the matched range is used. This patch uses the beginning

[PATCH] D66486: [LifetimeAnalysis] Detect more cases when the address of a local variable escapes

2019-08-23 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre added a comment. When I understand you correctly, you are thinking about the cases OwningArrayRef getRef(); ArrayRef f() { ArrayRef r = getRef(); // warning: r points into temporary owner return r; } and ArrayRef getRef() { OwningArrayRef r; return r; //

r369801 - [OPENMP5]Use nonmonotonic modifier by default for non-static and

2019-08-23 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Fri Aug 23 12:52:05 2019 New Revision: 369801 URL: http://llvm.org/viewvc/llvm-project?rev=369801=rev Log: [OPENMP5]Use nonmonotonic modifier by default for non-static and non-ordered loops. According to OpenMP 5.0, 2.9.2 Worksharing-Loop Construct, Desription, If the

[PATCH] D66673: [OPENMP][NVPTX]Fix critical region codegen.

2019-08-23 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. I guess IR test should be affected already and it would be good to have the run time test that breaks with barriers. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66673/new/ https://reviews.llvm.org/D66673

r369803 - Do a sweep of symbol internalization. NFC.

2019-08-23 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Fri Aug 23 12:59:23 2019 New Revision: 369803 URL: http://llvm.org/viewvc/llvm-project?rev=369803=rev Log: Do a sweep of symbol internalization. NFC. Modified: cfe/trunk/lib/CodeGen/CGNonTrivialStruct.cpp cfe/trunk/lib/Frontend/InterfaceStubFunctionsConsumer.cpp

[PATCH] D66486: [LifetimeAnalysis] Detect more cases when the address of a local variable escapes

2019-08-23 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre added a comment. Yes, it means that the automatic inference of Pointer/Owner from base classes has the same issues as all of those automatic inferences: Once can construct a case where they are not true. So for having no false-positives at all, we should avoid this inference by default

Re: r369616 - [analyzer] Enable control dependency condition tracking by default

2019-08-23 Thread Alexander Kornienko via cfe-commits
I suspect that this patch makes analysis much slower in certain cases. For example, the clang/test/Analysis/pr37802.cpp test has become ~5 times slower in some configurations in our environment. This happened somewhere between r369520 and r369679, and your series of patches seems most suspicious

[PATCH] D63325: [Support][Time profiler] Make FE codegen blocks to be inside frontend blocks

2019-08-23 Thread Anton Afanasyev via Phabricator via cfe-commits
anton-afanasyev added a comment. In D63325#1643023 , @nathanchance wrote: > Done, thanks for looking into this! > > F9847579: check-time-trace-sections.json Hmm, I still didn't manage to reproduce the issue using

Re: r369616 - [analyzer] Enable control dependency condition tracking by default

2019-08-23 Thread Kristóf Umann via cfe-commits
Totally possible, thanks for letting me know! There should be plenty of room for caching, because I do calculate control dependencies in an excess for the same CFG, and the retrieval of a basic block from an ExplodedNode is anything but efficient, though I honestly didnt expect a performance hit

[PATCH] D65907: Introduce FileEntryRef and use it when handling includes to report correct dependencies when the FileManager is reused across invocations

2019-08-23 Thread James Nagurne via Phabricator via cfe-commits
JamesNagurne added a comment. Herald added a subscriber: ributzka. @arphaman you disabled this test on Windows, but did not specify exactly how it fails. My team works on an embedded ARM compiler (most similar to arm-none-eabi), and we're now seeing failures from DependencyScannerTest. I can't

[PATCH] D66486: [LifetimeAnalysis] Detect more cases when the address of a local variable escapes

2019-08-23 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. In D66486#1643374 , @mgehre wrote: > > Also it feels a bit weird to change the ownership semantics in a derived > > class, I bet that would violate the Liskov substitution principle. > > And then we see that

Re: r369591 - [LifetimeAnalysis] Support more STL idioms (template forward declaration and DependentNameType)

2019-08-23 Thread Richard Smith via cfe-commits
On Thu, 22 Aug 2019 at 13:05, Matthias Gehre via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Hi Diana, > hi Richard, > > thank you for the feedback! > > Diana, > I remember that some gcc version had issues with raw string literals > inside macros. I'll fix that to use normal > string

Re: r369616 - [analyzer] Enable control dependency condition tracking by default

2019-08-23 Thread Artem Dergachev via cfe-commits
I had a look and i don't observe any regressions here. Both this test alone and the whole test suite in general take as much time as on r369520 for me. Additionally, -analyzer-stats doesn't indicate that any significant amount of time was spent in bug report post-processing. On 8/23/19 11:41

[PATCH] D66564: [clang-tidy] new FPGA struct pack align check

2019-08-23 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tidy/fpga/StructPackAlignCheck.h:1 +//===--- StructPackAlignCheck.h - clang-tidy-*- C++ -*-===// +// Please add space after clang-tidy. Same in source file. Comment

[PATCH] D66673: [OPENMP][NVPTX]Fix critical region codegen.

2019-08-23 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev updated this revision to Diff 216934. ABataev added a comment. Fix the test Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66673/new/ https://reviews.llvm.org/D66673 Files: lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp test/OpenMP/nvptx_parallel_codegen.cpp

[PATCH] D66673: [OPENMP][NVPTX]Fix critical region codegen.

2019-08-23 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D66673#1643544 , @jdoerfert wrote: > I guess IR test should be affected already and it would be good to have the > run time test that breaks with barriers. Runtime test is

Re: r369591 - [LifetimeAnalysis] Support more STL idioms (template forward declaration and DependentNameType)

2019-08-23 Thread Gábor Horváth via cfe-commits
Hi Richard, I'll move these behind a flag today. Moving forward, it would be great to have a way to dogfood those warnings without blocking you. We do run them over ~340 open source projects regularly, but clearly that is not enough :) Thanks, Gabor On Fri, 23 Aug 2019 at 13:03, Richard Smith

[PATCH] D66486: [LifetimeAnalysis] Detect more cases when the address of a local variable escapes

2019-08-23 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. Yeah, the analysis would work fine in this case. But that would mean that we should not propagate the Pointer annotations to derived classes as some of them in the wild do not follow the same ownership model. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D66564: [clang-tidy] new FPGA struct pack align check

2019-08-23 Thread Frank Derry Wanye via Phabricator via cfe-commits
ffrankies updated this revision to Diff 216928. ffrankies added a comment. Implemented changes requested by Eugene.Zelenko CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66564/new/ https://reviews.llvm.org/D66564 Files: clang-tidy/fpga/CMakeLists.txt

[PATCH] D66486: [LifetimeAnalysis] Detect more cases when the address of a local variable escapes

2019-08-23 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. Sounds good! Let's do that :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66486/new/ https://reviews.llvm.org/D66486 ___ cfe-commits mailing list

[PATCH] D66681: [clang-doc] Bump BitcodeWriter max line number to 32U

2019-08-23 Thread Julie Hockett via Phabricator via cfe-commits
juliehockett created this revision. juliehockett added a reviewer: phosek. juliehockett added a project: clang-tools-extra. b43039 reports hitting the assert on a very large file, so bumping this to allow for larger files. https://reviews.llvm.org/D66681 Files:

r369829 - PR40674: fix assertion failure if a structured binding declaration has a

2019-08-23 Thread Richard Smith via cfe-commits
Author: rsmith Date: Fri Aug 23 18:23:57 2019 New Revision: 369829 URL: http://llvm.org/viewvc/llvm-project?rev=369829=rev Log: PR40674: fix assertion failure if a structured binding declaration has a tuple-like decomposition that produces value-dependent reference bindings. Modified:

r369830 - NFC: Rename some sanitizer related lifetime checks

2019-08-23 Thread Vitaly Buka via cfe-commits
Author: vitalybuka Date: Fri Aug 23 18:31:38 2019 New Revision: 369830 URL: http://llvm.org/viewvc/llvm-project?rev=369830=rev Log: NFC: Rename some sanitizer related lifetime checks Added: cfe/trunk/test/CodeGen/lifetime-sanitizer.c cfe/trunk/test/CodeGenCXX/lifetime-sanitizer.cpp

[PATCH] D66695: msan, codegen, instcombine: Keep more lifetime markers used for msan

2019-08-23 Thread Vitaly Buka via Phabricator via cfe-commits
vitalybuka updated this revision to Diff 216991. vitalybuka added a comment. return hwasan Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66695/new/ https://reviews.llvm.org/D66695 Files: clang/lib/CodeGen/CGExpr.cpp

[PATCH] D66695: msan, codegen, instcombine: Keep more lifetime markers used for msan

2019-08-23 Thread Vitaly Buka via Phabricator via cfe-commits
vitalybuka updated this revision to Diff 216992. vitalybuka added a comment. fix compilation error Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66695/new/ https://reviews.llvm.org/D66695 Files: clang/lib/CodeGen/CGExpr.cpp

r369832 - Re-enable DependencyScannerTest on windows with the right fixes

2019-08-23 Thread Alex Lorenz via cfe-commits
Author: arphaman Date: Fri Aug 23 18:53:40 2019 New Revision: 369832 URL: http://llvm.org/viewvc/llvm-project?rev=369832=rev Log: Re-enable DependencyScannerTest on windows with the right fixes It should now pass. Modified: cfe/trunk/unittests/Tooling/DependencyScannerTest.cpp Modified:

[PATCH] D66695: msan, codegen, instcombine: Keep more lifetime markers used for msan

2019-08-23 Thread Vitaly Buka via Phabricator via cfe-commits
vitalybuka created this revision. vitalybuka added a reviewer: eugenis. Herald added subscribers: llvm-commits, Sanitizers, cfe-commits, hiraditya. Herald added projects: clang, Sanitizers, LLVM. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D66695 Files:

[PATCH] D66696: [ObjC generics] Fix not inheriting type bounds in categories/extensions.

2019-08-23 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai created this revision. vsapsai added reviewers: erik.pilkington, ahatanak. Herald added subscribers: ributzka, dexonsmith, jkorous. When a category/extension doesn't repeat a type bound, corresponding type parameter is substituted with `id` when used as a type argument. As a result, in

[PATCH] D66695: msan, codegen, instcombine: Keep more lifetime markers used for msan

2019-08-23 Thread Vitaly Buka via Phabricator via cfe-commits
vitalybuka updated this revision to Diff 216994. vitalybuka added a comment. update comment Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66695/new/ https://reviews.llvm.org/D66695 Files: clang/lib/CodeGen/CGExpr.cpp

[PATCH] D66697: hwasan, codegen: Keep more lifetime markers used for hwasan

2019-08-23 Thread Vitaly Buka via Phabricator via cfe-commits
vitalybuka created this revision. vitalybuka added a reviewer: eugenis. Herald added a project: clang. Herald added a subscriber: cfe-commits. vitalybuka added a parent revision: D66695: msan, codegen, instcombine: Keep more lifetime markers used for msan. Repository: rG LLVM Github Monorepo

r369834 - PR42513: Enter the proper DeclContext before substituting into an

2019-08-23 Thread Richard Smith via cfe-commits
Author: rsmith Date: Fri Aug 23 19:30:00 2019 New Revision: 369834 URL: http://llvm.org/viewvc/llvm-project?rev=369834=rev Log: PR42513: Enter the proper DeclContext before substituting into an default template argument expression. We already did this for type template parameters and template

[PATCH] D65907: Introduce FileEntryRef and use it when handling includes to report correct dependencies when the FileManager is reused across invocations

2019-08-23 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. In D65907#1643364 , @JamesNagurne wrote: > @arphaman you disabled this test on Windows, but did not specify exactly how > it fails. > My team works on an embedded ARM compiler (most similar to arm-none-eabi), > and we're now

[PATCH] D66681: [clang-doc] Bump BitcodeWriter max line number to 32U

2019-08-23 Thread Petr Hosek via Phabricator via cfe-commits
phosek accepted this revision. phosek added a comment. This revision is now accepted and ready to land. LGTM (small nit, people usually use PRXXX rather than bXXX to refer to issues) CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66681/new/ https://reviews.llvm.org/D66681

[clang-tools-extra] r369811 - [clang-doc] Bump BitcodeWriter max line number to 32U

2019-08-23 Thread Julie Hockett via cfe-commits
Author: juliehockett Date: Fri Aug 23 14:14:05 2019 New Revision: 369811 URL: http://llvm.org/viewvc/llvm-project?rev=369811=rev Log: [clang-doc] Bump BitcodeWriter max line number to 32U PR43039 reports hitting the assert on a very large file, so bumping this to allow for larger files.

[PATCH] D66686: [LifetimeAnalysis] Make it possible to disable the new warnings

2019-08-23 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun created this revision. xazax.hun added reviewers: rsmith, mgehre. xazax.hun added a project: clang. Herald added subscribers: llvm-commits, Szelethus, Charusso, gamesh411, jfb, dkrupp, rnkovacs, hiraditya, javed.absar. Herald added a project: LLVM. This patch introduces quite a bit of

Re: r369591 - [LifetimeAnalysis] Support more STL idioms (template forward declaration and DependentNameType)

2019-08-23 Thread Gábor Horváth via cfe-commits
Hi Richard, Sorry for the slow response, unfortunately the compile times are not great on the machine I have access to at the moment. Here is a patch, I'll commit it if you agree with the approach: https://reviews.llvm.org/D66686 Basically, the idea is to not run the new warning related code at

[PATCH] D66686: [LifetimeAnalysis] Make it possible to disable the new warnings

2019-08-23 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun updated this revision to Diff 216964. xazax.hun added a comment. - Added a test. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66686/new/ https://reviews.llvm.org/D66686 Files: clang/include/clang/Basic/DiagnosticGroups.td clang/include/clang/Basic/DiagnosticSemaKinds.td

[PATCH] D66686: [LifetimeAnalysis] Make it possible to disable the new warnings

2019-08-23 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun updated this revision to Diff 216962. xazax.hun added a comment. - Add the actual diff. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66686/new/ https://reviews.llvm.org/D66686 Files: clang/include/clang/Basic/DiagnosticGroups.td

[PATCH] D66364: Diagnose use of _Thread_local as an extension when appropriate

2019-08-23 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. In D66364#1638026 , @aaron.ballman wrote: > @rsmith are you fine with implementing the diagnostic for these keywords > piecemeal based on the pattern

Re: r369591 - [LifetimeAnalysis] Support more STL idioms (template forward declaration and DependentNameType)

2019-08-23 Thread Richard Smith via cfe-commits
Thank you for the fast turnaround here! On Fri, 23 Aug 2019 at 15:26, Gábor Horváth via cfe-commits < cfe-commits@lists.llvm.org> wrote: > I committed this in r369817 to keep things moving. If you have any > suggestion, complaints let me know and I will do my best to solve it > post-commit ASAP.

[PATCH] D66686: [LifetimeAnalysis] Make it possible to disable the new warnings

2019-08-23 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun abandoned this revision. xazax.hun added a comment. Committed in https://reviews.llvm.org/rG6379e5c8a441 due to it was urgent for some users. Will address any comments post-commit. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66686/new/ https://reviews.llvm.org/D66686

[PATCH] D66662: [clang-format] [PR43100] clang-format C# support does not add a space between "using" and paren

2019-08-23 Thread Owen Pan via Phabricator via cfe-commits
owenpan added inline comments. Comment at: clang/lib/Format/TokenAnnotator.cpp:2618 +// using (FileStream fs... +if (Style.isCSharp() && Left.is(tok::kw_using) && Right.is(tok::l_paren)) + return true; `if (Style.isCSharp() &&

Re: r369591 - [LifetimeAnalysis] Support more STL idioms (template forward declaration and DependentNameType)

2019-08-23 Thread Nico Weber via cfe-commits
On Thu, Aug 22, 2019 at 4:05 PM Matthias Gehre via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Hi Diana, > hi Richard, > > thank you for the feedback! > > Diana, > I remember that some gcc version had issues with raw string literals > inside macros. I'll fix that to use normal > string

[PATCH] D66572: [analyzer] BugReporter Separation Ep.I.

2019-08-23 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ marked an inline comment as done. NoQ added inline comments. Comment at: clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h:223 + using visitor_iterator = VisitorList::iterator; + using visitor_range = llvm::iterator_range; + Szelethus

Re: [clang-tools-extra] r369763 - [clang-tidy] Possibility of displaying duplicate warnings

2019-08-23 Thread Galina Kistanova via cfe-commits
Hello Kristof, This commit broke test to few builders: http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast/builds/53703 http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast . . . Failing Tests (1): Clang Tools ::

[PATCH] D66681: [clang-doc] Bump BitcodeWriter max line number to 32U

2019-08-23 Thread Julie Hockett via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL369811: [clang-doc] Bump BitcodeWriter max line number to 32U (authored by juliehockett, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit:

r369817 - [LifetimeAnalysis] Make it possible to disable the new warnings

2019-08-23 Thread Gabor Horvath via cfe-commits
Author: xazax Date: Fri Aug 23 15:21:33 2019 New Revision: 369817 URL: http://llvm.org/viewvc/llvm-project?rev=369817=rev Log: [LifetimeAnalysis] Make it possible to disable the new warnings Added: cfe/trunk/test/Sema/warn-lifetime-analysis-nocfg-disabled.cpp Modified:

r369820 - Fix a test to test what the name suggest.

2019-08-23 Thread Gabor Horvath via cfe-commits
Author: xazax Date: Fri Aug 23 15:26:49 2019 New Revision: 369820 URL: http://llvm.org/viewvc/llvm-project?rev=369820=rev Log: Fix a test to test what the name suggest. Modified: cfe/trunk/test/Sema/warn-lifetime-analysis-nocfg-disabled.cpp Modified:

Re: r369591 - [LifetimeAnalysis] Support more STL idioms (template forward declaration and DependentNameType)

2019-08-23 Thread Gábor Horváth via cfe-commits
I committed this in r369817 to keep things moving. If you have any suggestion, complaints let me know and I will do my best to solve it post-commit ASAP. On Fri, 23 Aug 2019 at 14:51, Gábor Horváth wrote: > Hi Richard, > > Sorry for the slow response, unfortunately the compile times are not

r369822 - [libclang][index][NFC] Fix test for skipping already parsed function bodies

2019-08-23 Thread Jan Korous via cfe-commits
Author: jkorous Date: Fri Aug 23 15:51:23 2019 New Revision: 369822 URL: http://llvm.org/viewvc/llvm-project?rev=369822=rev Log: [libclang][index][NFC] Fix test for skipping already parsed function bodies Modified: cfe/trunk/test/Index/skip-parsed-bodies/compile_commands.json Modified:

[PATCH] D65907: Introduce FileEntryRef and use it when handling includes to report correct dependencies when the FileManager is reused across invocations

2019-08-23 Thread James Nagurne via Phabricator via cfe-commits
JamesNagurne added a comment. In D65907#1643650 , @arphaman wrote: > No the windows test failure was different, there were no Deps at all. I'm > currently investigating it on a windows VM. > > @JamesNagurne I think there's some issue with the working

[PATCH] D66699: [PowerPC][Altivec] Fix constant argument for vec_dss

2019-08-23 Thread Jinsong Ji via Phabricator via cfe-commits
jsji created this revision. jsji added reviewers: nemanjai, hfinkel. Herald added subscribers: cfe-commits, shchenz, MaskRay, kbarton. Herald added a project: clang. jsji added a reviewer: PowerPC. Herald added a subscriber: wuzish. This is similar to vec_ct* in https://reviews.llvm.org/rL304205.

[PATCH] D66662: [clang-format] [PR43100] clang-format C# support does not add a space between "using" and paren

2019-08-23 Thread Owen Pan via Phabricator via cfe-commits
owenpan added inline comments. Comment at: clang/unittests/Format/FormatTestCSharp.cpp:169 +TEST_F(FormatTestCSharp, CSharpUsing) { + verifyFormat("using (StreamWriter sw = new StreamWriter(filename) { }"); +} owenpan wrote: > Maybe set `SpaceBeforeParens` to

[PATCH] D44609: [Clang-Format] New option BeforeLambdaBody to manage lambda line break inside function parameter call (in Allman style)

2019-08-23 Thread Christian Venegas via Phabricator via cfe-commits
cvenegas added a comment. I'm testing this patch on our codebase and it is working pretty well. We use the Allman style and the lambda problem has been an issue for many years. One thing to note in this patch is that some of the files have CRLF line endings but should be LF endings, which is

[PATCH] D66621: [clang] Devirtualization for classes with destructors marked as 'final'

2019-08-23 Thread Logan Smith via Phabricator via cfe-commits
logan-5 updated this revision to Diff 217009. logan-5 added a comment. Add a missing null check. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66621/new/ https://reviews.llvm.org/D66621 Files: clang/lib/AST/DeclCXX.cpp

[PATCH] D66186: [Sema] Don't warn on printf('%hd', [char]) (PR41467)

2019-08-23 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. Looks about right Comment at: clang/lib/Sema/SemaChecking.cpp:8105-8106 +if (ImplicitMatch == analyze_printf::ArgType::Match) return true; +else if (ImplicitMatch == analyze_printf::ArgType::NoMatchPedantic) +

[PATCH] D63325: [Support][Time profiler] Make FE codegen blocks to be inside frontend blocks

2019-08-23 Thread Anton Afanasyev via Phabricator via cfe-commits
anton-afanasyev added a comment. Hi @nathanchance , I could not reproduce your failure using the same revision and `build-llvm` script. Could you please attach your json report located at

Re: r369641 - [OpenCL] Fix declaration of enqueue_marker

2019-08-23 Thread Hans Wennborg via cfe-commits
Sure. Merged to release_90 in r369738. On Thu, Aug 22, 2019 at 5:39 PM Anastasia Stulova wrote: > > Hi Hans, > > > Can this still be merged into the release branch please. > > > Thanks in advance, > > Anastasia > > > > > From: cfe-commits on behalf of Yaxun Liu

[PATCH] D66593: [analyzer] CastValueChecker: Fix some assertions

2019-08-23 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added a comment. In D66593#1642253 , @Charusso wrote: > Wow, it is great you could address every of the edge cases. Thanks you so > much! I believe only one problem left: we need to `return false` instead of > plain `return` in order to let the

[PATCH] D66538: [AST] AST structural equivalence to work internally with pairs.

2019-08-23 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. In D66538#1641310 , @martong wrote: > > It looks like that the original code is correct in the decision of > > structural equivalence of the original pair. If we have an (A,B) and (A,C) > > to compare, B and C are in different

[PATCH] D66631: [clang-tidy] Don't emit google-runtime-references warning for functions defined in macros.

2019-08-23 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added reviewers: gribozavr, alexfh. Herald added a subscriber: xazax.hun. Herald added a project: clang. The macro are usually defined in the common/base headers which are hard for normal users to modify it. Repository: rG LLVM Github Monorepo

[PATCH] D66631: [clang-tidy] Don't emit google-runtime-references warning for functions defined in macros.

2019-08-23 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr accepted this revision. gribozavr added a comment. This revision is now accepted and ready to land. LGTM, although I'd be more comfortable with a whitelist of macros. Comment at: clang-tools-extra/test/clang-tidy/google-runtime-references.cpp:156 +DEFINE_F(func) {} \

[PATCH] D66632: [clangd] Link more clang-tidy modules to clangd

2019-08-23 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: sammccall. Herald added subscribers: kadircet, arphaman, jkorous, MaskRay, ilya-biryukov, mgorny, srhines. Herald added a reviewer: jdoerfert. Herald added a project: clang. There are two new clang-tidy modules being added recently.

[PATCH] D66631: [clang-tidy] Don't emit google-runtime-references warning for functions defined in macros.

2019-08-23 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 216777. hokein marked an inline comment as done. hokein added a comment. Add the missing back newline. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66631/new/ https://reviews.llvm.org/D66631 Files:

[clang-tools-extra] r369739 - [clang-tidy] Don't emit google-runtime-references warning for functions defined in macros.

2019-08-23 Thread Haojian Wu via cfe-commits
Author: hokein Date: Fri Aug 23 01:47:27 2019 New Revision: 369739 URL: http://llvm.org/viewvc/llvm-project?rev=369739=rev Log: [clang-tidy] Don't emit google-runtime-references warning for functions defined in macros. Summary: The macro are usually defined in the common/base headers which are

[PATCH] D66631: [clang-tidy] Don't emit google-runtime-references warning for functions defined in macros.

2019-08-23 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL369739: [clang-tidy] Dont emit google-runtime-references warning for functions defined… (authored by hokein, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits.

[PATCH] D66538: [AST] AST structural equivalence to work internally with pairs.

2019-08-23 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. The link for the diff went off, sorry about that. Here is the new link which is going to work: https://github.com/martong/clang/compare/NonEqDecls_cache_in_an_upper_level_0...martong:NonEqDecls_cache_in_an_upper_level?expand=1 Repository: rG LLVM Github Monorepo

[PATCH] D36562: [Bitfield] Make the bitfield a separate location if it has width of legal integer type and its bit offset is naturally aligned for the type

2019-08-23 Thread Momchil Velikov via Phabricator via cfe-commits
chill added a comment. In D36562#1641930 , @wmi wrote: > In D36562#1639441 , @chill wrote: > > > Shouldn't we disable `OPT_ffine_grained_bitfield_accesses` only if TSAN is > > active? > > > I don't remember why it

[clang-tools-extra] r369741 - [clangd] Link more clang-tidy modules to clangd

2019-08-23 Thread Haojian Wu via cfe-commits
Author: hokein Date: Fri Aug 23 02:13:23 2019 New Revision: 369741 URL: http://llvm.org/viewvc/llvm-project?rev=369741=rev Log: [clangd] Link more clang-tidy modules to clangd Summary: There are two new clang-tidy modules being added recently. Reviewers: sammccall, jdoerfert Subscribers:

[PATCH] D66632: [clangd] Link more clang-tidy modules to clangd

2019-08-23 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL369741: [clangd] Link more clang-tidy modules to clangd (authored by hokein, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D66505: Make add_new_check.py's insertion of registerCheck<> more closely match the sort order

2019-08-23 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. In D66505#1641776 , @aaron.ballman wrote: > Given that the alphabetization we want really is based on the string literal, > would it make sense to look for that rather than the check name? Adding a few > more reviewers for a

[PATCH] D66538: [AST] AST structural equivalence to work internally with pairs.

2019-08-23 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. The structural equivalency check works (with this patch) the following way: To check a `(A1,A2)` pair we collect further `(X1,X2)` pairs that should be checked and put these in `DeclsToCheck` (if not already there). The check succeeds if every pair is equivalent. The

[PATCH] D66637: [clangd] Support multifile edits as output of Tweaks

2019-08-23 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: sammccall. Herald added subscribers: cfe-commits, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. First patch for propogating multifile changes from tweak outputs to LSP WorkspaceEdits. Uses FS to convert

[PATCH] D66588: [ARM NEON] Avoid duplicated decarations

2019-08-23 Thread Diogo N. Sampaio via Phabricator via cfe-commits
dnsampaio updated this revision to Diff 216801. dnsampaio added a comment. - Consider BigEndianSafe intrinsics that all inputs and outputs are scalar or single element vectors Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66588/new/

[PATCH] D59692: [ASTImporter] Fix name conflict handling

2019-08-23 Thread Gabor Marton via Phabricator via cfe-commits
martong marked an inline comment as done. martong added a comment. @shafik Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59692/new/ https://reviews.llvm.org/D59692 ___ cfe-commits mailing list

[PATCH] D65526: [Clangd] Initial prototype version of ExtractFunction

2019-08-23 Thread Shaurya Gupta via Phabricator via cfe-commits
SureYeaah updated this revision to Diff 216805. SureYeaah marked 4 inline comments as done. SureYeaah added a comment. Addressed more review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65526/new/ https://reviews.llvm.org/D65526 Files:

r369749 - [Docs][OpenCL] Several corrections to C++ for OpenCL

2019-08-23 Thread Anastasia Stulova via cfe-commits
Author: stulova Date: Fri Aug 23 04:43:49 2019 New Revision: 369749 URL: http://llvm.org/viewvc/llvm-project?rev=369749=rev Log: [Docs][OpenCL] Several corrections to C++ for OpenCL Differential Revision:https://reviews.llvm.org/D64418 Modified: cfe/trunk/docs/LanguageExtensions.rst

[PATCH] D64418: [Docs][OpenCL] Documentation of C++ for OpenCL mode

2019-08-23 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL369749: [Docs][OpenCL] Several corrections to C++ for OpenCL (authored by stulova, committed by ). Changed prior to commit: https://reviews.llvm.org/D64418?vs=215922=216808#toc Repository: rL LLVM

[PATCH] D66538: [AST] AST structural equivalence to work internally with pairs.

2019-08-23 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. Ok. I like this patch because it eliminates the need for checking the redeclaration chains. Seems like it handles cycles and the simple `f(A,B)` vs `f(A,A)` cases properly too. (Not talking about caching now, probably we must remove the `NonEquivalentDecls` cache.)

[PATCH] D66186: [Sema] Don't warn on printf('%hd', [char]) (PR41467)

2019-08-23 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. LGTM aside from the else after return nit. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66186/new/ https://reviews.llvm.org/D66186

[PATCH] D62571: Implement codegen for MSVC unions with reference members

2019-08-23 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D62571#1642096 , @domdom wrote: > Thanks @aaron.ballman! > > I will need someone to commit this for me :) I'm happy to commit for you, but I get merge conflicts when trying to apply your patch. Can you rebase on trunk?

[PATCH] D66637: [clangd] Support multifile edits as output of Tweaks

2019-08-23 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clang-tools-extra/clangd/ClangdLSPServer.cpp:644 + assert(It.second.Edits && "TextEdits hasn't been generated?"); + if (auto Draft = DraftMgr.getDraft(It.first())) { +llvm::StringRef Contents =

[PATCH] D65433: [clangd] DefineInline action availability checks

2019-08-23 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 216815. kadircet added a comment. - Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65433/new/ https://reviews.llvm.org/D65433 Files: clang-tools-extra/clangd/refactor/tweaks/CMakeLists.txt

[PATCH] D66186: [Sema] Don't warn on printf('%hd', [char]) (PR41467)

2019-08-23 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri accepted this revision. lebedev.ri added a comment. This revision is now accepted and ready to land. In D66186#1642607 , @aaron.ballman wrote: > LGTM aside from the else after return nit. Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D66637: [clangd] Support multifile edits as output of Tweaks

2019-08-23 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clang-tools-extra/clangd/ClangdLSPServer.cpp:644 + assert(It.second.Edits && "TextEdits hasn't been generated?"); + if (auto Draft = DraftMgr.getDraft(It.first())) { +llvm::StringRef Contents = *Draft;

[PATCH] D66637: [clangd] Support multifile edits as output of Tweaks

2019-08-23 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet marked an inline comment as done. kadircet added inline comments. Comment at: clang-tools-extra/clangd/ClangdLSPServer.cpp:644 + assert(It.second.Edits && "TextEdits hasn't been generated?"); + if (auto Draft = DraftMgr.getDraft(It.first())) { +

[PATCH] D66647: [clangd] DefineInline action apply logic with fully qualified names

2019-08-23 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added reviewers: sammccall, ilya-biryukov. Herald added subscribers: cfe-commits, arphaman, jkorous, MaskRay. Herald added a project: clang. kadircet added a parent revision: D65433: [clangd] DefineInline action availability checks. Initial version of

[PATCH] D66637: [clangd] Support multifile edits as output of Tweaks

2019-08-23 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clang-tools-extra/clangd/SourceCode.h:41 +/// Represents a set of edits generated for a single file. +struct Edit { + /// SHA1 hash of the file contents for the edits generated below. Clients Hmm, it is also

[PATCH] D66637: [clangd] Support multifile edits as output of Tweaks

2019-08-23 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov marked an inline comment as done. ilya-biryukov added inline comments. Comment at: clang-tools-extra/clangd/ClangdLSPServer.cpp:644 + assert(It.second.Edits && "TextEdits hasn't been generated?"); + if (auto Draft = DraftMgr.getDraft(It.first()))

[PATCH] D66646: Ensure that statements, expressions and types are trivially destructible with a static_assert

2019-08-23 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno created this revision. riccibruno added reviewers: aaron.ballman, lebedev.ri. riccibruno added a project: clang. Herald added a subscriber: cfe-commits. Since statements, expressions and types are allocated with the `BumpPtrAllocator` from `ASTContext` their destructor is not

[PATCH] D66590: [clangd] Fix toHalfOpenFileRange where start/end endpoints are in different files due to #include

2019-08-23 Thread Shaurya Gupta via Phabricator via cfe-commits
SureYeaah accepted this revision. SureYeaah added a comment. This revision is now accepted and ready to land. LGTM Comment at: clang-tools-extra/clangd/SourceCode.cpp:284 + return SM.getComposedLoc(IncludingFile, Offset); +if (Buf[Offset] == '\n' || Offset == 0) // no

[PATCH] D66219: [clangd] Added a colorizer to the vscode extension.

2019-08-23 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. thanks, looks better now. Some more comments on the test code. Comment at: clang-tools-extra/clangd/clients/clangd-vscode/src/extension.ts:3 import * as vscodelc from 'vscode-languageclient'; - +import * as SM from './semantic-highlighting'; /**

[PATCH] D66646: Ensure that statements, expressions and types are trivially destructible with a static_assert

2019-08-23 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. SGTM, but i wonder if this should be done one level up, in `BumpPtrAllocator` itself? Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66646/new/ https://reviews.llvm.org/D66646 ___

[PATCH] D66646: Ensure that statements, expressions and types are trivially destructible with a static_assert

2019-08-23 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno added a comment. In D66646#1642708 , @lebedev.ri wrote: > SGTM, but i wonder if this should be done one level up, in `BumpPtrAllocator` > itself? I don't understand. `BumpPtrAllocator` is only used to allocate raw memory and doesn't know

[PATCH] D65526: [Clangd] First version of ExtractFunction

2019-08-23 Thread Shaurya Gupta via Phabricator via cfe-commits
SureYeaah added inline comments. Comment at: clang-tools-extra/clangd/refactor/tweaks/ExtractFunction.cpp:214 +bool IsConst; +Parameter(std::string Name, std::string Type, bool IsConst) +: Name(Name), Type(Type), IsConst(IsConst) {} sammccall

[PATCH] D65526: [Clangd] First version of ExtractFunction

2019-08-23 Thread Shaurya Gupta via Phabricator via cfe-commits
SureYeaah marked an inline comment as done. SureYeaah added inline comments. Comment at: clang-tools-extra/clangd/refactor/tweaks/ExtractFunction.cpp:360 + +CapturedSourceInfo::DeclInformation & +CapturedSourceInfo::getDeclInformationFor(const Decl *D) {

  1   2   >