[PATCH] D45680: [C++2a] Add operator<=> Rewriting - Early Attempt

2018-05-05 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added inline comments. Comment at: lib/Sema/SemaOverload.cpp:9177 +// specified in C++2a [over.match.oper]p1.10. +if (RewrittenCandidateTieBreaker && ICS1.isStandard() && +ICS2.isStandard() && ICS1.Standard.getRank() == ICR_Exact_Match &&

[PATCH] D45680: [C++2a] Add operator<=> Rewriting - Early Attempt

2018-05-05 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 145390. EricWF marked 7 inline comments as done. EricWF added a comment. - Remove the `= default` changes as requested. - Attempt to work around ambiguity in overload resolution caused by differing lvalue or qualification conversions when ranking synthesized

[PATCH] D46441: [clang][CodeGenCXX] Noalias attr for copy/move constructor arguments

2018-05-05 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith requested changes to this revision. rsmith added a comment. This revision now requires changes to proceed. The code you're generating is not correct. The object being constructed cannot be accessed through a pointer not derived from `this`, but for a copy or move constructor, it is

[PATCH] D45476: [C++2a] Implement operator<=> CodeGen and ExprConstant

2018-05-05 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: lib/AST/ExprConstant.cpp:8829 + return EvaluateComparisonBinaryOperator(Info, E, OnSuccess, [&]() { +return ExprEvaluatorBaseTy::VisitBinaryOperator(E); + }); EricWF wrote: > rsmith wrote: > > It'd be clearer to

[PATCH] D46176: Add SourceManagerForFile helper which sets up SourceManager and dependencies for a single file with code snippet

2018-05-05 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 145386. ioeric added a comment. - Replaced forward decl of DiagnosticsEngine with header include. Repository: rC Clang https://reviews.llvm.org/D46176 Files: include/clang/Basic/SourceManager.h lib/Basic/SourceManager.cpp lib/Format/Format.cpp

[PATCH] D46497: [clangd] Populate #include insertions as additional edits in completion items.

2018-05-05 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. ioeric added a reviewer: sammccall. Herald added subscribers: cfe-commits, jkorous, MaskRay, ilya-biryukov, klimek. o Remove IncludeInsertion LSP command. o Populate include insertion edits synchromously in completion items. o Share the code completion compiler

[PATCH] D46496: [Tooling] Pull #include manipulation code from clangFormat into libToolingCore.

2018-05-05 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 145384. ioeric added a comment. - Revert unintended change. Repository: rC Clang https://reviews.llvm.org/D46496 Files: include/clang/Format/Format.h include/clang/Tooling/Core/HeaderIncludes.h lib/Format/Format.cpp

[PATCH] D46496: [Tooling] Pull #include manipulation code from clangFormat into libToolingCore.

2018-05-05 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. ioeric added a reviewer: ilya-biryukov. Herald added subscribers: cfe-commits, mgorny, klimek. Also pull #include related style out of FormatStyle as tooling::IncludeStyle. Repository: rC Clang https://reviews.llvm.org/D46496 Files:

OpenCL Header: Guard all half float usage based on cl_khr_fp16 extension

2018-05-05 Thread via cfe-commits
Hi,   this patch guards all missed half float functions based on the availabiltiy of the OpenCL extension cl_khr_fp16.   Best regards,   JerryIndex: lib/Headers/opencl-c.h === --- lib/Headers/opencl-c.h (revision 331598) +++

[PATCH] D45927: [clang-tidy] [modernize-use-auto] Correct way to calculate a type name length for multi-token types

2018-05-05 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis added inline comments. Comment at: clang-tidy/modernize-use-auto-min-type-name-length.cpp:61-83 +long int li = static_cast(foo()); +// CHECK-FIXES-0-0: auto li = {{.*}} +// CHECK-FIXES-0-5: auto li = {{.*}} +// CHECK-FIXES-1-0: auto li = {{.*}} +

[PATCH] D45944: Disallow pointers to const in __sync_fetch_and_xxx

2018-05-05 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. Committed in r331598, with an additional test case. (Accepting officially on behalf of @rjmccall so that I can close the review.) https://reviews.llvm.org/D45944

r331598 - Disallow pointers to const in __sync_fetch_and_xxx.

2018-05-05 Thread Aaron Ballman via cfe-commits
Author: aaronballman Date: Sat May 5 10:38:42 2018 New Revision: 331598 URL: http://llvm.org/viewvc/llvm-project?rev=331598=rev Log: Disallow pointers to const in __sync_fetch_and_xxx. Diagnoses code like: void f(const int *ptr) { __sync_fetch_and_add(ptr, 1); } which matches the behavior

r331597 - Add -target to address errors in test from r331592

2018-05-05 Thread Teresa Johnson via cfe-commits
Author: tejohnson Date: Sat May 5 09:37:31 2018 New Revision: 331597 URL: http://llvm.org/viewvc/llvm-project?rev=331597=rev Log: Add -target to address errors in test from r331592 The error turns out to be: Assertion failed: (Target.isCompatibleDataLayout(getDataLayout()) && "Can't create a

[PATCH] D45679: [clang-tidy] Add ExprMutationAnalyzer, that analyzes whether an expression is mutated within a statement.

2018-05-05 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D45679#1088696, @shuaiwang wrote: > I've reverted the handling of DeclRefExpr to volatile after rethinking about > it. > > The purpose of this analyzer is to find whether the given Expr is mutated > within a scope, but doesn't really

r331596 - Skip part of test added in r331592 to help debug bot failures

2018-05-05 Thread Teresa Johnson via cfe-commits
Author: tejohnson Date: Sat May 5 08:54:57 2018 New Revision: 331596 URL: http://llvm.org/viewvc/llvm-project?rev=331596=rev Log: Skip part of test added in r331592 to help debug bot failures Trying to debug why/where a few bots getting exit code 256 e.g.

r331593 - Add required target to address bot failures from r331592

2018-05-05 Thread Teresa Johnson via cfe-commits
Author: tejohnson Date: Sat May 5 08:15:04 2018 New Revision: 331593 URL: http://llvm.org/viewvc/llvm-project?rev=331593=rev Log: Add required target to address bot failures from r331592 Failing on non-x86 bots, needs x86 target for code gen. Modified:

[PATCH] D46464: [ThinLTO] Support opt remarks options with distributed ThinLTO backends

2018-05-05 Thread Teresa Johnson via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL331592: [ThinLTO] Support opt remarks options with distributed ThinLTO backends (authored by tejohnson, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM

r331592 - [ThinLTO] Support opt remarks options with distributed ThinLTO backends

2018-05-05 Thread Teresa Johnson via cfe-commits
Author: tejohnson Date: Sat May 5 07:37:29 2018 New Revision: 331592 URL: http://llvm.org/viewvc/llvm-project?rev=331592=rev Log: [ThinLTO] Support opt remarks options with distributed ThinLTO backends Summary: Passes down the necessary code ge options to the LTO Config to enable

[PATCH] D46450: [Driver] Add mips_Features_Group to Options to improve documentation sorting

2018-05-05 Thread Simon Atanasyan via Phabricator via cfe-commits
atanasyan accepted this revision. atanasyan added a comment. This revision is now accepted and ready to land. LGTM Do you have commit access? Repository: rC Clang https://reviews.llvm.org/D46450 ___ cfe-commits mailing list

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

2018-05-05 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun marked 2 inline comments as done. xazax.hun added inline comments. Comment at: docs/LibASTMatchersReference.html:179

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

2018-05-05 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun updated this revision to Diff 145370. xazax.hun added a comment. - Rerun script https://reviews.llvm.org/D46233 Files: docs/LibASTMatchersReference.html include/clang/ASTMatchers/ASTMatchers.h unittests/ASTMatchers/ASTMatchersNarrowingTest.cpp Index:

[PATCH] D46187: [Analyzer] getRegisteredCheckers(): handle debug checkers too.

2018-05-05 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In https://reviews.llvm.org/D46187#1088722, @NoQ wrote: > It seems that you're using debug checkers of the analyzer to gain some free > tools for exploring the source code (such as displaying a call graph) for > free, right? Yes. I was interested to dump the

[PATCH] D45476: [C++2a] Implement operator<=> CodeGen and ExprConstant

2018-05-05 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added inline comments. Comment at: lib/AST/ExprConstant.cpp:8829 + return EvaluateComparisonBinaryOperator(Info, E, OnSuccess, [&]() { +return ExprEvaluatorBaseTy::VisitBinaryOperator(E); + }); rsmith wrote: > It'd be clearer to call `VisitBinCmp`

[PATCH] D46441: [clang][CodeGenCXX] Noalias attr for copy/move constructor arguments

2018-05-05 Thread Anton Bikineev via Phabricator via cfe-commits
AntonBikineev added a comment. @efriedma copy and move constructors are particular cases where the value of a constructed object may be accessed through a glvalue not obtained from 'this' pointer (but from the first arg of a ctor). Repository: rC Clang https://reviews.llvm.org/D46441

[PATCH] D44934: [analyzer] Improve the modeling of `memset()`.

2018-05-05 Thread Henry Wong via Phabricator via cfe-commits
MTC updated this revision to Diff 145361. MTC added a comment. - Since there is no perfect way to handle the default binding of non-zero character, remove the default binding of non-zero character. Use `bindDefaulrZero()` instead of `overwriteRegion()` to bind the zero character. - Reuse

[PATCH] D46155: Add warning flag -Wordered-compare-function-pointers.

2018-05-05 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. Ideally there should be a test that verifies that `-Wordered-compare-function-pointers` / `-Wno-ordered-compare-function-pointers` / the default is what you expect it to be. Repository: rC Clang https://reviews.llvm.org/D46155

[PATCH] D45476: [C++2a] Implement operator<=> CodeGen and ExprConstant

2018-05-05 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added inline comments. Comment at: lib/CodeGen/CGExprAgg.cpp:964 +RHS = CGF.EmitAnyExpr(E->getRHS()).getAggregatePointer(); +break; + case TEK_Complex: EricWF wrote: > rjmccall wrote: > > It looks like we don't actually support any aggregate

[PATCH] D45774: [analyzer] cover more cases where a Loc can be bound to constants

2018-05-05 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added inline comments. Comment at: lib/StaticAnalyzer/Core/RegionStore.cpp:1642-1645 +// Return unknown value if index is out of bounds. +if (i < 0 || i >= InitList->getNumInits()) { + return UnknownVal(); +}

[PATCH] D45476: [C++2a] Implement operator<=> CodeGen and ExprConstant

2018-05-05 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF marked 8 inline comments as done. EricWF added inline comments. Comment at: include/clang/AST/ComparisonCategories.h:71 + /// standard library. The key is a value of ComparisonCategoryResult. + mutable llvm::DenseMap Objects; + rjmccall