[PATCH] D57579: [analyzer][WIP] Enable subcheckers to possess checker options

2019-02-07 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. Herald added a subscriber: cfe-commits. Ping Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57579/new/ https://reviews.llvm.org/D57579 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D57896: Variable names rule

2019-02-07 Thread Chris Lattner via Phabricator via cfe-commits
lattner accepted this revision. lattner added a comment. This revision is now accepted and ready to land. I am very much +1 on this. That said, this isn't the sort of thing we just use patch review for. Please agitate a robust discussion about this on llvm-dev. :-) Repository: rG LLVM Git

[PATCH] D56571: [RFC prototype] Implementation of asm-goto support in clang

2019-02-07 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 added inline comments. Comment at: lib/Analysis/CFG.cpp:3137 + + Block = createBlock(false); + Block->setTerminator(G); efriedma wrote: > efriedma wrote: > > Passing add_successor=false seems suspect; this could probably use more > > test coverage. > Did

[PATCH] D56571: [RFC prototype] Implementation of asm-goto support in clang

2019-02-07 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 updated this revision to Diff 185911. jyu2 marked an inline comment as done. jyu2 added a comment. Remove check for %lN Fix missing successor of asm goto in CFG build. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56571/new/ https://reviews.llvm.org/D56571 Files: include/clang/A

[PATCH] D57464: Generalize method overloading on addr spaces to C++

2019-02-07 Thread John McCall via Phabricator via cfe-commits
rjmccall added a reviewer: rsmith. rjmccall added a comment. Hmm. Richard, I've mostly let you stay out of this, but do you have any thoughts about the right manage to parse attributes here? We want to allow `address_space` attributes to be written in the method-qualifiers list, but when we d

[PATCH] D57918: Add an attribute that causes clang to emit fortified calls to C stdlib functions

2019-02-07 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: clang/include/clang/Basic/AttrDocs.td:986 + } + }]; +} Probably worth clarifying somewhere in here that only a specific set of stdlib functions are supported. I don't know that it's important to spell that set out.

[PATCH] D57936: [CodeGenObjC] When available, emit a direct call to objc_alloc_init(cls) instead of [objc_alloc(cls) init]

2019-02-07 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: clang/lib/CodeGen/CGObjC.cpp:459 + llvm::Value *Receiver = + CGF.CGM.getObjCRuntime().GetClass(CGF, ObjTy->getInterface()); + return CGF.EmitObjCAllocInit(Receiver, CGF.ConvertType(OME->getType())); You might nee

[PATCH] D57797: Variable auto-init: fix __block initialization

2019-02-07 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. SGTM, thanks! Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57797/new/ https://reviews.llvm.org/D57797 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/

[PATCH] D57936: [CodeGenObjC] When available, emit a direct call to objc_alloc_init(cls) instead of [objc_alloc(cls) init]

2019-02-07 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington created this revision. erik.pilkington added reviewers: rjmccall, pete, ahatanak. Herald added subscribers: dexonsmith, jkorous. Herald added a project: clang. This provides a code size win on the caller side, since the `init` message send is done in the runtime function. rdar://

[PATCH] D57935: [Sema] Make string literal init an rvalue.

2019-02-07 Thread Eli Friedman via Phabricator via cfe-commits
efriedma created this revision. efriedma added a reviewer: rsmith. Herald added a project: clang. This allows substantially simplifying the expression evaluation code, because we don't have to special-case lvalues which are actually string literal initialization. This currently throws away an o

Buildbot numbers for the week of 01/27/2019 - 02/02/2019

2019-02-07 Thread Galina Kistanova via cfe-commits
Hello everyone, Below are some buildbot numbers for the last week of 01/27/2019 - 02/02/2019. Please see the same data in attached csv files: The longest time each builder was red during the week; "Status change ratio" by active builder (percent of builds that changed the builder status from gre

Buildbot numbers for the week of 01/20/2019 - 01/26/2019

2019-02-07 Thread Galina Kistanova via cfe-commits
Hello everyone, Below are some buildbot numbers for the week of 01/20/2019 - 01/26/2019. Please see the same data in attached csv files: The longest time each builder was red during the week; "Status change ratio" by active builder (percent of builds that changed the builder status from greed to

LLVM buildmaster will be updated and restarted tonight

2019-02-07 Thread Galina Kistanova via cfe-commits
Hello everyone, LLVM buildmaster will be updated and restarted after 7PM Pacific time today. Thanks Galina ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D56554: [ELF] Add '-z nognustack' opt to suppress emitting PT_GNU_STACK

2019-02-07 Thread Rui Ueyama via Phabricator via cfe-commits
ruiu added a comment. Overall looks good. > Do you mean that of those three options, the last one specified should take > precedence? Yes. Comment at: ELF/Config.h:191 bool ZGlobal; + GnuStackKind ZGnustack; bool ZHazardplt; Members are (roughly) sort

[PATCH] D57874: [WebAssembly] Make thread-related options consistent

2019-02-07 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added a comment. In D57874#1389981 , @sunfish wrote: > > - `-matomics` means `-mthread-model posix` > > The others sound reasonable, though this one seems a little surprising -- a > user might have -matomics enabled because they're targeting a VM t

[PATCH] D57797: Variable auto-init: fix __block initialization

2019-02-07 Thread JF Bastien via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rC353495: Variable auto-init: fix __block initialization (authored by jfb, committed by ). Changed prior to commit: https

r353495 - Variable auto-init: fix __block initialization

2019-02-07 Thread JF Bastien via cfe-commits
Author: jfb Date: Thu Feb 7 17:29:17 2019 New Revision: 353495 URL: http://llvm.org/viewvc/llvm-project?rev=353495&view=rev Log: Variable auto-init: fix __block initialization Summary: Automatic initialization [1] of __block variables was trampling over the block's headers after they'd been init

[PATCH] D57902: [AST] Fix structural inequivalence of operators

2019-02-07 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added inline comments. Comment at: unittests/AST/StructuralEquivalenceTest.cpp:251 + +TEST_F(StructuralEquivalenceFunctionTest, CtorVsDtor) { + auto t = makeDecls( Curious, is this test just for completeness or is this somehow related to the overloaded o

r353493 - [COFF, ARM64] Fix types for _ReadStatusReg, _WriteStatusReg

2019-02-07 Thread Eli Friedman via cfe-commits
Author: efriedma Date: Thu Feb 7 17:17:49 2019 New Revision: 353493 URL: http://llvm.org/viewvc/llvm-project?rev=353493&view=rev Log: [COFF, ARM64] Fix types for _ReadStatusReg, _WriteStatusReg r344765 added those intrinsics, but used the wrong types. Patch by Mike Hommey Differential Revision

[PATCH] D57874: [WebAssembly] Make thread-related options consistent

2019-02-07 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added inline comments. Comment at: lib/Driver/ToolChains/WebAssembly.cpp:66 +if (Args.hasFlag(clang::driver::options::OPT_pthread, + clang::driver::options::OPT_no_pthread), +false) aheejin wrote: > This code is not strictly

[PATCH] D57636: [COFF, ARM64] Fix types for _ReadStatusReg, _WriteStatusReg

2019-02-07 Thread Eli Friedman via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL353493: [COFF, ARM64] Fix types for _ReadStatusReg, _WriteStatusReg (authored by efriedma, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D57930: [Driver] Verify GCCInstallation is valid

2019-02-07 Thread Stephen Hines via Phabricator via cfe-commits
srhines added a comment. Would it be reasonable to have a test for this with perhaps an invalid GCC installation? There is some mock GCC/sysroot testing in https://github.com/llvm/llvm-project/blob/master/clang/test/Driver/android-gcc-toolchain.c and https://github.com/llvm/llvm-project/blob/m

[PATCH] D57874: [WebAssembly] Make thread-related options consistent

2019-02-07 Thread Dan Gohman via Phabricator via cfe-commits
sunfish added a comment. > - `-matomics` means `-mthread-model posix` The others sound reasonable, though this one seems a little surprising -- a user might have -matomics enabled because they're targeting a VM that has atomics, but still not want to use -mthread-model posix because their code

[PATCH] D57636: [COFF, ARM64] Fix types for _ReadStatusReg, _WriteStatusReg

2019-02-07 Thread Mike Hommey via Phabricator via cfe-commits
glandium added a comment. In D57636#1389971 , @efriedma wrote: > LGTM. Do you want me to commit this for you? Yes, please. Thank you. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57636/new/ https://reviews.llvm.org/D57

[PATCH] D57797: Variable auto-init: fix __block initialization

2019-02-07 Thread JF Bastien via Phabricator via cfe-commits
jfb updated this revision to Diff 185896. jfb added a comment. - Remove whitespace changes. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57797/new/ https://reviews.llvm.org/D57797 Files: lib/CodeGen/CGDecl.cpp test/CodeGenCXX/trivial-auto-var-init.cpp Ind

[PATCH] D57636: [COFF, ARM64] Fix types for _ReadStatusReg, _WriteStatusReg

2019-02-07 Thread Eli Friedman via Phabricator via cfe-commits
efriedma accepted this revision. efriedma added a comment. This revision is now accepted and ready to land. LGTM. Do you want me to commit this for you? Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57636/new/ https://reviews.llvm.org/D57636 __

[PATCH] D57874: [WebAssembly] Set '-matomics' when '-pthread' is set

2019-02-07 Thread Heejin Ahn via Phabricator via cfe-commits
aheejin marked an inline comment as done. aheejin added inline comments. Comment at: lib/Driver/ToolChains/WebAssembly.cpp:66 +if (Args.hasFlag(clang::driver::options::OPT_pthread, + clang::driver::options::OPT_no_pthread), +false)

[PATCH] D57874: [WebAssembly] Set '-matomics' when '-pthread' is set

2019-02-07 Thread Heejin Ahn via Phabricator via cfe-commits
aheejin updated this revision to Diff 185895. aheejin added a comment. Sorry nevermind my previous code. There was not hacky and much cleaner way to do everything in the driver layer. (Before I tried to do everything in the cc1 compilation layer :( ) Anyway, moved all logic to the driver layer

[PATCH] D57636: [COFF, ARM64] Fix types for _ReadStatusReg, _WriteStatusReg

2019-02-07 Thread Mike Hommey via Phabricator via cfe-commits
glandium added a comment. @efriedma can you take another look? Ideally, this should be backported to the release_80 branch, so that would need to be landed asap. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57636/new/ https://reviews.llvm.org/D57636

[PATCH] D57797: Variable auto-init: fix __block initialization

2019-02-07 Thread JF Bastien via Phabricator via cfe-commits
jfb marked an inline comment as done. jfb added inline comments. Comment at: lib/CodeGen/CGDecl.cpp:1642 CharUnits Size = getContext().getTypeSizeInChars(type); if (!Size.isZero()) { jfb wrote: > rjmccall wrote: > > Does this check handle flexible arr

[PATCH] D57797: Variable auto-init: fix __block initialization

2019-02-07 Thread JF Bastien via Phabricator via cfe-commits
jfb updated this revision to Diff 185892. jfb marked 4 inline comments as done. jfb added a comment. - Simplify patch greatly. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57797/new/ https://reviews.llvm.org/D57797 Files: lib/CodeGen/CGDecl.cpp test/CodeGen

r353490 - [NFC] Variable auto-init: use getAsVariableArrayType helper

2019-02-07 Thread JF Bastien via cfe-commits
Author: jfb Date: Thu Feb 7 16:51:05 2019 New Revision: 353490 URL: http://llvm.org/viewvc/llvm-project?rev=353490&view=rev Log: [NFC] Variable auto-init: use getAsVariableArrayType helper As suggested by @rjmccall in D57797. Modified: cfe/trunk/lib/CodeGen/CGDecl.cpp Modified: cfe/trunk/l

[PATCH] D57930: [Driver] Verify GCCInstallation is valid

2019-02-07 Thread Daniel Mentz via Phabricator via cfe-commits
danielmentz created this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Values returned by GCCInstallation.getParentLibPath() and GCCInstallation.getTriple() are not valid unless GCCInstallation.isValid() returns true. This has previously been ignored, and the for

[PATCH] D57797: Variable auto-init: fix __block initialization

2019-02-07 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/CodeGen/CGDecl.cpp:1726 +emitByrefStructureInit(emission); + } + jfb wrote: > Note that we still want this to be pulled out in this way because > `emitByrefStructureInit` emits the call to the initializer (in

[PATCH] D57797: Variable auto-init: fix __block initialization

2019-02-07 Thread JF Bastien via Phabricator via cfe-commits
jfb marked 2 inline comments as done. jfb added inline comments. Comment at: lib/CodeGen/CGDecl.cpp:1605 -emitByrefStructureInit(emission); - // Initialize the variable here if it doesn't have a initializer and it is a rjmccall wrote: > Are these changes s

[PATCH] D57797: Variable auto-init: fix __block initialization

2019-02-07 Thread JF Bastien via Phabricator via cfe-commits
jfb marked 2 inline comments as done. jfb added inline comments. Comment at: lib/CodeGen/CGDecl.cpp:1726 +emitByrefStructureInit(emission); + } + Note that we still want this to be pulled out in this way because `emitByrefStructureInit` emits the call to th

[PATCH] D57797: Variable auto-init: fix __block initialization

2019-02-07 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/CodeGen/CGDecl.cpp:1605 -emitByrefStructureInit(emission); - // Initialize the variable here if it doesn't have a initializer and it is a Are these changes still needed? Comment at: lib/Cod

[PATCH] D56571: [RFC prototype] Implementation of asm-goto support in clang

2019-02-07 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: lib/AST/Stmt.cpp:628 + DiagOffs = CurPtr-StrStart-1; + return diag::err_asm_invalid_operand_for_goto_labels; +} efriedma wrote: > jyu2 wrote: > > rsmith wrote: > > > jyu2 wrote: > > > > rsm

[PATCH] D57797: Variable auto-init: fix __block initialization

2019-02-07 Thread JF Bastien via Phabricator via cfe-commits
jfb updated this revision to Diff 185883. jfb added a comment. - Only initialize __block's storage. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57797/new/ https://reviews.llvm.org/D57797 Files: lib/CodeGen/CGDecl.cpp test/CodeGenCXX/trivial-auto-var-init.c

[PATCH] D57797: Variable auto-init: fix __block initialization

2019-02-07 Thread JF Bastien via Phabricator via cfe-commits
jfb marked 3 inline comments as done. jfb added inline comments. Comment at: lib/CodeGen/CGDecl.cpp:1643 CharUnits Size = getContext().getTypeSizeInChars(type); if (!Size.isZero()) { switch (trivialAutoVarInit) { rjmccall wrote: > jfb wrote: > >

[PATCH] D57915: [COFF, ARM64] Remove definitions for _byteswap library functions

2019-02-07 Thread Eli Friedman via Phabricator via cfe-commits
efriedma accepted this revision. efriedma added a comment. This revision is now accepted and ready to land. I guess we can track inlining separately, if you want to merge this quickly to unblock the Chrome build. LGTM > the former provides global declaration which seems inherited by the > defi

[PATCH] D57906: [CTU] Do not allow different CPP dialects in CTU

2019-02-07 Thread Aleksei Sidorin via Phabricator via cfe-commits
a_sidorin added a comment. Hi Gabor, Please find my comments inline. Comment at: lib/CrossTU/CrossTranslationUnit.cpp:232 + + // We do not support CTU across languages (C vs C++). if (LangTo.CPlusPlus != LangFrom.CPlusPlus) { The comment change looks strang

[PATCH] D57905: [ASTImporter][ASTImporterSpecificLookup] Add test for different operators

2019-02-07 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. LGTM! Comment at: unittests/AST/ASTImporterTest.cpp:4869 + + // FromPlus have a different TU, thus its DeclarationName is different too. + Res = LT.lookup(ToTU, FromP

[PATCH] D57915: [COFF, ARM64] Remove definitions for _byteswap library functions

2019-02-07 Thread Tom Tan via Phabricator via cfe-commits
TomTan added a comment. In D57915#1389788 , @efriedma wrote: > I did some quick testing with MSVC; apparently it inlines the implementations > of these functions when optimizations are on. We definitely want to support > inlining these. Since these are

[PATCH] D57902: [AST] Fix structural inequivalence of operators

2019-02-07 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. Looks good, thanks! Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57902/new/ https://reviews.llvm.org/D57902 _

[PATCH] D57915: [COFF, ARM64] Remove definitions for _byteswap library functions

2019-02-07 Thread Tom Tan via Phabricator via cfe-commits
TomTan added a comment. In D57915#1389750 , @lebedev.ri wrote: > In D57915#1389722 , @TomTan wrote: > > > In D57915#1389560 , @lebedev.ri > > wrote: > > > > > In D57915#1389

[PATCH] D57915: [COFF, ARM64] Remove definitions for _byteswap library functions

2019-02-07 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. I did some quick testing with MSVC; apparently it inlines the implementations of these functions when optimizations are on. We definitely want to support inlining these. Since these are commonly used in performance-sensitive code, I'd prefer to implement the required

[PATCH] D57230: [analyzer] Toning down invalidation a bit

2019-02-07 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. That's the one: typedef __typeof(sizeof(int)) size_t; void *malloc(size_t); void escape(int **); struct S { int *ptr; }; void foo() { struct S s1; s1.ptr = malloc(sizeof(int)); escape(&s1.ptr); } After the patch the allocated symbol no

[PATCH] D57915: [COFF, ARM64] Remove definitions for _byteswap library functions

2019-02-07 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In D57915#1389722 , @TomTan wrote: > In D57915#1389560 , @lebedev.ri > wrote: > > > In D57915#1389549 , @TomTan wrote: > > > > > Added the tests

r353479 - bpf: teach BPF driver about the new CPU "v3"

2019-02-07 Thread Jiong Wang via cfe-commits
Author: jiwang Date: Thu Feb 7 14:51:56 2019 New Revision: 353479 URL: http://llvm.org/viewvc/llvm-project?rev=353479&view=rev Log: bpf: teach BPF driver about the new CPU "v3" This patch simply teach BPF driver about the new CPU "v3" introduced in LLVM backend. Acked-by: Yonghong Song Signed-

[PATCH] D57915: [COFF, ARM64] Remove definitions for _byteswap library functions

2019-02-07 Thread Tom Tan via Phabricator via cfe-commits
TomTan added a comment. In D57915#1389560 , @lebedev.ri wrote: > In D57915#1389549 , @TomTan wrote: > > > Added the tests back. Clang IR should not lower these to bswap calls > > because they are global library fun

[PATCH] D57896: Variable names rule

2019-02-07 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. I am generally in favour of this direction. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57896/new/ https://reviews.llvm.org/D57896 ___ cfe-commits mailing list

[PATCH] D57855: [analyzer] Reimplement checker options

2019-02-07 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a reviewer: aaron.ballman. Szelethus added a comment. Aaron, you recently changed these file too, if you have the time, I'll happily listen to your feedback :) Also, I was thinking that maybe we could just `std::move` `CheckerRegisrty::Checkers` and `CheckerRegisrty::Packages` t

[PATCH] D57674: [clang-tidy] Add options to bugprone-argument-comment to add missing argument comments to literals

2019-02-07 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM aside from a testing nit. Comment at: clang-tidy/bugprone/ArgumentCommentCheck.cpp:231 +bool ArgumentCommentCheck::shouldAddComment(const Expr *Arg) const

[PATCH] D57855: [analyzer] Reimplement checker options

2019-02-07 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus updated this revision to Diff 185861. Szelethus edited the summary of this revision. Szelethus added a comment. Moved all `AnalyzerOptions` related changes to a separate revision. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57855/new/ https://reviews.llvm.org/D57855 Files:

[PATCH] D57922: [analyzer] Insert checker options into AnalyzerOption::ConfigTable

2019-02-07 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus marked an inline comment as done. Szelethus added inline comments. Comment at: lib/StaticAnalyzer/Core/AnalyzerOptions.cpp:183 SearchInParents) - .getAsInteger(10, Ret); + .getAsInteger(0

[PATCH] D57923: [Format/ObjC] Fix [foo bar]->baz formatting as lambda arrow

2019-02-07 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton updated this revision to Diff 185859. benhamilton added a comment. Tidy up code. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57923/new/ https://reviews.llvm.org/D57923 Files: clang/lib/Format/TokenAnnotator.cpp clang/lib/Format/U

[PATCH] D57923: [Format/ObjC] Fix [foo bar]->baz formatting as lambda arrow

2019-02-07 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton created this revision. benhamilton added reviewers: krasimir, djasper. Herald added a project: clang. Herald added a subscriber: cfe-commits. Currently, `UnwrappedLineParser` thinks an arrow token after an ObjC method expression is a C++ lambda arrow, so it formats: [foo bar]->baz

[PATCH] D57922: [analyzer] Insert checker options into AnalyzerOption::ConfigTable

2019-02-07 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus created this revision. Szelethus added reviewers: NoQ, george.karpenkov, xazax.hun, rnkovacs, baloghadamsoftware. Herald added subscribers: cfe-commits, gamesh411, dkrupp, donat.nagy, mikhail.ramalho, a.sidorin, szepet, whisperity. Herald added a project: clang. The more entries we hav

[PATCH] D57915: [COFF, ARM64] Remove definitions for _byteswap library functions

2019-02-07 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In D57915#1389549 , @TomTan wrote: > Added the tests back. Clang IR should not lower these to bswap calls because > they are global library functions. It might be slower to make the call to > library function than bswap, but t

[PATCH] D57915: [COFF, ARM64] Remove definitions for _byteswap library functions

2019-02-07 Thread Tom Tan via Phabricator via cfe-commits
TomTan updated this revision to Diff 185849. TomTan added a comment. Added the tests back. Clang IR should not lower these to bswap calls because they are global library functions. It might be slower to make the call to library function than bswap, but this is the same for other architectures s

[PATCH] D57687: [clang-format] Add style option AllowShortLambdasOnASingleLine

2019-02-07 Thread Ronald Wampler via Phabricator via cfe-commits
rdwampler updated this revision to Diff 185848. rdwampler added a comment. Update to include an option `Inline` to only put short lambda on a single line if used as an argument. See the following code style guide from catboost: ps://github.com/catboost/catboost/blob/master/CPP_STYLE_GUIDE.md#lam

[PATCH] D57553: [Fixed Point Arithmetic] Avoid resizing for types with the same width

2019-02-07 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan abandoned this revision. leonardchan marked an inline comment as done. leonardchan added a comment. In D57553#1388493 , @ebevhan wrote: > In D57553#1381920 , @leonardchan > wrote: > > > In regards to so

[PATCH] D55659: [Sema][ObjC] Disallow non-trivial C struct fields in unions

2019-02-07 Thread Akira Hatanaka via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. ahatanak marked 2 inline comments as done. Closed by commit rL353459: [Sema][ObjC] Disallow non-trivial C struct fields in unions. (authored by ahatanak, committed by ). Herald added a project: LLVM. Herald added a subscribe

r353459 - [Sema][ObjC] Disallow non-trivial C struct fields in unions.

2019-02-07 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Thu Feb 7 12:21:46 2019 New Revision: 353459 URL: http://llvm.org/viewvc/llvm-project?rev=353459&view=rev Log: [Sema][ObjC] Disallow non-trivial C struct fields in unions. This patch fixes a bug where clang doesn’t reject union fields of non-trivial C struct types. For exa

[PATCH] D56571: [RFC prototype] Implementation of asm-goto support in clang

2019-02-07 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added inline comments. Comment at: lib/AST/Stmt.cpp:628 + DiagOffs = CurPtr-StrStart-1; + return diag::err_asm_invalid_operand_for_goto_labels; +} jyu2 wrote: > rsmith wrote: > > jyu2 wrote: > > > rsmith wrote: > > > > I'm curio

[PATCH] D57915: [COFF, ARM64] Remove definitions for _byteswap library functions

2019-02-07 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. Should clang IR generation be lowering these to bswap calls anyway? Even if the function technically exists in the ucrt, it's going to be pretty slow to call it. Please leave the tests; fix the CHECK lines, if necessary, but we should still check it compiles. Repos

[PATCH] D57908: [SEMA]Generalize deferred diagnostic interface, NFC.

2019-02-07 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. LGTM as well. Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57908/new/ https://reviews.llvm.org/D57908 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/m

[PATCH] D57896: Variable names rule

2019-02-07 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. does the readability-identifier-naming check need to be changed to support multiple allowed case types? - key: readability-identifier-naming.VariableCase value:camelBack,CamelBack Repository: rG LLVM Github Monorepo CHANGES SINCE L

[PATCH] D57908: [SEMA]Generalize deferred diagnostic interface, NFC.

2019-02-07 Thread Alexey Bataev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL353456: [SEMA]Generalize deferred diagnostic interface, NFC. (authored by ABataev, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Repository: rL LLVM CHANGES SIN

r353456 - [SEMA]Generalize deferred diagnostic interface, NFC.

2019-02-07 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Thu Feb 7 11:46:42 2019 New Revision: 353456 URL: http://llvm.org/viewvc/llvm-project?rev=353456&view=rev Log: [SEMA]Generalize deferred diagnostic interface, NFC. Summary: Deferred diagnostic interface is going to be used for OpenMP device compilation. Generalized previous

[PATCH] D57918: Add an attribute that causes clang to emit fortified calls to C stdlib functions

2019-02-07 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington created this revision. erik.pilkington added reviewers: aaron.ballman, rjmccall, eli.friedman. Herald added subscribers: dexonsmith, jkorous. Herald added a project: clang. This attribute applies to declarations of C stdlib functions (sprintf, memcpy...) that have known fortified

[PATCH] D43737: Improve -Winfinite-recursion

2019-02-07 Thread Steven Wu via Phabricator via cfe-commits
steven_wu added a comment. Herald added a project: LLVM. Sorry for following up late on the patch. Removing the reachability testing for the exit block causes false positive for infinite loop cases like this: void l() { static int count = 5; if (count >0) { count--; l();

[PATCH] D57874: [WebAssembly] Set '-matomics' when '-pthread' is set

2019-02-07 Thread Dan Gohman via Phabricator via cfe-commits
sunfish added a comment. That sounds reasonable to me too. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57874/new/ https://reviews.llvm.org/D57874 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://list

[PATCH] D57874: [WebAssembly] Set '-matomics' when '-pthread' is set

2019-02-07 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added a comment. Yes it makes sense to me to set `-mthread-model=posix` when `-pthread` is passed on the commandline. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57874/new/ https://reviews.llvm.org/D57874 _

[PATCH] D57914: [Driver] Allow enum SanitizerOrdinal to represent more than 64 different sanitizer checks, NFC.

2019-02-07 Thread pierre gousseau via Phabricator via cfe-commits
pgousseau created this revision. pgousseau added reviewers: rsmith, probinson, gbedwell, filcab, lebedev.ri, wristow. Herald added subscribers: cfe-commits, cryptoad. Herald added a project: clang. enum SanitizerOrdinal has reached maximum capacity, this change extends the capacity to 128 saniti

[PATCH] D57915: [COFF, ARM64] Remove definitions for _byteswap library functions

2019-02-07 Thread Tom Tan via Phabricator via cfe-commits
TomTan created this revision. TomTan added reviewers: mgrang, efriedma, mstorsjo. Herald added subscribers: cfe-commits, kristof.beyls, javed.absar. Herald added a project: clang. _byteswap_* functions are are implemented in below file as normal function from libucrt.lib and declared in stdlib.h.

[PATCH] D57829: [HIP] Disable emitting llvm.linker.options in device compilation

2019-02-07 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Also, why is this HIP-specific? I thought the toolchain was largely shared with CUDA and there were just a few runtime differences. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57829/new/ https://reviews.llvm.org/D57829 ___

[PATCH] D57908: [SEMA]Generalize deferred diagnostic interface, NFC.

2019-02-07 Thread Artem Belevich via Phabricator via cfe-commits
tra accepted this revision. tra added a comment. This revision is now accepted and ready to land. LGTM. I've added jlebar@ as he's originally written the code. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57908/new/ https://reviews.llvm.org/D57908 ___

[PATCH] D54978: Move the SMT API to LLVM

2019-02-07 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov added a comment. @mikhail.ramalho could you revert then? In general, we should not use Z3 unless it's explicitly requested. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54978/new/ https://reviews.llvm.org/D54978 __

[PATCH] D57874: [WebAssembly] Set '-matomics' when '-pthread' is set

2019-02-07 Thread Derek Schuff via Phabricator via cfe-commits
dschuff added a comment. Oh I guess another option would just be to pin all 3 flags together here, but since `-pthread` sets a preprocessor define and may also affect linker behavior, I think it's fine to allow atomic codegen without setting `-pthread`. Repository: rC Clang CHANGES SINCE LA

[PATCH] D57874: [WebAssembly] Set '-matomics' when '-pthread' is set

2019-02-07 Thread Derek Schuff via Phabricator via cfe-commits
dschuff added a comment. So this CL has the effect that setting `-pthreads` will also set `-matomics`. Currently as you mentioned we have the problem that we can't make our current logic of "do we lower away the atomics" be controlled by the target features because it's done at pass config time

[PATCH] D55659: [Sema][ObjC] Disallow non-trivial C struct fields in unions

2019-02-07 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. Two minor tweaks, but otherwise LGTM. Comment at: lib/AST/Type.cpp:2273 +const RecordDecl *RD = QT->castAs()->getDecl(); +// C++ classes are ignored. +if (isa

[PATCH] D54978: Move the SMT API to LLVM

2019-02-07 Thread Shakeel Mahate via Phabricator via cfe-commits
shakeel.mahate added a comment. The ninja build also fails ninja -C out/gn ninja: Entering directory `out/gn' [1/3182] ACTION //clang/test:lit_site_cfg(//llvm/utils/gn/build/toolchain:unix) FAILED: gen/clang/test/lit.site.cfg.py python ../../llvm/utils/gn/build/write_cmake_config.py -o gen/clan

[PATCH] D57910: [ASTImporter] Find previous friend function template

2019-02-07 Thread Gabor Marton via Phabricator via cfe-commits
martong created this revision. martong added reviewers: a_sidorin, shafik. Herald added subscribers: cfe-commits, gamesh411, Szelethus, dkrupp, rnkovacs. Herald added a reviewer: a.sidorin. Herald added a project: clang. Repository: rC Clang https://reviews.llvm.org/D57910 Files: lib/AST/AST

[PATCH] D57908: [SEMA]Generalize deferred diagnostic interface, NFC.

2019-02-07 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev created this revision. ABataev added reviewers: rjmccall, tra. Herald added a project: clang. Deferred diagnostic interface is going to be used for OpenMP device compilation. Generalized previously existed deferred diagnostic interface for CUDA to be used with OpenMP and, possibly, other m

[PATCH] D57896: Variable names rule

2019-02-07 Thread Paul Robinson via Phabricator via cfe-commits
probinson added a comment. Herald added a project: LLVM. In D57896#1389067 , @lebedev.ri wrote: > 2. It might be best to give this more visibility, by submitting a mail to > llvm-dev, with a **noticeable** subject, like "RFC: changing variable naming > r

[PATCH] D57906: [CTU] Do not allow different CPP dialects in CTU

2019-02-07 Thread Gabor Marton via Phabricator via cfe-commits
martong created this revision. martong added reviewers: xazax.hun, a_sidorin, r.stahl. Herald added subscribers: cfe-commits, gamesh411, Szelethus, dkrupp, rnkovacs. Herald added a project: clang. If CPP dialects are different then return with error. Consider this STL code: template struct

[PATCH] D54978: Move the SMT API to LLVM

2019-02-07 Thread Brian Rzycki via Phabricator via cfe-commits
brzycki added a comment. This commit is causing a build-break for our nightly cross compilers of arm and aarch64. The immediately preceding commit of D54977 does not break with the exact same invocation. The problem is our build machine (Ubuntu 18.04 LTS) insta

[PATCH] D57905: [ASTImporter][ASTImporterSpecificLookup] Add test for different operators

2019-02-07 Thread Gabor Marton via Phabricator via cfe-commits
martong created this revision. martong added reviewers: a_sidorin, shafik. Herald added subscribers: cfe-commits, gamesh411, Szelethus, dkrupp, rnkovacs. Herald added a reviewer: a.sidorin. Herald added a project: clang. This is to check that operators are handled properly in `ASTImporterSpecificL

[PATCH] D57896: Variable names rule

2019-02-07 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In D57896#1389046 , @michaelplatings wrote: > In D57896#1389042 , @lebedev.ri > wrote: > > > Pretty sure this patch should have gone to llvm-commits, not cfe-commits. > > > I just set t

[PATCH] D57824: [OpenCL][PR40603] In C++ preserve backwards compatibility with OpenCL C v2.0

2019-02-07 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL353431: [OpenCL][PR40603] In C++ preserve compatibility with OpenCL C v2.0 (authored by stulova, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to com

r353431 - [OpenCL][PR40603] In C++ preserve compatibility with OpenCL C v2.0

2019-02-07 Thread Anastasia Stulova via cfe-commits
Author: stulova Date: Thu Feb 7 09:32:37 2019 New Revision: 353431 URL: http://llvm.org/viewvc/llvm-project?rev=353431&view=rev Log: [OpenCL][PR40603] In C++ preserve compatibility with OpenCL C v2.0 Valid OpenCL C code should still compile in C++ mode. This change enables extensions and OpenCL

[PATCH] D56571: [RFC prototype] Implementation of asm-goto support in clang

2019-02-07 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 marked an inline comment as done. jyu2 added inline comments. Comment at: lib/AST/Stmt.cpp:628 + DiagOffs = CurPtr-StrStart-1; + return diag::err_asm_invalid_operand_for_goto_labels; +} rsmith wrote: > jyu2 wrote: > > rsmith wrote:

[PATCH] D57902: [AST] Fix structural inequivalence of operators

2019-02-07 Thread Gabor Marton via Phabricator via cfe-commits
martong created this revision. martong added reviewers: shafik, a_sidorin, aaron.ballman. Herald added subscribers: cfe-commits, gamesh411, Szelethus, dkrupp, rnkovacs. Herald added a project: clang. Operators kind was not checked, so we reported e.g. op- to be equal with op+ Repository: rC Cl

[PATCH] D57896: Variable names rule

2019-02-07 Thread Michael Platings via Phabricator via cfe-commits
michaelplatings added a comment. In D57896#1389042 , @lebedev.ri wrote: > Pretty sure this patch should have gone to llvm-commits, not cfe-commits. I just set the repository, Phabricator did the rest - apparently the magic isn't working so well. Repos

[PATCH] D57896: Variable names rule

2019-02-07 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. Pretty sure this patch should have gone to llvm-commits, not cfe-commits. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57896/new/ https://reviews.llvm.org/D57896 ___ cfe-co

[PATCH] D57901: [ASTImporter] Add test RedeclChainShouldBeCorrectAmongstNamespaces

2019-02-07 Thread Gabor Marton via Phabricator via cfe-commits
martong created this revision. martong added reviewers: a_sidorin, shafik. Herald added subscribers: cfe-commits, gamesh411, Szelethus, dkrupp, rnkovacs. Herald added a reviewer: a.sidorin. Herald added a project: clang. We add a new test to show that redecl chains are not handled properly amongst

[PATCH] D57883: [clang-tidy] refactor ExceptionAnalyzer further to give ternary answer

2019-02-07 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: clang-tidy/utils/ExceptionAnalyzer.h:31-192 +enum class ExceptionState : std::int8_t { + Throwing,///< The function can definitly throw given an AST. + NotThrowing, ///< This function can not throw, given an AST. + Unknown,

[PATCH] D57768: [SYCL] Add SYCL device compilation flow.

2019-02-07 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In D57768#1386862 , @Anastasia wrote: > - SYCL seem to require adding tight dependencies from the standard libraries > into the compiler because many language features are hidden behind library > classes. This is not common for

  1   2   >