[PATCH] D59988: [PR41276] Generate address space cast of 'this' for objects attributed by an address space in C++

2019-04-01 Thread Bruno De Fraine via Phabricator via cfe-commits
brunodf added inline comments. Comment at: lib/CodeGen/CGClass.cpp:2025 +ThisPtr = +Builder.CreatePointerBitCastOrAddrSpaceCast(This.getPointer(), NewType); } rjmccall wrote: > Anastasia wrote: > > I am a bit unsure if `performAddrSpaceCast` shoul

[PATCH] D60059: [Driver] implement -feverything

2019-04-01 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers created this revision. nickdesaulniers added a reviewer: rsmith. Herald added subscribers: llvm-commits, cfe-commits, jdoerfert. Herald added projects: clang, LLVM. Due to the wild popularity of -Weverything (used for enabling all warnings), we're back for round 2 (electric boogalo

[PATCH] D60040: [clangd] Use capacity() instead of size() in RefSlab::bytes()

2019-04-01 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. I'll take the courtesy and land it since @gribozavr is OOO today. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60040/new/ https://reviews.llvm.org/D60040 ___ cfe-commits

[PATCH] D59449: [clang-tidy] Integrate clang-tidy-diff.py machinery into run-clang-tidy.py

2019-04-01 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis added a comment. Gentle ping. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59449/new/ https://reviews.llvm.org/D59449 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co

[PATCH] D59985: Re-fix invalid address space generation for clk_event_t arguments of enqueue_kernel builtin function

2019-04-01 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: lib/CodeGen/CGBuiltin.cpp:3711 + EventList = EventList->getType()->isIntegerTy() + ? Builder.CreateIntToPtr(EventList, EventPtrTy) + : Builder.CreatePointerCast(EventList, EventPtrTy); ---

[PATCH] D59449: [clang-tidy] Integrate clang-tidy-diff.py machinery into run-clang-tidy.py

2019-04-01 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. In D59449#1435836 , @zinovy.nis wrote: > In D59449#1435032 , @alexfh wrote: > > > How is this functionality different from the clang-tidy-diff.py script with > > the -j option being added in

[PATCH] D59449: [clang-tidy] Integrate clang-tidy-diff.py machinery into run-clang-tidy.py

2019-04-01 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis added a comment. > Why not just use clang-tidy-diff.py? The clang-tidy-diff.py script has a > distinct and somewhat self-documenting name and a very specific purpose (find > clang-tidy regressions in a patch), while run-clang-tidy.py is more focused > on running over larger bodies of

[PATCH] D59932: [clang-tidy] **Prototype**: Add fix description to clang-tidy checks.

2019-04-01 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 193070. hokein marked 2 inline comments as done. hokein added a comment. Update the patch: - move FixDescriptions to tooling diagnostics, YAML serialization support - add tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://review

[PATCH] D59932: [clang-tidy] **Prototype**: Add fix description to clang-tidy checks.

2019-04-01 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. In D59932#1446533 , @JonasToth wrote: > I think the idea is good and implementation, too. If we iterate all checks > anyway (probably?) we could think about adding a severity to the checks, too? > > I know that code-checker and cod

[PATCH] D59802: [clang-tidy] Add new checker: llvm-avoid-cast-in-conditional

2019-04-01 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tools-extra/clang-tidy/llvm/AvoidCastInConditionalCheck.cpp:38 + whileStmt(anyOf( + has(declStmt(containsDeclaration( + 0, varDecl( aaron.ballman wrote: > This seems like a fair amo

[PATCH] D59932: [clang-tidy] **Prototype**: Add fix description to clang-tidy checks.

2019-04-01 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. In D59932#1446533 , @JonasToth wrote: > I think the idea is good and implementation, too. If we iterate all checks > anyway (probably?) we could think about adding a severity to the checks, too? In a similar vein, I often

r357390 - [OPENMP] Check that allocated variables are used in private clauses.

2019-04-01 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Mon Apr 1 07:25:31 2019 New Revision: 357390 URL: http://llvm.org/viewvc/llvm-project?rev=357390&view=rev Log: [OPENMP] Check that allocated variables are used in private clauses. According to OpenMP 5.0 standard, 2.11.4 allocate Clause, Restrictions, For any list item that

[PATCH] D59802: [clang-tidy] Add new checker: llvm-avoid-cast-in-conditional

2019-04-01 Thread Don Hinton via Phabricator via cfe-commits
hintonda marked an inline comment as done. hintonda added inline comments. Comment at: clang-tools-extra/clang-tidy/utils/HeaderFileExtensionsUtils.h:21 -typedef llvm::SmallSet HeaderFileExtensionsSet; +using HeaderFileExtensionsSet = ::llvm::SmallSet; aaron.

[PATCH] D59802: [clang-tidy] Add new checker: llvm-avoid-cast-in-conditional

2019-04-01 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tools-extra/clang-tidy/utils/HeaderFileExtensionsUtils.h:21 -typedef llvm::SmallSet HeaderFileExtensionsSet; +using HeaderFileExtensionsSet = ::llvm::SmallSet; hintonda wrote: > aaron.ballman wrote: > > C

r357394 - [ASTImporter] Make ODR error handling configurable

2019-04-01 Thread Gabor Marton via cfe-commits
Author: martong Date: Mon Apr 1 07:46:53 2019 New Revision: 357394 URL: http://llvm.org/viewvc/llvm-project?rev=357394&view=rev Log: [ASTImporter] Make ODR error handling configurable Summary: ODR errors are not necessarily true errors during the import of ASTs. ASTMerge and CrossTU should use t

[PATCH] D58897: [ASTImporter] Make ODR error handling configurable

2019-04-01 Thread Gabor Marton via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC357394: [ASTImporter] Make ODR error handling configurable (authored by martong, committed by ). Changed prior to commit: https://reviews.llvm.org/D58897?vs=192070&id=193086#toc Repository: rC Clang

[PATCH] D54881: [clang-format] Prevent Clang-Format from editing leading whitespace on lines outside of the format range

2019-04-01 Thread Russell McClellan via Phabricator via cfe-commits
russellmcc added a comment. klimek: I'm sorry, I don't fully understand your proposed fix. Could you explain it in more detail? Without being able to respond to your proposal in detail, I strongly believe if you pass in a line range to clang-format, it should not change lines outside that ran

[PATCH] D59919: [Attributor] Deduce "returned" argument attribute

2019-04-01 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert marked an inline comment as done. jdoerfert added inline comments. Comment at: llvm/lib/Transforms/IPO/Attributor.cpp:394 + +indicateFixpoint(/* Optimistic */ true); +return; xbolva00 wrote: > Maybe enum here ? > So you could call indica

[PATCH] D59859: [clang-tidy] FIXIT for implicit bool conversion now obeys upper case suffixes if enforced.

2019-04-01 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. In D59859#1444333 , @aaron.ballman wrote: > In D59859#1444176 , @lebedev.ri > wrote: > > > I'm not sure why we want this? What is wrong with simply applying > > clang-tidy twice? > > > It

r357402 - [ASTImporter] Convert ODR diagnostics inside ASTImporter implementation

2019-04-01 Thread Gabor Marton via cfe-commits
Author: martong Date: Mon Apr 1 08:29:55 2019 New Revision: 357402 URL: http://llvm.org/viewvc/llvm-project?rev=357402&view=rev Log: [ASTImporter] Convert ODR diagnostics inside ASTImporter implementation Summary: ASTStructuralEquivalence uses a flag to indicate whether ODR diagnostics should be

[PATCH] D59859: [clang-tidy] FIXIT for implicit bool conversion now obeys upper case suffixes if enforced.

2019-04-01 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added inline comments. Comment at: clang-tools-extra/clang-tidy/readability/ImplicitBoolConversionCheck.cpp:48 case CK_IntegralToBoolean: -return Type->isUnsignedIntegerType() ? "0u" : "0"; +if (UppercaseSuffix) { + return Type->isUnsignedIntegerType() ? "

[PATCH] D59761: [ASTImporter] Convert ODR diagnostics inside ASTImporter implementation

2019-04-01 Thread Gabor Marton via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL357402: [ASTImporter] Convert ODR diagnostics inside ASTImporter implementation (authored by martong, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Repository: r

[PATCH] D60069: Declare std::tuple_element as struct instead of class

2019-04-01 Thread Jan Wilken Dörrie via Phabricator via cfe-commits
jdoerrie created this revision. jdoerrie added a reviewer: mclow.lists. Herald added subscribers: libcxx-commits, ldionne. Similarly to https://reviews.llvm.org/rL350972 this revision changes std::tuple_element from class to struct. Fixes PR#41331. Repository: rCXX libc++ https://reviews.llv

r357405 - Attempt to fix failing buildbot (ppc64le)

2019-04-01 Thread Gabor Marton via cfe-commits
Author: martong Date: Mon Apr 1 08:48:29 2019 New Revision: 357405 URL: http://llvm.org/viewvc/llvm-project?rev=357405&view=rev Log: Attempt to fix failing buildbot (ppc64le) Modified: cfe/trunk/lib/AST/ASTStructuralEquivalence.cpp Modified: cfe/trunk/lib/AST/ASTStructuralEquivalence.cpp UR

[PATCH] D60069: Declare std::tuple_element as struct instead of class

2019-04-01 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. Did you check the places that inherit from `tuple_element`? The public/private bits change between class and struct. Repository: rCXX libc++ CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60069/new/ https://reviews.llvm.org/D60069

[PATCH] D60069: Declare std::tuple_element as struct instead of class

2019-04-01 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. In D60069#1449928 , @mclow.lists wrote: > Did you check the places that inherit from `tuple_element`? The > public/private bits change between class and struct. Never mind. I was thinking of something else; I don't think th

[PATCH] D60059: [Driver] implement -feverything

2019-04-01 Thread Stephen Hines via Phabricator via cfe-commits
srhines added a comment. In addition to -fno-everything, don't forget about -fnothing and -fno-nothing, which seem like they would also be nice to have. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60059/new/ https://reviews.llvm.org/D60059 __

[PATCH] D59802: [clang-tidy] Add new checker: llvm-avoid-cast-in-conditional

2019-04-01 Thread Don Hinton via Phabricator via cfe-commits
hintonda marked an inline comment as done. hintonda added inline comments. Comment at: clang-tools-extra/clang-tidy/utils/HeaderFileExtensionsUtils.h:21 -typedef llvm::SmallSet HeaderFileExtensionsSet; +using HeaderFileExtensionsSet = ::llvm::SmallSet; aaron.

[PATCH] D60069: Declare std::tuple_element as struct instead of class

2019-04-01 Thread Jan Wilken Dörrie via Phabricator via cfe-commits
jdoerrie added a comment. In D60069#1449932 , @mclow.lists wrote: > In D60069#1449928 , @mclow.lists > wrote: > > > Did you check the places that inherit from `tuple_element`? The > > public/private bits change b

[PATCH] D60069: Declare std::tuple_element as struct instead of class

2019-04-01 Thread Louis Dionne via Phabricator via cfe-commits
ldionne added a comment. In D60069#1449937 , @jdoerrie wrote: > Right, there shouldn't be any inheritance. Some of the `public:` access > specifications are now redundant, though. Can you please fix those? Repository: rCXX libc++ CHANGES SINCE LAST

[PATCH] D60069: Declare std::tuple_element as struct instead of class

2019-04-01 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. In D60069#1449937 , @jdoerrie wrote: > Right, there shouldn't be any inheritance. Some of the `public:` access > specifications are now redundant, though. And I think that you should get rid of them. Repository: rCXX lib

[PATCH] D60069: Declare std::tuple_element as struct instead of class

2019-04-01 Thread Jan Wilken Dörrie via Phabricator via cfe-commits
jdoerrie updated this revision to Diff 193106. jdoerrie added a comment. Remove redundant `public:` access controls CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60069/new/ https://reviews.llvm.org/D60069 Files: include/__tuple include/array include/span include/tuple include

[PATCH] D60069: Declare std::tuple_element as struct instead of class

2019-04-01 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists accepted this revision. mclow.lists added a comment. I'm less enthusiastic about this change than the one for PR39871, because there we were being inconsistent with ourselves. However, my lack of enthusiasm is no reason not to land this. CHANGES SINCE LAST ACTION https://reviews.l

[PATCH] D59980: [Attributor] Deduce memory behavior argument attributes

2019-04-01 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert updated this revision to Diff 193107. jdoerfert added a comment. Minor adjustments wrt later patches Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59980/new/ https://reviews.llvm.org/D59980 Files: clang/test/CodeGen/arm-vfp16-arguments

[PATCH] D59870: [clang-tidy] Add MagnitudeBitsUpperLimit option to bugprone-too-small-loop-variable

2019-04-01 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:124 + ` now supports + `MagnitudeBitsUpperLimit` option. + Please add the new default here as its a change in behaviour of the check. Comment at: clang-tool

[PATCH] D59887: [Syntax] Introduce TokenBuffer, start clangToolingSyntax library

2019-04-01 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. incomplete, haven't reviewed token collector Comment at: clang/include/clang/Tooling/Syntax/TokenBuffer.h:72 + /// macro or a name, arguments and parentheses of a function-like macro. + llvm::ArrayRef macroTokens(const TokenBuffer &B) const; + ///

[PATCH] D60023: [libcxx] [test] Fix inability to rebind poca_alloc in string.cons/copy_alloc.pass.cpp.

2019-04-01 Thread Louis Dionne via Phabricator via cfe-commits
ldionne requested changes to this revision. ldionne added inline comments. This revision now requires changes to proceed. Comment at: test/std/strings/basic.string/string.cons/copy_alloc.pass.cpp:125 test_assign(s1, s2); assert(s1 == p1); assert(s2 == p2);

[PATCH] D60069: Declare std::tuple_element as struct instead of class

2019-04-01 Thread Jan Wilken Dörrie via Phabricator via cfe-commits
jdoerrie added a comment. In D60069#1449979 , @mclow.lists wrote: > I'm less enthusiastic about this change than the one for PR39871, because > there we were being inconsistent with ourselves. > However, my lack of enthusiasm is no reason not to land thi

[PATCH] D60069: Declare std::tuple_element as struct instead of class

2019-04-01 Thread Louis Dionne via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL357411: [libc++] Declare std::tuple_element as struct instead of class (authored by ldionne, committed by ). Herald added subscribers: llvm-commits, christof. Herald added a project: LLVM. Changed prior t

[PATCH] D59859: [clang-tidy] FIXIT for implicit bool conversion now obeys upper case suffixes if enforced.

2019-04-01 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added inline comments. Comment at: clang-tools-extra/clang-tidy/readability/ImplicitBoolConversionCheck.cpp:270 + AllowPointerConditions(Options.get("AllowPointerConditions", false)), + UseUppercaseLiteralSuffix(Context->isCheckEnabled("readability-uppercase-li

[PATCH] D59919: [Attributor] Deduce "returned" argument attribute

2019-04-01 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert updated this revision to Diff 193115. jdoerfert added a comment. Minor changes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59919/new/ https://reviews.llvm.org/D59919 Files: clang/test/CodeGenOpenCL/as_type.cl llvm/include/llvm/Tran

r357412 - [OPENMP]Allocate clause allocator in target region.

2019-04-01 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Mon Apr 1 09:56:59 2019 New Revision: 357412 URL: http://llvm.org/viewvc/llvm-project?rev=357412&view=rev Log: [OPENMP]Allocate clause allocator in target region. According to OpenMP 5.0, 2.11.4 allocate Clause, Restrictions, allocate clauses that appear on a target constru

[PATCH] D59467: [clang] Adding the Likelihood Attribute from C++2a

2019-04-01 Thread Gauthier via Phabricator via cfe-commits
Tyker marked an inline comment as done. Tyker added inline comments. Comment at: clang/lib/Analysis/CFG.cpp:2208 +} + CFGBlock *CFGBuilder::VisitStmt(Stmt *S, AddStmtChoice asc) { NoQ wrote: > Tyker wrote: > > riccibruno wrote: > > > I don't understand why this

[PATCH] D59988: [PR41276] Generate address space cast of 'this' for objects attributed by an address space in C++

2019-04-01 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/CodeGen/CGClass.cpp:2025 +ThisPtr = +Builder.CreatePointerBitCastOrAddrSpaceCast(This.getPointer(), NewType); } brunodf wrote: > rjmccall wrote: > > Anastasia wrote: > > > I am a bit unsure if `perfo

[PATCH] D59802: [clang-tidy] Add new checker: llvm-avoid-cast-in-conditional

2019-04-01 Thread Don Hinton via Phabricator via cfe-commits
hintonda marked an inline comment as done. hintonda added inline comments. Comment at: clang-tools-extra/clang-tidy/llvm/AvoidCastInConditionalCheck.cpp:125-126 + +diag(MatchedDecl->getBeginLoc(), "return value from dyn_cast<> not used") +<< FixItHint::CreateReplacem

[PATCH] D59376: [LibTooling] Add Transformer, a library for source-to-source transformations.

2019-04-01 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov marked an inline comment as done. ilya-biryukov added a comment. Looks neat, thanks! A final set of NITs from my side, I don't think any of the comments have to do with the actual design of the library, so expect LGTM in the next round. Comment at: clang/include/

[PATCH] D59922: [Attributor] Deduce "no-capture" argument attribute

2019-04-01 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert updated this revision to Diff 193122. jdoerfert added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59922/new/ https://reviews.llvm.org/D59922 Files: clang/test/CodeGenObjC/os_log.m clang/test/CodeGenOpenCL/as_type.

[PATCH] D59980: [Attributor] Deduce memory behavior argument attributes

2019-04-01 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert updated this revision to Diff 193123. jdoerfert added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59980/new/ https://reviews.llvm.org/D59980 Files: clang/test/CodeGen/arm-vfp16-arguments.c clang/test/CodeGen/syste

r357415 - [CodeGen] Generate follow-up metadata for loops with more than one transformation.

2019-04-01 Thread Michael Kruse via cfe-commits
Author: meinersbur Date: Mon Apr 1 10:47:41 2019 New Revision: 357415 URL: http://llvm.org/viewvc/llvm-project?rev=357415&view=rev Log: [CodeGen] Generate follow-up metadata for loops with more than one transformation. Before this patch, CGLoop would dump all transformations for a loop into a s

[PATCH] D60076: [Attributor] Deduce memory behavior function attributes

2019-04-01 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert created this revision. jdoerfert added reviewers: homerdin, hfinkel, fedor.sergeev, sanjoy, spatel, nlopes, nicholas, reames. Herald added projects: clang, LLVM. Herald added a subscriber: cfe-commits. jdoerfert added a parent revision: D59980: [Attributor] Deduce memory behavior argume

[PATCH] D57978: [CodeGen] Generate follow-up metadata for loops with more than one transformation.

2019-04-01 Thread Michael Kruse via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL357415: [CodeGen] Generate follow-up metadata for loops with more than one… (authored by Meinersbur, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to

[PATCH] D59802: [clang-tidy] Add new checker: llvm-avoid-cast-in-conditional

2019-04-01 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. Do we have any checker to recommend llvm functions over std ? e.g. llvm::sort, llvm::all_of, ... Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59802/new/ https://reviews.llvm.org/D59802

[PATCH] D59802: [clang-tidy] Add new checker: llvm-avoid-cast-in-conditional

2019-04-01 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. In D59802#1450185 , @xbolva00 wrote: > Do we have any checker to recommend llvm functions over std ? > > e.g. llvm::sort, llvm::all_of, ... No. Actually LLVM coding conventions support is very limited. See https://clang.l

[PATCH] D60059: [Driver] implement -feverything

2019-04-01 Thread Yuxuan Chen via Phabricator via cfe-commits
yuxuanchen1997 requested changes to this revision. yuxuanchen1997 added a comment. This revision now requires changes to proceed. > enable all runtime sanitizers for extra safety Brilliant idea. But I wonder how that could be done for -fsanitize. ASAN and MSAN can't be used together. Repositor

[PATCH] D57978: [CodeGen] Generate follow-up metadata for loops with more than one transformation.

2019-04-01 Thread Michael Kruse via Phabricator via cfe-commits
Meinersbur added a comment. @dmgreen Thank you for the review! Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57978/new/ https://reviews.llvm.org/D57978 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://l

[PATCH] D59628: Add support for __attribute__((objc_class_stub))

2019-04-01 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/Sema/SemaDeclObjC.cpp:4131-4133 + if (!getLangOpts().ObjCRuntime.allowsClassStubs()) { +Diag(IntfDecl->getLocation(), diag::err_class_stub_not_supported); + } aaron.ballman wrote: > This should be

[PATCH] D60059: [Driver] implement -feverything

2019-04-01 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In D60059#1450252 , @yuxuanchen1997 wrote: > > enable all runtime sanitizers for extra safety > > Brilliant idea. But I wonder how that could be done for -fsanitize. ASAN and > MSAN can't be used together. Nonsense. There is

[PATCH] D60059: [Driver] implement -feverything

2019-04-01 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added a comment. In D60059#1450320 , @lebedev.ri wrote: > In D60059#1450252 , @yuxuanchen1997 > wrote: > > > > enable all runtime sanitizers for extra safety > > > > Brilliant idea. But I wonder how that could

[PATCH] D59802: [clang-tidy] Add new checker: llvm-avoid-cast-in-conditional

2019-04-01 Thread Don Hinton via Phabricator via cfe-commits
hintonda marked an inline comment as done. hintonda added inline comments. Comment at: clang-tools-extra/clang-tidy/llvm/AvoidCastInConditionalCheck.cpp:145 + +diag(MatchedDecl->getBeginLoc(), "use dyn_cast_or_null") +<< FixItHint::CreateReplacement(SourceRange(Match

[PATCH] D60023: [libcxx] [test] Fix inability to rebind poca_alloc in string.cons/copy_alloc.pass.cpp.

2019-04-01 Thread Billy Robert O'Neal III via Phabricator via cfe-commits
BillyONeal updated this revision to Diff 193157. BillyONeal edited the summary of this revision. BillyONeal added a comment. Fix asserts for the strong EH guarantee. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60023/new/ https://reviews.llvm.org/D60023 Files: test/std/strings/basic

[PATCH] D59264: [Driver] Support compiler-rt crtbegin.o/crtend.o for Linux

2019-04-01 Thread Petr Hosek via Phabricator via cfe-commits
phosek added a comment. In D59264#1428785 , @MaskRay wrote: > > A nonzero __dso_handle has to match the value passed to __cxa_atexit but a > > zero __dso_handle matches every function registered. So it matters that DSO > > fini calls use &__dso_handle to

[PATCH] D60094: [MSVC] If unable to find link.exe relative to MSVC, look for link.exe in the path

2019-04-01 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo created this revision. mstorsjo added a reviewer: rnk. Herald added a project: clang. Previously, if this is encountered, clang will later just fail to execute link.exe. Or is this intentional, to avoid executing msys based link.exe accidentally, if the MSVC installation isn't found?

[PATCH] D59802: [clang-tidy] Add new checker: llvm-avoid-cast-in-conditional

2019-04-01 Thread Don Hinton via Phabricator via cfe-commits
hintonda updated this revision to Diff 193176. hintonda added a comment. - Defer HeaderFileExtionsUtils.h bugfix to separate patch. - Simplify code per comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59802/new/ https://reviews.llvm.org/D598

[PATCH] D58537: lib/Header: Simplify CMakeLists.txt

2019-04-01 Thread Vyacheslav Zakharin via Phabricator via cfe-commits
vzakhari added inline comments. Comment at: cfe/trunk/lib/Headers/CMakeLists.txt:168 install( - FILES ${cuda_wrapper_files} - COMPONENT clang-headers - PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ - DESTINATION lib${LLVM_LIBDIR_SUFFIX}/clang/${CLANG_VERSION}/inc

[PATCH] D59555: [analyzer] Add yaml parser to GenericTaintChecker

2019-04-01 Thread Borsik Gábor via Phabricator via cfe-commits
boga95 updated this revision to Diff 193175. boga95 marked an inline comment as done. boga95 added a comment. Rebase after https://reviews.llvm.org/D59861. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59555/new/ https://reviews.llvm.org/D59555 Files: lib/StaticAnalyzer/Checkers/Gene

[clang-tools-extra] r357429 - Fix clangd unittest _WIN32 ifdef

2019-04-01 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Mon Apr 1 14:16:17 2019 New Revision: 357429 URL: http://llvm.org/viewvc/llvm-project?rev=357429&view=rev Log: Fix clangd unittest _WIN32 ifdef WIN32 is not defined, _WIN32 is, use that instead. Modified: clang-tools-extra/trunk/unittests/clangd/JSONTransportTests.cpp Mod

[PATCH] D31417: [OpenMP] Add support for omp simd pragmas without runtime

2019-04-01 Thread Xinmin Tian via Phabricator via cfe-commits
xtian accepted this revision. xtian added a comment. This revision is now accepted and ready to land. Herald added subscribers: jdoerfert, jfb, guansong. LGTM. This provides a consistent behavior same as GCC and ICC w/ -fopenmp-simd option. To answer, Kelvin's question. it is not directly tied w

[PATCH] D60094: [MSVC] If unable to find link.exe relative to MSVC, look for link.exe in the path

2019-04-01 Thread Adrian McCarthy via Phabricator via cfe-commits
amccarth added inline comments. Comment at: lib/Driver/ToolChains/MSVC.cpp:493 C.getDriver().Diag(clang::diag::warn_drv_msvc_not_found); + linkPath = TC.GetProgramPath("link.exe"); +} The comment above explains one reason why we shouldn't use link

[PATCH] D53701: [Analyzer] Instead of recording comparisons in interator checkers do an eager state split

2019-04-01 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. Looks great, thanks! You can still add the regression test for the correct number of transitions if you want - even if it's an NFC patch, it's nice to know that we didn't regress something we could

[PATCH] D60099: [CodeGen] Fix a regression by emitting lambda expressions in EmitLValue

2019-04-01 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington created this revision. erik.pilkington added reviewers: rjmccall, rsmith, ahatanak. Herald added subscribers: dexonsmith, jkorous. Herald added a project: clang. Currently, we emit a "unsupported l-value" error for the lambda expression in the following: @interface X @proper

[PATCH] D60101: [Sema] Fix a use-after-deallocate of a ParsedAttr

2019-04-01 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington created this revision. erik.pilkington added a reviewer: aaron.ballman. Herald added subscribers: dexonsmith, jkorous. Herald added a project: clang. `moveAttrFromListToList` only makes sense when moving an attribute to a list with a pool that's either equivalent, or has a shorter

[PATCH] D60018: [codeview] Remove Type member from CVRecord

2019-04-01 Thread Reid Kleckner via Phabricator via cfe-commits
rnk updated this revision to Diff 193191. rnk marked 2 inline comments as done. rnk added a comment. Herald added subscribers: lldb-commits, cfe-commits, kadircet, arphaman, jkorous. Herald added projects: clang, LLDB. - fix one lldb usage Repository: rG LLVM Github Monorepo CHANGES SINCE LA

[PATCH] D59746: [LibTooling] Fix '-h' option

2019-04-01 Thread Don Hinton via Phabricator via cfe-commits
hintonda added a subscriber: arphaman. hintonda added a comment. @arphaman, since you added the `-h` option in D37618 , could you let me know if this change is okay with you? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llv

[PATCH] D60104: [libcxx] [test] Use ptrdiff_t rather than int in splice_after_range.pass.cpp to avoid narrowing from pointer subtraction to int warnings.

2019-04-01 Thread Billy Robert O'Neal III via Phabricator via cfe-commits
BillyONeal created this revision. BillyONeal added reviewers: ldionne, mclow.lists, EricWF. Herald added a subscriber: dexonsmith. https://reviews.llvm.org/D60104 Files: test/std/containers/sequences/forwardlist/forwardlist.ops/splice_after_range.pass.cpp Index: test/std/containers/sequences/

[PATCH] D60094: [MSVC] If unable to find link.exe relative to MSVC, look for link.exe in the path

2019-04-01 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added inline comments. Comment at: lib/Driver/ToolChains/MSVC.cpp:493 C.getDriver().Diag(clang::diag::warn_drv_msvc_not_found); + linkPath = TC.GetProgramPath("link.exe"); +} amccarth wrote: > The comment above explains one reason why we shoul

[PATCH] D58094: Fix -Wnonportable-include-path suppression for header maps with absolute paths.

2019-04-01 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. Ping. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58094/new/ https://reviews.llvm.org/D58094 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D60107: [analyzer] NoStoreFuncVisitor: Suppress bug reports with no-store in system headers.

2019-04-01 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ created this revision. NoQ added reviewers: dcoughlin, xazax.hun, rnkovacs, mikhail.ramalho, Szelethus, baloghadamsoftware, Charusso. Herald added subscribers: cfe-commits, jdoerfert, dkrupp, donat.nagy, a.sidorin, szepet. Herald added a project: clang. Hmm, i literally patched the same line

[PATCH] D60023: [libcxx] [test] Fix inability to rebind poca_alloc in string.cons/copy_alloc.pass.cpp.

2019-04-01 Thread Casey Carter via Phabricator via cfe-commits
CaseyCarter requested changes to this revision. CaseyCarter added inline comments. This revision now requires changes to proceed. Comment at: test/std/strings/basic.string/string.cons/copy_alloc.pass.cpp:128 +// but the standard only requires the basic guarantee: +_LIBCXX

[PATCH] D55463: Introduce a source minimizer that reduces source to directives that might affect the dependency list for a compilation

2019-04-01 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman updated this revision to Diff 193214. arphaman added a comment. Herald added a subscriber: jdoerfert. Herald added a project: clang. Rebased patch, added a `#warning/error` fix from @dexonsmith. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55463/new/ ht

[PATCH] D55463: Introduce a source minimizer that reduces source to directives that might affect the dependency list for a compilation

2019-04-01 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. @Bigcheese Please take a look. I'll post the basic tool that runs the preprocessor on regular vs minimized sources by Wed. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55463/new/ https://reviews.llvm.org/D55463 _

[PATCH] D59467: [clang] Adding the Likelihood Attribute from C++2a

2019-04-01 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: clang/lib/Analysis/CFG.cpp:2208 +} + CFGBlock *CFGBuilder::VisitStmt(Stmt *S, AddStmtChoice asc) { Tyker wrote: > NoQ wrote: > > Tyker wrote: > > > riccibruno wrote: > > > > I don't understand why this is needed. Can you ex

[PATCH] D60023: [libcxx] [test] Fix inability to rebind poca_alloc in string.cons/copy_alloc.pass.cpp.

2019-04-01 Thread Billy Robert O'Neal III via Phabricator via cfe-commits
BillyONeal updated this revision to Diff 193216. BillyONeal added a comment. Fixed misspelled test macro. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60023/new/ https://reviews.llvm.org/D60023 Files: test/std/strings/basic.string/string.cons/copy_alloc.pass.cpp Index: test/std/st

[PATCH] D60108: [os_log] Mark os_log_helper `nounwind`

2019-04-01 Thread Vedant Kumar via Phabricator via cfe-commits
vsk created this revision. vsk added reviewers: ahatanak, JDevlieghere. Herald added subscribers: jdoerfert, dexonsmith. Allow the optimizer to remove unnecessary EH cleanups surrounding calls to os_log_helper, to save some code size. As a follow-up, it might be worthwhile to add a BasicNoexcept

[PATCH] D60018: [codeview] Remove Type member from CVRecord

2019-04-01 Thread Alexandre Ganea via Phabricator via cfe-commits
aganea added inline comments. Comment at: llvm/include/llvm/DebugInfo/CodeView/CVRecord.h:29 +/// Carrying the size separately instead of trusting the size stored in the +/// record prefix provides some extra safety and flexibility. template class CVRecord { To

[PATCH] D59376: [LibTooling] Add Transformer, a library for source-to-source transformations.

2019-04-01 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 193219. ymandel marked 28 inline comments as done. ymandel added a comment. Assorted changes in response to comments. Most notably, dropped constructor from RewriteRule, in favor of putting meaningful initialization in the builder. Repository: rG LLVM Gi

[PATCH] D59376: [LibTooling] Add Transformer, a library for source-to-source transformations.

2019-04-01 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added inline comments. Comment at: clang/include/clang/Tooling/Refactoring/Transformer.h:70 +// +// * Explanation: explanation of the rewrite. +// ilya-biryukov wrote: > ymandel wrote: > > ilya-biryukov wrote: > > > NIT: maybe mention what it should be us

[PATCH] D60018: [codeview] Remove Type member from CVRecord

2019-04-01 Thread Alexandre Ganea via Phabricator via cfe-commits
aganea marked an inline comment as done. aganea added inline comments. Comment at: llvm/include/llvm/DebugInfo/CodeView/CVRecord.h:29 +/// Carrying the size separately instead of trusting the size stored in the +/// record prefix provides some extra safety and flexibility. templ

[PATCH] D55044: [clang-tidy] check for Abseil make_unique

2019-04-01 Thread Andy Zhang via Phabricator via cfe-commits
axzhang marked an inline comment as done. axzhang added inline comments. Comment at: clang-tidy/modernize/MakeSmartPtrCheck.cpp:94 equalsBoundNode(PointerType), CanCallCtor)

[PATCH] D60110: [analyzer] When failing to evaluate a __builtin_constant_p, presume it's false.

2019-04-01 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ created this revision. NoQ added reviewers: dcoughlin, xazax.hun, a_sidorin, rnkovacs, mikhail.ramalho, Szelethus, baloghadamsoftware, Charusso. Herald added subscribers: cfe-commits, jdoerfert, dkrupp, donat.nagy, kristina, a.sidorin, szepet. Herald added a project: clang. `__builtin_consta

[PATCH] D55044: [clang-tidy] check for Abseil make_unique

2019-04-01 Thread Andy Zhang via Phabricator via cfe-commits
axzhang marked 2 inline comments as done and an inline comment as not done. axzhang added inline comments. Comment at: clang-tidy/modernize/MakeSmartPtrCheck.cpp:94 equalsBoundNode(PointerType), C

[PATCH] D60107: [analyzer] NoStoreFuncVisitor: Suppress bug reports with no-store in system headers.

2019-04-01 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. (whoops, forgot Alexey) Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60107/new/ https://reviews.llvm.org/D60107 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[PATCH] D60112: [analyzer] Treat write into a top-level parameter variable with destructor as escape.

2019-04-01 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ created this revision. NoQ added reviewers: dcoughlin, xazax.hun, a_sidorin, rnkovacs, mikhail.ramalho, Szelethus, baloghadamsoftware, Charusso. Herald added subscribers: cfe-commits, jdoerfert, dkrupp, donat.nagy, a.sidorin, szepet. Herald added a project: clang. Writing stuff into an argum

[PATCH] D59407: [clangd] Add RelationSlab

2019-04-01 Thread Nathan Ridge via Phabricator via cfe-commits
nridge requested review of this revision. nridge added a reviewer: sammccall. nridge added a comment. I guess I should clear the "Accepted" status until we settle the question of the data model. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59407/n

[PATCH] D58841: [Diagnostics] Support -Wtype-limits for GCC compatibility

2019-04-01 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. Ping @rsmith CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58841/new/ https://reviews.llvm.org/D58841 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-comm

[PATCH] D60094: [MSVC] If unable to find link.exe relative to MSVC, look for link.exe in the path

2019-04-01 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo marked an inline comment as done. mstorsjo added inline comments. Comment at: lib/Driver/ToolChains/MSVC.cpp:493 C.getDriver().Diag(clang::diag::warn_drv_msvc_not_found); + linkPath = TC.GetProgramPath("link.exe"); +} rnk wrote: > amccart

[PATCH] D60094: [MSVC] If unable to find link.exe relative to MSVC, look for link.exe in the path

2019-04-01 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. FWIW, to add a bit of context about why (since normally, few people actually do link via the `(clang-)cl` interface); CMake does during some of its tests. I'd like to bring it to a point so that `CC=clang-cl CXX=clang-cl cmake ...` would work, while I currently either