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

2017-04-30 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. Has it been discussed whether this is something to be addressed in the optimizer as opposed to the front-end? Comment at: lib/CodeGen/CGExprScalar.cpp:3069 + !isa(RHS)) { +// Based on comparisons of pointers to dynamic

r301787 - Fix test that was incorrected merged between patches.

2017-04-30 Thread Nick Lewycky via cfe-commits
Author: nicholas Date: Sun Apr 30 21:20:06 2017 New Revision: 301787 URL: http://llvm.org/viewvc/llvm-project?rev=301787=rev Log: Fix test that was incorrected merged between patches. Modified: cfe/trunk/test/Sema/integer-overflow.c Modified: cfe/trunk/test/Sema/integer-overflow.c URL:

r301786 - Fix line endings (dos -> unix) and clang-format while I'm here

2017-04-30 Thread David Blaikie via cfe-commits
Author: dblaikie Date: Sun Apr 30 21:11:39 2017 New Revision: 301786 URL: http://llvm.org/viewvc/llvm-project?rev=301786=rev Log: Fix line endings (dos -> unix) and clang-format while I'm here Modified: cfe/trunk/test/SemaCXX/cxx1z-lambda-star-this.cpp Modified:

r301785 - Handle expressions with non-literal types like ignored expressions if we are supposed to continue evaluating them.

2017-04-30 Thread Nick Lewycky via cfe-commits
Author: nicholas Date: Sun Apr 30 21:03:23 2017 New Revision: 301785 URL: http://llvm.org/viewvc/llvm-project?rev=301785=rev Log: Handle expressions with non-literal types like ignored expressions if we are supposed to continue evaluating them. Also fix a crash casting a derived nullptr to a

[PATCH] D31839: make -Winteger-overflow find overflows in function arguments

2017-04-30 Thread Nick Lewycky via Phabricator via cfe-commits
nlewycky updated this revision to Diff 97253. nlewycky added a comment. Use an RAII object to always evaluate the arguments, except if HandleFunctionCall does it. https://reviews.llvm.org/D31839 Files: lib/AST/ExprConstant.cpp test/Sema/integer-overflow.c Index:

[PATCH] D32675: in expression evaluator, treat non-literal types as discarded value expressions if EvalInfo says to continue evaluating them

2017-04-30 Thread Richard Smith via Phabricator via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. Thanks. Could you also add something like: struct A {}; struct B : virtual A {}; constexpr A = (A&)*(B*)0; to test/SemaCXX/constant-expression-cxx11.cpp to ensure we produce a suitable

r301783 - utils: Silence -Wpedantic warning

2017-04-30 Thread Saleem Abdulrasool via cfe-commits
Author: compnerd Date: Sun Apr 30 19:26:59 2017 New Revision: 301783 URL: http://llvm.org/viewvc/llvm-project?rev=301783=rev Log: utils: Silence -Wpedantic warning llvm/tools/clang/utils/TableGen/ClangAttrEmitter.cpp:1673:67: warning: default argument specified for lambda parameter [-Wpedantic]

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

2017-04-30 Thread Jakub Kuderski via Phabricator via cfe-commits
kuhar added a comment. In https://reviews.llvm.org/D32690#741952, @JonasToth wrote: > Would it make sense to add boost pairs/tuples support? I think it can be added the same way it is possible to specify smart pointers and vector-like containers now. It would require users to provide both

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

2017-04-30 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. Nothing to complain from my side. Would it make sense to add boost pairs/tuples support? I could imagine modernize checks that would transform boost structures into the stl ones, but that's another discussion probably. Something for a later check: the same logic

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

2017-04-30 Thread Jakub Kuderski via Phabricator via cfe-commits
kuhar updated this revision to Diff 97248. kuhar added a comment. Cosmetic changes. https://reviews.llvm.org/D32690 Files: clang-tidy/modernize/UseEmplaceCheck.cpp docs/ReleaseNotes.rst test/clang-tidy/modernize-use-emplace.cpp Index: test/clang-tidy/modernize-use-emplace.cpp

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

2017-04-30 Thread Jakub Kuderski via Phabricator via cfe-commits
kuhar created this revision. kuhar added a project: clang-tools-extra. This patch makes modernize-use-emplace remove unnecessary make_tuple calls from push_back calls and turn them into emplace_back -- the same way make_pair calls are handled. Eq. std::vector> v;

[clang-tools-extra] r301780 - [clang-tidy] Fix naming convention in modernize-use-emplace

2017-04-30 Thread Jakub Kuderski via cfe-commits
Author: kuhar Date: Sun Apr 30 16:12:56 2017 New Revision: 301780 URL: http://llvm.org/viewvc/llvm-project?rev=301780=rev Log: [clang-tidy] Fix naming convention in modernize-use-emplace Summary: Conform to the llvm naming convention for local variables in modernize-use-emplace check.

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

2017-04-30 Thread Jakub Kuderski via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL301780: [clang-tidy] Fix naming convention in modernize-use-emplace (authored by kuhar). Changed prior to commit: https://reviews.llvm.org/D32678?vs=97221=97243#toc Repository: rL LLVM

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

2017-04-30 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh accepted this revision. alexfh added a comment. LG https://reviews.llvm.org/D32678 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Missing comma diagnostics patch

2017-04-30 Thread Zaid Alkhishman via cfe-commits
Hello, This patch adds missing comma diagnostics to initializer lists. I'm attaching the .diff (git), an input .c and the compilation output .out Let me know if there are any required changes. Regards, Zaid zaid.al.khish...@gmail.com (Note, I tried subscribing to cfe-commits but it said the

[PATCH] D32646: Fix a bug that -Wmissing-braces fires on system headers

2017-04-30 Thread Rui Ueyama via Phabricator via cfe-commits
ruiu added inline comments. Comment at: lib/Sema/SemaInit.cpp:897 +SemaRef.getSourceManager().isInSystemHeader(SpellingLoc)) + return; SemaRef.Diag(StructuredSubobjectInitList->getLocStart(), Please use clang-format to format your

[PATCH] D32646: Fix a bug that -Wmissing-braces fires on system headers

2017-04-30 Thread Rui Ueyama via Phabricator via cfe-commits
ruiu added inline comments. Comment at: lib/Sema/SemaInit.cpp:875 if (!VerifyOnly) { StructuredSubobjectInitList->setType(T); Is it intentional that you run the new code only when !VerifyOnly? Comment at:

[PATCH] D32646: Fix a bug that -Wmissing-braces fires on system headers

2017-04-30 Thread Yuka Takahashi via Phabricator via cfe-commits
yamaguchi updated this revision to Diff 97228. yamaguchi added a comment. Add check if there is -Wmissing-braces enabled or not. https://reviews.llvm.org/D32646 Files: lib/Sema/SemaInit.cpp test/Sema/warn-missing-braces.c Index: test/Sema/warn-missing-braces.c

[PATCH] D32646: Fix a bug that -Wmissing-braces fires on system headers

2017-04-30 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added a comment. Did you incorporate the comment from here: https://bugs.llvm.org/show_bug.cgi?id=24007#c2 https://reviews.llvm.org/D32646 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D32646: Fix a bug that -Wmissing-braces fires on system headers

2017-04-30 Thread Yuka Takahashi via Phabricator via cfe-commits
yamaguchi updated this revision to Diff 97227. yamaguchi marked 5 inline comments as done. yamaguchi added a comment. Changed to early return. https://reviews.llvm.org/D32646 Files: lib/Sema/SemaInit.cpp test/Sema/warn-missing-braces.c Index: test/Sema/warn-missing-braces.c

[PATCH] D32646: Fix a bug that -Wmissing-braces fires on system headers

2017-04-30 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added a comment. I don't think we should worry about that. Please also see: http://llvm.org/docs/CodingStandards.html#use-early-exits-and-continue-to-simplify-code https://reviews.llvm.org/D32646 ___ cfe-commits mailing list

[PATCH] D32646: Fix a bug that -Wmissing-braces fires on system headers

2017-04-30 Thread Yuka Takahashi via Phabricator via cfe-commits
yamaguchi updated this revision to Diff 97224. yamaguchi added a comment. @v.g.vassilev I don't think early return is good idea, because someone might want to add some code under this function in the future. https://reviews.llvm.org/D32646 Files: lib/Sema/SemaInit.cpp

[PATCH] D32646: Fix a bug that -Wmissing-braces fires on system headers

2017-04-30 Thread Yuka Takahashi via Phabricator via cfe-commits
yamaguchi added inline comments. Comment at: lib/Sema/SemaInit.cpp:892 + SpellingLoc = SemaRef.getSourceManager().getSpellingLoc(SpellingLoc); + if (!(SpellingLoc.isValid() && +SemaRef.getSourceManager().isInSystemHeader(SpellingLoc))) {

[PATCH] D32646: Fix a bug that -Wmissing-braces fires on system headers

2017-04-30 Thread Yuka Takahashi via Phabricator via cfe-commits
yamaguchi added inline comments. Comment at: lib/Sema/SemaInit.cpp:892 + SpellingLoc = SemaRef.getSourceManager().getSpellingLoc(SpellingLoc); + if (!(SpellingLoc.isValid() && +SemaRef.getSourceManager().isInSystemHeader(SpellingLoc))) {

[PATCH] D32646: Fix a bug that -Wmissing-braces fires on system headers

2017-04-30 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added inline comments. Comment at: lib/Sema/SemaInit.cpp:892 + SpellingLoc = SemaRef.getSourceManager().getSpellingLoc(SpellingLoc); + if (!(SpellingLoc.isValid() && +SemaRef.getSourceManager().isInSystemHeader(SpellingLoc))) {

[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

[PATCH] D25051: Fix PR 10758: Infinite recursion when dealing with copy-initialization

2017-04-30 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added a comment. I am not very familiar with this code here. This seems a reasonable fix to me. Unless @rsmith and @ahatanak have objections, please go ahead and land it some time next week. Repository: rL LLVM https://reviews.llvm.org/D25051

[PATCH] D32646: Fix a bug that -Wmissing-braces fires on system headers

2017-04-30 Thread Yuka Takahashi via Phabricator via cfe-commits
yamaguchi marked 2 inline comments as done. yamaguchi added inline comments. Comment at: lib/Sema/SemaInit.cpp:892 + SpellingLoc = SemaRef.getSourceManager().getSpellingLoc(SpellingLoc); + if (!(SpellingLoc.isValid() && +

[PATCH] D32341: Fix a bug that warnings generated with -M or -MM flags

2017-04-30 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added a comment. @teemperor, is this ok with you? https://reviews.llvm.org/D32341 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D31495: Fix a bug that -isysroot is completely ignored on Unix

2017-04-30 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev accepted this revision. v.g.vassilev added a comment. This revision is now accepted and ready to land. LGTM. https://reviews.llvm.org/D31495 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D32646: Fix a bug that -Wmissing-braces fires on system headers

2017-04-30 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added a comment. LGTM, modulo the comment. Comment at: lib/Sema/SemaInit.cpp:892 + SpellingLoc = SemaRef.getSourceManager().getSpellingLoc(SpellingLoc); + if (!(SpellingLoc.isValid() && +

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

2017-04-30 Thread Jakub Kuderski via Phabricator via cfe-commits
kuhar created this revision. kuhar added a project: clang-tools-extra. Conform to llvm naming convention for local variables in modernize-use-emplace check. https://reviews.llvm.org/D32678 Files: clang-tidy/modernize/UseEmplaceCheck.cpp Index: clang-tidy/modernize/UseEmplaceCheck.cpp

[PATCH] D32309: [libcxx] [test] Resolve compiler warnings in LCM/GCD tests

2017-04-30 Thread Casey Carter via Phabricator via cfe-commits
CaseyCarter added inline comments. Comment at: test/std/numerics/numeric.ops/numeric.ops.lcm/lcm.pass.cpp:144 +auto res1 = std::lcm(static_cast(1234), INT32_MIN); +(void)std::lcm(INT_MIN, 2UL); // this used to trigger UBSAN +

[PATCH] D32385: [libcxx] optional: Implement LWG 2900 and P0602

2017-04-30 Thread Casey Carter via Phabricator via cfe-commits
CaseyCarter updated this revision to Diff 97217. CaseyCarter added a comment. Update libc++-specific special member test for extended P0602 implementation. https://reviews.llvm.org/D32385 Files: include/optional test/libcxx/utilities/optional/optional.object/special_member_gen.pass.cpp

[PATCH] D32675: in expression evaluator, treat non-literal types as discarded value expressions if EvalInfo says to continue evaluating them

2017-04-30 Thread Nick Lewycky via Phabricator via cfe-commits
nlewycky created this revision. Make the integer overflow evaluator continue into expressions with non-literal types, notably void. In passing it fixes a crash attempting to codegen: struct A { char x; }; struct B : virtual A {}; A = ((A&)*(B*)0); which we nearly have a test for except