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

2019-08-22 Thread Nathan Chancellor via Phabricator via cfe-commits
nathanchance added a comment. This test case has never passed for me with `check-clang`, is there something environment related that is needed with this or are others experiencing this too? [147/148] Running the Clang regression tests llvm-lit:

[PATCH] D66627: [clang-tidy] new check: bugprone-pthread-return

2019-08-22 Thread Jian Cai via Phabricator via cfe-commits
jcai19 marked 7 inline comments as done. jcai19 added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/PthreadReturnCheck.cpp:2 +//===--- PthreadReturnCheck.cpp - clang-tidy---===//

[PATCH] D66627: [clang-tidy] new check: bugprone-pthread-return

2019-08-22 Thread Jian Cai via Phabricator via cfe-commits
jcai19 updated this revision to Diff 216768. jcai19 added a comment. Fix typos. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66627/new/ https://reviews.llvm.org/D66627 Files: clang-tools-extra/clang-tidy/bugprone/BugproneTidyModule.cpp

[PATCH] D66627: [clang-tidy] new check: bugprone-pthread-return

2019-08-22 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/PthreadReturnCheck.cpp:1 +//===--- PthreadReturnCheck.cpp - clang-tidy---===// +//clang-tidy-===// Please put

[PATCH] D66584: [clang-format] Support .mjs module javascript extension in clang-format

2019-08-22 Thread Fangrui Song via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL369732: [clang-format] Recognize ECMAScript module .mjs as JavaScript (authored by MaskRay, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit:

r369732 - [clang-format] Recognize ECMAScript module .mjs as JavaScript

2019-08-22 Thread Fangrui Song via cfe-commits
Author: maskray Date: Thu Aug 22 21:46:01 2019 New Revision: 369732 URL: http://llvm.org/viewvc/llvm-project?rev=369732=rev Log: [clang-format] Recognize ECMAScript module .mjs as JavaScript PR43085. Recognize .mjs files as JavaScript. .mjs is the extension for ECMAScript modules. A specific

[PATCH] D66584: [clang-format] Support .mjs module javascript extension in clang-format

2019-08-22 Thread Fergal Daly via Phabricator via cfe-commits
fergald added a comment. Thanks, I'm happy with that description Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66584/new/ https://reviews.llvm.org/D66584 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D66627: [clang-tidy] new check: bugprone-pthread-return

2019-08-22 Thread Jian Cai via Phabricator via cfe-commits
jcai19 updated this revision to Diff 216765. jcai19 added a comment. Fix format. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66627/new/ https://reviews.llvm.org/D66627 Files: clang-tools-extra/clang-tidy/bugprone/BugproneTidyModule.cpp

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

2019-08-22 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso abandoned this revision. Charusso marked 4 inline comments as done. Charusso added a comment. 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] D66593: [analyzer] CastValueChecker: Fix some assertions

2019-08-22 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Pushed my own emergency hotfixes as rC369726 , rC369727 , rC369728 , rC369729 ; reduced tests included. CHANGES SINCE LAST ACTION

r369729 - [analyzer] CastValueChecker: Correctly model results of based-to-derived casts.

2019-08-22 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Thu Aug 22 20:24:04 2019 New Revision: 369729 URL: http://llvm.org/viewvc/llvm-project?rev=369729=rev Log: [analyzer] CastValueChecker: Correctly model results of based-to-derived casts. Our SVal hierarchy doesn't allow modeling pointer casts as no-op. The pointer type is

r369726 - [analyzer] DynamicTypeInfo: Avoid putting null regions into dynamic typemap.

2019-08-22 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Thu Aug 22 20:23:55 2019 New Revision: 369726 URL: http://llvm.org/viewvc/llvm-project?rev=369726=rev Log: [analyzer] DynamicTypeInfo: Avoid putting null regions into dynamic typemap. Fixes a crash. Modified: cfe/trunk/lib/StaticAnalyzer/Core/DynamicType.cpp

r369727 - [analyzer] CastValueChecker: Avoid modeling casts between objects.

2019-08-22 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Thu Aug 22 20:23:58 2019 New Revision: 369727 URL: http://llvm.org/viewvc/llvm-project?rev=369727=rev Log: [analyzer] CastValueChecker: Avoid modeling casts between objects. Our method only works correctly when casting a pointer to a pointer or a reference to a reference.

r369728 - [analyzer] CastValueChecker: Provide DynamicTypeMap with pointer types only.

2019-08-22 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Thu Aug 22 20:24:01 2019 New Revision: 369728 URL: http://llvm.org/viewvc/llvm-project?rev=369728=rev Log: [analyzer] CastValueChecker: Provide DynamicTypeMap with pointer types only. The idea to drop this requirement is good, but for now every other user of

[PATCH] D66584: [clang-format] Support .mjs module javascript extension in clang-format

2019-08-22 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay accepted this revision. MaskRay added a comment. Reading some materials online... I think this should be named ECMAScript module (ECM), not JavaScript modules.. I can fix the description and commit for you. Repository: rC Clang CHANGES SINCE LAST ACTION

[PATCH] D66584: [clang-format] Support .mjs module javascript extension in clang-format

2019-08-22 Thread Fergal Daly via Phabricator via cfe-commits
fergald added a comment. "why .mjs is so common that it justifies a clang-format change?" I don't have data but Module JS is the future, it's supported by all major browsers for some time and also Node.js, it solves the problem of everything being lumped into one namespace. Why does it need a

r369725 - Revert "PR42587: diagnose unexpanded uses of a pack parameter of a generic" due to buildbot breakage.

2019-08-22 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Aug 22 19:33:46 2019 New Revision: 369725 URL: http://llvm.org/viewvc/llvm-project?rev=369725=rev Log: Revert "PR42587: diagnose unexpanded uses of a pack parameter of a generic" due to buildbot breakage. This reverts commit r369722. Modified:

[PATCH] D66584: [clang-format] Support .mjs module javascript extension in clang-format

2019-08-22 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. > This causes .mjs files to be treated as javascript. I think you meant .mjs was not recognized before but will be recognized as JavaScript with this change. Can you elaborate a bit why .mjs is so common that it justifies a clang-format change? Repository: rC

[PATCH] D66584: [clang-format] Support .mjs module javascript extension in clang-format

2019-08-22 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. > module-javascript. Module javascript is not compatible with non-module java > script as it uses the "export" and "import" keywords which are only legal in > module-javascript. java script -> JavaScript module-javascript -> Module JavaScript? Repository: rC Clang

[PATCH] D66584: [clang-format] Support .mjs module javascript extension in clang-format

2019-08-22 Thread Fergal Daly via Phabricator via cfe-commits
fergald added a comment. I cannot commit this, please do so, if you're happy with it. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66584/new/ https://reviews.llvm.org/D66584 ___ cfe-commits mailing list

[PATCH] D66584: [clang-format] Support .mjs module javascript extension in clang-format

2019-08-22 Thread Fergal Daly via Phabricator via cfe-commits
fergald added a comment. It seems to do the right thing. E.g. https://crrev.com/c/1767284/5/third_party/blink/renderer/core/script/resources/layered_api/elements/virtual-scroller/visibility-manager.mjs Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66584/new/

[PATCH] D66584: [clang-format] Support .mjs module javascript extension in clang-format

2019-08-22 Thread Nico Weber via Phabricator via cfe-commits
thakis accepted this revision. thakis added a comment. This revision is now accepted and ready to land. Does clang-format format import and export lines in mjs files correctly? Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66584/new/

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

2019-08-22 Thread Logan Smith via Phabricator via cfe-commits
logan-5 marked an inline comment as done. logan-5 added a comment. @rsmith I agree having a final destructor in a non-final class smells weird. I'd be interested in working on adding a warning like that, if it sounds like a useful thing. For now, I need help committing this, if anyone would be

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

2019-08-22 Thread Logan Smith via Phabricator via cfe-commits
logan-5 updated this revision to Diff 216757. logan-5 added a comment. Tweaked comment wording for accuracy. 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] D66555: [driver] add a new option `-gen-cdb-fragment-path` to emit a fragment of a compilation database for each compilation

2019-08-22 Thread Jan Korous via Phabricator via cfe-commits
jkorous added inline comments. Comment at: clang/lib/Driver/ToolChains/Clang.h:99 + void DumpCompilationDatabaseFragmentToDir( + StringRef Dir, Compilation , StringRef Target, const InputInfo , + const InputInfo , const llvm::opt::ArgList ) const; BTW

[PATCH] D66555: [driver] add a new option `-gen-cdb-fragment-path` to emit a fragment of a compilation database for each compilation

2019-08-22 Thread Jan Korous via Phabricator via cfe-commits
jkorous added inline comments. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:2067 + const auto = C.getDriver(); + auto CWD = Driver.getVFS().getCurrentWorkingDirectory(); + if (!CWD) { Do we still need this now? Comment at:

r369722 - PR42587: diagnose unexpanded uses of a pack parameter of a generic

2019-08-22 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Aug 22 18:41:48 2019 New Revision: 369722 URL: http://llvm.org/viewvc/llvm-project?rev=369722=rev Log: PR42587: diagnose unexpanded uses of a pack parameter of a generic lambda from within the lambda-declarator. Modified: cfe/trunk/lib/Sema/SemaLambda.cpp

[PATCH] D66627: [clang-tidy] new check: bugprone-pthread-return

2019-08-22 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/PthreadReturnCheck.cpp:1 +//===--- PthreadReturnCheck.cpp - +//clang-tidy-===// Please make it single line, 80 characters long.

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

2019-08-22 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. This seems subtle, but I believe it is correct. I wonder whether we should provide a warning for a non-final class has a final destructor, since moving the `final` from the destructor to the

[PATCH] D66627: [clang-tidy] new check: bugprone-pthread-return

2019-08-22 Thread Jian Cai via Phabricator via cfe-commits
jcai19 created this revision. Herald added subscribers: cfe-commits, jfb, xazax.hun, mgorny. Herald added a project: clang. Checks if any calls to POSIX pthread functions expect negative return values. These functions return either 0 on success or an errno on failure, which is positive only.

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

2019-08-22 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tidy/fpga/FPGATidyModule.cpp:15 + + +using namespace clang::ast_matchers; Unnecessary empty line. Comment at: clang-tidy/fpga/FPGATidyModule.cpp:32 + +} // namespace flocl +

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

2019-08-22 Thread Dominic Ferreira via Phabricator via cfe-commits
domdom added a comment. Thanks @aaron.ballman! I will need someone to commit this for me :) Cheers, Dom CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62571/new/ https://reviews.llvm.org/D62571 ___ cfe-commits mailing list

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

2019-08-22 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers accepted this revision. nickdesaulniers added a comment. Thanks for being responsive to all this code review!  Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66186/new/ https://reviews.llvm.org/D66186

[PATCH] D66573: [clang][ifs] Dropping older experimental interface stub formats.

2019-08-22 Thread Puyan Lotfi via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL369719: [clang][ifs] Dropping older experimental interface stub formats. (authored by zer0, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit:

r369719 - [clang][ifs] Dropping older experimental interface stub formats.

2019-08-22 Thread Puyan Lotfi via cfe-commits
Author: zer0 Date: Thu Aug 22 16:44:34 2019 New Revision: 369719 URL: http://llvm.org/viewvc/llvm-project?rev=369719=rev Log: [clang][ifs] Dropping older experimental interface stub formats. I've been working on a new tool, llvm-ifs, for merging interface stub files generated by clang and I've

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

2019-08-22 Thread Nathan Huckleberry via Phabricator via cfe-commits
Nathan-Huckleberry updated this revision to Diff 216739. Nathan-Huckleberry added a comment. - Simplify logic for readability Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66186/new/ https://reviews.llvm.org/D66186 Files:

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

2019-08-22 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/CallEvent.cpp:743-750 + QualType RegionType = DynType.getType(); + if (RegionType->isPointerType()) +RegionType = RegionType->getPointeeType(); + else +RegionType =

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

2019-08-22 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso updated this revision to Diff 216737. Charusso marked 2 inline comments as done. Charusso added a comment. - The null `MemRegion` is a `0 (Loc)`, try to avoid to store it. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66593/new/ https://reviews.llvm.org/D66593 Files:

[PATCH] D66446: [clang][IFS] Adding new Interface Stubs format.

2019-08-22 Thread Puyan Lotfi via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL369715: [clang][ifs] New interface stubs format (llvm triple based). (authored by zer0, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit:

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

2019-08-22 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: clang/lib/Sema/SemaChecking.cpp:8107 +return true; + Pedantic |= ImplicitMatch == analyze_printf::ArgType::NoMatchPedantic; +} At this point `ImplicitMatch` can only have the value

r369715 - [clang][ifs] New interface stubs format (llvm triple based).

2019-08-22 Thread Puyan Lotfi via cfe-commits
Author: zer0 Date: Thu Aug 22 16:29:22 2019 New Revision: 369715 URL: http://llvm.org/viewvc/llvm-project?rev=369715=rev Log: [clang][ifs] New interface stubs format (llvm triple based). After posting llvm-ifs on phabricator, I made some progress in hardening up how I think the format for

r369714 - [libclang][NFC] Remove debug comment

2019-08-22 Thread Jan Korous via cfe-commits
Author: jkorous Date: Thu Aug 22 16:29:10 2019 New Revision: 369714 URL: http://llvm.org/viewvc/llvm-project?rev=369714=rev Log: [libclang][NFC] Remove debug comment Modified: cfe/trunk/tools/libclang/Indexing.cpp Modified: cfe/trunk/tools/libclang/Indexing.cpp URL:

[PATCH] D66622: [Bugfix] fix r369705 unit test

2019-08-22 Thread Nick Desaulniers via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL369713: [Bugfix] fix r369705 unit test (authored by nickdesaulniers, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit:

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

2019-08-22 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. In D66486#1640203 , @mgehre wrote: > In the false-positive example, after the `DerivedToBase`, we see a > constructor call which I think is the copy constructor. Yeah, but we do not have problems with the copy constructors.

r369713 - [Bugfix] fix r369705 unit test

2019-08-22 Thread Nick Desaulniers via cfe-commits
Author: nickdesaulniers Date: Thu Aug 22 16:18:46 2019 New Revision: 369713 URL: http://llvm.org/viewvc/llvm-project?rev=369713=rev Log: [Bugfix] fix r369705 unit test Summary: Aliases aren't supported on OSX. Add a GNU target triple. Reported-by: leonardchan Reported-by: erik.pilkington

[PATCH] D65239: [analyzer] RangeConstraintManager: Apply constraint ranges of bitwise operations

2019-08-22 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added a comment. In overall I wanted to keep the [A, B] shape of the tests, but now they are more precise, thanks! Comment at: clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp:503 + + if (!BinaryOperator::isBitwiseOrShiftOp(SIE->getOpcode())) +return

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

2019-08-22 Thread Nathan Huckleberry via Phabricator via cfe-commits
Nathan-Huckleberry updated this revision to Diff 216730. Nathan-Huckleberry added a comment. - Fix broken logic from previous revision Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66186/new/ https://reviews.llvm.org/D66186 Files:

[PATCH] D65239: [analyzer] RangeConstraintManager: Apply constraint ranges of bitwise operations

2019-08-22 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso updated this revision to Diff 216731. Charusso marked 7 inline comments as done. Charusso edited the summary of this revision. Charusso added a comment. - Fix. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65239/new/ https://reviews.llvm.org/D65239 Files:

[PATCH] D66397: [Diagnostics] Improve -Wxor-used-as-pow

2019-08-22 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone added a comment. @thakis wrote: > What was the motivation for firing on more than bare literals? Well, fundamentally, there is no difference in code quality between any of these snippets: #define BIG 300 double bigpower1() { return 10 ^ BIG; } static constexpr int BIG =

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

2019-08-22 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. You got me convinced. Comment at: clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h:223 + using visitor_iterator = VisitorList::iterator; + using visitor_range = llvm::iterator_range; + I think I added a visitor

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

2019-08-22 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri requested changes to this revision. lebedev.ri added a comment. This revision now requires changes to proceed. Please can you explain why the snippet i posted in-line does not work for you? Comment at: clang/lib/Sema/SemaChecking.cpp:8105-8107 + if

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

2019-08-22 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. These assertions are fundamental, so we can't remove them; i believe we messed up modeling at some point. I'll pick this up to address some nasty regressions quickly; i managed to reproduce the crashes and i already have 4 creduces running. Comment at:

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

2019-08-22 Thread Nathan Huckleberry via Phabricator via cfe-commits
Nathan-Huckleberry updated this revision to Diff 216729. Nathan-Huckleberry added a comment. - Remove else and |= Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66186/new/ https://reviews.llvm.org/D66186 Files: clang/lib/AST/FormatString.cpp

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

2019-08-22 Thread Nathan Huckleberry via Phabricator via cfe-commits
Nathan-Huckleberry marked an inline comment as done. Nathan-Huckleberry added inline comments. Comment at: clang/lib/Sema/SemaChecking.cpp:8100-8107 +// All further checking is done on the subexpression +Match = AT.matchesType(S.Context, ExprTy); +if

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

2019-08-22 Thread Nathan Huckleberry via Phabricator via cfe-commits
Nathan-Huckleberry marked an inline comment as done. Nathan-Huckleberry added inline comments. Comment at: clang/lib/Sema/SemaChecking.cpp:8100-8107 +// All further checking is done on the subexpression +Match = AT.matchesType(S.Context, ExprTy); +if

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

2019-08-22 Thread Nathan Huckleberry via Phabricator via cfe-commits
Nathan-Huckleberry marked an inline comment as done. Nathan-Huckleberry added inline comments. Comment at: clang/lib/Sema/SemaChecking.cpp:8100-8107 +// All further checking is done on the subexpression +Match = AT.matchesType(S.Context, ExprTy); +if

[PATCH] D66622: [Bugfix] fix r369705 unit test

2019-08-22 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington accepted this revision. erik.pilkington added a comment. This revision is now accepted and ready to land. LGTM, thanks for fixing this! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66622/new/ https://reviews.llvm.org/D66622

[PATCH] D66556: [clang-scan-deps] Minimizer: Correctly handle multi-line content with CR+LF line endings

2019-08-22 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: lib/Lex/DependencyDirectivesSourceMinimizer.cpp:213 + unsigned Len = isEOL(First, End); + assert(Len); + First += Len; Nit: Please add `&& "expected newline")` to the assert. Comment at:

[PATCH] D66492: [Clang][CodeGen] set alias linkage on QualType

2019-08-22 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added a comment. @leonardchan thanks for the report, would you mind reviewing: https://reviews.llvm.org/D66622? Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66492/new/ https://reviews.llvm.org/D66492

Re: r369705 - [Clang][CodeGen] set alias linkage on QualType

2019-08-22 Thread Nick Desaulniers via cfe-commits
Thanks for the report, would you mind reviewing: https://reviews.llvm.org/D66622? On Thu, Aug 22, 2019 at 2:44 PM Erik Pilkington wrote: > > This commit is causing test failures on darwin: > >

[PATCH] D66622: [Bugfix] fix r369705 unit test

2019-08-22 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers created this revision. nickdesaulniers added reviewers: leonardchan, erik.pilkington. Herald added subscribers: cfe-commits, dexonsmith. Herald added a project: clang. Aliases aren't supported on OSX. Add a GNU target triple. Reported-by: leonardchan Reported-by: erik.pilkington

[PATCH] D66404: [CFG] Make destructor calls more accurate

2019-08-22 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ accepted this revision. NoQ added a comment. This revision is now accepted and ready to land. This looks fantastic, thanks! > Note: I don't have commit access. I can commit this for you but i believe you should totally ask for it

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

2019-08-22 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. Aha okay :) Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66621/new/ https://reviews.llvm.org/D66621 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D66492: [Clang][CodeGen] set alias linkage on QualType

2019-08-22 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. I think this patch might be causing some test failures on our mac bots: FAIL: Clang :: CodeGen/alias.c (2014 of 15397) TEST 'Clang :: CodeGen/alias.c' FAILED Script: -- : 'RUN: at line 2';

[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-22 Thread Wei Mi via Phabricator via cfe-commits
wmi added a comment. 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 is disabled for all sanitizer modes. Seems you are right that the disabling the

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

2019-08-22 Thread Logan Smith via Phabricator via cfe-commits
logan-5 added a comment. That appears sort of tangential to me. To clarify, this PR is not (necessarily) about devirtualizing destructors themselves, but rather devirtualizing OTHER member function calls for classes whose destructor is marked `final`, since that is sort of morally equivalent

[PATCH] D66397: [Diagnostics] Improve -Wxor-used-as-pow

2019-08-22 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 updated this revision to Diff 216724. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66397/new/ https://reviews.llvm.org/D66397 Files: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaExpr.cpp test/SemaCXX/warn-xor-as-pow.cpp Index: test/SemaCXX/warn-xor-as-pow.cpp

[PATCH] D66397: [Diagnostics] Improve -Wxor-used-as-pow

2019-08-22 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 updated this revision to Diff 216723. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66397/new/ https://reviews.llvm.org/D66397 Files: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaExpr.cpp test/SemaCXX/warn-xor-as-pow.cpp Index: test/SemaCXX/warn-xor-as-pow.cpp

Re: r369705 - [Clang][CodeGen] set alias linkage on QualType

2019-08-22 Thread Erik Pilkington via cfe-commits
This commit is causing test failures on darwin: http://lab.llvm.org:8080/green/job/clang-stage1-cmake-RA-incremental/1464/consoleFull#-18314650158254eaf0-7326-4999-85b0-388101f2d404

[PATCH] D66397: [Diagnostics] Improve -Wxor-used-as-pow

2019-08-22 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. Removed macro support (again...). I agree with Nico, this warning is on by default so should be as exact as possible without many false positives. While we all know that the Chromium's false positive case could be rewritten for better code readability, on the other

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

2019-08-22 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. https://reviews.llvm.org/rGcb30590da10ba80a133222588efedab7e5fc9bdd does not help here? Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66621/new/ https://reviews.llvm.org/D66621 ___

[PATCH] D66573: [clang][ifs] Dropping older experimental interface stub formats.

2019-08-22 Thread Puyan Lotfi via Phabricator via cfe-commits
plotfi updated this revision to Diff 216722. plotfi added a comment. Better diag Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66573/new/ https://reviews.llvm.org/D66573 Files: clang/include/clang/Frontend/FrontendActions.h

[PATCH] D66397: [Diagnostics] Improve -Wxor-used-as-pow

2019-08-22 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 updated this revision to Diff 216720. xbolva00 added a comment. Addressed Bruno Ricci's tips. Removed macro support. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66397/new/ https://reviews.llvm.org/D66397 Files: include/clang/Basic/DiagnosticSemaKinds.td

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

2019-08-22 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/Sema/SemaChecking.cpp:8106 + if (ImplicitMatch == analyze_printf::ArgType::NoMatchPedantic) +Pedantic |= true; + else I don't think this needs to use `|= true`. If

[PATCH] D66559: [OPENMP] Update the diagnosis message for canonical loop form

2019-08-22 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D66559#1641827 , @cchen wrote: > Is there any way that I can find the OpenMP version in Clang? I couldn't find > any example in source code. Thanks. LangOpts.OpenMP has the version of OpenMP. For OpenMP 5.0 this value is set

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

2019-08-22 Thread Logan Smith via Phabricator via cfe-commits
logan-5 created this revision. logan-5 added a reviewer: rsmith. logan-5 added a project: clang. Herald added subscribers: cfe-commits, Prazek. A class with a destructor marked `final` cannot be derived from, so it should afford the same devirtualization opportunities as marking the entire class

[PATCH] D66555: [driver] add a new option `-gen-cdb-fragment-path` to emit a fragment of a compilation database for each compilation

2019-08-22 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman updated this revision to Diff 216717. arphaman added a comment. Herald added a subscriber: ributzka. Reimplement the new option on top of `-MJ`. `-MJ` is still the preferred option if both are specified. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D66555: [driver] add a new option `-gen-cdb-fragment-path` to emit a fragment of a compilation database for each compilation

2019-08-22 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. @jkorous I addressed your comments as well ("" directory is now allowed, error is reported, existing escape used). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66555/new/ https://reviews.llvm.org/D66555

[PATCH] D66559: [OPENMP] Update the diagnosis message for canonical loop form

2019-08-22 Thread Chi Chun Chen via Phabricator via cfe-commits
cchen added a comment. Is there any way that I can find the OpenMP version in Clang? I couldn't find any example in source code. Thanks. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66559/new/ https://reviews.llvm.org/D66559

[PATCH] D54441: [OPENMP] Support relational-op !- (not-equal) as one of the canonical forms of random access iterator

2019-08-22 Thread Chi Chun Chen via Phabricator via cfe-commits
cchen added a comment. Herald added a reviewer: jdoerfert. Herald added a project: LLVM. Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54441/new/ https://reviews.llvm.org/D54441 ___ cfe-commits mailing list

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

2019-08-22 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: clang/lib/Sema/SemaChecking.cpp:8100-8107 +// All further checking is done on the subexpression +Match = AT.matchesType(S.Context, ExprTy); +if (Match) { + if (Match ==

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

2019-08-22 Thread Nathan Huckleberry via Phabricator via cfe-commits
Nathan-Huckleberry updated this revision to Diff 216713. Nathan-Huckleberry added a comment. - Add variable for implicit match and fix comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66186/new/ https://reviews.llvm.org/D66186 Files:

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

2019-08-22 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: clang/lib/Sema/SemaChecking.cpp:8101 +// All further checking is done on the subexpression +Match = AT.matchesType(S.Context, ExprTy); +if (Match) { Maybe leave the top level Match const

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

2019-08-22 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/test/Sema/format-strings-enum-fixed-type.cpp:82 // This is not correct but it is safe. We warn because '%hd' shows intent. + printf("%hd", input);// no-warning aaron.ballman wrote: > This

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

2019-08-22 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: clang/lib/Sema/SemaChecking.cpp:8080-8083 + analyze_printf::ArgType::MatchKind Match = AT.matchesType(S.Context, ExprTy); bool Pedantic = Match == analyze_printf::ArgType::NoMatchPedantic; if (Match ==

[PATCH] D66492: [Clang][CodeGen] set alias linkage on QualType

2019-08-22 Thread Nick Desaulniers via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL369705: [Clang][CodeGen] set alias linkage on QualType (authored by nickdesaulniers, 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-22 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added reviewers: alexfh, djasper, JonasToth. aaron.ballman added a comment. 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 better mix of opinions.

[PATCH] D66397: [Diagnostics] Improve -Wxor-used-as-pow

2019-08-22 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. >> What was the motivation for firing on more than bare literals? First patch supported diagnosing macros. There is no exact motivation why, simply “I just did it” to present working prototype. Based on review, things were adjusted. Some reviewers wanted to keep full

r369705 - [Clang][CodeGen] set alias linkage on QualType

2019-08-22 Thread Nick Desaulniers via cfe-commits
Author: nickdesaulniers Date: Thu Aug 22 13:47:12 2019 New Revision: 369705 URL: http://llvm.org/viewvc/llvm-project?rev=369705=rev Log: [Clang][CodeGen] set alias linkage on QualType Summary: It seems that CodeGen was always using ExternalLinkage when emitting a GlobalDecl with

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

2019-08-22 Thread Nathan Huckleberry via Phabricator via cfe-commits
Nathan-Huckleberry updated this revision to Diff 216702. Nathan-Huckleberry added a comment. - Cleanup test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66186/new/ https://reviews.llvm.org/D66186 Files: clang/lib/AST/FormatString.cpp

[PATCH] D66302: [SVE][Inline-Asm] Support for SVE asm operands

2019-08-22 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen accepted this revision. sdesmalen added a comment. This revision is now accepted and ready to land. Thanks for making these changes @kmclaughlin, LGTM! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66302/new/ https://reviews.llvm.org/D66302

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

2019-08-22 Thread Nathan Huckleberry via Phabricator via cfe-commits
Nathan-Huckleberry updated this revision to Diff 216699. Nathan-Huckleberry added a comment. - Warn when -Wformat-pedantic is set Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66186/new/ https://reviews.llvm.org/D66186 Files:

[PATCH] D66492: [Clang][CodeGen] set alias linkage on QualType

2019-08-22 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers updated this revision to Diff 216697. nickdesaulniers added a comment. - add unit test for function Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66492/new/ https://reviews.llvm.org/D66492 Files:

[PATCH] D66179: [LifetimeAnalysis] Support more STL idioms (template forward declaration and DependentNameType)

2019-08-22 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre marked an inline comment as done. mgehre added a comment. Yes, for libc++ we could add the annotations to its source code, and eventually this would be the cleaner solution. Currently, that is neither sufficient (because one could use libstdc++, MSVC or an older libc++ version) nor

[PATCH] D66397: [Diagnostics] Improve -Wxor-used-as-pow

2019-08-22 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D66397#1639818 , @rsmith wrote: > The `ALPHA_OFFSET` code seems to be unnecessarily "clever" to me. I think the > warning can be suppressed by reversing the operands: > > `ALPHA_OFFSET ^ 2` > > But if I were maintaining

[PATCH] D66179: [LifetimeAnalysis] Support more STL idioms (template forward declaration and DependentNameType)

2019-08-22 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre marked 2 inline comments as done. mgehre added inline comments. Comment at: cfe/trunk/unittests/Sema/GslOwnerPointerInference.cpp:9 + +#include "../ASTMatchers/ASTMatchersTest.h" +#include "clang/ASTMatchers/ASTMatchers.h" thakis wrote: > mgehre wrote: >

[PATCH] D66361: Improve behavior in the case of stack exhaustion.

2019-08-22 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM aside from an accidental newline change. Comment at: include/clang/Basic/DiagnosticSemaKinds.td:15 let CategoryName = "Semantic Issue" in { - def

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

2019-08-22 Thread Matthias Gehre via cfe-commits
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 literals instead. Richard, We are definitely want the gsl::Pointer-based warnings that are enabled by default to be

[PATCH] D66606: IR. Change strip* family of functions to not look through aliases.

2019-08-22 Thread Peter Collingbourne via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL369697: IR. Change strip* family of functions to not look through aliases. (authored by pcc, committed by ). Changed prior to commit: https://reviews.llvm.org/D66606?vs=216671=216694#toc Repository:

[PATCH] D62731: [RFC] Add support for options -fp-model= and -fp-speculation= : specify floating point behavior

2019-08-22 Thread Melanie Blower via Phabricator via cfe-commits
mibintc added a comment. ping, looking for a code review, especially from front end folks. thank you! Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62731/new/ https://reviews.llvm.org/D62731 ___ cfe-commits mailing

  1   2   >