[PATCH] D53475: Create ConstantExpr class

2018-10-30 Thread Bill Wendling via Phabricator via cfe-commits
void added a subscriber: rsmith. void added a comment. I didn't see that during my tests. Probably different -W flags or something. I reverted that bit. I hope it fixes the problem. -bw Repository: rC Clang https://reviews.llvm.org/D53475 ___ cf

Re: [PATCH] D53475: Create ConstantExpr class

2018-10-30 Thread Bill Wendling via cfe-commits
I didn't see that during my tests. Probably different -W flags or something. I reverted that bit. I hope it fixes the problem. -bw On Tue, Oct 30, 2018 at 10:02 PM Kristina Brooks via Phabricator < revi...@reviews.llvm.org> wrote: > kristina added a comment. > > Ah, it was causing this warning d

[PATCH] D53475: Create ConstantExpr class

2018-10-30 Thread Kristina Brooks via Phabricator via cfe-commits
kristina added a comment. Ah, it was causing this warning during build: /SourceCache/llvm-trunk-8.0/tools/clang/include/clang/AST/Expr.h:903:1: warning: 'ConstantExpr' defined as a struct here but previously declared as a class [-Wmismatched-tags] Repository: rC Clang https://reviews.llv

r345695 - Change "struct" to "class" to avoid warnings

2018-10-30 Thread Bill Wendling via cfe-commits
Author: void Date: Tue Oct 30 21:58:34 2018 New Revision: 345695 URL: http://llvm.org/viewvc/llvm-project?rev=345695&view=rev Log: Change "struct" to "class" to avoid warnings Modified: cfe/trunk/include/clang/AST/Expr.h Modified: cfe/trunk/include/clang/AST/Expr.h URL: http://llvm.org/view

[PATCH] D53475: Create ConstantExpr class

2018-10-30 Thread Bill Wendling via Phabricator via cfe-commits
void marked 4 inline comments as done. void added a comment. That change was intentional. But I guess it's causing issues. I'll change it to a `class`. Repository: rC Clang https://reviews.llvm.org/D53475 ___ cfe-commits mailing list cfe-commits

[PATCH] D53919: [X86] Don't allow illegal vector types to return by direct value.

2018-10-30 Thread Craig Topper via Phabricator via cfe-commits
craig.topper created this revision. craig.topper added reviewers: efriedma, rnk, echristo. The backend can't lower this correctly and will try to split the return value into multiple registers. This patches forces it to return via memory similar to what was already done for arguments. Fixes PR

[PATCH] D53475: Create ConstantExpr class

2018-10-30 Thread Kristina Brooks via Phabricator via cfe-commits
kristina added a comment. I think you may have accidentally commited the wrong patch. +struct ConstantExpr : public FullExpr { Is causing a warning right now, not sure where that came from. Repository: rC Clang https://reviews.llvm.org/D53475 ___

[PATCH] D52674: [AST] Add Obj-C discriminator to MS ABI RTTI

2018-10-30 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In https://reviews.llvm.org/D52674#1271814, @smeenai wrote: > @rjmccall I prototyped the ForRTTI parameter approach in > https://reviews.llvm.org/D53546. It could definitely be cleaned up a bit, but > it demonstrates the problems I saw with the added parameter. Namely,

r345692 - Create ConstantExpr class

2018-10-30 Thread Bill Wendling via cfe-commits
Author: void Date: Tue Oct 30 20:48:47 2018 New Revision: 345692 URL: http://llvm.org/viewvc/llvm-project?rev=345692&view=rev Log: Create ConstantExpr class A ConstantExpr class represents a full expression that's in a context where a constant expression is required. This class reflects the path

[PATCH] D53705: [OpenCL] Postpone PSV address space diagnostic

2018-10-30 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In https://reviews.llvm.org/D53705#1281738, @keryell wrote: > In https://reviews.llvm.org/D53705#1278066, @rjmccall wrote: > > > I don't suppose there's any chance you can just tell Khronos to fix their > > stuff. It's a little funny to be more conservative about keywo

[PATCH] D53475: Create ConstantExpr class

2018-10-30 Thread Bill Wendling via Phabricator via cfe-commits
void closed this revision. void marked 2 inline comments as done. void added inline comments. Comment at: include/clang/AST/Expr.h:898 +class ConstantExpr : public FullExpr { + Stmt *Val; +public: rsmith wrote: > I think it'd be cleaner and simpler to move this

[PATCH] D53705: [OpenCL] Postpone PSV address space diagnostic

2018-10-30 Thread Ronan Keryell via Phabricator via cfe-commits
keryell added a comment. In https://reviews.llvm.org/D53705#1278066, @rjmccall wrote: > I don't suppose there's any chance you can just tell Khronos to fix their > stuff. It's a little funny to be more conservative about keywords in C++ > when the C++ committee is actually much more aggressive

[PATCH] D53860: [SemaCXX] Don't check base's dtor is accessible

2018-10-30 Thread Brian Gesiak via Phabricator via cfe-commits
modocache abandoned this revision. modocache added a comment. Yes, thanks @rsmith! And sorry @ahatanak for the trouble of explaining your code here. The new standards behavior does impact @twoh and I's codebase in a few places, but as you explained we can simply change the source to not use li

[PATCH] D53705: [OpenCL] Postpone PSV address space diagnostic

2018-10-30 Thread Ronan Keryell via Phabricator via cfe-commits
keryell added a comment. We could submit to the standard an OpenCL C++ extension to accept the OpenCL C syntax... Repository: rC Clang https://reviews.llvm.org/D53705 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/

[PATCH] D53475: Create ConstantExpr class

2018-10-30 Thread Bill Wendling via Phabricator via cfe-commits
void added a comment. Thanks, Richard! :-) Repository: rC Clang https://reviews.llvm.org/D53475 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: r345676 - [Win64] Handle passing i128 by value

2018-10-30 Thread Richard Trieu via cfe-commits
I have reverted this in r345691 because it caused test CodeGen/mingw-long-double.c to start failing. Command Output (stderr): -- /usr/local/google/clang/install/llvm/tools/clang/test/CodeGen/mingw-long-double.c:36:11: error: MSC64: expected string not found in input // MSC64: define dso_local doub

r345691 - Revert r345676 due to test failure.

2018-10-30 Thread Richard Trieu via cfe-commits
Author: rtrieu Date: Tue Oct 30 19:10:51 2018 New Revision: 345691 URL: http://llvm.org/viewvc/llvm-project?rev=345691&view=rev Log: Revert r345676 due to test failure. This was causing CodeGen/mingw-long-double.c to start failing. Removed: cfe/trunk/test/CodeGen/win64-i128.c Modified: c

[PATCH] D53860: [SemaCXX] Don't check base's dtor is accessible

2018-10-30 Thread Taewook Oh via Phabricator via cfe-commits
twoh added a comment. @rsmith I see. Thank you for the clarification! Repository: rC Clang https://reviews.llvm.org/D53860 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D53860: [SemaCXX] Don't check base's dtor is accessible

2018-10-30 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. In https://reviews.llvm.org/D53860#1280959, @twoh wrote: > For me it seems that the bug is checking destructor accessibility of Base > itself, not fields of Base. The code is correct (or at least, following the current standard rule) as-is. The base class subobject its

[PATCH] D53916: [ARM64] [Windows] Implement _InterlockedExchangeAdd*_* builtins.

2018-10-30 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: lib/CodeGen/CGBuiltin.cpp:100 +CodeGenFunction &CGF, llvm::AtomicRMWInst::BinOp Kind, const CallExpr *E, +AtomicOrdering Ordering = AtomicOrdering::Sequent

[PATCH] D53725: [CodeGen] Move `emitConstant` from ScalarExprEmitter to CodeGenFunction. NFC.

2018-10-30 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added a comment. This revision is now accepted and ready to land. Well, that's the old style, but we've been slowly moving to the camelCase style instead. Very, very slowly. I won't hold up your patch over it. https://reviews.llvm.org/D53725 __

[PATCH] D53916: [ARM64] [Windows] Implement _InterlockedExchangeAdd*_* builtins.

2018-10-30 Thread Eli Friedman via Phabricator via cfe-commits
efriedma updated this revision to Diff 171853. efriedma added a comment. Upload correct diff. Repository: rC Clang https://reviews.llvm.org/D53916 Files: include/clang/Basic/BuiltinsAArch64.def include/clang/Basic/BuiltinsARM.def lib/CodeGen/CGBuiltin.cpp lib/Headers/intrin.h test/

[PATCH] D53916: [ARM64] [Windows] Implement _InterlockedExchangeAdd*_* builtins.

2018-10-30 Thread Eli Friedman via Phabricator via cfe-commits
efriedma updated this revision to Diff 171852. efriedma added a comment. Get rid of unnecessary constants. Repository: rC Clang https://reviews.llvm.org/D53916 Files: include/clang/Basic/BuiltinsAArch64.def include/clang/Basic/BuiltinsARM.def lib/CodeGen/CGBuiltin.cpp lib/Headers/int

[PATCH] D53916: [ARM64] [Windows] Implement _InterlockedExchangeAdd*_* builtins.

2018-10-30 Thread Eli Friedman via Phabricator via cfe-commits
efriedma created this revision. efriedma added reviewers: rnk, mstorsjo. Herald added subscribers: kristina, jfb, chrib, kristof.beyls, javed.absar. These apparently need to be proper builtins to handle the Windows SDK. Repository: rC Clang https://reviews.llvm.org/D53916 Files: include/cl

[PATCH] D53475: Create ConstantExpr class

2018-10-30 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. Thanks, looks good. I don't mind if you address the comments below before this commit or in a separate commit. Comment at: include/clang/AST/Expr.h:898 +class ConstantExpr :

[PATCH] D53770: Support g++ headers in include/g++

2018-10-30 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. Looks good with an accompanying test. (You can probably copy whatever was added for the FreeScale line above.) Repository: rC Clang https://reviews.llvm.org/D53770 ___ cfe-commits mailing list cfe-commits@lists.llvm.org h

[PATCH] D52296: [Clang] - Add -gsingle-file-split-dwarf option.

2018-10-30 Thread Eric Christopher via Phabricator via cfe-commits
echristo added a comment. In https://reviews.llvm.org/D52296#1246142, @grimar wrote: > In https://reviews.llvm.org/D52296#1243688, @echristo wrote: > > > In https://reviews.llvm.org/D52296#1241928, @probinson wrote: > > > > > Do we generate the .dwo file directly these days? If not, I can imagin

LLVM buildmaster will be restarted tonight

2018-10-30 Thread Galina Kistanova via cfe-commits
Hello everyone, LLVM buildmaster will be updated and restarted after 6PM Pacific time today. Thanks Galina ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r345676 - [Win64] Handle passing i128 by value

2018-10-30 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Tue Oct 30 16:58:41 2018 New Revision: 345676 URL: http://llvm.org/viewvc/llvm-project?rev=345676&view=rev Log: [Win64] Handle passing i128 by value For arguments, pass it indirectly, since the ABI doc says pretty clearly that arguments larger than 8 bytes are passed indirectly.

[PATCH] D53912: [Headers] [MS] Add intrin0.h

2018-10-30 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. This sounds like it would defeat what I'm assuming is the intended purpose of intrin0.h, which is to reduce compile time. intrin.h is kind of enormous, and the compile time problems are well-documented. We should investigate what's up with intrin0.h and implement as many bu

[PATCH] D53912: [Headers] [MS] Add intrin0.h

2018-10-30 Thread Azharuddin Mohammed via Phabricator via cfe-commits
azharudd created this revision. azharudd added reviewers: rnk, mgrang. Herald added subscribers: jfb, mgorny. xatomic.h header in VS 2017 includes instead of like before. Adding an intrin0.h header which internally includes when compiling for the Windows platform. Repository: rC Clang http

[PATCH] D53854: [Driver] Use -push-/-pop-state and -as-needed for libc++ on Fuchsia

2018-10-30 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr accepted this revision. mcgrathr added inline comments. This revision is now accepted and ready to land. Comment at: clang/lib/Driver/ToolChains/Fuchsia.cpp:125 !Args.hasArg(options::OPT_static); +CmdArgs.push_back("-push-state

[PATCH] D53066: [Driver] Use forward slashes in most linker arguments

2018-10-30 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. We discussed adding a new path style that opts into a / preferred separator on Windows, something like path::Style::windows_forward. All of the absolute path handling routines would behave the same, but the preferred separator would now be `/`. We can make the default path

[PATCH] D52674: [AST] Add Obj-C discriminator to MS ABI RTTI

2018-10-30 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai added a comment. Ping @rjmccall. Let me know if the approach in https://reviews.llvm.org/D53546 is what you'd been envisioning, or if I'm just doing something completely brain-dead :) Repository: rC Clang https://reviews.llvm.org/D52674 ___

r345669 - Silence unused variable warnings. NFC

2018-10-30 Thread Richard Trieu via cfe-commits
Author: rtrieu Date: Tue Oct 30 16:01:15 2018 New Revision: 345669 URL: http://llvm.org/viewvc/llvm-project?rev=345669&view=rev Log: Silence unused variable warnings. NFC Modified: cfe/trunk/lib/CodeGen/CGExprScalar.cpp Modified: cfe/trunk/lib/CodeGen/CGExprScalar.cpp URL: http://llvm.org/

[PATCH] D53488: [clang-tidy] Catching narrowing from double to float.

2018-10-30 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added inline comments. Comment at: clang-tidy/cppcoreguidelines/NarrowingConversionsCheck.cpp:149 + const QualType RhsType = Rhs->getType(); + if (Lhs->isValueDependent() || Rhs->isValueDependent() || + LhsType->isDependentType() || RhsType->isDependentType()) --

[PATCH] D53882: [clang-tidy] Adding Zircon checker for std namespace

2018-10-30 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added inline comments. Comment at: clang-tools-extra/clang-tidy/zircon/NoStdNamespaceCheck.cpp:52 + Finder->addMatcher( + valueDecl(hasType(decl(hasDeclContext(namespaceDecl(isStdNamespace()) + .bind("stdVar"), Recommend extracting `na

[PATCH] D53628: [analyzer] Remove custom rule for OSIterator in RetainCountChecker

2018-10-30 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov added a comment. Actually, I'm reverting this: the rule seems fairly ubiquitous. Repository: rC Clang https://reviews.llvm.org/D53628 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/l

[PATCH] D53699: [ASTImporter] Fix inequality of functions with different attributes

2018-10-30 Thread Aleksei Sidorin via Phabricator via cfe-commits
a_sidorin added a comment. Hi Gabor, Thank you for the patch. The reason for this change looks clear. However, I don't think omitting this comparison completely is what we want here. Instead, we can do a dance similar to `ASTContext::mergeFunctionTypes()` where all attributes but NoReturn are c

[PATCH] D53488: [clang-tidy] Catching narrowing from double to float.

2018-10-30 Thread Guillaume Chatelet via Phabricator via cfe-commits
gchatelet marked an inline comment as done. gchatelet added inline comments. Comment at: clang-tidy/cppcoreguidelines/NarrowingConversionsCheck.cpp:42 + unless(hasParent(castExpr())), + unless(isInTemplateInstantiation())) + .b

[PATCH] D53488: [clang-tidy] Catching narrowing from double to float.

2018-10-30 Thread Guillaume Chatelet via Phabricator via cfe-commits
gchatelet updated this revision to Diff 171826. gchatelet marked 12 inline comments as done. gchatelet added a comment. - Address comments Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D53488 Files: clang-tidy/cppcoreguidelines/NarrowingConversionsCheck.cpp clang-tidy/cppco

[PATCH] D52984: [analyzer] Checker reviewer's checklist

2018-10-30 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Yes. Not just for checkers, not just for beginners :) https://reviews.llvm.org/D52984 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D45050: [clang-tidy] New checker for not null-terminated result caused by strlen(), size() or equal length

2018-10-30 Thread Douglas Yung via Phabricator via cfe-commits
dyung added a comment. In https://reviews.llvm.org/D45050#1281178, @whisperity wrote: > I have installed said Ubuntu in a virtual machine for testing this, but > unfortunately only the following Clangs are available in the package manager > for `Trusty`: > > clang - C, C++ and Objective-C com

[PATCH] D53882: [clang-tidy] Adding Zircon checker for std namespace

2018-10-30 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added inline comments. Comment at: clang-tools-extra/clang-tidy/zircon/NoStdNamespaceCheck.cpp:71 +void NoStdNamespaceCheck::check(const MatchFinder::MatchResult &Result) { + if (const auto *D = Result.Nodes.getNodeAs("stdVar")) +diag(D->getBeginLoc(),

[PATCH] D50250: [clang][ubsan] Implicit Conversion Sanitizer - integer sign change - clang part

2018-10-30 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL345660: [clang][ubsan] Implicit Conversion Sanitizer - integer sign change - clang part (authored by lebedevri, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://

[PATCH] D45050: [clang-tidy] New checker for not null-terminated result caused by strlen(), size() or equal length

2018-10-30 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. Interesting, did you try out `gcc-4.8` and if it is reproducable with that one? This version of gcc is still supported and if the problem occurs with the libstdc++ shipped there, we need to consider it. > However, **`16.04 LTS (Xenial)`** at the time of writing this com

r345660 - [clang][ubsan] Implicit Conversion Sanitizer - integer sign change - clang part

2018-10-30 Thread Roman Lebedev via cfe-commits
Author: lebedevri Date: Tue Oct 30 14:58:56 2018 New Revision: 345660 URL: http://llvm.org/viewvc/llvm-project?rev=345660&view=rev Log: [clang][ubsan] Implicit Conversion Sanitizer - integer sign change - clang part This is the second half of Implicit Integer Conversion Sanitizer. It completes th

[PATCH] D53705: [OpenCL] Postpone PSV address space diagnostic

2018-10-30 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In https://reviews.llvm.org/D53705#1280264, @Anastasia wrote: > In https://reviews.llvm.org/D53705#1279086, @rjmccall wrote: > > > In https://reviews.llvm.org/D53705#1279068, @svenvh wrote: > > > > > Unlikely, since address spaces are provided in a different way in OpenC

[PATCH] D53882: [clang-tidy] Adding Zircon checker for std namespace

2018-10-30 Thread Julie Hockett via Phabricator via cfe-commits
juliehockett updated this revision to Diff 171810. juliehockett marked 5 inline comments as done. https://reviews.llvm.org/D53882 Files: clang-tools-extra/clang-tidy/zircon/CMakeLists.txt clang-tools-extra/clang-tidy/zircon/NoStdNamespaceCheck.cpp clang-tools-extra/clang-tidy/zircon/NoStdNa

[PATCH] D53882: [clang-tidy] Adding Zircon checker for std namespace

2018-10-30 Thread Julie Hockett via Phabricator via cfe-commits
juliehockett added inline comments. Comment at: clang-tools-extra/clang-tidy/zircon/NoStdNamespaceCheck.cpp:71 +void NoStdNamespaceCheck::check(const MatchFinder::MatchResult &Result) { + if (const auto *D = Result.Nodes.getNodeAs("stdVar")) +diag(D->getBeginLoc(), -

[PATCH] D53738: [Fixed Point Arithmetic] Fixed Point Addition

2018-10-30 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In https://reviews.llvm.org/D53738#1280193, @ebevhan wrote: > In https://reviews.llvm.org/D53738#1279069, @rjmccall wrote: > > > > The important difference would be that we separate the semantics of > > > performing the conversion and the operation. I understand that ad

[PATCH] D52615: Handle -fsanitize-address-poison-class-member-array-new-cookie in the driver and propagate it to cc1

2018-10-30 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Thanks, and I agree with renaming the existing option. Comment at: docs/ClangCommandLineReference.rst:805 -Enable poisoning array cookies when using class member operator new\[\] in AddressSanitizer +Enable poisoning array cookies when using custom

[PATCH] D50672: [ASTImporter] Change the return result of Decl import to Optional

2018-10-30 Thread Aleksei Sidorin via Phabricator via cfe-commits
a_sidorin abandoned this revision. a_sidorin added a comment. Another version has been committed (https://reviews.llvm.org/D51633). Repository: rC Clang https://reviews.llvm.org/D50672 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http:

[PATCH] D53697: [ASTImporter][Structural Eq] Check for isBeingDefined

2018-10-30 Thread Aleksei Sidorin via Phabricator via cfe-commits
a_sidorin accepted this revision. a_sidorin added a comment. This revision is now accepted and ready to land. Thank you for the explanation! Repository: rC Clang https://reviews.llvm.org/D53697 ___ cfe-commits mailing list cfe-commits@lists.llvm.

[PATCH] D53770: Support g++ headers in include/g++

2018-10-30 Thread David Greene via Phabricator via cfe-commits
greened updated this revision to Diff 171801. greened edited the summary of this revision. greened added a comment. Explain that Cray packages gcc such that headers are in include/g++. Repository: rC Clang https://reviews.llvm.org/D53770 Files: lib/Driver/ToolChains/Linux.cpp Index: lib/

[PATCH] D53870: [clang-cl] Put dllexport attrs on static locals also in template instantiations (PR39496)

2018-10-30 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/dllimport.cpp:1010 +int bar() { T t; return t.foo(); } +// MO1-DAG: @"?x@?{{1|2}}??foo@?$T@H@pr39496@@Q{{[A-Z]*}}HXZ@4HA" = available_externally d

[PATCH] D53900: [CodeComplete] Penalize inherited ObjC properties for auto-completion

2018-10-30 Thread David Goldman via Phabricator via cfe-commits
dgoldman created this revision. Herald added subscribers: cfe-commits, arphaman. Similar to auto-completion for ObjC methods, inherited properties should be penalized / direct class and category properties should be prioritized. Note that currently, the penalty for using a result from a base clas

[PATCH] D53850: Declares __cpu_model as dso local

2018-10-30 Thread Haibo Huang via Phabricator via cfe-commits
hhb added inline comments. Comment at: lib/CodeGen/CGBuiltin.cpp:9013 Features, llvm::ConstantInt::get(Int32Ty, FeaturesMask)); return Builder.CreateICmpNE(Bitset, llvm::ConstantInt::get(Int32Ty, 0)); } craig.topper wrote: > This code looks to be out o

[PATCH] D45050: [clang-tidy] New checker for not null-terminated result caused by strlen(), size() or equal length

2018-10-30 Thread Whisperity via Phabricator via cfe-commits
whisperity added a reviewer: dyung. whisperity added a subscriber: dyung. whisperity added a comment. In https://reviews.llvm.org/D45050#1280831, @dyung wrote: > I have attached a bzipped preprocessed file that I can confirm will show the > failure if built with clang++ version 3.7.1, specifical

[PATCH] D44100: [ASTImporter] Reorder fields after structure import is finished

2018-10-30 Thread Aleksei Sidorin via Phabricator via cfe-commits
a_sidorin added a comment. Oops. Thank you Davide! Repository: rC Clang https://reviews.llvm.org/D44100 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D53850: Declares __cpu_model as hidden symbol

2018-10-30 Thread Haibo Huang via Phabricator via cfe-commits
hhb updated this revision to Diff 171789. https://reviews.llvm.org/D53850 Files: lib/CodeGen/CGBuiltin.cpp test/CodeGen/builtin-cpu-is.c test/CodeGen/builtin-cpu-supports.c Index: test/CodeGen/builtin-cpu-supports.c === --- t

r345649 - Changing the command line parameters sent to diff for this test.

2018-10-30 Thread Aaron Ballman via cfe-commits
Author: aaronballman Date: Tue Oct 30 13:55:18 2018 New Revision: 345649 URL: http://llvm.org/viewvc/llvm-project?rev=345649&view=rev Log: Changing the command line parameters sent to diff for this test. On some systems, -U 1 was being interpreted as -U -1. Trying -U1 to see if that's the univer

[PATCH] D52949: [Diagnostics] Implement -Wsizeof-pointer-div

2018-10-30 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. Any ideas for better warning message? Except for the warning text, I see this patch as ready. https://reviews.llvm.org/D52949 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/li

[PATCH] D53850: Declares __cpu_model as hidden symbol

2018-10-30 Thread Haibo Huang via Phabricator via cfe-commits
hhb updated this revision to Diff 171787. hhb added a comment. Rebase. Change to SetDSOLocal. https://reviews.llvm.org/D53850 Files: lib/CodeGen/CGBuiltin.cpp test/CodeGen/builtin-cpu-is.c test/CodeGen/builtin-cpu-supports.c Index: test/CodeGen/builtin-cpu-supports.c ===

[PATCH] D53547: NFC: Remove the ObjC1/ObjC2 distinction from clang (and related projects)

2018-10-30 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added inline comments. Comment at: clang-tools-extra/clang-tidy/google/AvoidThrowingObjCExceptionCheck.cpp:23 // this check should only be applied to ObjC sources. - if (!getLangOpts().ObjC1 && !getLangOpts().ObjC2) { + if (!getLangOpts().ObjC) { return

r345646 - NFC: Merge KEYOBJC and KEYARC

2018-10-30 Thread Erik Pilkington via cfe-commits
Author: epilk Date: Tue Oct 30 13:51:28 2018 New Revision: 345646 URL: http://llvm.org/viewvc/llvm-project?rev=345646&view=rev Log: NFC: Merge KEYOBJC and KEYARC We used to only define ARC keywords in -fobjc-arc mode, but now that we define them in ObjC mode, there isn't any reason to keep them s

[PATCH] D53025: [clang-tidy] implement new check for const return types.

2018-10-30 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. Am 30.10.18 um 21:47 schrieb Aaron Ballman via Phabricator: > aaron.ballman added a comment. > > I think this is getting really close! One question: would it make more sense > to name this `readability-const-type-return` or > `readability-const-return-type` instead?

r345643 - Revert "[ASTImporter] Reorder fields after structure import is finished"

2018-10-30 Thread Davide Italiano via cfe-commits
Author: davide Date: Tue Oct 30 13:46:29 2018 New Revision: 345643 URL: http://llvm.org/viewvc/llvm-project?rev=345643&view=rev Log: Revert "[ASTImporter] Reorder fields after structure import is finished" This reverts commit r345545 because it breaks some lldb tests. Modified: cfe/trunk/lib

[PATCH] D44100: [ASTImporter] Reorder fields after structure import is finished

2018-10-30 Thread Davide Italiano via Phabricator via cfe-commits
davide added subscribers: shafik, davide. davide added a comment. This patch broke lldb, at least on MacOS. You can reproduce the issue building lldb, applying your patch and then running $ ./lldb-dotest -p TestCModules I'm going to revert this to unblock folks, but don't hesitate to ping me i

[PATCH] D53025: [clang-tidy] implement new check for const return types.

2018-10-30 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. I think this is getting really close! One question: would it make more sense to name this `readability-const-type-return` or `readability-const-return-type` instead? It's not that the functions return a const *value* that's the issue, it's that the declared return

[PATCH] D53025: [clang-tidy] implement new check for const return types.

2018-10-30 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added inline comments. Comment at: clang-tidy/readability/ConstValueReturnCheck.cpp:107 +diag(Def->getInnerLocStart(), "return type %0 is 'const'-qualified " + "hindering compiler optimizations") +<< Def->getReturnTyp

[PATCH] D53882: [clang-tidy] Adding Zircon checker for std namespace

2018-10-30 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added inline comments. Comment at: clang-tools-extra/clang-tidy/zircon/NoStdNamespaceCheck.cpp:29 +AST_MATCHER(NamespaceAliasDecl, isAliasedToStd) { + if (const auto *AN = Node.getAliasedNamespace()) { +// If this aliases to an actual namespace, check if its std. I

[PATCH] D53524: [ThinLTO] Enable LTOUnit only when it is needed

2018-10-30 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson added a comment. In https://reviews.llvm.org/D53524#1279288, @tejohnson wrote: > In https://reviews.llvm.org/D53524#1276038, @pcc wrote: > > > In https://reviews.llvm.org/D53524#1274505, @tejohnson wrote: > > > > > In https://reviews.llvm.org/D53524#1271387, @tejohnson wrote: > > > > >

[PATCH] D53891: [LTO] Pass down LTOUnit codegen flag to bitcode writer

2018-10-30 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson created this revision. tejohnson added a reviewer: pcc. Herald added subscribers: cfe-commits, dexonsmith, steven_wu, eraman, inglorion, mehdi_amini. Clang side patch for recording the LTOUnit flag in the index. Depends on https://reviews.llvm.org/D53890. Repository: rC Clang http

[PATCH] D53547: NFC: Remove the ObjC1/ObjC2 distinction from clang (and related projects)

2018-10-30 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE345637: NFC: Remove the ObjC1/ObjC2 distinction from clang (and related projects) (authored by epilk, committed by ). Changed prior to commit: https://reviews.llvm.org/D53547?vs=170703&id=171778#toc

[clang-tools-extra] r345637 - NFC: Remove the ObjC1/ObjC2 distinction from clang (and related projects)

2018-10-30 Thread Erik Pilkington via cfe-commits
Author: epilk Date: Tue Oct 30 13:31:30 2018 New Revision: 345637 URL: http://llvm.org/viewvc/llvm-project?rev=345637&view=rev Log: NFC: Remove the ObjC1/ObjC2 distinction from clang (and related projects) We haven't supported compiling ObjC1 for a long time (and never will again), so there isn't

r345637 - NFC: Remove the ObjC1/ObjC2 distinction from clang (and related projects)

2018-10-30 Thread Erik Pilkington via cfe-commits
Author: epilk Date: Tue Oct 30 13:31:30 2018 New Revision: 345637 URL: http://llvm.org/viewvc/llvm-project?rev=345637&view=rev Log: NFC: Remove the ObjC1/ObjC2 distinction from clang (and related projects) We haven't supported compiling ObjC1 for a long time (and never will again), so there isn't

[PATCH] D53860: [SemaCXX] Don't check base's dtor is accessible

2018-10-30 Thread Taewook Oh via Phabricator via cfe-commits
twoh added a comment. I think the context is Derived here. My understanding of http://wg21.link/p0968r0#2227 (in this patch's context) is that when Derived is aggregate initialized, the destructor for each element of Base is potentially invoked as well. For me it seems that the bug is checking

r345635 - Speculatively attempt to fix a failing testbot.

2018-10-30 Thread Aaron Ballman via cfe-commits
Author: aaronballman Date: Tue Oct 30 12:49:17 2018 New Revision: 345635 URL: http://llvm.org/viewvc/llvm-project?rev=345635&view=rev Log: Speculatively attempt to fix a failing testbot. A testbot ( http://green.lab.llvm.org/green/job/clang-stage1-cmake-RA-incremental/54690/) was failing wi

[PATCH] D53025: [clang-tidy] implement new check for const return types.

2018-10-30 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added inline comments. Comment at: clang-tidy/readability/ConstValueReturnCheck.cpp:107 +diag(Def->getInnerLocStart(), "return type %0 is 'const'-qualified " + "hindering compiler optimizations") +<< Def->getReturnType(

[PATCH] D53025: [clang-tidy] implement new check for const return types.

2018-10-30 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 171765. ymandel marked 2 inline comments as done. ymandel added a comment. Add comment to field. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D53025 Files: clang-tidy/readability/CMakeLists.txt clang-tidy/readability/ConstValueReturnCh

[PATCH] D53025: [clang-tidy] implement new check for const return types.

2018-10-30 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 171764. ymandel marked an inline comment as done. ymandel added a comment. Modify dialog printing to highlight const token. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D53025 Files: clang-tidy/readability/CMakeLists.txt clang-tidy/rea

[PATCH] D53882: [clang-tidy] Adding Zircon checker for std namespace

2018-10-30 Thread Julie Hockett via Phabricator via cfe-commits
juliehockett created this revision. juliehockett added reviewers: aaron.ballman, hokein, ilya-biryukov. juliehockett added a project: clang-tools-extra. Herald added subscribers: xazax.hun, mgorny. Adds a checker to warn against using the std namespace, as Zircon's kernel lib++ policy does not al

r345633 - Silencing a -Wunused-variable warning; NFC.

2018-10-30 Thread Aaron Ballman via cfe-commits
Author: aaronballman Date: Tue Oct 30 12:23:06 2018 New Revision: 345633 URL: http://llvm.org/viewvc/llvm-project?rev=345633&view=rev Log: Silencing a -Wunused-variable warning; NFC. Modified: cfe/trunk/lib/StaticAnalyzer/Core/SarifDiagnostics.cpp Modified: cfe/trunk/lib/StaticAnalyzer/Core/

r345630 - Fixing some build bot failures from r345628; NFC intended.

2018-10-30 Thread Aaron Ballman via cfe-commits
Author: aaronballman Date: Tue Oct 30 12:06:58 2018 New Revision: 345630 URL: http://llvm.org/viewvc/llvm-project?rev=345630&view=rev Log: Fixing some build bot failures from r345628; NFC intended. Modified: cfe/trunk/lib/StaticAnalyzer/Core/SarifDiagnostics.cpp Modified: cfe/trunk/lib/Stati

[PATCH] D53475: Create ConstantExpr class

2018-10-30 Thread Bill Wendling via Phabricator via cfe-commits
void added a comment. Ping? Repository: rC Clang https://reviews.llvm.org/D53475 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D53814: Allow the analyzer to output to a SARIF file

2018-10-30 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman closed this revision. aaron.ballman added a comment. In https://reviews.llvm.org/D53814#1280581, @george.karpenkov wrote: > I much prefer this version. > We've had the same problem with diffing plist output. > One thing we have learned is using a FileCheck was definitely a bad ide

r345628 - Add the ability to output static analysis results to SARIF.

2018-10-30 Thread Aaron Ballman via cfe-commits
Author: aaronballman Date: Tue Oct 30 11:55:38 2018 New Revision: 345628 URL: http://llvm.org/viewvc/llvm-project?rev=345628&view=rev Log: Add the ability to output static analysis results to SARIF. This allows users to specify SARIF (https://github.com/oasis-tcs/sarif-spec) as the output from t

[PATCH] D45050: [clang-tidy] New checker for not null-terminated result caused by strlen(), size() or equal length

2018-10-30 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. Sorry for responding so late, but i thought i get a shot to look at it. Here is the mail from Douglas Yung who was so kind to isolate the breakage and find a reproducer. If you have the chance please take a look at it. Hi Jonas, I have attached a bzipped prepro

[PATCH] D53725: [CodeGen] Move `emitConstant` from ScalarExprEmitter to CodeGenFunction. NFC.

2018-10-30 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. In https://reviews.llvm.org/D53725#1278067, @rjmccall wrote: > This should at least be named `emitScalarConstant`. Agree. I've just capitalized 'e' as it looks like the majority of `Emit...` methods are capitalized that way. https://reviews.llvm.org/D53725 ___

[PATCH] D53725: [CodeGen] Move `emitConstant` from ScalarExprEmitter to CodeGenFunction. NFC.

2018-10-30 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai updated this revision to Diff 171751. vsapsai added a comment. - Rename `EmitConstant` to `EmitScalarConstant`. https://reviews.llvm.org/D53725 Files: clang/lib/CodeGen/CGExpr.cpp clang/lib/CodeGen/CGExprScalar.cpp clang/lib/CodeGen/CodeGenFunction.h Index: clang/lib/CodeGen/Cod

[PATCH] D53850: Declares __cpu_model as hidden symbol

2018-10-30 Thread Haibo Huang via Phabricator via cfe-commits
hhb updated this revision to Diff 171748. https://reviews.llvm.org/D53850 Files: lib/CodeGen/CGBuiltin.cpp test/CodeGen/builtin-cpu-is.c test/CodeGen/builtin-cpu-supports.c Index: test/CodeGen/builtin-cpu-supports.c === --- t

[PATCH] D53771: [clang-tidy] Avoid C arrays check

2018-10-30 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri updated this revision to Diff 171747. lebedev.ri marked 4 inline comments as done. lebedev.ri added a comment. Address review notes. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D53771 Files: clang-tidy/cppcoreguidelines/CMakeLists.txt clang-tidy/cppcoreguidelin

[PATCH] D53771: [clang-tidy] Avoid C arrays check

2018-10-30 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: clang-tidy/cppcoreguidelines/CppCoreGuidelinesTidyModule.cpp:84 "cppcoreguidelines-c-copy-assignment-signature"); +CheckFactories.registerCheck( +"cppcoreguidelines-avoid-c-arrays"); JonasToth wro

[PATCH] D53860: [SemaCXX] Don't check base's dtor is accessible

2018-10-30 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. http://wg21.link/p0968r0#2227 says: The destructor for each element of class type is potentially invoked (15.4 [class.dtor]) from the context where the aggregate initialization occurs. [Note: This provision ensures that destructors can be called for fully-constructed

[PATCH] D53697: [ASTImporter][Structural Eq] Check for isBeingDefined

2018-10-30 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 171723. martong marked 2 inline comments as done. martong added a comment. - Remove unrelated test Repository: rC Clang https://reviews.llvm.org/D53697 Files: lib/AST/ASTStructuralEquivalence.cpp unittests/AST/ASTImporterTest.cpp Index: unittests/A

[PATCH] D53697: [ASTImporter][Structural Eq] Check for isBeingDefined

2018-10-30 Thread Gabor Marton via Phabricator via cfe-commits
martong marked 2 inline comments as done. martong added a comment. > I wonder if it is possible to get into situation where non-equivalent decls > are marked equivalent with this patch? If yes, we can create a mapping > between decls being imported and original decls as an alternative solution.

[PATCH] D53522: [Frontend] Include module map header declaration in dependency file output

2018-10-30 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added inline comments. Comment at: clang/include/clang/Lex/ModuleMap.h:649-650 + ///This can differ from \c Header's name due to symlinks. void addHeader(Module *Mod, Module::Header Header, - ModuleHeaderRole Role, bool Imported = false

[PATCH] D53522: [Frontend] Include module map header declaration in dependency file output

2018-10-30 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington updated this revision to Diff 171719. erik.pilkington marked 7 inline comments as done. erik.pilkington added a comment. Address review comments. Thanks! https://reviews.llvm.org/D53522 Files: clang/include/clang/Lex/ModuleMap.h clang/lib/Frontend/DependencyFile.cpp clang/

[PATCH] D53488: [clang-tidy] Catching narrowing from double to float.

2018-10-30 Thread Guillaume Chatelet via Phabricator via cfe-commits
gchatelet added a comment. Here are 15 random ones from **llvm** synced at `8f9fb8bab2e9b5b27fe40d700d2abe967b99fbb5`. lib/Target/ARM/AsmParser/ARMAsmParser.cpp:3802:31: warning: narrowing conversion from 'int' to 'unsigned int' [cppcoreguidelines-narrowing-conversions] tools/dsymutil/Mach

  1   2   >