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

2018-12-14 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak marked an inline comment as done. ahatanak added inline comments. Comment at: lib/Sema/SemaType.cpp:8127 QualType Sema::BuildDecltypeType(Expr *E, SourceLocation Loc, bool AsUnevaluated) { ExprResult ER = CheckPlaceholderExpr(E);

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

2018-12-14 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 178341. ahatanak added a comment. Call CheckPlaceholderExpr instead of pushing an unevaluated evaluation context. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55662/new/ https://reviews.llvm.org/D55662 Files:

[libunwind] r349249 - Creating release candidate final from release_701 branch

2018-12-14 Thread Tom Stellard via cfe-commits
Author: tstellar Date: Fri Dec 14 20:32:13 2018 New Revision: 349249 URL: http://llvm.org/viewvc/llvm-project?rev=349249=rev Log: Creating release candidate final from release_701 branch Added: libunwind/tags/RELEASE_701/final/ (props changed) - copied from r349248,

r349237 - Fix includes and dependencies for libclang

2018-12-14 Thread Richard Trieu via cfe-commits
Author: rtrieu Date: Fri Dec 14 20:25:19 2018 New Revision: 349237 URL: http://llvm.org/viewvc/llvm-project?rev=349237=rev Log: Fix includes and dependencies for libclang Remove unneeded includes Add needed include Remove dependency on Serialization Modified:

[PATCH] D55719: [OpenMP] parsing and sema support for 'close' map-type-modifier

2018-12-14 Thread Ahsan Saghir via Phabricator via cfe-commits
saghir updated this revision to Diff 178336. saghir added a comment. Made following changes: - added more tests for checking diagnostic error messages. - added initialization of modifiers' location in OMPMapClause. - improved variable names to depict multiple modifiers as opposed to a single

[PATCH] D55388: [analyzer] MoveChecker Pt.8: Add checks for dereferencing a smart pointer after move.

2018-12-14 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Reverted in rC349233 - fails on a Windows buildbot (http://lab.llvm.org:8011/builders/clang-x64-windows-msvc/builds/2642/steps/annotate/logs/stdio). Surprisingly, the next build is fine, and the build after it is broken again. Probably

r349233 - Revert "[analyzer] MoveChecker: Add checks for dereferencing a smart pointer..."

2018-12-14 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Fri Dec 14 18:55:55 2018 New Revision: 349233 URL: http://llvm.org/viewvc/llvm-project?rev=349233=rev Log: Revert "[analyzer] MoveChecker: Add checks for dereferencing a smart pointer..." This reverts commit r349226. Fails on an MSVC buildbot. Modified:

[PATCH] D55731: [darwin][arm64] use the "cyclone" CPU for Darwin even when `-arch` is not specified

2018-12-14 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman created this revision. arphaman added reviewers: ab, t.p.northover. Herald added subscribers: dexonsmith, jkorous, kristof.beyls, javed.absar. The `-target` option allows the user to specify the build target using LLVM triple. The triple includes the arch, and so the `-arch` option is

r349230 - Move static analyzer core diagnostics to common.

2018-12-14 Thread Richard Trieu via cfe-commits
Author: rtrieu Date: Fri Dec 14 18:30:16 2018 New Revision: 349230 URL: http://llvm.org/viewvc/llvm-project?rev=349230=rev Log: Move static analyzer core diagnostics to common. Modified: cfe/trunk/include/clang/Basic/DiagnosticCommonKinds.td

[PATCH] D55671: [analyzer] Don't pretend that unknown block calls have one null parameter.

2018-12-14 Thread Phabricator via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rL349229: [analyzer] Fix unknown block calls to have zero parameters. (authored by dergachev, committed by ). Herald added

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

2018-12-14 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. In D55543#1329288 , @vsapsai wrote: > In D55543#1328025 , @rjmccall wrote: > > > Nice catch. This also fixes problems where there might be cleanups entered > > by `EmitParmDecl`, e.g. in

r349229 - [analyzer] Fix unknown block calls to have zero parameters.

2018-12-14 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Fri Dec 14 18:13:26 2018 New Revision: 349229 URL: http://llvm.org/viewvc/llvm-project?rev=349229=rev Log: [analyzer] Fix unknown block calls to have zero parameters. Right now they report to have one parameter with null decl, because initializing an ArrayRef of pointers

[PATCH] D55680: [analyzer] ObjCDealloc: Fix a crash when a class attempts to deallocate another class.

2018-12-14 Thread Phabricator via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rL349228: [analyzer] ObjCDealloc: Fix a crash when a class attempts to deallocate a class. (authored by dergachev,

r349228 - [analyzer] ObjCDealloc: Fix a crash when a class attempts to deallocate a class.

2018-12-14 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Fri Dec 14 18:09:02 2018 New Revision: 349228 URL: http://llvm.org/viewvc/llvm-project?rev=349228=rev Log: [analyzer] ObjCDealloc: Fix a crash when a class attempts to deallocate a class. The checker wasn't prepared to see the dealloc message sent to the class itself

[PATCH] D55458: [analyzer] ObjCContainers: Track index values.

2018-12-14 Thread Phabricator via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rC349227: [analyzer] ObjCContainers: Track index values. (authored by dergachev, committed by ). Repository: rC Clang

r349227 - [analyzer] ObjCContainers: Track index values.

2018-12-14 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Fri Dec 14 18:06:13 2018 New Revision: 349227 URL: http://llvm.org/viewvc/llvm-project?rev=349227=rev Log: [analyzer] ObjCContainers: Track index values. Use trackExpressionValue() (previously known as trackNullOrUndefValue()) to track index value in the report, so that

[PATCH] D55458: [analyzer] ObjCContainers: Track index values.

2018-12-14 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. These are boring, i guess i just commit. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55458/new/ https://reviews.llvm.org/D55458 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D55388: [analyzer] MoveChecker Pt.8: Add checks for dereferencing a smart pointer after move.

2018-12-14 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC349226: [analyzer] MoveChecker: Add checks for dereferencing a smart pointer after move. (authored by dergachev, committed by ). Repository: rC Clang CHANGES SINCE LAST ACTION

r349226 - [analyzer] MoveChecker: Add checks for dereferencing a smart pointer after move.

2018-12-14 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Fri Dec 14 17:53:38 2018 New Revision: 349226 URL: http://llvm.org/viewvc/llvm-project?rev=349226=rev Log: [analyzer] MoveChecker: Add checks for dereferencing a smart pointer after move. Calling operator*() or operator->() on a null STL smart pointer is undefined

r349225 - [analyzer] MoveChecker: NFC: De-duplicate a few checks.

2018-12-14 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Fri Dec 14 17:50:58 2018 New Revision: 349225 URL: http://llvm.org/viewvc/llvm-project?rev=349225=rev Log: [analyzer] MoveChecker: NFC: De-duplicate a few checks. No functional change intended. Differential Revision: https://reviews.llvm.org/D55387 Modified:

[PATCH] D55387: [analyzer] MoveChecker Pt.7: NFC: Misc refactoring.

2018-12-14 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC349225: [analyzer] MoveChecker: NFC: De-duplicate a few checks. (authored by dergachev, committed by ). Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55387/new/

[PATCH] D38675: [analyzer] MoveChecker Pt.10: Move the checker out of alpha state.

2018-12-14 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 178324. NoQ retitled this revision from "[analyzer] MisusedMovedObjectChecker: Moving the checker out of alpha state" to "[analyzer] MoveChecker Pt.10: Move the checker out of alpha state.". NoQ added a comment. Rebase! CHANGES SINCE LAST ACTION

Re: r349212 - Mangle calling conventions into function pointer types where GCC does

2018-12-14 Thread Richard Smith via cfe-commits
Should this change be disableable by -fclang-abi-compat=7 or below? On Fri, 14 Dec 2018, 15:46 Reid Kleckner via cfe-commits < cfe-commits@lists.llvm.org wrote: > Author: rnk > Date: Fri Dec 14 15:42:59 2018 > New Revision: 349212 > > URL: http://llvm.org/viewvc/llvm-project?rev=349212=rev >

[PATCH] D55544: Warning: objc-encodings-larger-than=

2018-12-14 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. The patch looks largely fine to me. Comment at: include/clang/Basic/DiagnosticSemaKinds.td:6207 +def warn_objc_method_encoding_too_large : Warning< + "%0 method %1 encoding of size %2 is larger than %3 bytes">, + InGroup; You can

[PATCH] D55388: [analyzer] MoveChecker Pt.8: Add checks for dereferencing a smart pointer after move.

2018-12-14 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: test/Analysis/use-after-move.cpp:239 A a; for (int i = 0; i < bignum(); i++) { // expected-note {{Loop condition is false. Execution jumps to the end of the function}} rightRefCall(std::move(a));// no-warning

[PATCH] D55673: [darwin] parse the SDK settings from SDKSettings.json if it exists and pass in the -target-sdk-version to the compiler and backend

2018-12-14 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman updated this revision to Diff 178309. arphaman marked an inline comment as done. arphaman added a comment. Ensure test will pass on non-darwin. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55673/new/ https://reviews.llvm.org/D55673 Files:

[PATCH] D55672: Mangle calling conventions into function pointer types where GCC does

2018-12-14 Thread Reid Kleckner via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL349212: Mangle calling conventions into function pointer types where GCC does (authored by rnk, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

r349212 - Mangle calling conventions into function pointer types where GCC does

2018-12-14 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Fri Dec 14 15:42:59 2018 New Revision: 349212 URL: http://llvm.org/viewvc/llvm-project?rev=349212=rev Log: Mangle calling conventions into function pointer types where GCC does Summary: GCC 5.1 began mangling these Windows calling conventions into function types, since they can

[PATCH] D55673: [darwin] parse the SDK settings from SDKSettings.json if it exists and pass in the -target-sdk-version to the compiler and backend

2018-12-14 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman marked 2 inline comments as done. arphaman added inline comments. Comment at: lib/Driver/ToolChains/Darwin.cpp:2053 +return None; + } + return *SDKInfoOrErr; steven_wu wrote: > We also has this InferredFromSDK when we infer deployment target,

[PATCH] D55673: [darwin] parse the SDK settings from SDKSettings.json if it exists and pass in the -target-sdk-version to the compiler and backend

2018-12-14 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman updated this revision to Diff 178307. arphaman added a comment. Updated to infer deployment target version from SDK versions specified in the JSON file and to allow inferring the SDK version from the SDK path. Repository: rC Clang CHANGES SINCE LAST ACTION

[PATCH] D55698: [MinGW] Produce a vtable and RTTI for dllexported classes without a key function

2018-12-14 Thread Reid Kleckner via Phabricator via cfe-commits
rnk accepted this revision. rnk added a comment. This revision is now accepted and ready to land. lgtm CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55698/new/ https://reviews.llvm.org/D55698 ___ cfe-commits mailing list

[PATCH] D55715: Add AddressSpace mangling to MS mode

2018-12-14 Thread Erich Keane via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL349209: Add AddressSpace mangling to MS mode (authored by erichkeane, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

r349209 - Add AddressSpace mangling to MS mode

2018-12-14 Thread Erich Keane via cfe-commits
Author: erichkeane Date: Fri Dec 14 15:17:34 2018 New Revision: 349209 URL: http://llvm.org/viewvc/llvm-project?rev=349209=rev Log: Add AddressSpace mangling to MS mode All of the symbols demangle on llvm-undname and demangler.com. This address space qualifier is useful for when we want to use

RE: r349053 - [CodeComplete] Fill preferred type on binary expressions

2018-12-14 Thread via cfe-commits
Hi, I think this test is still broken on Windows when you are building a cross compiler as we at Sony do. I have put the details in PR40033. Can somebody take a look? Douglas Yung From: cfe-commits On Behalf Of Reid Kleckner via cfe-commits Sent: Thursday, December 13, 2018 13:51 To: Ilya

[PATCH] D55685: Update Microsoft name mangling scheme for exception specifiers in the type system

2018-12-14 Thread Zachary Henkel via Phabricator via cfe-commits
zahen added a comment. In D55685#1331810 , @zturner wrote: > BTW, as far as updating the demangler, as long as it doesn't crash or > generate an error on a valid `_E` mangling, that should be sufficient (with a > test). If you want bonus points you can

[PATCH] D55715: Add AddressSpace mangling to MS mode

2018-12-14 Thread Erich Keane via Phabricator via cfe-commits
erichkeane marked an inline comment as done. erichkeane added inline comments. Comment at: test/CodeGenCXX/mangle-address-space.cpp:7 +// CHECKNOOCL-LABEL: define {{.*}}void @_Z2f0Pc +// WINNOOCL-LABEL: define {{.*}}void @"?f0@@YAXPEAD@Z" +// CHECKOCL-LABEL: define {{.*}}void

[PATCH] D54604: Automatic variable initialization

2018-12-14 Thread JF Bastien via Phabricator via cfe-commits
jfb updated this revision to Diff 178304. jfb added a comment. - Rebase Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54604/new/ https://reviews.llvm.org/D54604 Files: include/clang/Basic/Attr.td include/clang/Basic/AttrDocs.td

[PATCH] D55685: Update Microsoft name mangling scheme for exception specifiers in the type system

2018-12-14 Thread Zachary Turner via Phabricator via cfe-commits
zturner added a comment. BTW, as far as updating the demangler, as long as it doesn't crash or generate an error on a valid `_E` mangling, that should be sufficient (with a test). If you want bonus points you can make it print out `noexcept` when you see the `_E`, but I won't require it as

[PATCH] D55715: Add AddressSpace mangling to MS mode

2018-12-14 Thread Reid Kleckner via Phabricator via cfe-commits
rnk accepted this revision. rnk added a comment. This revision is now accepted and ready to land. lgtm Comment at: test/CodeGenCXX/mangle-address-space.cpp:7 +// CHECKNOOCL-LABEL: define {{.*}}void @_Z2f0Pc +// WINNOOCL-LABEL: define {{.*}}void @"?f0@@YAXPEAD@Z" +//

[PATCH] D53713: Add extension to always default-initialize nullptr_t.

2018-12-14 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: test/Analysis/nullptr.cpp:136 -invokeF(p); // expected-warning{{1st function call argument is an uninitialized value}} -// expected-note@-1{{1st function call argument is an uninitialized value}} if (getSymbol())

RE: r349201 - Add extension to always default-initialize nullptr_t.

2018-12-14 Thread Keane, Erich via cfe-commits
Thanks! I’ll take a look in a bit! -Erich From: Richard Smith [mailto:rich...@metafoo.co.uk] Sent: Friday, December 14, 2018 2:55 PM To: Keane, Erich Cc: cfe-commits Subject: Re: r349201 - Add extension to always default-initialize nullptr_t. Attached. With the functional part of your change

[PATCH] D54604: Automatic variable initialization

2018-12-14 Thread JF Bastien via Phabricator via cfe-commits
jfb added a comment. In D54604#1331711 , @pcc wrote: > Mostly looking good, a few style nits. Thanks! I think I addressed all of your comments. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54604/new/

[PATCH] D54604: Automatic variable initialization

2018-12-14 Thread JF Bastien via Phabricator via cfe-commits
jfb updated this revision to Diff 178301. jfb marked 6 inline comments as done. jfb added a comment. - Address @pcc's comments. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54604/new/ https://reviews.llvm.org/D54604 Files: include/clang/Basic/Attr.td

Re: r349201 - Add extension to always default-initialize nullptr_t.

2018-12-14 Thread Richard Smith via cfe-commits
Attached. With the functional part of your change reverted and this applied, the modified tests still pass except error: 'note' diagnostics expected but not seen: File /usr/local/google/home/richardsmith/llvm-git-1/src/tools/clang/test/Analysis/nullptr.cpp Line 128: 'p' initialized to a null

[PATCH] D55685: Update Microsoft name mangling scheme for exception specifiers in the type system

2018-12-14 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added inline comments. Comment at: lib/AST/MicrosoftMangle.cpp:2311-2314 + if (FT->canThrow()) +Out << 'Z'; + else +Out << "_E"; zahen wrote: > zturner wrote: > > I knew that the mangling changed whenever a pointer to a `noexcept` > > function is

Re: r349201 - Add extension to always default-initialize nullptr_t.

2018-12-14 Thread Richard Smith via cfe-commits
I have a patch I put together a while back as an attempt to fix a different bug, that creates a new CastKind for this operation (didn't work out there, but it might do so here). I'll dig it out and mail it to you in case it's a useful starting point. On Fri, 14 Dec 2018 at 14:42, Keane, Erich via

[PATCH] D55685: Update Microsoft name mangling scheme for exception specifiers in the type system

2018-12-14 Thread Zachary Henkel via Phabricator via cfe-commits
zahen added a comment. In D55685#1330717 , @zturner wrote: > Also we still need to put this behind `-fms-compatibility-version`. Finally, > it would be nice if you could also update the demangler > (`llvm/lib/Demangle/MicrosoftDemangle.cpp`) This was

r349206 - Revert "Add extension to always default-initialize nullptr_t."

2018-12-14 Thread Erich Keane via cfe-commits
Author: erichkeane Date: Fri Dec 14 14:41:18 2018 New Revision: 349206 URL: http://llvm.org/viewvc/llvm-project?rev=349206=rev Log: Revert "Add extension to always default-initialize nullptr_t." This reverts commit 46efdf2ccc2a80aefebf8433dbf9c7c959f6e629. Richard Smith commented just after I

RE: r349201 - Add extension to always default-initialize nullptr_t.

2018-12-14 Thread Keane, Erich via cfe-commits
Reverted in r349206. From: Richard Smith [mailto:rich...@metafoo.co.uk] Sent: Friday, December 14, 2018 2:41 PM To: Keane, Erich Cc: cfe-commits Subject: Re: r349201 - Add extension to always default-initialize nullptr_t. Sorry, I was late with my review comment. I think this is the wrong way

[PATCH] D53713: Add extension to always default-initialize nullptr_t.

2018-12-14 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. As stated in CFE commits (in response to Richard's comments): `I’ll push a revert in a few minutes and give it another try. Perhaps I can suppress the creation of a CK_LValueToRValue in the case where it’s a read from nullptr_t Repository: rC Clang CHANGES

RE: r349201 - Add extension to always default-initialize nullptr_t.

2018-12-14 Thread Keane, Erich via cfe-commits
Alright, no problem. I’ll push a revert in a few minutes and give it another try. Perhaps I can suppress the creation of a CK_LValueToRValue in the case where it’s a read from nullptr_t From: Richard Smith [mailto:rich...@metafoo.co.uk] Sent: Friday, December 14, 2018 2:41 PM To: Keane,

Re: r349201 - Add extension to always default-initialize nullptr_t.

2018-12-14 Thread Richard Smith via cfe-commits
Sorry, I was late with my review comment. I think this is the wrong way to approach this problem. This does not "fix all situations where nullptr_t would seem uninitialized", and it makes our AST representation lose source fidelity. On Fri, 14 Dec 2018 at 14:25, Erich Keane via cfe-commits <

[PATCH] D55443: [test] Capture stderr from 'tar --version' call as well

2018-12-14 Thread Michał Górny via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL349204: [test] Capture stderr from tar --version call as well (authored by mgorny, committed by ). Changed prior to commit: https://reviews.llvm.org/D55443?vs=177265=178296#toc Repository: rL LLVM

[PATCH] D55443: [test] Capture stderr from 'tar --version' call as well

2018-12-14 Thread Rui Ueyama via Phabricator via cfe-commits
ruiu accepted this revision. ruiu added a comment. This revision is now accepted and ready to land. LGTM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55443/new/ https://reviews.llvm.org/D55443 ___ cfe-commits mailing list

[PATCH] D53713: Add extension to always default-initialize nullptr_t.

2018-12-14 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. I'm concerned that this will hide real bugs by suppressing the bogus warnings in (only) the simple cases. There is no "read a value from memory" operation on type `nullptr_t` (just like for, say, class types), and any warning that believes there is is incorrect. For

[PATCH] D54604: Automatic variable initialization

2018-12-14 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added a comment. Mostly looking good, a few style nits. Comment at: include/clang/Basic/DiagnosticDriverKinds.td:409 + +def err_drv_trivial_auto_var_init_zero_disabled : Warning< + "-ftrivial-auto-var-init=zero hasn't been enabled. Enable it at your own peril for

[PATCH] D53847: [C++2a] P0634r3: Down with typename!

2018-12-14 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete updated this revision to Diff 178289. Rakete added a comment. @rsmith do you have any more comments? ping/rebase. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53847/new/ https://reviews.llvm.org/D53847 Files:

[PATCH] D53713: Add extension to always default-initialize nullptr_t.

2018-12-14 Thread Erich Keane via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC349201: Add extension to always default-initialize nullptr_t. (authored by erichkeane, committed by ). Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53713/new/

[PATCH] D55697: [analyzer] Assume that we always have a SubEngine available

2018-12-14 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. In D55697#1331001 , @Szelethus wrote: > We could also add an assert to getOwningEngine I guess. Or make it return a reference, like everything else. Repository: rC Clang CHANGES SINCE LAST ACTION

r349201 - Add extension to always default-initialize nullptr_t.

2018-12-14 Thread Erich Keane via cfe-commits
Author: erichkeane Date: Fri Dec 14 14:22:29 2018 New Revision: 349201 URL: http://llvm.org/viewvc/llvm-project?rev=349201=rev Log: Add extension to always default-initialize nullptr_t. Core issue 1013 suggests that having an uninitialied std::nullptr_t be UB is a bit foolish, since there is

[PATCH] D55697: [analyzer] Assume that we always have a SubEngine available

2018-12-14 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. Yup, squash these! Even if there was a plan to use `ProgramState` separately for some other sort of analysis that doesn't involve a sub-engine, it is currently long forgotten. Repository: rC

[PATCH] D55701: [analyzer] Pass the correct loc Expr from VisitIncDecOp to evalStore

2018-12-14 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. Thanks! Neat test. Can we now `assert(LocationE->isGLValue())` in `evalStore()`? What about `evalLoad()`? Also, were no other checkers affected? Like, will null pointer dereference checker now

[PATCH] D55715: Add AddressSpace mangling to MS mode

2018-12-14 Thread Erich Keane via Phabricator via cfe-commits
erichkeane updated this revision to Diff 178282. erichkeane added a comment. Should catch me up on all comments except @zturner's llvm-undname feature request :) CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55715/new/ https://reviews.llvm.org/D55715 Files:

[PATCH] D55719: [OpenMP] parsing and sema support for 'close' map-type-modifier

2018-12-14 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: clang. Herald added subscribers: cfe-commits, guansong. A map clause with the close map-type-modifier is a hint to prefer that the variables

[PATCH] D55715: Add AddressSpace mangling to MS mode

2018-12-14 Thread Erich Keane via Phabricator via cfe-commits
erichkeane marked 2 inline comments as done. erichkeane added inline comments. Comment at: lib/AST/MicrosoftMangle.cpp:1806-1836 +Extra.mangleSourceName("AS_"); +Extra.mangleIntegerLiteral(llvm::APSInt::getUnsigned(TargetAS), + /*IsBoolean*/

[PATCH] D55698: [MinGW] Produce a vtable and RTTI for dllexported classes without a key function

2018-12-14 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo updated this revision to Diff 178275. mstorsjo added a comment. Moved the code to work on DelayedDllExportClasses instead, as suggested, which still works for the testcase. (I've yet to test that approach on a larger codebase though.) CHANGES SINCE LAST ACTION

[PATCH] D55698: [MinGW] Produce a vtable and RTTI for dllexported classes without a key function

2018-12-14 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo marked 2 inline comments as done. mstorsjo added inline comments. Comment at: lib/Sema/SemaDeclCXX.cpp:5754-5756 + if (ClassExported && + Context.getTargetInfo().getTriple().isWindowsGNUEnvironment()) +MarkVTableUsed(Class->getLocation(), Class, true);

[PATCH] D55388: [analyzer] MoveChecker Pt.8: Add checks for dereferencing a smart pointer after move.

2018-12-14 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 178273. NoQ added a comment. Rebase. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55388/new/ https://reviews.llvm.org/D55388 Files: lib/StaticAnalyzer/Checkers/MoveChecker.cpp test/Analysis/use-after-move.cpp Index:

[PATCH] D55387: [analyzer] MoveChecker Pt.7: NFC: Misc refactoring.

2018-12-14 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: lib/StaticAnalyzer/Checkers/MoveChecker.cpp:265 +void MoveChecker::checkUse(ProgramStateRef State, const MemRegion *Region, + const CXXRecordDecl *RD, MisuseKind MK, a_sidorin wrote: > I think

[PATCH] D55387: [analyzer] MoveChecker Pt.7: NFC: Misc refactoring.

2018-12-14 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 178272. NoQ marked 4 inline comments as done. NoQ added a comment. Fxd. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55387/new/ https://reviews.llvm.org/D55387 Files: lib/StaticAnalyzer/Checkers/MoveChecker.cpp Index:

r349197 - Using llvm::find_if() instead of a range-based for loop; NFC.

2018-12-14 Thread Aaron Ballman via cfe-commits
Author: aaronballman Date: Fri Dec 14 13:14:44 2018 New Revision: 349197 URL: http://llvm.org/viewvc/llvm-project?rev=349197=rev Log: Using llvm::find_if() instead of a range-based for loop; NFC. This addresses post-commit review feedback from r349188. Modified:

[PATCH] D55707: Update to SARIF 11-28

2018-12-14 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman marked an inline comment as done. aaron.ballman added inline comments. Comment at: lib/StaticAnalyzer/Core/SarifDiagnostics.cpp:129 + unsigned Index = 0; + for (const json::Value : Files) { +if (const json::Object *Obj = File.getAsObject()) {

r349195 - [Clang] Add __builtin_launder

2018-12-14 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Fri Dec 14 13:11:28 2018 New Revision: 349195 URL: http://llvm.org/viewvc/llvm-project?rev=349195=rev Log: [Clang] Add __builtin_launder Summary: This patch adds `__builtin_launder`, which is required to implement `std::launder`. Additionally GCC provides

[PATCH] D40218: [Clang] Add __builtin_launder

2018-12-14 Thread Eric Fiselier via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC349195: [Clang] Add __builtin_launder (authored by EricWF, committed by ). Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D40218/new/ https://reviews.llvm.org/D40218

[PATCH] D40218: [Clang] Add __builtin_launder

2018-12-14 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 178267. EricWF added a comment. Merging with upstream. Preparing to commit. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D40218/new/ https://reviews.llvm.org/D40218 Files: include/clang/Basic/Builtins.def

r349192 - [OPENMP][NVPTX]Improved interwarp copy function.

2018-12-14 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Fri Dec 14 13:00:58 2018 New Revision: 349192 URL: http://llvm.org/viewvc/llvm-project?rev=349192=rev Log: [OPENMP][NVPTX]Improved interwarp copy function. Inlined runtime with the current implementation of the interwarp copy function leads to the undefined behavior because

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

2018-12-14 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added inline comments. Comment at: clang/test/Sema/pragma-attribute-label.c:15 +// Out of order! +#pragma clang attribute pop MY_LABEL + aaron.ballman wrote: > dexonsmith wrote: > > erik.pilkington wrote: > > > aaron.ballman wrote: > > > > dexonsmith

r349191 - [analyzer] MoveChecker Pt.6: Suppress the warning for the move-safe STL classes.

2018-12-14 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Fri Dec 14 12:52:57 2018 New Revision: 349191 URL: http://llvm.org/viewvc/llvm-project?rev=349191=rev Log: [analyzer] MoveChecker Pt.6: Suppress the warning for the move-safe STL classes. Some C++ standard library classes provide additional guarantees about their state

[PATCH] D55307: [analyzer] MoveChecker Pt.6: Suppress the warning for the few move-safe STL classes.

2018-12-14 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC349191: [analyzer] MoveChecker Pt.6: Suppress the warning for the move-safe STL classes. (authored by dergachev, committed by ). Changed prior to commit:

[PATCH] D55307: [analyzer] MoveChecker Pt.6: Suppress the warning for the few move-safe STL classes.

2018-12-14 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ marked 2 inline comments as done. NoQ added inline comments. Comment at: test/Analysis/Inputs/system-header-simulator-cxx.h:782 +namespace std { + template // TODO: Implement the stub for deleter. + class unique_ptr { a_sidorin wrote: > Nit: our coding

[PATCH] D55289: [analyzer] MoveChecker Pt.5: Improve invalidation policies.

2018-12-14 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC349190: [analyzer] MoveChecker: Improve invalidation policies. (authored by dergachev, committed by ). Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55289/new/

r349190 - [analyzer] MoveChecker: Improve invalidation policies.

2018-12-14 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Fri Dec 14 12:47:58 2018 New Revision: 349190 URL: http://llvm.org/viewvc/llvm-project?rev=349190=rev Log: [analyzer] MoveChecker: Improve invalidation policies. If a moved-from object is passed into a conservatively evaluated function by pointer or by reference, we

[PATCH] D53713: Add extension to always default-initialize nullptr_t.

2018-12-14 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. I approve this for Static Analyzer. As long as this is the correct thing to do in the compiler, Static Analyzer should ideally behave similarly to the compiler. Exposing portability bugs that would

[PATCH] D55707: Update to SARIF 11-28

2018-12-14 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Sure, np. Comment at: lib/StaticAnalyzer/Core/SarifDiagnostics.cpp:129 + unsigned Index = 0; + for (const json::Value : Files) { +if (const json::Object *Obj = File.getAsObject()) { aaron.ballman wrote: > NoQ wrote: > > This sounds

[PATCH] D51211: [Sema] Emit -Wformat properly for bitfield promotions.

2018-12-14 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: lib/Sema/SemaChecking.cpp:7725-7726 +return true; + // Look through vector types, since we do default argument promotion for + // those in OpenCL. + if (const ExtVectorType *VecTy = From->getAs()) Looking

[PATCH] D55707: Update to SARIF 11-28

2018-12-14 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman closed this revision. aaron.ballman added a comment. Committed in r349188. (@NoQ -- if you'd like to see a switch to `llvm::find_if()`, I'm happy to handle it post-commit.) CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55707/new/ https://reviews.llvm.org/D55707

r349188 - Update our SARIF support from 10-10 to 11-28.

2018-12-14 Thread Aaron Ballman via cfe-commits
Author: aaronballman Date: Fri Dec 14 12:34:23 2018 New Revision: 349188 URL: http://llvm.org/viewvc/llvm-project?rev=349188=rev Log: Update our SARIF support from 10-10 to 11-28. Functional changes include: * The run.files property is now an array instead of a mapping. * fileLocation objects

[PATCH] D55707: Update to SARIF 11-28

2018-12-14 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman marked 4 inline comments as done. aaron.ballman added inline comments. Comment at: lib/StaticAnalyzer/Core/SarifDiagnostics.cpp:129 + unsigned Index = 0; + for (const json::Value : Files) { +if (const json::Object *Obj = File.getAsObject()) {

[PATCH] D55707: Update to SARIF 11-28

2018-12-14 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. Yup, looks good, and i keep passively cheering for this project to be successful. Comment at: lib/StaticAnalyzer/Core/SarifDiagnostics.cpp:129 + unsigned Index = 0; + for

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

2018-12-14 Thread Alexey Lapshin via Phabricator via cfe-commits
alexey.lapshin updated this revision to Diff 178264. alexey.lapshin added a comment. deleted small typo in CGLoopInfo.cpp CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55710/new/ https://reviews.llvm.org/D55710 Files: include/clang/Basic/Attr.td include/clang/Basic/AttrDocs.td

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

2018-12-14 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/test/Sema/pragma-attribute-label.c:15 +// Out of order! +#pragma clang attribute pop MY_LABEL + dexonsmith wrote: > erik.pilkington wrote: > > aaron.ballman wrote: > > > dexonsmith wrote: > > > >

[PATCH] D55698: [MinGW] Produce a vtable and RTTI for dllexported classes without a key function

2018-12-14 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added inline comments. Comment at: lib/Sema/SemaDeclCXX.cpp:5754-5756 + if (ClassExported && + Context.getTargetInfo().getTriple().isWindowsGNUEnvironment()) +MarkVTableUsed(Class->getLocation(), Class, true); This may be too early, you can get

[PATCH] D46421: [analyzer][CrossTU] Extend CTU to VarDecls with initializer

2018-12-14 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. In D46421#1121080 , @r.stahl wrote: > It seems like a good idea to not do that, since non-const values are not > used. It might become useful if we ever do some kind of straight line > execution from static initialization to main. >

[PATCH] D55715: Add AddressSpace mangling to MS mode

2018-12-14 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added inline comments. Comment at: lib/AST/MicrosoftMangle.cpp:1806-1836 +Extra.mangleSourceName("AS_"); +Extra.mangleIntegerLiteral(llvm::APSInt::getUnsigned(TargetAS), + /*IsBoolean*/ false); + } else { +switch (AS) { +

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

2018-12-14 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added inline comments. Comment at: clang/test/Sema/pragma-attribute-label.c:7 + +#pragma clang attribute pop // expected-error{{'#pragma clang attribute pop' with no matching '#pragma clang attribute push'}} +#pragma clang attribute pop NOT_MY_LABEL //

[PATCH] D55715: Add AddressSpace mangling to MS mode

2018-12-14 Thread David Majnemer via Phabricator via cfe-commits
majnemer added inline comments. Comment at: lib/AST/MicrosoftMangle.cpp:1806-1836 +Extra.mangleSourceName("AS_"); +Extra.mangleIntegerLiteral(llvm::APSInt::getUnsigned(TargetAS), + /*IsBoolean*/ false); + } else { +switch (AS) { +

[PATCH] D55715: Add AddressSpace mangling to MS mode

2018-12-14 Thread Erich Keane via Phabricator via cfe-commits
erichkeane marked 2 inline comments as done. erichkeane added inline comments. Comment at: test/CodeGenOpenCL/address-spaces-mangling.cl:7 +// RUN: %clang_cc1 %s -ffake-address-space-map -faddress-space-map-mangling=yes -triple x86_64-windows-pc -emit-llvm -o - | FileCheck

[PATCH] D55715: Add AddressSpace mangling to MS mode

2018-12-14 Thread Erich Keane via Phabricator via cfe-commits
erichkeane marked 4 inline comments as done. erichkeane added inline comments. Comment at: test/CodeGenCXX/mangle-address-space.cpp:7 +// CHECKNOOCL-LABEL: define {{.*}}void @_Z2f0Pc +// WINNOOCL-LABEL: define {{.*}}void @"?f0@@YAXPEAD@Z" +// CHECKOCL-LABEL: define {{.*}}void

[PATCH] D55715: Add AddressSpace mangling to MS mode

2018-12-14 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added inline comments. Comment at: test/CodeGenCXX/mangle-address-space.cpp:7 +// CHECKNOOCL-LABEL: define {{.*}}void @_Z2f0Pc +// WINNOOCL-LABEL: define {{.*}}void @"?f0@@YAXPEAD@Z" +// CHECKOCL-LABEL: define {{.*}}void @_Z2f0PU9CLgenericc You know, now

[PATCH] D55715: Add AddressSpace mangling to MS mode

2018-12-14 Thread Zachary Turner via Phabricator via cfe-commits
zturner added a comment. It would be interesting to teach `llvm-undname` to demangle this more naturally. Right for this mangling: `?f1@@YAXPEAU?$AS_@$00$$CBD@__clang@@@Z` I see this demangling: `void __cdecl f1(struct __clang::AS_<1, char const> *)`. That's an accurate representation of the

  1   2   >