[PATCH] D55552: [Sema] Better static assert diagnostics for expressions involving temporaries.

2018-12-19 Thread Clement Courbet via Phabricator via cfe-commits
courbet updated this revision to Diff 179018. courbet marked 3 inline comments as done. courbet added a comment. address review comments Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D2/new/ https://reviews.llvm.org/D2 Files: include/clang/AST/PrettyPri

[PATCH] D55869: Convert some ObjC retain/release msgSends to runtime calls

2018-12-19 Thread Pete Cooper via Phabricator via cfe-commits
pete updated this revision to Diff 179017. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55869/new/ https://reviews.llvm.org/D55869 Files: include/clang/Basic/ObjCRuntime.h lib/CodeGen/CGObjC.cpp lib/CodeGen/CodeGenFunction.h lib/CodeGen/CodeGenModule.h test/CodeGenObjC/convert

[PATCH] D55869: Convert some ObjC retain/release msgSends to runtime calls

2018-12-19 Thread Pete Cooper via Phabricator via cfe-commits
pete marked 3 inline comments as done. pete added a comment. In D55869#1335783 , @rjmccall wrote: > So, once upon a time this was a problem because we were rewriting the method > calls in the runtime itself. Can you explain how that's not a problem now?

Re: [PATCH] D55828: [clang] [Driver] Disable -faddrsig by default on NetBSD

2018-12-19 Thread Kamil Rytarowski via cfe-commits
On 19.12.2018 22:03, Michał Górny wrote: > On Wed, 2018-12-19 at 21:51 +0100, Joerg Sonnenberger wrote: >> On Tue, Dec 18, 2018 at 04:35:54PM +, Michał Górny via Phabricator via >> cfe-commits wrote: >>> mgorny created this revision. >>> mgorny added reviewers: krytarowski, pcc. >>> >>> Avoid

[PATCH] D55915: [Driver] Make -fno-omit-frame-pointer imply -mno-omit-leaf-frame-pointerand make -fomit-frame-pointer imply -momit-leaf-frame-pointer.This matches GCC's behavior.

2018-12-19 Thread Yuanfang Chen via Phabricator via cfe-commits
tabloid.adroit created this revision. Herald added a subscriber: cfe-commits. llvm.org/PR9825 Repository: rC Clang https://reviews.llvm.org/D55915 Files: lib/CodeGen/CGCall.cpp lib/Driver/ToolChains/Clang.cpp test/Driver/cl-options.c test/Driver/frame-pointer-elim.c Index: test/Dri

[PATCH] D55844: [Fixed Point Arithmetic] Fixed Point Subtraction

2018-12-19 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: clang/lib/CodeGen/CGExprScalar.cpp:3397 Value *Result; - if (ResultFixedSema.isSaturated()) { -llvm::Intrinsic::ID IID = ResultFixedSema.isSigned() - ? llvm::Intrinsic::sadd_sat -

[PATCH] D55662: [Sema][ObjC] Do not warn about repeated uses of weak variables when the variables are accessed in an unevaluated context.

2018-12-19 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In D55662#1336835 , @ahatanak wrote: > In D55662#1335773 , @rjmccall wrote: > > > Okay. You may need to push an unevaluated context when doing that. > > > Since I'm just moving the call to

[PATCH] D55913: [gn build] Add build files for clang/lib/{Analysis, Edit, Sema}

2018-12-19 Thread Petr Hosek via Phabricator via cfe-commits
phosek accepted this revision. phosek added a comment. This revision is now accepted and ready to land. LGTM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55913/new/ https://reviews.llvm.org/D55913 ___ cfe-commits mailing list cfe-commits@l

[PATCH] D55913: [gn build] Add build files for clang/lib/{Analysis, Edit, Sema}

2018-12-19 Thread Nico Weber via Phabricator via cfe-commits
thakis created this revision. thakis added a reviewer: phosek. Nothing interesting. https://reviews.llvm.org/D55913 Files: llvm/utils/gn/secondary/BUILD.gn llvm/utils/gn/secondary/clang/include/clang/Sema/BUILD.gn llvm/utils/gn/secondary/clang/lib/Analysis/BUILD.gn llvm/utils/gn/seconda

[PATCH] D55912: [gn build] Add build files for clang/lib/Lex and clang/lib/AST

2018-12-19 Thread Petr Hosek via Phabricator via cfe-commits
phosek accepted this revision. phosek added a comment. This revision is now accepted and ready to land. LGTM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55912/new/ https://reviews.llvm.org/D55912 ___ cfe-commits mailing list cfe-commits@l

[PATCH] D55912: [gn build] Add build files for clang/lib/Lex and clang/lib/AST

2018-12-19 Thread Nico Weber via Phabricator via cfe-commits
thakis created this revision. thakis added a reviewer: phosek. Nothing interesting. https://reviews.llvm.org/D55912 Files: llvm/utils/gn/secondary/BUILD.gn llvm/utils/gn/secondary/clang/include/clang/AST/BUILD.gn llvm/utils/gn/secondary/clang/lib/AST/BUILD.gn llvm/utils/gn/secondary/cla

[PATCH] D55823: [analyzer] Fix backward compatibility issue after D53280 'Emit an error for invalid -analyzer-config inputs'

2018-12-19 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: lib/Driver/ToolChains/Clang.cpp:3700 + // through them. + for (size_t Index = 0; Index < Args.size(); ++Index) { +if (StringRef(Args.getArgString(Index)).contains("-analyzer-config")) { Needs an LLVM-style loop!~ :)

[PATCH] D55907: [analyzer] RetainCount: Bluntly suppress the CFRetain detection heuristic on a couple of CM functions.

2018-12-19 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 178995. NoQ added a comment. Improve comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55907/new/ https://reviews.llvm.org/D55907 Files: lib/StaticAnalyzer/Core/RetainSummaryManager.cpp test/Analysis/retain-release.m Index: test/Analysis/re

[PATCH] D55907: [analyzer] RetainCount: Bluntly suppress the CFRetain detection heuristic on a couple of CM functions.

2018-12-19 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ created this revision. NoQ added reviewers: dcoughlin, george.karpenkov. Herald added subscribers: cfe-commits, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, szepet, baloghadamsoftware, xazax.hun. If it ends with "Retain" like `CFRetain` and returns a `CFTypeRef` like `CFRetain`

[PATCH] D55875: [analyzer] pr38668: RegionStore: Do not attempt to cast loaded values of non-scalar types.

2018-12-19 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC349701: [analyzer] pr38668: Do not attempt to cast loaded values of non-scalar types. (authored by dergachev, committed by ). Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D

r349701 - [analyzer] pr38668: Do not attempt to cast loaded values of non-scalar types.

2018-12-19 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Wed Dec 19 15:48:44 2018 New Revision: 349701 URL: http://llvm.org/viewvc/llvm-project?rev=349701&view=rev Log: [analyzer] pr38668: Do not attempt to cast loaded values of non-scalar types. It is expected to have the same object (memory region) treated as if it has differe

[PATCH] D55875: [analyzer] pr38668: RegionStore: Do not attempt to cast loaded values of non-scalar types.

2018-12-19 Thread Devin Coughlin via Phabricator via cfe-commits
dcoughlin accepted this revision. dcoughlin added a comment. This revision is now accepted and ready to land. Looks good to me. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55875/new/ https://reviews.llvm.org/D55875 ___ cfe-commits mailing

[PATCH] D54918: [analyzer] Apply clang-format to GenericTaintChecker.cpp

2018-12-19 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC349698: [analyzer] GenericTaint: Fix formatting to prepare for incoming improvements. (authored by dergachev, committed by ). Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D

r349698 - [analyzer] GenericTaint: Fix formatting to prepare for incoming improvements.

2018-12-19 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Wed Dec 19 15:35:08 2018 New Revision: 349698 URL: http://llvm.org/viewvc/llvm-project?rev=349698&view=rev Log: [analyzer] GenericTaint: Fix formatting to prepare for incoming improvements. Patch by Gábor Borsik! Differential Revision: https://reviews.llvm.org/D54918 Mod

r349696 - [analyzer] Improve modeling for returning an object from the top frame with RVO.

2018-12-19 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Wed Dec 19 15:14:06 2018 New Revision: 349696 URL: http://llvm.org/viewvc/llvm-project?rev=349696&view=rev Log: [analyzer] Improve modeling for returning an object from the top frame with RVO. Static Analyzer processes the program function-by-function, sometimes diving int

[PATCH] D55804: [analyzer] C++17: Fix leak false positives when an object with destructor is returned from the top frame.

2018-12-19 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL349696: [analyzer] Improve modeling for returning an object from the top frame with RVO. (authored by dergachev, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https:/

r349691 - Disable -faddsig by default for PS4 target.

2018-12-19 Thread Douglas Yung via cfe-commits
Author: dyung Date: Wed Dec 19 14:45:26 2018 New Revision: 349691 URL: http://llvm.org/viewvc/llvm-project?rev=349691&view=rev Log: Disable -faddsig by default for PS4 target. Modified: cfe/trunk/lib/Driver/ToolChains/Clang.cpp cfe/trunk/test/Driver/addrsig.c Modified: cfe/trunk/lib/Driv

[PATCH] D54724: [Driver] Automatically include C++ library dependencies

2018-12-19 Thread Petr Hosek via Phabricator via cfe-commits
phosek added a comment. In D54724#1304986 , @dim wrote: > I think I understand the motivation, it's just that the toolchain classes > were split up specifically to avoid `if(OS==foo) ... else if(OS==bar) ... > else if(OS==baz)` mazes. So this feels a li

[PATCH] D55710: add pragmas to control Software Pipelining optimisation

2018-12-19 Thread Alexey Lapshin via Phabricator via cfe-commits
alexey.lapshin updated this revision to Diff 178956. alexey.lapshin edited the summary of this revision. alexey.lapshin added a comment. Please consider this change: 1. addressed style issues and formatted patch with clang-format 2. renamed pragma pipeline_ii_count to pipeline_initiation_interval

[PATCH] D55875: [analyzer] pr38668: RegionStore: Do not attempt to cast loaded values of non-scalar types.

2018-12-19 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 178963. NoQ added a comment. Remove the test change that wasn't caused by this patch. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55875/new/ https://reviews.llvm.org/D55875 Files: lib/StaticAnalyzer/Core/Store.cpp test/Analysis/casts.c test/Ana

r349683 - [analyzer] CStringChecker: Add the forgotten test file.

2018-12-19 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Wed Dec 19 13:51:59 2018 New Revision: 349683 URL: http://llvm.org/viewvc/llvm-project?rev=349683&view=rev Log: [analyzer] CStringChecker: Add the forgotten test file. Differential Revision: https://reviews.llvm.org/D55873 rdar://problem/45366551 Added: cfe/trunk/tes

[PATCH] D55873: [analyzer] CStringChecker: Fix a crash when an argument of a weird type is encountered.

2018-12-19 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC349682: [analyzer] CStringChecker: Fix a crash on C++ overloads of standard functions. (authored by dergachev, committed by ). Changed prior to commit: https://reviews.llvm.org/D55873?vs=178959&id=17896

[PATCH] D55662: [Sema][ObjC] Do not warn about repeated uses of weak variables when the variables are accessed in an unevaluated context.

2018-12-19 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. In D55662#1335773 , @rjmccall wrote: > Okay. You may need to push an unevaluated context when doing that. Since I'm just moving the call to `CheckPlaceholderExpr` to the call site, I don't think I have to push an unevaluated c

r349682 - [analyzer] CStringChecker: Fix a crash on C++ overloads of standard functions.

2018-12-19 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Wed Dec 19 13:50:46 2018 New Revision: 349682 URL: http://llvm.org/viewvc/llvm-project?rev=349682&view=rev Log: [analyzer] CStringChecker: Fix a crash on C++ overloads of standard functions. It turns out that it's not all that uncommon to have a C++ override of, say, memcp

[PATCH] D55853: Ignore ConstantExpr in IgnoreParenNoopCasts

2018-12-19 Thread Reid Kleckner via Phabricator via cfe-commits
rnk marked an inline comment as done. rnk added inline comments. Comment at: clang/lib/AST/Expr.cpp:2694 while (true) { E = E->IgnoreParens(); rsmith wrote: > Maybe `IgnoreParens` should be doing this itself? I can do that, it passes tests. CHANGES SI

[PATCH] D55853: Ignore ConstantExpr in IgnoreParenNoopCasts

2018-12-19 Thread Reid Kleckner via Phabricator via cfe-commits
rnk updated this revision to Diff 178960. rnk added a comment. - move to IgnoreParens CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55853/new/ https://reviews.llvm.org/D55853 Files: clang/lib/AST/Expr.cpp clang/test/CodeGenCXX/mangle-ms-templates.cpp Index: clang/test/CodeGenCXX/

[PATCH] D55873: [analyzer] CStringChecker: Fix a crash when an argument of a weird type is encountered.

2018-12-19 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 178959. NoQ added a comment. Fxd. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55873/new/ https://reviews.llvm.org/D55873 Files: lib/StaticAnalyzer/Checkers/CStringChecker.cpp test/Analysis/string.cpp Index: test/Analysis/string.cpp =

[PATCH] D55662: [Sema][ObjC] Do not warn about repeated uses of weak variables when the variables are accessed in an unevaluated context.

2018-12-19 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 178957. ahatanak added a comment. Remove the call to `CheckPlaceholderExpr` in `Sema::BuildDecltypeType` and move it to `Sema::DeduceAutoType`. Assert that the expression that is passed to `Sema::BuildDecltypeType` isn't a placeholder. Repository: rC Cl

[PATCH] D55823: [analyzer] Fix backward compatibility issue after D53280 'Emit an error for invalid -analyzer-config inputs'

2018-12-19 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. It works! :D I guess, please commit this if you don't find anything better. Comment at: test/Analysis/invalid-analyzer-config-value.c:72 +// even if -analyze isn't specified. +//

[PATCH] D55628: Add support for "labels" on push/pop directives in #pragma clang attribute

2018-12-19 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added inline comments. Comment at: clang/lib/Parse/ParsePragma.cpp:3161 + if (!Tok.is(tok::period)) { +PP.Diag(Tok.getLocation(), diag::err_pragma_attribute_expected_period) +<< II; aaron.ballman wrote: > Can you reuse `di

[PATCH] D55628: Add support for "labels" on push/pop directives in #pragma clang attribute

2018-12-19 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington updated this revision to Diff 178952. erik.pilkington marked 4 inline comments as done. erik.pilkington added a comment. Add Aaron's testcase, improve the documentation a bit. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55628/new/ https://reviews.llvm.org/D55628 Files

[PATCH] D55895: NFC: simplify Darwin environment handling

2018-12-19 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. I think we might need to run it past the internal builds to see if anything breaks. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55895/new/ https://reviews.llvm.org/D55895 ___ cfe-commits

[PATCH] D55873: [analyzer] CStringChecker: Fix a crash when an argument of a weird type is encountered.

2018-12-19 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: lib/StaticAnalyzer/Checkers/CStringChecker.cpp:2317-2320 else if (isCPPStdLibraryFunction(FDecl, "copy")) evalFunction = &CStringChecker::evalStdCopy; else if (isCPPStdLibraryFunction(FDecl, "copy_backward")) evalFunction =

Re: [PATCH] D55828: [clang] [Driver] Disable -faddrsig by default on NetBSD

2018-12-19 Thread Michał Górny via cfe-commits
On Wed, 2018-12-19 at 21:51 +0100, Joerg Sonnenberger wrote: > On Tue, Dec 18, 2018 at 04:35:54PM +, Michał Górny via Phabricator via > cfe-commits wrote: > > mgorny created this revision. > > mgorny added reviewers: krytarowski, pcc. > > > > Avoid passing -faddrsig by default on NetBSD. Thi

[PATCH] D55890: [X86][SSE] Auto upgrade PADDS/PSUBS intrinsics to SADD_SAT/SSUB_SAT generic intrinsics (clang)

2018-12-19 Thread Craig Topper via Phabricator via cfe-commits
craig.topper accepted this revision. craig.topper added a comment. This revision is now accepted and ready to land. LGTM Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55890/new/ https://reviews.llvm.org/D55890 ___ cfe

[PATCH] D55890: [X86][SSE] Auto upgrade PADDS/PSUBS intrinsics to SADD_SAT/SSUB_SAT generic intrinsics (clang)

2018-12-19 Thread Simon Pilgrim via Phabricator via cfe-commits
RKSimon updated this revision to Diff 178946. RKSimon added a comment. Use ArrayRef Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55890/new/ https://reviews.llvm.org/D55890 Files: lib/CodeGen/CGBuiltin.cpp test/CodeGen/avx2-builtins.c test/CodeGen/avx512bw-

Re: [PATCH] D55828: [clang] [Driver] Disable -faddrsig by default on NetBSD

2018-12-19 Thread Joerg Sonnenberger via cfe-commits
On Tue, Dec 18, 2018 at 04:35:54PM +, Michał Górny via Phabricator via cfe-commits wrote: > mgorny created this revision. > mgorny added reviewers: krytarowski, pcc. > > Avoid passing -faddrsig by default on NetBSD. This platform is still > using old GNU binutils that crashes on executables

[PATCH] D55865: [ObjC] Add a new attribute to opt-out of implicit callee retain/release in ARC

2018-12-19 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:3492 +def warn_ignored_objc_externally_retained : Warning< + "'objc_externally_retained' can only be applied to strong retainable " + "object pointer types with automatic storage">, InG

[PATCH] D55865: [ObjC] Add a new attribute to opt-out of implicit callee retain/release in ARC

2018-12-19 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/Sema/SemaDeclAttr.cpp:6117 + // to ensure that the variable is 'const' so that we can error on + // modification, which can otherwise overrelease. + VD->setType(Ty.withConst()); erik.pilkington wrote:

[PATCH] D52117: Generate llvm.loop.parallel_accesses instead of llvm.mem.parallel_loop_access metadata.

2018-12-19 Thread Michael Kruse via Phabricator via cfe-commits
Meinersbur updated this revision to Diff 178944. Meinersbur added a comment. - Fix typo Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D52117/new/ https://reviews.llvm.org/D52117 Files: lib/CodeGen/CGLoopInfo.cpp lib/CodeGen/CGLoopInfo.h test/CodeGenCXX/prag

[PATCH] D55847: [gn build] Add build file for clang/lib/Basic and dependencies

2018-12-19 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL349677: [gn build] Add build file for clang/lib/Basic and dependencies (authored by nico, committed by ). Herald added subscribers: llvm-commits, delcypher, mgorny. Changed prior to commit: https://revi

[PATCH] D55875: [analyzer] pr38668: RegionStore: Do not attempt to cast loaded values of non-scalar types.

2018-12-19 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ marked an inline comment as done. NoQ added inline comments. Comment at: test/Analysis/bstring.cpp:47 + // The TRUE warning shows up on the path on which the vector is empty. clang_analyzer_eval(i == 66); // expected-warning {{UNKNOWN}} dcoughlin wrote:

[PATCH] D55878: [Driver] Use --hash-style=gnu instead of both on FreeBSD

2018-12-19 Thread Simon Dardis via Phabricator via cfe-commits
sdardis added a comment. > I can't find rationale behind the MIPS discrepancy in the original commit. I > can add the if branch back if you tell me why... From my recollections, the gnu-hash style isn't supported in ld.bfd for MIPS. A patch was posted to the binutils list (https://sourceware.o

[PATCH] D48753: [libcxx] Use custom allocator's `construct` in C++03 when available.

2018-12-19 Thread Volodymyr Sapsai via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL349676: [libcxx] Use custom allocator's `construct` in C++03 when available. (authored by vsapsai, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.

[PATCH] D55873: [analyzer] CStringChecker: Fix a crash when an argument of a weird type is encountered.

2018-12-19 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 178938. NoQ marked an inline comment as done. NoQ added a comment. Indeed :) CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55873/new/ https://reviews.llvm.org/D55873 Files: lib/StaticAnalyzer/Checkers/CStringChecker.cpp test/Analysis/string.cpp I

[PATCH] D55804: [analyzer] C++17: Fix leak false positives when an object with destructor is returned from the top frame.

2018-12-19 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: lib/StaticAnalyzer/Core/ExprEngineCXX.cpp:224 +bool IsArray = false; +V = makeZeroElementRegion(State, V, ReturnTy, IsArray); +assert(!IsArray && "Returning array from a function!"); dcoughlin wrote:

[PATCH] D55804: [analyzer] C++17: Fix leak false positives when an object with destructor is returned from the top frame.

2018-12-19 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 178936. NoQ marked 2 inline comments as done. NoQ added a comment. Fxd! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55804/new/ https://reviews.llvm.org/D55804 Files: lib/StaticAnalyzer/Core/ExprEngineCXX.cpp test/Analysis/temporaries.cpp Index:

[PATCH] D55862: [Sema] Don't try to account for the size of an incomplete type in CheckArrayAccess

2018-12-19 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added inline comments. Comment at: lib/Sema/SemaChecking.cpp:12357 + Context.getAsConstantArrayType(BaseExpr->getType()); + const Type *BaseType = BaseExpr->getType()->getPointeeOrArrayElementType(); + Using getPointeeOrArrayElementType here is kin

[PATCH] D55543: [CodeGen] Fix assertion on throwing object with inlined inherited constructor and non-trivial destructor.

2018-12-19 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Thanks, LGTM. Somewhat surprised that we don't have an implicit copy of the `Strong` argument, but it's not a bad thing that we don't. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55543/new/ https://reviews.llvm.org/D55543

r349669 - PR40096: Forwards-compatible with C++20 rule regarding aggregates not having user-declared ctors

2018-12-19 Thread David Blaikie via cfe-commits
Author: dblaikie Date: Wed Dec 19 11:33:35 2018 New Revision: 349669 URL: http://llvm.org/viewvc/llvm-project?rev=349669&view=rev Log: PR40096: Forwards-compatible with C++20 rule regarding aggregates not having user-declared ctors Looks like these were in place to make these types move-only. Th

[PATCH] D55890: [X86][SSE] Auto upgrade PADDS/PSUBS intrinsics to SADD_SAT/SSUB_SAT generic intrinsics (clang)

2018-12-19 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: lib/CodeGen/CGBuiltin.cpp:9492 static Value *EmitX86AddSubSatExpr(CodeGenFunction &CGF, - SmallVectorImpl &Ops, + SmallVectorImpl &Ops, bool IsSigned,

[PATCH] D55865: [ObjC] Add a new attribute to opt-out of implicit callee retain/release in ARC

2018-12-19 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington updated this revision to Diff 178928. erik.pilkington marked 10 inline comments as done. erik.pilkington added a comment. Address @aaron.ballman comments, rebase onto r349535. Thanks! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55865/new/ https://reviews.llvm.org/D5586

[PATCH] D55865: [ObjC] Add a new attribute to opt-out of implicit callee retain/release in ARC

2018-12-19 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:3492 +def warn_ignored_objc_externally_retained : Warning< + "'objc_externally_retained' can only be applied to strong retainable " + "object pointer types with automatic storage

[PATCH] D55823: [analyzer] Fix backward compatibility issue after D53280 'Emit an error for invalid -analyzer-config inputs'

2018-12-19 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus marked 2 inline comments as done. Szelethus added inline comments. Comment at: test/Analysis/invalid-analyzer-config-value.c:72 +// even if -analyze isn't specified. +// RUN: %clang --analyze -Xclang -analyzer-config -Xclang remember=TheVasa %s + Szelet

[PATCH] D55823: [analyzer] Fix backward compatibility issue after D53280 'Emit an error for invalid -analyzer-config inputs'

2018-12-19 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus updated this revision to Diff 178927. Szelethus added a comment. I'm still looking for a sensible solution, but I'll at least share a patch that actually works. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55823/new/ https://reviews.llvm.org/D55823 Files: lib/Driver/ToolC

[PATCH] D55895: NFC: simplify Darwin environment handling

2018-12-19 Thread JF Bastien via Phabricator via cfe-commits
jfb created this revision. jfb added reviewers: dexonsmith, arphaman. Herald added subscribers: cfe-commits, jkorous. The previous code detected conflicts through copy-pasta, this versions uses a 'loop'. Repository: rC Clang https://reviews.llvm.org/D55895 Files: lib/Driver/ToolChains/Darw

[PATCH] D48753: [libcxx] Use custom allocator's `construct` in C++03 when available.

2018-12-19 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. Ping. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D48753/new/ https://reviews.llvm.org/D48753 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D55823: [analyzer] Fix backward compatibility issue after D53280 'Emit an error for invalid -analyzer-config inputs'

2018-12-19 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus marked an inline comment as done. Szelethus added inline comments. Comment at: lib/Driver/ToolChains/Clang.cpp:3694 + { +auto AnalyzerConfigArg = When I dump `Args` for the following invocation, I get this: `clang -c dummie.cpp -Xclang -analyzer

[PATCH] D55543: [CodeGen] Fix assertion on throwing object with inlined inherited constructor and non-trivial destructor.

2018-12-19 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai updated this revision to Diff 178921. vsapsai added a comment. - [ObjC++] Verify there are no unexpected calls. `--implicit-check-not` seems reasonable approach in this case. It causes adding `Inheritor` destructors but gives higher confidence there are no unexpected calls in unexpected p

LLVM lab maintenance works in the nearest hour

2018-12-19 Thread Galina Kistanova via cfe-commits
Hello everyone, LLVM lab could be unavailable for very short time in about next half hour due to maintenance works in llvm lab. Thank you for understanding. Thanks Galina ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llv

[PATCH] D55850: [OpenCL] Allow address spaces as method qualifiers

2018-12-19 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/Parse/ParseDecl.cpp:6162 +} + } + Anastasia wrote: > rjmccall wrote: > > This is enforcing a restriction that users write `const __private`, which > > seems unreasonable. It looks like `ParseTypeQuali

[PATCH] D55847: [gn build] Add build file for clang/lib/Basic and dependencies

2018-12-19 Thread Petr Hosek via Phabricator via cfe-commits
phosek accepted this revision. phosek added a comment. This revision is now accepted and ready to land. LGTM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55847/new/ https://reviews.llvm.org/D55847 ___ cfe-commits mailing list cfe-commits@l

[PATCH] D55892: [OpenMP] 'close' map-type-modifier code generation

2018-12-19 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev accepted this revision. ABataev added a comment. This revision is now accepted and ready to land. LG Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55892/new/ https://reviews.llvm.org/D55892 ___ cfe-commits ma

[PATCH] D55892: [OpenMP] 'close' map-type-modifier code generation

2018-12-19 Thread Ahsan Saghir via Phabricator via cfe-commits
saghir created this revision. saghir added reviewers: ABataev, kkwli0, Hahnfeld, RaviNarayanaswamy, mikerice, hfinkel, gtbercea. saghir added a project: OpenMP. Herald added subscribers: cfe-commits, guansong. This patch provides codegen support for close map-type-modifier in map clause. A map c

r349657 - [OPENMP]Mark the loop as started when initialized.

2018-12-19 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Wed Dec 19 10:16:37 2018 New Revision: 349657 URL: http://llvm.org/viewvc/llvm-project?rev=349657&view=rev Log: [OPENMP]Mark the loop as started when initialized. Need to mark the loop as started when the initialization statement is found. It is required to prevent possible

[PATCH] D55878: [Driver] Use --hash-style=gnu instead of both on FreeBSD

2018-12-19 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 178908. MaskRay edited the summary of this revision. MaskRay added a comment. Bring back MIPS special case Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55878/new/ https://reviews.llvm.org/D55878 Files: lib/Driver/ToolChai

[PATCH] D55885: [CodeComplete] Properly determine qualifiers of 'this' in a lambda

2018-12-19 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL349655: [CodeComplete] Properly determine qualifiers of 'this' in a lambda (authored by ibiryukov, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM CHANGES SINCE LAST ACTION

r349655 - [CodeComplete] Properly determine qualifiers of 'this' in a lambda

2018-12-19 Thread Ilya Biryukov via cfe-commits
Author: ibiryukov Date: Wed Dec 19 10:01:24 2018 New Revision: 349655 URL: http://llvm.org/viewvc/llvm-project?rev=349655&view=rev Log: [CodeComplete] Properly determine qualifiers of 'this' in a lambda Summary: The clang used to pick up the qualifiers of the lamba's call operator (which is alway

[PATCH] D55850: [OpenCL] Allow address spaces as method qualifiers

2018-12-19 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D55850#1335826 , @rjmccall wrote: > You're gating on OpenCL C++ in several places in this patch, but I don't > think you need to. This extension should be available to anyone using > address spaces and C++. Ok, I am happy

[PATCH] D55850: [OpenCL] Allow address spaces as method qualifiers

2018-12-19 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: lib/Parse/ParseDecl.cpp:6162 +} + } + rjmccall wrote: > This is enforcing a restriction that users write `const __private`, which > seems unreasonable. It looks like `ParseTypeQualifierList` takes a flag

[PATCH] D55850: [OpenCL] Allow address spaces as method qualifiers

2018-12-19 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 178904. Anastasia marked an inline comment as done. Anastasia added a comment. Address review comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55850/new/ https://reviews.llvm.org/D55850 Files: lib/Parse/ParseDecl.cpp lib/Sema/SemaOverl

[PATCH] D55654: [clang] [Driver] [NetBSD] Add -D_REENTRANT when using sanitizers

2018-12-19 Thread Michał Górny via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. mgorny marked an inline comment as done. Closed by commit rL349650: [Driver] [NetBSD] Add -D_REENTRANT when using sanitizers (authored by mgorny, committed by ). Herald added a subscriber: llvm-commits. Changed prior to com

[PATCH] D55832: [clang] [Driver] Add .hasAnySanitizer() to SanitizerArgs

2018-12-19 Thread Michał Górny via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL349649: [Driver] Add .hasAnySanitizer() to SanitizerArgs (authored by mgorny, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D55832?vs=178699&

[PATCH] D55830: [clang] [Basic] Correct description of SanitizerSet.empty()

2018-12-19 Thread Michał Górny via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL349648: [Basic] Correct description of SanitizerSet.empty() (authored by mgorny, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D55830?vs=1786

r349650 - [Driver] [NetBSD] Add -D_REENTRANT when using sanitizers

2018-12-19 Thread Michal Gorny via cfe-commits
Author: mgorny Date: Wed Dec 19 09:25:59 2018 New Revision: 349650 URL: http://llvm.org/viewvc/llvm-project?rev=349650&view=rev Log: [Driver] [NetBSD] Add -D_REENTRANT when using sanitizers NetBSD intends to support only reentrant interfaces in interceptors. When -lpthread is used without _REENTR

[PATCH] D55828: [clang] [Driver] Disable -faddrsig by default on NetBSD

2018-12-19 Thread Michał Górny via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC349647: [Driver] Disable -faddrsig by default on NetBSD (authored by mgorny, committed by ). Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55828/new/ https://reviews.llvm.

r349649 - [Driver] Add .hasAnySanitizer() to SanitizerArgs

2018-12-19 Thread Michal Gorny via cfe-commits
Author: mgorny Date: Wed Dec 19 09:25:55 2018 New Revision: 349649 URL: http://llvm.org/viewvc/llvm-project?rev=349649&view=rev Log: [Driver] Add .hasAnySanitizer() to SanitizerArgs Add a simple method to query whether any sanitizer was enabled, via SanitizerArgs. This will be used in the NetBSD

r349647 - [Driver] Disable -faddrsig by default on NetBSD

2018-12-19 Thread Michal Gorny via cfe-commits
Author: mgorny Date: Wed Dec 19 09:25:46 2018 New Revision: 349647 URL: http://llvm.org/viewvc/llvm-project?rev=349647&view=rev Log: [Driver] Disable -faddrsig by default on NetBSD Avoid passing -faddrsig by default on NetBSD. This platform is still using old GNU binutils that crashes on executa

r349648 - [Basic] Correct description of SanitizerSet.empty()

2018-12-19 Thread Michal Gorny via cfe-commits
Author: mgorny Date: Wed Dec 19 09:25:51 2018 New Revision: 349648 URL: http://llvm.org/viewvc/llvm-project?rev=349648&view=rev Log: [Basic] Correct description of SanitizerSet.empty() Differential Revision: https://reviews.llvm.org/D55830 Modified: cfe/trunk/include/clang/Basic/Sanitizers.h

[PATCH] D55811: [compiler-rt] [sanitizer_common] Fix sha2 interceptors not to use vars in array len

2018-12-19 Thread Michał Górny via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL349645: [sanitizer_common] Fix sha2 interceptors not to use vars in array len (authored by mgorny, committed by ). Herald added a subscriber: delcypher. Changed prior to commit: https://reviews.llvm.org

[PATCH] D55552: [Sema] Better static assert diagnostics for expressions involving temporaries.

2018-12-19 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone added a comment. LGTM. Tiny style suggestions, which I won't mind if you ignore. Comment at: include/clang/AST/Type.h:995 void getAsStringInternal(std::string &Str, - const PrintingPolicy &Policy) const { -return getAsStringInternal(

[PATCH] D55891: [compiler-rt] [xray] [tests] Detect and handle missing LLVMTestingSupport gracefully

2018-12-19 Thread Michał Górny via Phabricator via cfe-commits
mgorny created this revision. mgorny added reviewers: krytarowski, dberris, george.karpenkov. Herald added subscribers: Sanitizers, llvm-commits. Add a code to properly test for presence of LLVMTestingSupport library when performing a stand-alone build, and skip tests requiring it when it is not p

[PATCH] D53891: [LTO] Add option to enable LTOUnit splitting, and disable unless needed

2018-12-19 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson marked 2 inline comments as done. tejohnson added inline comments. Comment at: lib/CodeGen/BackendUtil.cpp:831 + *OS, CodeGenOpts.EmitLLVMUseLists, EmitLTOSummary, + /*EmitModuleHash=*/false)); } pcc wrote: > Why add this argument

[PATCH] D55552: [Sema] Better static assert diagnostics for expressions involving temporaries.

2018-12-19 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, but you should wait a few days before committing in case @Quuxplusone has comments. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D2/new

[PATCH] D55890: [X86][SSE] Auto upgrade PADDS/PSUBS intrinsics to SADD_SAT/SSUB_SAT generic intrinsics (clang)

2018-12-19 Thread Simon Pilgrim via Phabricator via cfe-commits
RKSimon created this revision. RKSimon added reviewers: craig.topper, spatel, nikic, tkrupa. Herald added a subscriber: llvm-commits. This emits SADD_SAT/SSUB_SAT generic intrinsics for the SSE saturated math intrinsics. I'm still working on the llvm sibling patch (auto upgrade etc.) as there's

[PATCH] D54450: Get the correct range of tokens for preprocessor conditions

2018-12-19 Thread Miklos Vajna via Phabricator via cfe-commits
vmiklos added a comment. Ping, could this be reviewed, please? :-) Thanks! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54450/new/ https://reviews.llvm.org/D54450 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.or

[PATCH] D55784: [clang-tidy] Update abseil-duration-comparison to handle macro arguments

2018-12-19 Thread Hyrum Wright via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. hwright marked an inline comment as done. Closed by commit rL349636: [clang-tidy] Diagnose abseil-duration-comparison on macro arguments (authored by hwright, committed by ). Herald added a subscriber: llvm-commits. Changed

[clang-tools-extra] r349636 - [clang-tidy] Diagnose abseil-duration-comparison on macro arguments

2018-12-19 Thread Hyrum Wright via cfe-commits
Author: hwright Date: Wed Dec 19 08:03:34 2018 New Revision: 349636 URL: http://llvm.org/viewvc/llvm-project?rev=349636&view=rev Log: [clang-tidy] Diagnose abseil-duration-comparison on macro arguments Summary: This change relaxes the requirements on the utility `rewriteExprFromNumberToDuration`

[PATCH] D55861: [OpenMP] Fix data sharing analysis in nested clause

2018-12-19 Thread Joel E. Denny via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC349635: [OpenMP] Fix data sharing analysis in nested clause (authored by jdenny, committed by ). Changed prior to commit: https://reviews.llvm.org/D55861?vs=178803&id=178890#toc Repository: rC Clang

r349635 - [OpenMP] Fix data sharing analysis in nested clause

2018-12-19 Thread Joel E. Denny via cfe-commits
Author: jdenny Date: Wed Dec 19 07:59:47 2018 New Revision: 349635 URL: http://llvm.org/viewvc/llvm-project?rev=349635&view=rev Log: [OpenMP] Fix data sharing analysis in nested clause Without this patch, clang doesn't complain that X needs explicit data sharing attributes in the following: ```

[PATCH] D55784: [clang-tidy] Update abseil-duration-comparison to handle macro arguments

2018-12-19 Thread Hyrum Wright via Phabricator via cfe-commits
hwright marked 2 inline comments as done. hwright added inline comments. Comment at: test/clang-tidy/abseil-duration-comparison.cpp:146 +#define VALUE_IF_2(e) (e) +#define VALUE_IF(v, e, type) (v ? VALUE_IF_2(absl::To##type##Seconds(e)) : 0) + int a3 = VALUE_IF(1, d1, Double); -

[PATCH] D55552: [Sema] Better static assert diagnostics for expressions involving temporaries.

2018-12-19 Thread Clement Courbet via Phabricator via cfe-commits
courbet updated this revision to Diff 17. courbet added a comment. clang-format diff Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D2/new/ https://reviews.llvm.org/D2 Files: include/clang/AST/PrettyPrinter.h include/clang/AST/Type.h lib/AST/Type

[PATCH] D55552: [Sema] Better static assert diagnostics for expressions involving temporaries.

2018-12-19 Thread Clement Courbet via Phabricator via cfe-commits
courbet updated this revision to Diff 178887. courbet marked 2 inline comments as done. courbet added a comment. address review comments Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D2/new/ https://reviews.llvm.org/D2 Files: include/clang/AST/PrettyPri

[PATCH] D55552: [Sema] Better static assert diagnostics for expressions involving temporaries.

2018-12-19 Thread Clement Courbet via Phabricator via cfe-commits
courbet marked 6 inline comments as done. courbet added inline comments. Comment at: lib/AST/TypePrinter.cpp:165 +static SplitQualType splitAccordingToPolicy(QualType t, +const PrintingPolicy &Policy) { aaron.ballman

[PATCH] D55363: [clangd] Expose FileStatus in LSP.

2018-12-19 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. Could we add a capability to the init request to check for this extension? We don't want to send those notifications to clients that don't have the code to handle them. Another observation: when I played around with the previous version of the patch, `RunningActi

  1   2   >