[PATCH] D53295: Mark store and load of block invoke function as invariant.group

2019-06-14 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek added inline comments. Comment at: lib/CodeGen/CGBlocks.cpp:1318 +CGM.getModule().getMDKindID("invariant.load"), +llvm::MDNode::get(getLLVMContext(), None)); + rjmccall wrote: > yaxunl wrote: > > rjmccall wrote: > > > OpenCL blocks are stil

[PATCH] D47299: [CodeGenCXX] Emit strip.invariant.group with -fstrict-vtable-pointers

2018-07-02 Thread Piotr Padlewski 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 rC336137: [CodeGenCXX] Emit strip.invariant.group with -fstrict-vtable-pointers (authored by Prazek, committed by ). Change

[PATCH] D47299: [CodeGenCXX] Emit strip.invariant.group with -fstrict-vtable-pointers

2018-07-01 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek marked 10 inline comments as done. Prazek added inline comments. Comment at: clang/lib/CodeGen/CGExprScalar.cpp:1647 + } +} + rsmith wrote: > Prazek wrote: > > rjmccall wrote: > > > Prazek wrote: > > > > rjmccall wrote: > > > > > Incidentally, how

[PATCH] D47103: Implement strip.invariant.group

2018-07-01 Thread Piotr Padlewski via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Prazek marked an inline comment as done. Closed by commit rL336073: Implement strip.invariant.group (authored by Prazek, committed by ). Changed prior to commit: https://reviews.llvm.org/D47103?vs=148313&id=153664#toc Re

[PATCH] D47299: [CodeGenCXX] Emit strip.invariant.group with -fstrict-vtable-pointers

2018-06-16 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek added inline comments. Comment at: clang/lib/CodeGen/CGExprScalar.cpp:1647 + } +} + rjmccall wrote: > Prazek wrote: > > rjmccall wrote: > > > Incidentally, how do you protect against code like this? > > > > > > A *ptr; > > > reinterpret_cast(

[PATCH] D47299: [CodeGenCXX] Emit strip.invariant.group with -fstrict-vtable-pointers

2018-06-15 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek marked an inline comment as done. Prazek added inline comments. Comment at: clang/lib/CodeGen/CGExprScalar.cpp:1624 + E->getType().getTypePtr()->getPointeeCXXRecordDecl(); + const CXXRecordDecl *DstClassDecl = DestTy->getPointeeCXXRecordDecl(); +

[PATCH] D47299: [CodeGenCXX] Emit strip.invariant.group with -fstrict-vtable-pointers

2018-06-15 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek added inline comments. Comment at: clang/lib/CodeGen/CGExprScalar.cpp:1633 + bool DstMayNotBeDynamic = + !DstClassDecl || DstClassDecl->mayBeNotDynamicClass(); + if (SourceMayBeNotDynamic && DstMayBeDynamic) { rjmccall wrote: > If you ma

[PATCH] D47299: [CodeGenCXX] Emit strip.invariant.group with -fstrict-vtable-pointers

2018-06-15 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek updated this revision to Diff 151575. Prazek added a comment. Refactor Repository: rL LLVM https://reviews.llvm.org/D47299 Files: clang/include/clang/AST/DeclCXX.h clang/include/clang/AST/Type.h clang/lib/AST/Type.cpp clang/lib/CodeGen/CGExpr.cpp clang/lib/CodeGen/CGExprScal

[PATCH] D47299: [CodeGenCXX] Emit strip.invariant.group with -fstrict-vtable-pointers

2018-06-15 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek marked 5 inline comments as done. Prazek added inline comments. Comment at: clang/lib/CodeGen/CGExprScalar.cpp:1623 + const CXXRecordDecl *SourceClassDecl = + E->getType().getTypePtr()->getPointeeCXXRecordDecl(); + const CXXRecordDecl *DstClassDecl = Des

[PATCH] D47108: [CodeGenCXX] Add -fforce-emit-vtables

2018-06-13 Thread Piotr Padlewski via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Prazek marked an inline comment as done. Closed by commit rC334600: Add -fforce-emit-vtables (authored by Prazek, committed by ). Changed prior to commit: https://reviews.llvm.org/D47108?vs=150735&id=151154#toc Repositor

[PATCH] D47103: Implement strip.invariant.group

2018-06-13 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek added a comment. Friendly ping @hfinkel @rsmith Repository: rL LLVM https://reviews.llvm.org/D47103 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D47108: [CodeGenCXX] Add -fforce-emit-vtables

2018-06-11 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek updated this revision to Diff 150735. Prazek added a comment. - Fixed templates Repository: rL LLVM https://reviews.llvm.org/D47108 Files: clang/docs/ClangCommandLineReference.rst clang/docs/ReleaseNotes.rst clang/docs/UsersManual.rst clang/include/clang/Basic/LangOptions.def

[PATCH] D47299: [CodeGenCXX] Emit strip.invariant.group with -fstrict-vtable-pointers

2018-06-02 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek added a comment. @rjmccall @rsmith friendly ping Repository: rL LLVM https://reviews.llvm.org/D47299 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D47103: Implement strip.invariant.group

2018-06-02 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek added a comment. friendly ping Repository: rL LLVM https://reviews.llvm.org/D47103 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D47108: [CodeGenCXX] Add -fforce-emit-vtables

2018-05-28 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek updated this revision to Diff 148839. Prazek marked an inline comment as done. Prazek added a comment. fixed test Repository: rL LLVM https://reviews.llvm.org/D47108 Files: clang/docs/ClangCommandLineReference.rst clang/docs/ReleaseNotes.rst clang/docs/UsersManual.rst clang/in

[PATCH] D47108: [CodeGenCXX] Add -fforce-emit-vtables

2018-05-27 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek updated this revision to Diff 148764. Prazek added a comment. small update Repository: rL LLVM https://reviews.llvm.org/D47108 Files: clang/docs/ClangCommandLineReference.rst clang/docs/ReleaseNotes.rst clang/docs/UsersManual.rst clang/include/clang/Basic/LangOptions.def cla

[PATCH] D47108: [CodeGenCXX] Add -fforce-emit-vtables

2018-05-27 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek updated this revision to Diff 148762. Prazek added a comment. Fixed missing vtable commponents Repository: rL LLVM https://reviews.llvm.org/D47108 Files: clang/docs/ClangCommandLineReference.rst clang/docs/ReleaseNotes.rst clang/docs/UsersManual.rst clang/include/clang/Basic/L

[PATCH] D47299: [CodeGenCXX] Emit strip.invariant.group with -fstrict-vtable-pointers

2018-05-27 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek updated this revision to Diff 148746. Prazek marked 3 inline comments as done. Prazek added a comment. one more test Repository: rL LLVM https://reviews.llvm.org/D47299 Files: clang/include/clang/AST/DeclCXX.h clang/lib/CodeGen/CGExpr.cpp clang/lib/CodeGen/CGExprScalar.cpp cla

[PATCH] D47299: [CodeGenCXX] Emit strip.invariant.group with -fstrict-vtable-pointers

2018-05-27 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek updated this revision to Diff 148745. Prazek added a comment. Herald added a subscriber: hiraditya. Added launder when going from possiblyNotDynamic to possiblyDynamic emitting strip for pointer -> int only if poitner is possiblyDynamic Repository: rL LLVM https://reviews.llvm.org/

[PATCH] D47299: [CodeGenCXX] Emit strip.invariant.group with -fstrict-vtable-pointers

2018-05-25 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek added inline comments. Comment at: clang/lib/CodeGen/CGExprScalar.cpp:1626-1627 + + // Casting to pointer that does not carry dynamic information (provided by + // invariant.group) requires stripping it. + Src = Builder.CreateStripInvariantGroup(Src); -

[PATCH] D47103: Implement strip.invariant.group

2018-05-23 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek updated this revision to Diff 148313. Prazek marked 2 inline comments as done. Prazek added a comment. Slitted commit into defining and using intrinsic Repository: rL LLVM https://reviews.llvm.org/D47103 Files: llvm/docs/LangRef.rst llvm/include/llvm/IR/IRBuilder.h llvm/include/

[PATCH] D47103: Implement strip.invariant.group

2018-05-23 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek added inline comments. Comment at: clang/lib/CodeGen/CGExpr.cpp:3858 +} + } + rjmccall wrote: > Please add a comment explaining why this is necessary. (I'm actually not > sure why it is, because surely the invariant groups we generate don't contain

[PATCH] D47299: [CodeGenCXX] Emit strip.invariant.group with -fstrict-vtable-pointers

2018-05-23 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek created this revision. Prazek added reviewers: rjmccall, rsmith, amharc, kuhar. Herald added a subscriber: llvm-commits. Emmiting new intrinsic that strips invariant.groups to make devirtulization sound, as described in RFC: Devirtualization v2. Repository: rL LLVM https://reviews.llv

[PATCH] D47108: [CodeGenCXX] Add -fforce-emit-vtables

2018-05-23 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek added a comment. In https://reviews.llvm.org/D47108#1109014, @rjmccall wrote: > I thought we already had places in Sema that marked inline virtual methods as > used, instantiated templates, etc. for devirtualization purposes when > optimization was enabled. Did we rip that out? I only

[PATCH] D47108: [CodeGenCXX] Add -fforce-emit-vtables

2018-05-22 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek added a comment. @rjmccall do you have any thoughts on the best way to solve it? Repository: rL LLVM https://reviews.llvm.org/D47108 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe

[PATCH] D47103: Implement strip.invariant.group

2018-05-19 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek updated this revision to Diff 147691. Prazek added a comment. rebase Repository: rL LLVM https://reviews.llvm.org/D47103 Files: clang/include/clang/AST/DeclCXX.h clang/lib/CodeGen/CGExpr.cpp clang/lib/CodeGen/CGExprScalar.cpp clang/test/CodeGenCXX/strict-vtable-pointers.cpp

[PATCH] D47103: Implement strip.invariant.group

2018-05-19 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek updated this revision to Diff 147688. Prazek added a comment. After rebasing Repository: rL LLVM https://reviews.llvm.org/D47103 Files: clang/include/clang/AST/DeclCXX.h clang/lib/CodeGen/CGExpr.cpp clang/lib/CodeGen/CGExprScalar.cpp clang/test/CodeGenCXX/strict-vtable-pointer

[PATCH] D47103: Implement strip.invariant.group

2018-05-19 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek updated this revision to Diff 147684. Prazek added a comment. Changed comments Repository: rL LLVM https://reviews.llvm.org/D47103 Files: clang/include/clang/AST/DeclCXX.h clang/lib/CodeGen/CGExpr.cpp clang/lib/CodeGen/CGExprScalar.cpp clang/test/CodeGenCXX/strict-vtable-point

[PATCH] D47103: Implement strip.invariant.group

2018-05-19 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek updated this revision to Diff 147683. Prazek added a comment. introduced mayBeDynamicClass and added more tests Repository: rL LLVM https://reviews.llvm.org/D47103 Files: clang/include/clang/AST/DeclCXX.h clang/lib/CodeGen/CGExpr.cpp clang/lib/CodeGen/CGExprScalar.cpp clang/te

[PATCH] D47108: Add -fforce-emit-vtable

2018-05-19 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek updated this revision to Diff 147679. Prazek added a comment. Fixed flag passing Repository: rL LLVM https://reviews.llvm.org/D47108 Files: clang/docs/ClangCommandLineReference.rst clang/docs/ReleaseNotes.rst clang/docs/UsersManual.rst clang/include/clang/Driver/Options.td c

[PATCH] D47108: Add -fforce-emit-vtable

2018-05-19 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek updated this revision to Diff 147675. Prazek added a comment. Fixed comment Repository: rL LLVM https://reviews.llvm.org/D47108 Files: clang/docs/ClangCommandLineReference.rst clang/docs/ReleaseNotes.rst clang/docs/UsersManual.rst clang/include/clang/Driver/Options.td clang/

[PATCH] D47108: Add -fforce-emit-vtable

2018-05-19 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek updated this revision to Diff 147673. Prazek added a comment. remove empty line Repository: rL LLVM https://reviews.llvm.org/D47108 Files: clang/docs/ClangCommandLineReference.rst clang/docs/ReleaseNotes.rst clang/docs/UsersManual.rst clang/include/clang/Driver/Options.td cl

[PATCH] D47108: Add -fforce-emit-vtable

2018-05-19 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek updated this revision to Diff 147672. Prazek added a comment. Add release note Repository: rL LLVM https://reviews.llvm.org/D47108 Files: clang/docs/ClangCommandLineReference.rst clang/docs/ReleaseNotes.rst clang/docs/UsersManual.rst clang/include/clang/Driver/Options.td cla

[PATCH] D47108: Add -fforce-emit-vtable

2018-05-19 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek created this revision. Prazek added reviewers: rjmccall, rsmith, amharc, kuhar. Herald added a subscriber: llvm-commits. In many cases we can't devirtualize because definition of vtable is not present. Most of the time it is caused by inline virtual function not beeing emitted. Forcing emit

[PATCH] D40062: Update tests for llvm.invariant.group.barrier becoming mangled

2017-11-16 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek accepted this revision. Prazek added a comment. LGTM https://reviews.llvm.org/D40062 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D33852: Enable __declspec(selectany) on linux

2017-09-14 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek marked 3 inline comments as done. Prazek added a comment. Thanks for help. I checked and docs build and looks legit. Sorry that it took so long. Repository: rL LLVM https://reviews.llvm.org/D33852 ___ cfe-commits mailing list cfe-commits@

[PATCH] D33852: Enable __declspec(selectany) on linux

2017-09-14 Thread Piotr Padlewski via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL313278: Enable __declspec(selectany) on any platform (authored by Prazek). Repository: rL LLVM https://reviews.llvm.org/D33852 Files: cfe/trunk/include/clang/Basic/Attr.td cfe/trunk/include/clang/

[PATCH] D33852: Enable __declspec(selectany) on linux

2017-09-14 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek updated this revision to Diff 115243. Prazek marked 8 inline comments as done. Prazek added a comment. Fixed links https://reviews.llvm.org/D33852 Files: include/clang/Basic/Attr.td include/clang/Basic/AttrDocs.td test/Sema/attr-selectany.c test/SemaCXX/attr-selectany.cpp Index

[PATCH] D33852: Enable __declspec(selectany) on linux

2017-09-05 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek marked an inline comment as done. Prazek added inline comments. Comment at: include/clang/Basic/AttrDocs.td:3154 + +def SelectAnyDocs : Documentation { + let Content = [{This attribute makes global symbol have a weak definition aaron.ballman wrote: > Pra

[PATCH] D33852: Enable __declspec(selectany) on linux

2017-08-31 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek updated this revision to Diff 113507. Prazek marked 4 inline comments as done. Prazek added a comment. - docs fixes https://reviews.llvm.org/D33852 Files: include/clang/Basic/Attr.td include/clang/Basic/AttrDocs.td test/Sema/attr-selectany.c test/SemaCXX/attr-selectany.cpp Inde

[PATCH] D33852: Enable __declspec(selectany) on linux

2017-08-31 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek added inline comments. Comment at: include/clang/Basic/AttrDocs.td:3154 + +def SelectAnyDocs : Documentation { + let Content = [{This attribute makes global symbol have a weak definition aaron.ballman wrote: > I think you need to set the `Category` as we

[PATCH] D33852: Enable __declspec(selectany) on linux

2017-08-30 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek updated this revision to Diff 113359. Prazek added a comment. - docs fixes https://reviews.llvm.org/D33852 Files: include/clang/Basic/Attr.td include/clang/Basic/AttrDocs.td test/Sema/attr-selectany.c test/SemaCXX/attr-selectany.cpp Index: test/SemaCXX/attr-selectany.cpp ==

[PATCH] D33852: Enable __declspec(selectany) on linux

2017-08-30 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek updated this revision to Diff 113357. Prazek added a comment. - docs fixes https://reviews.llvm.org/D33852 Files: include/clang/Basic/Attr.td include/clang/Basic/AttrDocs.td test/Sema/attr-selectany.c test/SemaCXX/attr-selectany.cpp Index: test/SemaCXX/attr-selectany.cpp ==

[PATCH] D33852: Enable __declspec(selectany) on linux

2017-08-30 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek added inline comments. Comment at: include/clang/Basic/Attr.td:2477 let Spellings = [Declspec<"selectany">, GCC<"selectany">]; let Documentation = [Undocumented]; } aaron.ballman wrote: > aaron.ballman wrote: > > Since we're drastically modifying wh

[PATCH] D33852: Enable __declspec(selectany) on linux

2017-08-29 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek updated this revision to Diff 113189. Prazek added a comment. - Add documentation https://reviews.llvm.org/D33852 Files: include/clang/Basic/Attr.td test/Sema/attr-selectany.c test/SemaCXX/attr-selectany.cpp Index: test/SemaCXX/attr-selectany.cpp =

[PATCH] D33852: Enable __declspec(selectany) on linux

2017-08-29 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek added a comment. In https://reviews.llvm.org/D33852#854213, @aaron.ballman wrote: > In https://reviews.llvm.org/D33852#854176, @Prazek wrote: > > > In https://reviews.llvm.org/D33852#853982, @aaron.ballman wrote: > > > > > In https://reviews.llvm.org/D33852#853410, @Prazek wrote: > > > > >

[PATCH] D33852: Enable __declspec(selectany) on linux

2017-08-28 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek added a comment. In https://reviews.llvm.org/D33852#853982, @aaron.ballman wrote: > In https://reviews.llvm.org/D33852#853410, @Prazek wrote: > > > Sorry for so late fixes, but it would be good to put it in 5.0 > > > I do not think this should be in 5.0, as I believe we're only accepting

[PATCH] D33852: Enable __declspec(selectany) on linux

2017-08-26 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek updated this revision to Diff 112804. Prazek added a comment. Enable it on every platform https://reviews.llvm.org/D33852 Files: include/clang/Basic/Attr.td test/Sema/attr-selectany.c test/SemaCXX/attr-selectany.cpp utils/TableGen/ClangAttrEmitter.cpp Index: utils/TableGen/Clan

[PATCH] D33852: Enable __declspec(selectany) on linux

2017-08-26 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek updated this revision to Diff 112805. Prazek added a comment. remove empty line https://reviews.llvm.org/D33852 Files: include/clang/Basic/Attr.td test/Sema/attr-selectany.c test/SemaCXX/attr-selectany.cpp Index: test/SemaCXX/attr-selectany.cpp ===

[PATCH] D33852: Enable __declspec(selectany) on linux

2017-08-26 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek marked 9 inline comments as done. Prazek added a comment. Sorry for so late fixes, but it would be good to put it in 5.0 https://reviews.llvm.org/D33852 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mai

[PATCH] D33852: Enable __declspec(selectany) on linux

2017-07-19 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek added inline comments. Comment at: include/clang/Basic/Attr.td:2421 -def SelectAny : InheritableAttr, TargetSpecificAttr { +def SelectAny : InheritableAttr, TargetSpecificAttr { let Spellings = [Declspec<"selectany">, GCC<"selectany">]; davide wrote:

[PATCH] D33470: [clang-tidy] Add misc-default-numerics

2017-06-27 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek updated this revision to Diff 104297. Prazek added a comment. fixed broken test https://reviews.llvm.org/D33470 Files: clang-tidy/misc/CMakeLists.txt clang-tidy/misc/DefaultNumericsCheck.cpp clang-tidy/misc/DefaultNumericsCheck.h clang-tidy/misc/MiscTidyModule.cpp docs/ReleaseN

[PATCH] D33470: [clang-tidy] Add misc-default-numerics

2017-06-27 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek updated this revision to Diff 104288. Prazek added a comment. Small fix https://reviews.llvm.org/D33470 Files: clang-tidy/misc/CMakeLists.txt clang-tidy/misc/DefaultNumericsCheck.cpp clang-tidy/misc/DefaultNumericsCheck.h clang-tidy/misc/MiscTidyModule.cpp docs/ReleaseNotes.rst

[PATCH] D33470: [clang-tidy] Add misc-default-numerics

2017-06-27 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek updated this revision to Diff 104281. Prazek marked 2 inline comments as done. Prazek added a comment. Herald added a subscriber: JDevlieghere. - fixed docs - fixes - Last fixes? https://reviews.llvm.org/D33470 Files: clang-tidy/misc/CMakeLists.txt clang-tidy/misc/DefaultNumericsChec

[PATCH] D33470: [clang-tidy] Add misc-default-numerics

2017-06-27 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek added a comment. In https://reviews.llvm.org/D33470#790484, @aaron.ballman wrote: > In https://reviews.llvm.org/D33470#789791, @Prazek wrote: > > > In https://reviews.llvm.org/D33470#764846, @aaron.ballman wrote: > > > > > Once you fix the typo in the check, can you run it over some large

[PATCH] D33470: [clang-tidy] Add misc-default-numerics

2017-06-24 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek added a comment. In https://reviews.llvm.org/D33470#764846, @aaron.ballman wrote: > Once you fix the typo in the check, can you run it over some large C++ code > bases to see if it finds any results? I tried it on LLVM code base (after fixing bug with the numeric_limits name) and it di

[PATCH] D33470: [clang-tidy] Add misc-default-numerics

2017-06-24 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek updated this revision to Diff 103837. Prazek marked 4 inline comments as done. Prazek added a comment. - fixed docs - fixes https://reviews.llvm.org/D33470 Files: clang-tidy/misc/CMakeLists.txt clang-tidy/misc/DefaultNumericsCheck.cpp clang-tidy/misc/DefaultNumericsCheck.h clang-

[PATCH] D33852: Enable __declspec(selectany) on linux

2017-06-13 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek added inline comments. Comment at: include/clang/Basic/Attr.td:2421 -def SelectAny : InheritableAttr, TargetSpecificAttr { +def SelectAny : InheritableAttr, TargetSpecificAttr { let Spellings = [Declspec<"selectany">, GCC<"selectany">]; rnk wrote: > d

[PATCH] D33852: Enable __declspec(selectany) on linux

2017-06-05 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek added inline comments. Comment at: include/clang/Basic/Attr.td:2421 -def SelectAny : InheritableAttr, TargetSpecificAttr { +def SelectAny : InheritableAttr, TargetSpecificAttr { let Spellings = [Declspec<"selectany">, GCC<"selectany">]; majnemer wrote

[PATCH] D33852: Enable __declspec(selectany) on linux

2017-06-04 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek added a comment. I fired bug about the crash: https://bugs.llvm.org/show_bug.cgi?id=33300 https://reviews.llvm.org/D33852 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D33852: Enable __declspec(selectany) on linux

2017-06-04 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek updated this revision to Diff 101352. Prazek added a comment. - Fixes https://reviews.llvm.org/D33852 Files: include/clang/Basic/Attr.td test/Sema/attr-selectany-not-supported.c test/Sema/attr-selectany.c test/SemaCXX/attr-selectany.cpp utils/TableGen/ClangAttrEmitter.cpp Ind

[PATCH] D33852: Enable __declspec(selectany) on linux

2017-06-03 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek added a comment. It seems that this is separate issue - we don't generate comdat for MachO. Indeed we should warn on not supported declspec for macho. https://reviews.llvm.org/D33852 ___ cfe-commits mailing list cfe-commits@lists.llvm.org ht

[PATCH] D33852: Enable __declspec(selectany) on linux

2017-06-02 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek added a comment. OK, I will try to make it work on linux and windows only https://reviews.llvm.org/D33852 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D33841: [clang-tidy] redundant keyword check

2017-06-02 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek added a comment. extern on function definition is also redundant, right? Also, what about: inline extern void foo(); (you check if it startswith extern) Repository: rL LLVM https://reviews.llvm.org/D33841 ___ cfe-commits mailing list cfe-

[PATCH] D33841: [clang-tidy] redundant keyword check

2017-06-02 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek added a comment. Feature request: removing "void" from int main(void) Repository: rL LLVM https://reviews.llvm.org/D33841 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D33852: Enable __declspec(selectany) on linux)

2017-06-02 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek created this revision. This feature was disabled probably by mistake in https://reviews.llvm.org/rL300562 This fixes bug https://bugs.llvm.org/show_bug.cgi?id=33285 https://reviews.llvm.org/D33852 Files: include/clang/Basic/Attr.td test/Sema/attr-selectany.c test/SemaCXX/attr-sele

[PATCH] D31830: Emit invariant.group.barrier when using union field

2017-06-01 Thread Piotr Padlewski via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL304448: Emit invariant.group.barrier when using union field (authored by Prazek). Changed prior to commit: https://reviews.llvm.org/D31830?vs=100977&id=101058#toc Repository: rL LLVM https://reviews

[PATCH] D31830: Emit invariant.group.barrier when using union field

2017-06-01 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek updated this revision to Diff 100977. Prazek marked an inline comment as done. Prazek added a comment. Extra test https://reviews.llvm.org/D31830 Files: lib/CodeGen/CGExpr.cpp test/CodeGenCXX/strict-vtable-pointers.cpp Index: test/CodeGenCXX/strict-vtable-pointers.cpp ==

[PATCH] D33437: Emit available_externally vtables opportunistically

2017-06-01 Thread Piotr Padlewski via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL304394: Emit available_externally vtables opportunistically (authored by Prazek). Changed prior to commit: https://reviews.llvm.org/D33437?vs=100641&id=100976#toc Repository: rL LLVM https://reviews

[PATCH] D33437: Emit available_externally vtables opportunistically

2017-05-29 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek updated this revision to Diff 100641. Prazek added a comment. changed assert https://reviews.llvm.org/D33437 Files: include/clang/AST/VTableBuilder.h lib/CodeGen/CGVTables.cpp lib/CodeGen/CodeGenModule.cpp lib/CodeGen/CodeGenModule.h lib/CodeGen/ItaniumCXXABI.cpp lib/CodeGen/

[PATCH] D33437: Emit available_externally vtables opportunistically

2017-05-29 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek updated this revision to Diff 100623. Prazek marked an inline comment as done. Prazek added a comment. - Final changes https://reviews.llvm.org/D33437 Files: include/clang/AST/VTableBuilder.h lib/CodeGen/CGVTables.cpp lib/CodeGen/CodeGenModule.cpp lib/CodeGen/CodeGenModule.h li

[PATCH] D33437: Emit available_externally vtables opportunistically

2017-05-29 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek marked 4 inline comments as done. Prazek added inline comments. Comment at: include/clang/AST/VTableBuilder.h:160 + "GlobalDecl can be created only from virtual function"); +if (getKind() == CK_FunctionPointer) + return GlobalDecl(getFunctionDecl()); ---

[PATCH] D33437: Emit available_externally vtables opportunistically

2017-05-29 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek marked an inline comment as done. Prazek added inline comments. Comment at: include/clang/AST/VTableBuilder.h:169 + return GlobalDecl(DtorDecl, CXXDtorType::Dtor_Deleting); +default: + llvm_unreachable("Only function pointers kinds"); rjmccal

[PATCH] D31830: Emit invariant.group.barrier when using union field

2017-05-29 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek updated this revision to Diff 100621. Prazek added a comment. Add test https://reviews.llvm.org/D31830 Files: lib/CodeGen/CGExpr.cpp test/CodeGenCXX/strict-vtable-pointers.cpp Index: test/CodeGenCXX/strict-vtable-pointers.cpp =

[PATCH] D31830: Emit invariant.group.barrier when using union field

2017-05-27 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek marked 2 inline comments as done. Prazek added inline comments. Comment at: lib/CodeGen/CGExpr.cpp:3530 + return false; +} + rjmccall wrote: > You need to recurse into base classes (to check their fields), and if you > write this to take a QualType you w

[PATCH] D31830: Emit invariant.group.barrier when using union field

2017-05-27 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek updated this revision to Diff 100533. Prazek added a comment. - changed to QualType, now it is much cleaner https://reviews.llvm.org/D31830 Files: lib/CodeGen/CGExpr.cpp test/CodeGenCXX/strict-vtable-pointers.cpp Index: test/CodeGenCXX/strict-vtable-pointers.cpp

[PATCH] D33437: Emit available_externally vtables opportunistically

2017-05-27 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek updated this revision to Diff 100530. Prazek marked 3 inline comments as done. Prazek added a comment. - Addressing John's comments https://reviews.llvm.org/D33437 Files: include/clang/AST/VTableBuilder.h lib/CodeGen/CGVTables.cpp lib/CodeGen/CodeGenModule.cpp lib/CodeGen/CodeGen

[PATCH] D33437: Emit available_externally vtables opportunistically

2017-05-27 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek added a comment. Thanks for the comments :) Comment at: include/clang/AST/VTableBuilder.h:160 + "GlobalDecl can be created only from virtual function"); +if (getKind() == CK_FunctionPointer) + return GlobalDecl(getFunctionDecl()); rjmc

[PATCH] D33537: [clang-tidy] Exception Escape Checker

2017-05-25 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek added a comment. How is that compared to https://reviews.llvm.org/D19201 and the clang patch mentioned in this patch? Repository: rL LLVM https://reviews.llvm.org/D33537 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists

[PATCH] D33470: [clang-tidy] Add misc-default-numerics

2017-05-25 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek updated this revision to Diff 100216. Prazek marked 8 inline comments as done. Prazek added a comment. - Thanks for the review Aaron, that is much better. https://reviews.llvm.org/D33470 Files: clang-tidy/misc/CMakeLists.txt clang-tidy/misc/DefaultNumericsCheck.cpp clang-tidy/misc/

[PATCH] D33470: [clang-tidy] Add misc-default-numerics

2017-05-24 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek updated this revision to Diff 100070. Prazek added a comment. - fixed docs https://reviews.llvm.org/D33470 Files: clang-tidy/misc/CMakeLists.txt clang-tidy/misc/DefaultNumericsCheck.cpp clang-tidy/misc/DefaultNumericsCheck.h clang-tidy/misc/MiscTidyModule.cpp docs/ReleaseNotes.

[PATCH] D33470: [clang-tidy] Add misc-default-numerics

2017-05-24 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek added inline comments. Comment at: docs/clang-tidy/checks/misc-default-numerics.rst:11 +Consider scenario: +1. Have `typedef long long BigInt` in source code +2. Use `std::numeric_limits::min()` Eugene.Zelenko wrote: > May be code-block will be better? Rig

[PATCH] D33470: [clang-tidy] Add misc-default-numerics

2017-05-23 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek created this revision. Herald added subscribers: xazax.hun, mgorny. This check flags usages of ``std::numeric_limits::{min,max}()`` for unspecialized types. It is dangerous because returns T(), which might is rarely minimum or maximum for this type. Consider scenario: 1. Have `typedef lon

[PATCH] D33437: Emit available_externally vtables opportunistically

2017-05-23 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek updated this revision to Diff 99897. Prazek added a comment. Removed debug print https://reviews.llvm.org/D33437 Files: include/clang/AST/VTableBuilder.h lib/CodeGen/CGVTables.cpp lib/CodeGen/CodeGenModule.cpp lib/CodeGen/CodeGenModule.h lib/CodeGen/ItaniumCXXABI.cpp test/Cod

[PATCH] D33437: Emit available_externally vtables opportunistically

2017-05-23 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek created this revision. We can emit vtable definition having inline function if they are all emitted. https://reviews.llvm.org/D33437 Files: include/clang/AST/VTableBuilder.h lib/CodeGen/CGVTables.cpp lib/CodeGen/CodeGenModule.cpp lib/CodeGen/CodeGenModule.h lib/CodeGen/ItaniumC

[PATCH] D19201: [clang-tidy] misc-throw-with-noexcept

2017-05-21 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek accepted this revision. Prazek added a comment. LGTM, but wait if Aaron will accept it. https://reviews.llvm.org/D19201 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D19201: [clang-tidy] misc-throw-with-noexcept

2017-05-21 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek added a comment. In https://reviews.llvm.org/D19201#760151, @aaron.ballman wrote: > As an FYI, there is a related check being implemented in clang currently; we > probably should not duplicate this effort. See > https://reviews.llvm.org/D3. I think that clang is the right place for

[PATCH] D33333: Emit warning when throw exception in destruct or dealloc functions which has a (possible implicit) noexcept specifier

2017-05-21 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek added a comment. Could you add similar tests as the ones that Stanislaw provied in his patch? Like the one with checking if throw is catched, or the conditional noexcept (by a macro, etc) https://reviews.llvm.org/D3 ___ cfe-commits maili

[PATCH] D19201: [clang-tidy] misc-throw-with-noexcept

2017-05-20 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek added inline comments. Comment at: docs/ReleaseNotes.rst:58 +- New `misc-throw-with-noexcept + `_ check I think this should be in alphabetical order. https://reviews.llvm.o

[PATCH] D19201: [clang-tidy] misc-throw-with-noexcept

2017-05-20 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek added inline comments. Comment at: clang-tidy/misc/ThrowWithNoexceptCheck.cpp:76 + + for (const auto Parent : Context->getParents(node)) { +if (isCaughtInFunction(Context, Throw, Function, Parent)) unnecessary braces Comment at: cla

[PATCH] D31830: Emit invariant.group.barrier when using union field

2017-05-20 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek added a reviewer: mehdi_amini. Prazek added a comment. Ping https://reviews.llvm.org/D31830 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D32401: [Devirtualization] insert placement new barrier with -O0

2017-05-20 Thread Piotr Padlewski via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL303488: [Devirtualization] insert placement new barrier with -O0 (authored by Prazek). Changed prior to commit: https://reviews.llvm.org/D32401?vs=96313&id=99667#toc Repository: rL LLVM https://revi

[PATCH] D32401: [Devirtualization] insert placement new barrier with -O0

2017-05-19 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek added a comment. Is everyone ok with sending this patch? https://reviews.llvm.org/D32401 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D32690: [clang-tidy] modernize-use-emplace: Remove unnecessary make_tuple calls

2017-05-14 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek accepted this revision. Prazek added a comment. This revision is now accepted and ready to land. LGTM https://reviews.llvm.org/D32690 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

[PATCH] D19201: [clang-tidy] misc-throw-with-noexcept

2017-05-06 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek added inline comments. Comment at: clang-tidy/misc/ThrowWithNoexceptCheck.cpp:22 +void ThrowWithNoexceptCheck::registerMatchers(MatchFinder *Finder) { + if (!getLangOpts().CPlusPlus11) +return; If we handle throw() then it should be CPlusPlus ==

[PATCH] D32767: [clang-tidy] Fix PR32896: detect initializer lists in modernize-use-empalce

2017-05-05 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek accepted this revision. Prazek added a comment. LGTM Repository: rL LLVM https://reviews.llvm.org/D32767 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D32767: [clang-tidy] Fix PR32896: detect initializer lists in modernize-use-empalce

2017-05-03 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek added inline comments. Comment at: clang-tidy/modernize/UseEmplaceCheck.cpp:23 +AST_MATCHER(CXXStdInitializerListExpr, cxxStdInitializerListExpr) { + return true; kuhar wrote: > alexfh wrote: > > This should be a node matcher rather than a narrowing mat

[PATCH] D32378: Insert invariant.group.barrier for pointers comparisons

2017-05-03 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek added a comment. In https://reviews.llvm.org/D32378#741989, @hubert.reinterpretcast wrote: > Has it been discussed whether this is something to be addressed in the > optimizer as opposed to the front-end? The example that you showed is excellent. I didn't know that LLVM does the transf

[PATCH] D32678: [clang-tidy] Fix naming convention in modernize-use-emplace

2017-04-30 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek accepted this revision. Prazek added a comment. This revision is now accepted and ready to land. Lgtm https://reviews.llvm.org/D32678 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

[PATCH] D31887: [clangd] Add documentation page

2017-04-28 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek added a comment. In https://reviews.llvm.org/D31887#740727, @malaperle-ericsson wrote: > Would it be possible to commit this? I do not have commit rights. Thanks! Why won't you get commit right? You will probably make some other contribution to clangd, so it will be handy to have it :)

  1   2   3   >