[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] 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 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 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 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] 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] 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 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 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] 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] 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] 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] 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] 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] 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] 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-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] 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] 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-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] 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-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-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] 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] 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] 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] 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-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] 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] 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 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 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-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] 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] 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] 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] 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] 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] 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] 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-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-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-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-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] 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] 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] 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] 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] 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] 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-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] 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] 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 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 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-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] 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-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 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-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-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-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-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-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 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-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-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-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-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-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 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] 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] 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-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] 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] 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] D27166: [clang-tidy] Enhance modernize-use-auto to templated function casts

2016-12-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, thanks for all the fixes. Can you leave FIXIT comment somewhere in the code near the FixitHint about the function pointers? https://reviews.llvm.org/D27166 __

[PATCH] D21298: [Clang-tidy] delete null check

2016-12-14 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek added inline comments. Comment at: clang-tidy/readability/DeleteNullPointerCheck.cpp:33 + Finder->addMatcher( + ifStmt(allOf(hasCondition( + anyOf(PointerCondition, BinaryPointerCheckCondition)), I think allOf matcher is redunda

[PATCH] D27806: [clang-tidy] Add misc-invalid-range

2016-12-15 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek created this revision. Prazek added reviewers: alexfh, malcolm.parsons. Prazek added a subscriber: cfe-commits. Herald added subscribers: JDevlieghere, mgorny. Warns if algorithm is used with ``.begin()`` and ``.end()`` from different variables. https://reviews.llvm.org/D27806 Files: c

[PATCH] D27813: [clang-tidy] fix missing anchor for MPI Module

2016-12-15 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek created this revision. Prazek added reviewers: alexfh, Alexander_Droste, hokein. Prazek added a subscriber: cfe-commits. Herald added a subscriber: JDevlieghere. MPIModule was not linked to plugins https://reviews.llvm.org/D27813 Files: clang-tidy/plugin/ClangTidyPlugin.cpp Index: cl

[PATCH] D24487: [Clang] Fix some Clang-tidy modernize-use-bool-literals and Include What You Use warnings in AST; other minor fixes

2016-12-15 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek added inline comments. Comment at: lib/ASTMatchers/Dynamic/Parser.cpp:617 -} // namespace dynamic -} // namespace ast_matchers -} // namespace clang +} // end namespace dynamic +} // end namespace ast_matchers I think check should not warn in these ca

[PATCH] D27767: NFC Changes from modernize-use-auto

2016-12-15 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek added inline comments. Comment at: lib/StaticAnalyzer/Checkers/TestAfterDivZeroChecker.cpp:106 if (Optional P = Succ->getLocationAs()) +if (const auto *BO = P->getStmtAs()) { malcolm.parsons wrote: > The check missed this one. I don't think it is

[PATCH] D27806: [clang-tidy] Add misc-invalid-range

2016-12-15 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek marked an inline comment as done. Prazek added inline comments. Comment at: clang-tidy/ClangTidy.cpp:296 const auto &RegisteredCheckers = - AnalyzerOptions::getRegisteredCheckers(/*IncludeExperimental=*/false); + AnalyzerOptions::getRegisteredCheckers(/*Includ

[PATCH] D27815: [clang-tidy] Add obvious module for obvious bugs

2016-12-15 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek created this revision. Prazek added reviewers: alexfh, malcolm.parsons. Prazek added a subscriber: cfe-commits. Herald added subscribers: JDevlieghere, mgorny. Module for checks for obvious bugs that probably won't be found in working code, but can be found while looking for an obvious bug

[PATCH] D27806: [clang-tidy] Add misc-invalid-range

2016-12-15 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek updated this revision to Diff 81597. Prazek added a comment. - Moved to obvious https://reviews.llvm.org/D27806 Files: clang-tidy/ClangTidy.cpp clang-tidy/obvious/CMakeLists.txt clang-tidy/obvious/InvalidRangeCheck.cpp clang-tidy/obvious/InvalidRangeCheck.h clang-tidy/obvious/O

[PATCH] D27806: [clang-tidy] Add misc-invalid-range

2016-12-15 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek marked 2 inline comments as done. Prazek added inline comments. Comment at: docs/ReleaseNotes.rst:84 +- New `misc-invalid-range + `_ check malcolm.parsons wrote: > "invalid" < "use"

[PATCH] D27806: [clang-tidy] Add misc-invalid-range

2016-12-15 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek updated this revision to Diff 81600. Prazek added a comment. - Small fixes https://reviews.llvm.org/D27806 Files: clang-tidy/obvious/CMakeLists.txt clang-tidy/obvious/InvalidRangeCheck.cpp clang-tidy/obvious/InvalidRangeCheck.h clang-tidy/obvious/ObviousTidyModule.cpp docs/Rele

[PATCH] D27806: [clang-tidy] Add obvious-invalid-range

2016-12-15 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek marked 3 inline comments as done. Prazek added inline comments. Comment at: docs/ReleaseNotes.rst:84 +- New `misc-invalid-range + `_ check malcolm.parsons wrote: > Prazek wrote: > >

[PATCH] D27806: [clang-tidy] Add obvious-invalid-range

2016-12-15 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek updated this revision to Diff 81603. Prazek marked 2 inline comments as done. Prazek added a comment. - Small fixes https://reviews.llvm.org/D27806 Files: clang-tidy/obvious/CMakeLists.txt clang-tidy/obvious/InvalidRangeCheck.cpp clang-tidy/obvious/InvalidRangeCheck.h clang-tidy/

[PATCH] D27806: [clang-tidy] Add obvious-invalid-range

2016-12-15 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek marked an inline comment as done. Prazek added a comment. In https://reviews.llvm.org/D27806#623838, @malcolm.parsons wrote: > What about arguments 3 and 4 of `std::list::splice(It, list, It, It)`? I am aware of that, but I wanted to make a bunch of simple checks to fill obvious module

[PATCH] D27806: [clang-tidy] Add obvious-invalid-range

2016-12-15 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek updated this revision to Diff 81604. Prazek added a comment. - Small fixes https://reviews.llvm.org/D27806 Files: clang-tidy/obvious/CMakeLists.txt clang-tidy/obvious/InvalidRangeCheck.cpp clang-tidy/obvious/InvalidRangeCheck.h clang-tidy/obvious/ObviousTidyModule.cpp docs/Rele

[PATCH] D27806: [clang-tidy] Add obvious-invalid-range

2016-12-15 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek updated this revision to Diff 81606. Prazek added a comment. - Small fixes https://reviews.llvm.org/D27806 Files: clang-tidy/obvious/CMakeLists.txt clang-tidy/obvious/InvalidRangeCheck.cpp clang-tidy/obvious/InvalidRangeCheck.h clang-tidy/obvious/ObviousTidyModule.cpp docs/Rele

[PATCH] D27806: [clang-tidy] Add obvious-invalid-range

2016-12-15 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek added inline comments. Comment at: test/clang-tidy/misc-invalid-range.cpp:41 + auto &v2 = v; + std::move(v.begin(), v2.end(), v2.begin()); + // CHECK-MESSAGES: :[[@LINE-1]]:13: warning: call to algorithm with begin and end from different objects [misc-invalid-range] --

[PATCH] D27806: [clang-tidy] Add obvious-invalid-range

2016-12-15 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek added inline comments. Comment at: docs/clang-tidy/checks/list.rst:68 misc-inefficient-algorithm + misc-invalid-range misc-macro-parentheses malcolm.parsons wrote: > misc. > add_new_check.py can fix it. How? I added new check with this script, bu

[PATCH] D27806: [clang-tidy] Add obvious-invalid-range

2016-12-15 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek updated this revision to Diff 81616. Prazek marked an inline comment as done. Prazek added a comment. - removed misc https://reviews.llvm.org/D27806 Files: clang-tidy/obvious/CMakeLists.txt clang-tidy/obvious/InvalidRangeCheck.cpp clang-tidy/obvious/InvalidRangeCheck.h clang-tidy

[PATCH] D27806: [clang-tidy] Add obvious-invalid-range

2016-12-15 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek updated this revision to Diff 81617. Prazek marked an inline comment as done. Prazek added a comment. - Small fixes https://reviews.llvm.org/D27806 Files: clang-tidy/obvious/CMakeLists.txt clang-tidy/obvious/InvalidRangeCheck.cpp clang-tidy/obvious/InvalidRangeCheck.h clang-tidy/

[PATCH] D27806: [clang-tidy] Add obvious-invalid-range

2016-12-15 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek added a comment. Also please review https://reviews.llvm.org/D27815 to make it happen https://reviews.llvm.org/D27806 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D24487: [Clang] Fix some Clang-tidy modernize-use-bool-literals and Include What You Use warnings in AST; other minor fixes

2016-12-15 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek added a comment. I would say that as long as most of the people don't see big difference between "end namespace X" and "namespace X" or even "X" then we should not be so strict. For me "end" is redundant. Even checks added by add_new_check uses "namespace clang" instead of "end namespac

[PATCH] D27813: [clang-tidy] fix missing anchor for MPI Module

2016-12-15 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek added a comment. In https://reviews.llvm.org/D27813#623978, @Alexander_Droste wrote: > Thanks for adding! I also forgot about that one once. It is simple bugfix so I guess I need small LGTM to push it https://reviews.llvm.org/D27813 ___ c

  1   2   3   >