[PATCH] D64454: [clang-tidy] Adding static analyzer check to list of clang-tidy checks

2019-07-09 Thread Nathan Huckleberry via Phabricator via cfe-commits
Nathan-Huckleberry added a comment. The contents of each check page are identical other than the check name. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64454/new/ https://reviews.llvm.org/D64454 ___

r365581 - Revert [clang] DirectoryWatcher

2019-07-09 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Tue Jul 9 16:22:01 2019 New Revision: 365581 URL: http://llvm.org/viewvc/llvm-project?rev=365581&view=rev Log: Revert [clang] DirectoryWatcher This reverts r365574 (git commit 31babea94a3ed38a140540f2252cf043dacec1f7) Removed: cfe/trunk/include/clang/DirectoryWatcher/

[PATCH] D58418: [clang][DirectoryWatcher] Upstream DirectoryWatcher

2019-07-09 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added inline comments. Comment at: cfe/trunk/unittests/DirectoryWatcher/DirectoryWatcherTest.cpp:420 +std::error_code setTimeRes = +llvm::sys::fs::setLastAccessAndModificationTime(FD, NewTimePt, +NewTimePt);

[PATCH] D58418: [clang][DirectoryWatcher] Upstream DirectoryWatcher

2019-07-09 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. Reverted in rC365581 . Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58418/new/ https://reviews.llvm.org/D58418 ___ cfe-commits mailing list cfe-commits@lists.ll

[PATCH] D64374: [analyzer] CastValueChecker: Model casts

2019-07-09 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added a comment. Thanks for the review! In D64374#1577279 , @NoQ wrote: > That doesn't sound like it's high on our list. That's not too many times. > Probably very few false positives come out of it. Also modeling smart > pointers is much harde

[PATCH] D50763: [Parser] Refactor and fix bugs in late-parsing

2019-07-09 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Herald added a project: clang. Comment at: lib/Parse/ParseCXXInlineMethods.cpp:266 +public: + UseCachedTokensRAII(Parser &Self, CachedTokens &Cache, const void *Data) + : Self(Self), Data(Data) { Can you pass ownership of the c

r365582 - [analyzer] CastValueChecker: Model casts

2019-07-09 Thread Csaba Dabis via cfe-commits
Author: charusso Date: Tue Jul 9 16:33:23 2019 New Revision: 365582 URL: http://llvm.org/viewvc/llvm-project?rev=365582&view=rev Log: [analyzer] CastValueChecker: Model casts Summary: It models the LLVM casts: - `cast<>` - `dyn_cast<>` - `cast_or_null<>` - `dyn_cast_or_null<>` It has a very bas

[PATCH] D64374: [analyzer] CastValueChecker: Model casts

2019-07-09 Thread Csaba Dabis via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL365582: [analyzer] CastValueChecker: Model casts (authored by Charusso, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.ll

[PATCH] D64454: [clang-tidy] Adding static analyzer check to list of clang-tidy checks

2019-07-09 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/clang-analyzer-apiModeling.StdCLibraryFunctions.rst:4 +clang-analyzer-apiModeling.StdCLibraryFunctions +

r365584 - Revert "[analyzer] CastValueChecker: Model casts"

2019-07-09 Thread Csaba Dabis via cfe-commits
Author: charusso Date: Tue Jul 9 16:47:09 2019 New Revision: 365584 URL: http://llvm.org/viewvc/llvm-project?rev=365584&view=rev Log: Revert "[analyzer] CastValueChecker: Model casts" This reverts commit 27cf6664437efd640bb6db5594bafcce68fa2854. Removed: cfe/trunk/lib/StaticAnalyzer/Checker

[PATCH] D64380: Add 'require_designated_init' and 'required' attribute to clang

2019-07-09 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman updated this revision to Diff 208840. emmettneyman marked an inline comment as done. emmettneyman added a comment. Remove cppreference link, add reference to C++ spec. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64380/new/ https://re

[PATCH] D64380: Add 'require_designated_init' and 'required' attribute to clang

2019-07-09 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. C++20 designated initializers don't permit mixing designated fields with non-designated ones, so some of the examples here are invalid. However, I think we should be looking for an attribute design that works well in both C and C++, and with the various Clang extensions

[PATCH] D64380: Add 'require_designated_init' and 'required' attribute to clang

2019-07-09 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman updated this revision to Diff 208842. emmettneyman added a comment. slight change to specification reference format Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64380/new/ https://reviews.llvm.org/D64380 Files: clang/include/clang/

[PATCH] D64257: [clangd] Added highlighting for class and enum types

2019-07-09 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. @jvikstrom out of curiosity, are you testing these patches against a client-side implementation of semantic highlighting? If so, which one? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64257/new/ https://reviews.llvm.org/D

[PATCH] D58418: [clang][DirectoryWatcher] Upstream DirectoryWatcher

2019-07-09 Thread Jan Korous via Phabricator via cfe-commits
jkorous added a comment. Thanks for the revert. There's actually one more problem - seems like ninja doesn't like the generated build.ninja file on Linux. ninja: error: build.ninja:52390: bad $-escape (literal $ must be written as $$) http://lab.llvm.org:8011/builders/clang-with-lto-ubuntu/

[PATCH] D64380: Add 'require_designated_init' and 'required' attribute to clang

2019-07-09 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added a comment. I don't see any cases where `[[clang::required]]` is tested, am I missing something? Comment at: clang/test/SemaCXX/attr-designated-init-required.cpp:3 + +#define ATTR [[clang::designated_init_required]] + Why the macro? ===

[PATCH] D64374: [analyzer] CastValueChecker: Model casts

2019-07-09 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso updated this revision to Diff 208847. Charusso added a comment. - Add the llvm namespace to the test file. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64374/new/ https://reviews.llvm.org/D64374 Files: clang/include/clang/StaticAnalyzer/Checkers/Checkers.td clang/include/

r365585 - [analyzer] CastValueChecker: Model casts

2019-07-09 Thread Csaba Dabis via cfe-commits
Author: charusso Date: Tue Jul 9 17:20:03 2019 New Revision: 365585 URL: http://llvm.org/viewvc/llvm-project?rev=365585&view=rev Log: [analyzer] CastValueChecker: Model casts Summary: It models the LLVM casts: - `cast<>` - `dyn_cast<>` - `cast_or_null<>` - `dyn_cast_or_null<>` It has a very bas

[PATCH] D64458: add -fthinlto-index= option to clang-cl

2019-07-09 Thread Bob Haarman via Phabricator via cfe-commits
inglorion created this revision. inglorion added reviewers: tejohnson, pcc, rnk. Herald added subscribers: arphaman, dexonsmith, steven_wu, mehdi_amini. Herald added a project: clang. This adds a -fthinlto-index= option to clang-cl, which allows it to be used to drive ThinLTO backend passes. This

r365587 - [Driver] Add float-divide-by-zero back to supported sanitizers after D63793/rC365272

2019-07-09 Thread Fangrui Song via cfe-commits
Author: maskray Date: Tue Jul 9 17:30:02 2019 New Revision: 365587 URL: http://llvm.org/viewvc/llvm-project?rev=365587&view=rev Log: [Driver] Add float-divide-by-zero back to supported sanitizers after D63793/rC365272 D63793 removed float-divide-by-zero from the "undefined" set but it failed to

[PATCH] D64317: [Driver] Add float-divide-by-zero back to supported sanitizers after D63793/rC365272

2019-07-09 Thread Fangrui Song via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL365587: [Driver] Add float-divide-by-zero back to supported sanitizers after… (authored by MaskRay, committed by ). Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64317/new/

[PATCH] D64458: add -fthinlto-index= option to clang-cl

2019-07-09 Thread Bob Haarman via Phabricator via cfe-commits
inglorion added a comment. This is similar to r254927 for the clang driver, and reuses the tests from that commit for the backend part. On the frontend, it differs in that clang-cl does not support -x (per the comment in clang/lib/Driver/Driver.cpp line 2068: "// No driver mode exposes -x and /

[PATCH] D64380: Add 'require_designated_init' and 'required' attribute to clang

2019-07-09 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman added a comment. In D64380#1577350 , @compnerd wrote: > I don't see any cases where `[[clang::required]]` is tested, am I missing > something? I renamed the attribute at your suggestion. It's now called `[[clang::designated_init_required]`

[PATCH] D64458: add -fthinlto-index= option to clang-cl

2019-07-09 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added a comment. Do we really need to support clang-cl syntax here? Can't the user of -fthinlto-index= use the regular clang driver? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64458/new/ https://reviews.llvm.org/D64458 __

[PATCH] D64380: Add 'require_designated_init' and 'required' attribute to clang

2019-07-09 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman marked 2 inline comments as done. emmettneyman added inline comments. Comment at: clang/test/SemaCXX/attr-designated-init-required.cpp:3 + +#define ATTR [[clang::designated_init_required]] + compnerd wrote: > Why the macro? I modeled this file after

r365590 - [analyzer] CastValueChecker: Remove a dump()

2019-07-09 Thread Csaba Dabis via cfe-commits
Author: charusso Date: Tue Jul 9 17:50:01 2019 New Revision: 365590 URL: http://llvm.org/viewvc/llvm-project?rev=365590&view=rev Log: [analyzer] CastValueChecker: Remove a dump() Summary: Fix a nit. Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/CastValueChecker.cpp Modified: cfe/trunk/li

[PATCH] D64458: add -fthinlto-index= option to clang-cl

2019-07-09 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. In D64458#1577435 , @pcc wrote: > Do we really need to support clang-cl syntax here? Can't the user of > -fthinlto-index= use the regular clang driver? I think it depends on how many compiler flags we have to pass to backend compil

[PATCH] D63753: [Sema] Instead of rejecting C unions with non-trivial fields, detect attempts to destruct/initialize/copy them.

2019-07-09 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 208861. ahatanak marked 2 inline comments as done. ahatanak added a comment. Add a bit to `RecordDeclBitfields` that indicates whether the record has a non-trivial C union member. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org

[PATCH] D64464: [CodeGen] Emit destructor calls for non-trivial C structs

2019-07-09 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak created this revision. ahatanak added a reviewer: rjmccall. ahatanak added a project: clang. Herald added subscribers: dexonsmith, jkorous. This patch fixes a bug in IRGen where it wasn't calling the destructors for non-trivial C structs in the following cases: - member access of struct

[PATCH] D64464: [CodeGen] Emit destructor calls for non-trivial C structs

2019-07-09 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak marked an inline comment as done. ahatanak added inline comments. Comment at: lib/CodeGen/CGExprAgg.cpp:248 bool RequiresDestruction = - Dest.isIgnored() && + !Dest.isExternallyDestructed() && RetTy.isDestructedType() == QualType::DK_nontrivial_c_stru

[PATCH] D64283: [PowerPC] Support -mabi=ieeelongdouble and -mabi=ibmlongdouble

2019-07-09 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay marked an inline comment as done. MaskRay added inline comments. Comment at: lib/Driver/ToolChains/Clang.cpp:1825 + // that don't use the altivec abi. + if (!SeenOther) +ABIName = A->getValue(); hfinkel wrote: > This seems like an uninte

[PATCH] D64283: [PowerPC] Support -mabi=ieeelongdouble and -mabi=ibmlongdouble

2019-07-09 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 208875. MaskRay edited the summary of this revision. MaskRay added a comment. Add another test: -mabi=elfv2 -mabi=elfv1 -mabi=ibmlongdouble -mabi=ieeelongdouble Try fixing the markdown in the description Repository: rC Clang CHANGES SINCE LAST ACTION

[PATCH] D64294: [Driver] Consolidate shouldUseFramePointer() and shouldUseLeafFramePointer()

2019-07-09 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added inline comments. Comment at: lib/Driver/ToolChains/Clang.cpp:579 -static bool shouldUseFramePointer(const ArgList &Args, - const llvm::Triple &Triple) { - if (Arg *A = Args.getLastArg(options::OPT_fno_omit_frame_pointer, -

[PATCH] D63753: [Sema] Instead of rejecting C unions with non-trivial fields, detect attempts to destruct/initialize/copy them.

2019-07-09 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Thanks, that looks great. A few more requests and then this will be ready to go, I think. Comment at: include/clang/AST/DeclBase.h:1454 /// Number of non-inherited bits in RecordDeclBitfields. enum { NumRecordDeclBits = 11 };

[PATCH] D64464: [CodeGen] Emit destructor calls for non-trivial C structs

2019-07-09 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/CodeGen/CGExpr.cpp:4100 + if (E->getType().isDestructedType() == QualType::DK_nontrivial_c_struct) +pushDestroy(QualType::DK_nontrivial_c_struct, DeclPtr, E->getType()); + Unfortunately, the lifetime of compoun

[PATCH] D64083: [OpenCL][Sema] Improve address space support for blocks

2019-07-09 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: cfe/trunk/lib/Sema/SemaExprCXX.cpp:4229 +LangAS AddrSpaceR = +RHSType->getAs()->getPointeeType().getAddressSpace(); +CastKind Kind = All of this can be much simpler: ``` LangAS AddrSpaceL = ToType->cas

[PATCH] D58418: [clang][DirectoryWatcher] Upstream DirectoryWatcher

2019-07-09 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai added subscribers: beanz, smeenai. smeenai added a comment. In D58418#1577349 , @jkorous wrote: > Thanks for the revert. > > There's actually one more problem - seems like ninja doesn't like the > generated build.ninja file on Linux. > > ninja:

[PATCH] D62584: [OpenCL][PR42033] Deducing addr space with template parameter types

2019-07-09 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/Sema/TreeTransform.h:5363 +if (ResultType.getAddressSpace() != LangAS::Default && +(ResultType.getAddressSpace() != LangAS::opencl_private)) { SemaRef.Diag(TL.getReturnLoc().getBeginLoc(), Anastas

[PATCH] D64400: [OpenCL][PR42390] Deduce addr space for templ specialization

2019-07-09 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: include/clang/AST/Type.h:6512 +inline bool Type::isTemplateSpecializationType() const { + return isa(this); +} This is a sugar type. What are you trying to do? Comment at: lib/Sema/SemaType.cpp:7417

[PATCH] D64123: Add clang-llvm-rename tool.

2019-07-09 Thread Rui Ueyama via Phabricator via cfe-commits
ruiu updated this revision to Diff 208883. ruiu added a comment. - Add a comment as to how to build and run clang-llvm-rename tool Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64123/new/ https://reviews.llvm.org/D64123 Files: clang-tools-extra/

<    1   2   3