[PATCH] D46241: [CodeGen] Recognize more cases of zero initialization

2018-04-29 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff created this revision. sepavloff added reviewers: rjmccall, rsmith. If a variable has initializer, codegen tries to build its value. It causes strange behavior from user viewpoint: compilation of huge zero initialized arrays like: int char data_1[2147483648u] = { 0 }; consumes

[clang-tools-extra] r331156 - Fix up after clang r331155.

2018-04-29 Thread Richard Smith via cfe-commits
Author: rsmith Date: Sun Apr 29 22:26:07 2018 New Revision: 331156 URL: http://llvm.org/viewvc/llvm-project?rev=331156=rev Log: Fix up after clang r331155. Modified: clang-tools-extra/trunk/clang-move/ClangMove.cpp clang-tools-extra/trunk/clang-tidy/ClangTidyDiagnosticConsumer.cpp

r331155 - PR37189 Fix incorrect end source location and spelling for a split '>>' token.

2018-04-29 Thread Richard Smith via cfe-commits
Author: rsmith Date: Sun Apr 29 22:25:48 2018 New Revision: 331155 URL: http://llvm.org/viewvc/llvm-project?rev=331155=rev Log: PR37189 Fix incorrect end source location and spelling for a split '>>' token. When a '>>' token is split into two '>' tokens (in C++11 onwards), or (as an extension)

[PATCH] D46056: Move _LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS macro to build system

2018-04-29 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. Apologies for misspelling your last name :-( Repository: rCXXA libc++abi https://reviews.llvm.org/D46056 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [libcxxabi] r331150 - Move _LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS macro to build system

2018-04-29 Thread Nico Weber via cfe-commits
This should have said "Patch from Taiju Tsuiki ", apologies. On Sun, Apr 29, 2018 at 7:05 PM, Nico Weber via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: nico > Date: Sun Apr 29 16:05:11 2018 > New Revision: 331150 > > URL:

[PATCH] D46056: Move _LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS macro to build system

2018-04-29 Thread Nico Weber via Phabricator via cfe-commits
thakis closed this revision. thakis added a comment. Landed in r331150: http://llvm.org/viewvc/llvm-project?view=revision=331150 Repository: rCXXA libc++abi https://reviews.llvm.org/D46056 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[libcxxabi] r331150 - Move _LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS macro to build system

2018-04-29 Thread Nico Weber via cfe-commits
Author: nico Date: Sun Apr 29 16:05:11 2018 New Revision: 331150 URL: http://llvm.org/viewvc/llvm-project?rev=331150=rev Log: Move _LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS macro to build system _LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS is currently used to bring back

[PATCH] D46234: Mark if a null statement is the result of constexpr folding

2018-04-29 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. In https://reviews.llvm.org/D46234#1082332, @xazax.hun wrote: > In https://reviews.llvm.org/D46234#1082307, @rsmith wrote: > > > Perhaps we should just use a null pointer for the not-instantiated arm of > > an `if constexpr` instead, rather than tracking a flag on an

[PATCH] D46234: Mark if a null statement is the result of constexpr folding

2018-04-29 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. In https://reviews.llvm.org/D46234#1082307, @rsmith wrote: > Can you say something about why you want to track this? The original motivation was to fix this false positive in clang tidy: https://reviews.llvm.org/D46027 > Perhaps we should just use a null pointer

[PATCH] D46236: [Driver, CodeGen] rename options to disable an FP cast optimization

2018-04-29 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: docs/ReleaseNotes.rst:96 + type, the code has undefined behavior according to the language standard. + Clang will not guarantee any particular result in that case. With the + 'no-strict' option, Clang attempts to match the

[PATCH] D46234: Mark if a null statement is the result of constexpr folding

2018-04-29 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. Can you say something about why you want to track this? Perhaps we should just use a null pointer for the not-instantiated arm of an `if constexpr` instead, rather than tracking a flag on an empty statement that is meaningless for real empty statements. Repository:

[PATCH] D45679: [clang-tidy] Add a helper function isModified, that checks whether an expression is modified within a statement.

2018-04-29 Thread Shuai Wang via Phabricator via cfe-commits
shuaiwang updated this revision to Diff 144490. shuaiwang marked 11 inline comments as done. shuaiwang added a comment. Added an isMutated overload for Decl. A few more test cases. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D45679 Files: clang-tidy/utils/CMakeLists.txt

[PATCH] D45444: [clang-tidy] WIP: implement new check for const-correctness

2018-04-29 Thread Shuai Wang via Phabricator via cfe-commits
shuaiwang added inline comments. Comment at: clang-tidy/cppcoreguidelines/ConstCheck.cpp:229-237 + const auto *UseExpr = selectFirst("use", Usage); + + // The declared variables was used in non-const conserving way and can not + // be declared as const. + if (UseExpr &&

[PATCH] D46236: [Driver, CodeGen] rename options to disable an FP cast optimization

2018-04-29 Thread Sanjay Patel via Phabricator via cfe-commits
spatel updated this revision to Diff 144487. spatel marked 6 inline comments as done. spatel added a comment. Patch updated: 1. Improved language in docs. 2. Added help text for clang options. 3. Added driver test with -fstrict-float-cast-overflow specified explicitly. I'll leave this up for

[PATCH] D46236: [Driver, CodeGen] rename options to disable an FP cast optimization

2018-04-29 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri accepted this revision. lebedev.ri added a comment. This revision is now accepted and ready to land. Overall makes sense to me. Comment at: docs/ReleaseNotes.rst:94 + :option:`-fno-strict-float-cast-overflow` - + When a floating-point value is not representable

Re: r331056 - [docs] add -ffp-cast-overflow-workaround to the release notes

2018-04-29 Thread Sanjay Patel via cfe-commits
Patches to improve the language posted for review: https://reviews.llvm.org/D46236 https://reviews.llvm.org/D46237 On Fri, Apr 27, 2018 at 7:41 PM, Chandler Carruth via cfe-commits < cfe-commits@lists.llvm.org> wrote: > On Fri, Apr 27, 2018 at 5:13 PM Richard Smith >

[PATCH] D46236: [Driver, CodeGen] rename options to disable an FP cast optimization

2018-04-29 Thread Sanjay Patel via Phabricator via cfe-commits
spatel updated this revision to Diff 144481. spatel added a comment. Patch updated: I missed a spot in the release notes - forgot to delete 'workaround' when listing the new options. https://reviews.llvm.org/D46236 Files: docs/ReleaseNotes.rst docs/UsersManual.rst

[PATCH] D46236: [Driver, CodeGen] rename options to disable an FP cast optimization

2018-04-29 Thread Sanjay Patel via Phabricator via cfe-commits
spatel created this revision. spatel added reviewers: rsmith, chandlerc, scanon, hans, echristo, jgorbe, lebedev.ri. Herald added a subscriber: mcrosier. As suggested in the post-commit thread for https://reviews.llvm.org/rL331056, we should match these clang options with the established

[PATCH] D46234: Mark if a null statement is the result of constexpr folding

2018-04-29 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun created this revision. xazax.hun added a reviewer: aaron.ballman. Herald added subscribers: dkrupp, rnkovacs. I did not add tests yet because first I wanted to be sure whether this approach is OK. Repository: rC Clang https://reviews.llvm.org/D46234 Files:

[PATCH] D46233: [ASTMatchers] Overload isConstexpr for ifStmts

2018-04-29 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun created this revision. xazax.hun added reviewers: alexfh, aaron.ballman. Herald added subscribers: dkrupp, rnkovacs, klimek. The HTML is the result of running the `dump_ast_matchers.py` script. There are more changes than I expected, looks like some link disappeared. I do not know if

[PATCH] D45532: [StaticAnalyzer] Checker to find uninitialized fields after a constructor call

2018-04-29 Thread Whisperity via Phabricator via cfe-commits
whisperity added a comment. Two minor comments. With regards to the function naming, the problem with incremental counts is that they get out of sync, like they did with `fXpY` and such, and if someone wants to keep the count incremental down the file, adding any new test will result in an

[PATCH] D46056: Move _LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS macro to build system

2018-04-29 Thread Taiju Tsuiki via Phabricator via cfe-commits
tzik added a comment. rsmith: Thanks! I don't have the commit access to the repository. Could you submit this for me? Repository: rCXXA libc++abi https://reviews.llvm.org/D46056 ___ cfe-commits mailing list cfe-commits@lists.llvm.org