[PATCH] D61617: [NewPassManager] Add tuning option: SLPVectorization [clang-change]

2019-05-07 Thread Alina Sbirlea via Phabricator via cfe-commits
asbirlea updated this revision to Diff 198587. asbirlea added a comment. Updated test. Improvement suggestions are always *very* much welcome! Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61617/new/ https://reviews.llvm.org/D61617 Files: lib/CodeGen/BackendUt

[PATCH] D61634: [clang/llvm] Allow efficient implementation of libc's memory functions in C/C++

2019-05-07 Thread Alexandre Isoard via Phabricator via cfe-commits
alexandre.isoard added a comment. I'm not convinced by the approach. Can it still recognize the loop idiom into memcpy implementation but use `memmove` (as only `memcpy` has been blacklisted)? Can it do the same for `memmove` (for the case without overlap), and end-up with infinite recursion?

r360225 - Fix for the greendragon bots.

2019-05-07 Thread Leonard Chan via cfe-commits
Author: leonardchan Date: Tue May 7 22:59:25 2019 New Revision: 360225 URL: http://llvm.org/viewvc/llvm-project?rev=360225&view=rev Log: Fix for the greendragon bots. Adds extra checks for ObjC GC and Ownership. Modified: cfe/trunk/lib/Sema/SemaType.cpp cfe/trunk/test/SemaObjC/mrc-weak.

r360224 - [Sema] Correct typos in return statements so the return types of 'auto' functions are always deduced.

2019-05-07 Thread Sam McCall via cfe-commits
Author: sammccall Date: Tue May 7 22:49:42 2019 New Revision: 360224 URL: http://llvm.org/viewvc/llvm-project?rev=360224&view=rev Log: [Sema] Correct typos in return statements so the return types of 'auto' functions are always deduced. Summary: e.g. auto foo() { return no_such_thing; //

[PATCH] D61649: [Sema] Correct typos in return statements so the return types of 'auto' functions are always deduced.

2019-05-07 Thread Sam McCall via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL360224: [Sema] Correct typos in return statements so the return types of 'auto'… (authored by sammccall, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Repository:

[PATCH] D60661: Revert "Revert "[clang-format] Keep protobuf "package" statement on one line""

2019-05-07 Thread Donald Chai via Phabricator via cfe-commits
dchai updated this revision to Diff 198585. dchai added a comment. This revision is now accepted and ready to land. no-op to try to get rid of "Changes Planned" state Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60661/new/ https://reviews.llvm.org/D60661 Files:

[PATCH] D60661: Revert "Revert "[clang-format] Keep protobuf "package" statement on one line""

2019-05-07 Thread Donald Chai via Phabricator via cfe-commits
dchai planned changes to this revision. dchai added a comment. Hi, can someone please merge this on my behalf? I don't have commit access. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60661/new/ https://reviews.llvm.org/D60661 ___

[PATCH] D61454: [CodeGen][ObjC] Remove the leading 'l_' from ObjC symbols and make private symbols in the __DATA segment internal.

2019-05-07 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 198581. ahatanak marked an inline comment as done. ahatanak added a comment. Define helper function `getLinkageTypeForObjCMetadata`. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61454/new/ https://reviews.llvm.org/D61454 F

[PATCH] D61664: [NewPM] Setup Passes for KASan and KMSan

2019-05-07 Thread Petr Hosek via Phabricator via cfe-commits
phosek created this revision. phosek added reviewers: leonardchan, fedor.sergeev, chandlerc, philip.pfaffe. Herald added subscribers: llvm-commits, cfe-commits, hiraditya. Herald added projects: clang, LLVM. While ASan and MSan passes were already ported to new PM, the kernel variants weren't setu

[PATCH] D61165: Fix a crash where a [[no_destroy]] destructor was not emitted in an array

2019-05-07 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: clang/lib/Sema/SemaDeclCXX.cpp:13121-13122 + if (VD->isNoDestroy(getASTContext()) && + !(VD->getType()->isArrayType() && getLangOpts().Exceptions && +VD->isStaticLocal())) return; rsmith wrote: > Hmm,

[PATCH] D61399: [OpenMP][Clang] Support for target math functions

2019-05-07 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 198578. gtbercea added a comment. - Fix move to openmp_wrapper folder. Fix header ordering problem. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61399/new/ https://reviews.llvm.org/D61399 Files: lib/Driver/ToolChain.cpp

Re: r359960 - Reduce amount of work ODR hashing does.

2019-05-07 Thread Richard Trieu via cfe-commits
*From: *David Blaikie *Date: *Mon, May 6, 2019 at 4:39 PM *To: *Richard Trieu *Cc: *cfe-commits On Mon, May 6, 2019 at 4:24 PM Richard Trieu wrote: > > > > There was no cycle for this crash. > > Oh, yeah, didn't mean to imply there were - but that a system designed > to prevent cycles might also

r360220 - Fix buildbot break after r360195

2019-05-07 Thread Nemanja Ivanovic via cfe-commits
Author: nemanjai Date: Tue May 7 19:03:32 2019 New Revision: 360220 URL: http://llvm.org/viewvc/llvm-project?rev=360220&view=rev Log: Fix buildbot break after r360195 Modified: cfe/trunk/test/Modules/preprocess-umbrella.cpp Modified: cfe/trunk/test/Modules/preprocess-umbrella.cpp URL: http

[PATCH] D61663: [clang-format] Fix a JavaScript import order bug.

2019-05-07 Thread Bowen Ni via Phabricator via cfe-commits
bowenni created this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. bowenni retitled this revision from "Fix a JavaScript import order bug." to "[clang-format] Fix a JavaScript import order bug.". When the imported symbol is exactly "template" the sorting is disa

[PATCH] D61399: [OpenMP][Clang] Support for target math functions

2019-05-07 Thread Jonas Devlieghere via Phabricator via cfe-commits
JDevlieghere added inline comments. Comment at: lib/Headers/CMakeLists.txt:36 bmiintrin.h + openmp_wrappers/math.h + openmp_wrappers/cmath hfinkel wrote: > JDevlieghere wrote: > > This doesn't do what you think it would do. The files are copied into the > >

r360217 - Split ActOnCallExpr into an ActOnCallExpr to be called by the parser,

2019-05-07 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue May 7 18:36:36 2019 New Revision: 360217 URL: http://llvm.org/viewvc/llvm-project?rev=360217&view=rev Log: Split ActOnCallExpr into an ActOnCallExpr to be called by the parser, and a BuildCallExpr to be called internally within Sema to build / rebuild calls. Modified:

[PATCH] D58497: Clear the KnownModules cache if the preprocessor is going away

2019-05-07 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a reviewer: bruno. dexonsmith added a comment. +bruno Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58497/new/ https://reviews.llvm.org/D58497 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D61396: [hip] Fix ambiguity from `>>>` of CUDA.

2019-05-07 Thread Michael Liao via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL360214: [hip] Fix ambiguity from `>>>` of CUDA. (authored by hliao, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.o

r360214 - [hip] Fix ambiguity from `>>>` of CUDA.

2019-05-07 Thread Michael Liao via cfe-commits
Author: hliao Date: Tue May 7 17:52:33 2019 New Revision: 360214 URL: http://llvm.org/viewvc/llvm-project?rev=360214&view=rev Log: [hip] Fix ambiguity from `>>>` of CUDA. Summary: - For template arguments ending with `>>>`, we should cease lookahead and treat it as type-id firstly, so that ded

[PATCH] D61454: [CodeGen][ObjC] Remove the leading 'l_' from ObjC symbols and make private symbols in the __DATA segment internal.

2019-05-07 Thread Vedant Kumar via Phabricator via cfe-commits
vsk added inline comments. Comment at: lib/CodeGen/CGObjCMac.cpp:6039 +LT = llvm::GlobalValue::PrivateLinkage; + } + I see some minor variant of this logic repeated a few times. Wdyt of defining a 'getLinkageTypeForObjCMetadata(CGM, Section)' helper to cons

[PATCH] D61617: [NewPassManager] Add tuning option: SLPVectorization [clang-change]

2019-05-07 Thread Chandler Carruth via Phabricator via cfe-commits
chandlerc added a comment. (Sorry for still more comments) Comment at: test/CodeGen/loop-vectorize.c:10 +// CHECK-DISABLE-VECT-LABEL: @for_test() +// CHECK-DISABLE-VECT: fmul double + You'll want to check that the vector form *doesn't* show up. I would expect

[PATCH] D61617: [NewPassManager] Add tuning option: SLPVectorization [clang-change]

2019-05-07 Thread Alina Sbirlea via Phabricator via cfe-commits
asbirlea updated this revision to Diff 198562. asbirlea added a comment. Updated test. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61617/new/ https://reviews.llvm.org/D61617 Files: lib/CodeGen/BackendUtil.cpp test/CodeGen/loop-vectorize.c Index: test/Cod

[PATCH] D61621: [X86] Make `x86intrin.h`, `immintrin.h` includable with `-fno-gnu-inline-asm`.

2019-05-07 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. I see one more instance of unprotected __asm__ usage, but it's under `#ifdef _MSC_VER`, it's the HLE extensions. Can you protect that, and then add another RUN line with a windows triple and -fms-extensions to test it? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D

[PATCH] D61617: [NewPassManager] Add tuning option: SLPVectorization [clang-change]

2019-05-07 Thread Alina Sbirlea via Phabricator via cfe-commits
asbirlea updated this revision to Diff 198561. asbirlea added a comment. Rename new test for clarity. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61617/new/ https://reviews.llvm.org/D61617 Files: lib/CodeGen/BackendUtil.cpp test/CodeGenCXX/no-pragma-loop-v

[PATCH] D61620: [NewPassManager] Add tuning option: LoopUnrolling [clang-change]

2019-05-07 Thread Alina Sbirlea via Phabricator via cfe-commits
asbirlea updated this revision to Diff 198560. asbirlea added a comment. Herald added a subscriber: zzheng. Added test. Last RUN line fails before this patch (i.e. unrolling is not disabled with the given flag in the new pass manager). Repository: rC Clang CHANGES SINCE LAST ACTION https:/

[PATCH] D61617: [NewPassManager] Add tuning option: SLPVectorization [clang-change]

2019-05-07 Thread Chandler Carruth via Phabricator via cfe-commits
chandlerc requested changes to this revision. chandlerc added a comment. This revision now requires changes to proceed. The file name of the test seems odd? How about `vectorize-loops.c`? I'd also make it a C test and put it in `test/CodeGen` instead of a C++ test. Comment at:

[PATCH] D61646: Include corecrt.h/vcruntime.h to improve MS compatibility

2019-05-07 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, thanks CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61646/new/ https://reviews.llvm.org/D61646 ___ cfe-commits mailing list cfe-commits

[PATCH] D61646: Include corecrt.h/vcruntime.h to improve MS compatibility

2019-05-07 Thread Mike Rice via Phabricator via cfe-commits
mikerice updated this revision to Diff 198559. mikerice added a comment. Added comments as requested. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61646/new/ https://reviews.llvm.org/D61646 Files: lib/Headers/stdarg.h lib/Headers/stddef.h test/Headers/Inputs/ms-crt/corecrt.h t

r360207 - [COFF] Use COFF stubs for extern_weak functions

2019-05-07 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Tue May 7 16:06:21 2019 New Revision: 360207 URL: http://llvm.org/viewvc/llvm-project?rev=360207&view=rev Log: [COFF] Use COFF stubs for extern_weak functions Summary: A COFF stub indirects the reference to a symbol through memory. A .refptr.$sym global variable pointer is crea

[PATCH] D61615: [COFF] Use COFF stubs for extern_weak functions

2019-05-07 Thread Reid Kleckner via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC360207: [COFF] Use COFF stubs for extern_weak functions (authored by rnk, committed by ). Changed prior to commit: https://reviews.llvm.org/D61615?vs=198359&id=198558#toc Repository: rC Clang CHANGE

Re: r360109 - Recommit r359859 "[Attribute/Diagnostics] Print macro if definition is an attribute declaration"

2019-05-07 Thread Jonas Devlieghere via cfe-commits
Hi Leonard, My personal rule of thumb is that if I can fix it in something like 30 minutes or less, I'll leave the bot red and commit a fix. Otherwise I'll revert my change. The problem with leaving the bot red is that if something else breaks, that person doesn't get a signal, and issue start to

[PATCH] D61646: Include corecrt.h/vcruntime.h to improve MS compatibility

2019-05-07 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added inline comments. Comment at: lib/Headers/stdarg.h:13 +#if defined(_MSC_VER) +#include Please add a comment about why we're including this otherwise unneeded header. Comment at: lib/Headers/stddef.h:22 + +#if defined(_MSC_VER) +#inc

[PATCH] D58497: Clear the KnownModules cache if the preprocessor is going away

2019-05-07 Thread Nemanja Ivanovic via Phabricator via cfe-commits
nemanjai added a comment. Herald added a subscriber: jsji. Ping. Does anyone think this is a good idea? Bad idea? Have any further comments? Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58497/new/ https://reviews.llvm.org/D58497 _

[PATCH] D61545: [analyzer] Fix a crash in RVO from within blocks.

2019-05-07 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC360202: [analyzer] Fix a crash when doing RVO from within blocks. (authored by dergachev, committed by ). Changed prior to commit: https://reviews.llvm.org/D61545?vs=198535&id=198555#toc Repository:

r360202 - [analyzer] Fix a crash when doing RVO from within blocks.

2019-05-07 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Tue May 7 15:33:13 2019 New Revision: 360202 URL: http://llvm.org/viewvc/llvm-project?rev=360202&view=rev Log: [analyzer] Fix a crash when doing RVO from within blocks. When looking for the location context of the call site, unwrap block invocation contexts because they a

[PATCH] D61165: Fix a crash where a [[no_destroy]] destructor was not emitted in an array

2019-05-07 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: clang/lib/Sema/SemaDeclCXX.cpp:13121-13122 + if (VD->isNoDestroy(getASTContext()) && + !(VD->getType()->isArrayType() && getLangOpts().Exceptions && +VD->isStaticLocal())) return; Hmm, perhaps it would

[PATCH] D61399: [OpenMP][Clang] Support for target math functions

2019-05-07 Thread Hal Finkel via Phabricator via cfe-commits
hfinkel added inline comments. Comment at: lib/Headers/CMakeLists.txt:36 bmiintrin.h + openmp_wrappers/math.h + openmp_wrappers/cmath JDevlieghere wrote: > This doesn't do what you think it would do. The files are copied into the > root of the resource dire

[PATCH] D61396: [hip] Fix ambiguity from `>>>` of CUDA.

2019-05-07 Thread Michael Liao via Phabricator via cfe-commits
hliao marked an inline comment as done. hliao added a comment. done Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61396/new/ https://reviews.llvm.org/D61396 ___ cfe-commits mailing list cfe-commits@lis

[PATCH] D61396: [hip] Fix ambiguity from `>>>` of CUDA.

2019-05-07 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 198545. hliao added a comment. Add one unrealistic case for test purpose only. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61396/new/ https://reviews.llvm.org/D61396 Files: clang/lib/Parse/ParseTentative.cpp

[PATCH] D61165: Fix a crash where a [[no_destroy]] destructor was not emitted in an array

2019-05-07 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. All of the IRGen changes in this patch are unnecessary according to the model we've worked out, right? The fix is just to mark the destructor as still used when we're constructing an array. Comment at: clang/lib/Sema/SemaDeclCXX.cpp:13119 + // vari

[PATCH] D61617: [NewPassManager] Add tuning option: SLPVectorization [clang-change]

2019-05-07 Thread Alina Sbirlea via Phabricator via cfe-commits
asbirlea updated this revision to Diff 198540. asbirlea added a comment. Added test. The last RUN line fails before this patch (i.e. the flag to disable vectorization was not used by the new pass manager) Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61617/new/

[PATCH] D61545: [analyzer] Fix a crash in RVO from within blocks.

2019-05-07 Thread Devin Coughlin via Phabricator via cfe-commits
dcoughlin accepted this revision. dcoughlin added a comment. Looks good to me. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61545/new/ https://reviews.llvm.org/D61545 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.ll

[PATCH] D61165: Fix a crash where a [[no_destroy]] destructor was not emitted in an array

2019-05-07 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In D61165#1494001 , @rsmith wrote: > In D61165#1492830 , @rjmccall wrote: > > > In D61165#1492781 , @rsmith wrote: > > > > > For the purposes of thi

[PATCH] D61545: [analyzer] Fix a crash in RVO from within blocks.

2019-05-07 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 198535. NoQ added a comment. Remove unused declaration from the test. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61545/new/ https://reviews.llvm.org/D61545 Files: clang/lib/StaticAnalyzer/Core/ExprEngineCXX.cpp clang/test/Analysis/copy-elision.m

[PATCH] D61656: -frewrite-imports: Add support for wildcard rules in umbrella modules with

2019-05-07 Thread David Blaikie via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC360195: -frewrite-imports: Add support for wildcard rules in umbrella modules with (authored by dblaikie, committed by ). Changed prior to commit: https://reviews.llvm.org/D61656?vs=198528&id=198533#toc

[PATCH] D61656: -frewrite-imports: Add support for wildcard rules in umbrella modules with

2019-05-07 Thread David Blaikie via Phabricator via cfe-commits
dblaikie marked an inline comment as done. dblaikie added inline comments. Comment at: test/Modules/preprocess-umbrella.cpp:1-2 +// FIXME: The standalone module still seems to cause clang to want to test for +// the existence of a 'foo' directory: +// RUN: mkdir %t --

[PATCH] D56160: [clang-tidy] modernize-use-trailing-return-type check

2019-05-07 Thread Bernhard Manfred Gruber via Phabricator via cfe-commits
bernhardmgruber updated this revision to Diff 198531. bernhardmgruber marked 8 inline comments as done. bernhardmgruber added a comment. Fixed small nits suggested by @aaron.ballman. Thanks! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56160/new/ https://reviews.llvm.org/D56160 Files:

r360195 - -frewrite-imports: Add support for wildcard rules in umbrella modules with

2019-05-07 Thread David Blaikie via cfe-commits
Author: dblaikie Date: Tue May 7 14:38:51 2019 New Revision: 360195 URL: http://llvm.org/viewvc/llvm-project?rev=360195&view=rev Log: -frewrite-imports: Add support for wildcard rules in umbrella modules with This trips over a few other limitations, but in the interests of incremental developme

[PATCH] D61522: Added an assertion to constant evaluation enty points that prohibits dependent expressions

2019-05-07 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. The right thing to check in all of these cases should be only `isValueDependent()`. Every type-dependent expression should generally also be value-dependent (because the type is part of the value), but value-dependent exactly means "dependent in a way that prevents const

[PATCH] D61396: [hip] Fix ambiguity from `>>>` of CUDA.

2019-05-07 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith accepted this revision. rsmith added inline comments. This revision is now accepted and ready to land. Comment at: clang/lib/Parse/ParseTentative.cpp:597 NextToken().isOneOf(tok::greater, tok::greatergreater, + tok:

[PATCH] D61656: -frewrite-imports: Add support for wildcard rules in umbrella modules with

2019-05-07 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith accepted this revision. rsmith added inline comments. This revision is now accepted and ready to land. Comment at: lib/Basic/Module.cpp:324 +Module *Module::findOrCreateSubmodule(StringRef Name) { + llvm::StringMap::const_iterator Pos = SubModuleIndex.find(Name); --

[PATCH] D61396: [hip] Fix ambiguity from `>>>` of CUDA.

2019-05-07 Thread Michael Liao via Phabricator via cfe-commits
hliao marked an inline comment as done. hliao added a comment. done Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61396/new/ https://reviews.llvm.org/D61396 ___ cfe-commits mailing list cfe-commits@lis

[PATCH] D61656: -frewrite-imports: Add support for wildcard rules in umbrella modules with

2019-05-07 Thread David Blaikie via Phabricator via cfe-commits
dblaikie created this revision. dblaikie added a reviewer: rsmith. Herald added a project: clang. Herald added a subscriber: cfe-commits. dblaikie updated this revision to Diff 198528. dblaikie added a comment. Add another FIXME This trips over a few other limitations, but in the interests of in

[PATCH] D61396: [hip] Fix ambiguity from `>>>` of CUDA.

2019-05-07 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 198529. hliao added a comment. revise following reviewer's suggestion. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61396/new/ https://reviews.llvm.org/D61396 Files: clang/lib/Parse/ParseTentative.cpp clang

[PATCH] D61656: -frewrite-imports: Add support for wildcard rules in umbrella modules with

2019-05-07 Thread David Blaikie via Phabricator via cfe-commits
dblaikie updated this revision to Diff 198528. dblaikie added a comment. Add another FIXME Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61656/new/ https://reviews.llvm.org/D61656 Files: include/clang/Basic/Module.h lib/Basic/Module.cpp lib/Lex/Pragma.cpp

[PATCH] D61399: [OpenMP][Clang] Support for target math functions

2019-05-07 Thread Jonas Devlieghere via Phabricator via cfe-commits
JDevlieghere added a comment. I've reverted this in rL360192 because it breaks stage 2 builds on GreenDragon. Please see the commit message and the inline comment for more details. Comment at: lib/Headers/CMakeLists.txt:36 bmiintrin.h +

r360192 - Revert "[OpenMP][Clang] Support for target math functions"

2019-05-07 Thread Jonas Devlieghere via cfe-commits
Author: jdevlieghere Date: Tue May 7 14:08:15 2019 New Revision: 360192 URL: http://llvm.org/viewvc/llvm-project?rev=360192&view=rev Log: Revert "[OpenMP][Clang] Support for target math functions" This commit appears to be breaking stage-2 builds on GreenDragon. The OpenMP wrappers for cmath and

[PATCH] D60629: [clang-tidy] Change the namespace for llvm checkers from 'llvm' to 'llvm_check'

2019-05-07 Thread Don Hinton via Phabricator via cfe-commits
hintonda added a comment. ping... Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60629/new/ https://reviews.llvm.org/D60629 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org

[PATCH] D61649: [Sema] Correct typos in return statements so the return types of 'auto' functions are always deduced.

2019-05-07 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. sammccall added a reviewer: rsmith. Herald added a project: clang. Herald added a subscriber: cfe-commits. e.g. auto foo() { return no_such_thing; // Return value is a TypoExpr } using T = decltype(foo()); // Uh-oh, undeduced auto. Repository: rC Cla

[PATCH] D61165: Fix a crash where a [[no_destroy]] destructor was not emitted in an array

2019-05-07 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. In D61165#1492830 , @rjmccall wrote: > In D61165#1492781 , @rsmith wrote: > > > (Those destructor calls are separate full-expressions that happen > > afterwards; see [intro.execution]/5.) >

[PATCH] D61396: [hip] Fix ambiguity from `>>>` of CUDA.

2019-05-07 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: clang/lib/Parse/ParseTentative.cpp:597 + tok::comma || +(getLangOpts().CUDA && Tok.is(tok::greatergreatergreater { TPR = TPResult::True; No need to chec

[PATCH] D61350: [clang-tidy] New check calling out uses of +new in Objective-C code

2019-05-07 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore accepted this revision. stephanemoore added a comment. Looks good to me once the comments from other reviewers have been addressed. I added a couple suggestions as well. Comment at: clang-tools-extra/clang-tidy/google/AvoidNSObjectNewCheck.cpp:112 + Resu

[PATCH] D61506: [OpenCL] Switch to C++17

2019-05-07 Thread Ronan Keryell via Phabricator via cfe-commits
keryell added a comment. In D61506#1490555 , @rsmith wrote: > Per the OpenCL C++ 1.0 specification, section 2: > > > The OpenCL C++ programming language is based on the ISO/IEC JTC1 SC22 WG21 > > N 3690 language specification (a.k.a. C++14 specification).

[PATCH] D61634: [clang/llvm] Allow efficient implementation of libc's memory functions in C/C++

2019-05-07 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. I would be careful about trying to over-generalize here. There are a few different related bits of functionality which seem to be interesting, given the discussion in the llvm-dev thread, here, and in related patches: 1. The ability to specify -fno-builtin* on a per-f

[PATCH] D61642: [clang-tidy] Do not show incorrect fix in modernize-make-unique

2019-05-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! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61642/new/ https://reviews.llvm.org/D61642

[PATCH] D61350: [clang-tidy] New check calling out uses of +new in Objective-C code

2019-05-07 Thread Michael Wyman via Phabricator via cfe-commits
mwyman updated this revision to Diff 198503. mwyman marked an inline comment as done. mwyman added a comment. Update comments/doc based on feedback. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61350/new/ https://reviews.llvm.org/D61350 Files: clang-tools-extra/clang-tidy/google/Avo

[PATCH] D61627: [clang driver] Allow -fembed-bitcode combined with -mno-red-zone

2019-05-07 Thread Steven Wu via Phabricator via cfe-commits
steven_wu added a comment. Like I said, I am not worried that -mno-red-zone itself changes the ABI. As long as LLVM still respect the attribute the same way, it is fine. I want to consult Tim to make sure we can support re-targeting no red zone from armv7k to arm64_32. The intention for the bl

[PATCH] D61350: [clang-tidy] New check calling out uses of +new in Objective-C code

2019-05-07 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman marked an inline comment as done. aaron.ballman added a comment. LGTM modulo the comments from @gribozavr. Comment at: clang-tools-extra/clang-tidy/google/AvoidNSObjectNewCheck.cpp:76-77 + // Some classes should use standard

Re: r360109 - Recommit r359859 "[Attribute/Diagnostics] Print macro if definition is an attribute declaration"

2019-05-07 Thread Leonard Chan via cfe-commits
Thanks! It turns out that we weren't running debuginfo-tests. Trying to find a mac I can ssh into to reproduce this. Another side question: is there usually an etiquette for how long a greendragon bot is allowed to stay broken? I don't want to leave it that way for too long while working on my fix

[PATCH] D61615: [COFF] Use COFF stubs for extern_weak functions

2019-05-07 Thread Reid Kleckner via Phabricator via cfe-commits
rnk marked an inline comment as done. rnk added a comment. Thanks! I'll see about AArch64. It would be nice for this use of `__attribute__((weak))` declarations to work there as well. Comment at: llvm/test/CodeGen/X86/extern_weak.ll:20-21 +; DARWIN-LABEL: _bar: +; DARWIN: cmpl

[PATCH] D61627: [clang driver] Allow -fembed-bitcode combined with -mno-red-zone

2019-05-07 Thread Anders Waldenborg via Phabricator via cfe-commits
wanders added a comment. But running code that has been compiled with `-mno-red-zone` on a platform that guarantees that redzones are not stamped on should be fine as far as I can understand? The red zone is that the platform guarantees that it (e.g signal handlers, interrupts) will not use so

[PATCH] D61615: [COFF] Use COFF stubs for extern_weak functions

2019-05-07 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. Ideally it'd be nice to have this consistent on arm and aarch64 as well, but it's not a blocker (it's not something I'm running into so far). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61615/new/ https://reviews.llvm.o

[PATCH] D61646: Include corecrt.h/vcruntime.h to improve MS compatibility

2019-05-07 Thread Mike Rice via Phabricator via cfe-commits
mikerice created this revision. mikerice added reviewers: cfe-commits, rnk. Include corecrt.h in stddef.h and vcruntime.h in stdarg.h to improve MS compatibility. This allows some applications developed with MSVC to compile with clang without any extra changes. Fixes: llvm.org/PR40789 https:

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

2019-05-07 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: test/CodeGenCXX/address-space-of-this.cpp:9 +//CHECK: call void @_ZN6MyTypeC1Ei(%struct.MyType* addrspacecast (%struct.MyType addrspace(10)* @m to %struct.MyType*), i32 123) +MyType __attribute__((address_space(10))) m = 123; -

[PATCH] D61643: [PragmaHandler][NFC] Expose `#pragma` location

2019-05-07 Thread Joel E. Denny via Phabricator via cfe-commits
jdenny marked an inline comment as done. jdenny added inline comments. Comment at: clang/docs/ClangPlugins.rst:58 ExamplePragmaHandler() : PragmaHandler("example_pragma") { } -void HandlePragma(Preprocessor &PP, PragmaIntroducerKind Introducer, +void HandlePragma(Pre

[PATCH] D61642: [clang-tidy] Do not show incorrect fix in modernize-make-unique

2019-05-07 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clang-tools-extra/clang-tidy/modernize/MakeSmartPtrCheck.cpp:302 if (const auto *ImplicitCE = dyn_cast(Arg->IgnoreImplicit())) { if (ImplicitCE->isStdInitListInitialization()) aaron.b

[PATCH] D61637: [Syntax] Introduce syntax trees

2019-05-07 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clang/include/clang/Tooling/Syntax/Tree.h:40 +/// node. +void traverse(Node *N, llvm::function_ref Visit); +void traverse(const Node *N, llvm::function_ref Visit); sammccall wrote: > I've been burned with adding th

[PATCH] D61642: [clang-tidy] Do not show incorrect fix in modernize-make-unique

2019-05-07 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 198497. ilya-biryukov marked 3 inline comments as done. ilya-biryukov added a comment. - Remove redundant check. - Actually check the code stays the same in tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.

Re: r360109 - Recommit r359859 "[Attribute/Diagnostics] Print macro if definition is an attribute declaration"

2019-05-07 Thread Jonas Devlieghere via cfe-commits
Hi Leonard, The test that is asserting is part of the debuginfo test. ( https://github.com/llvm-project/debuginfo-tests) The reason that it's only failing on the non-incremental bot is because the incremental one isn't running those, I believe. RA stands for Release/Asserts. Hope that helps! Ch

[PATCH] D61627: [clang driver] Allow -fembed-bitcode combined with -mno-red-zone

2019-05-07 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added a comment. Well, Apple's ARM64 ABI also has red zones and they are similar to x64 in the sense that they can be used for spilling locals. I believe that the ILP32 variant retains the red zones as well, so, yes, this would impact the ABI unfortunately, and the platform guarantees

[PATCH] D61350: [clang-tidy] New check calling out uses of +new in Objective-C code

2019-05-07 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr accepted this revision. gribozavr added inline comments. This revision is now accepted and ready to land. Comment at: clang-tools-extra/clang-tidy/google/AvoidNSObjectNewCheck.cpp:55 + +// Return the string for the Objective-C message receiver. Keeps any generics +// in

[PATCH] D61643: [PragmaHandler][NFC] Expose `#pragma` location

2019-05-07 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added reviewers: rsmith, aaron.ballman. lebedev.ri added a comment. Seems like obvious NFC to me, but i'm not sure about API/ABI implications for external use. Comment at: clang/docs/ClangPlugins.rst:58 ExamplePragmaHandler() : PragmaHandler("example_pragma") {

[PATCH] D54757: [clang-tidy] new check: bugprone-branch-clone

2019-05-07 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth accepted this revision. JonasToth added a comment. This revision is now accepted and ready to land. Did you run the new version over a big project like llvm again? If yes LGTM from my side, if not please do that before committing to ensure no new/other problems creeped in. CHANGES SIN

[PATCH] D61350: [clang-tidy] New check calling out uses of +new in Objective-C code

2019-05-07 Thread Michael Wyman via Phabricator via cfe-commits
mwyman marked 3 inline comments as done. mwyman added inline comments. Comment at: clang-tools-extra/clang-tidy/google/AvoidNSObjectNewCheck.cpp:76-77 + // Some classes should use standard factory methods instead of alloc/init. + const std::map ClassToFactoryMethodMap = { +

[PATCH] D61350: [clang-tidy] New check calling out uses of +new in Objective-C code

2019-05-07 Thread Michael Wyman via Phabricator via cfe-commits
mwyman updated this revision to Diff 198495. mwyman added a comment. Updated to address code review comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61350/new/ https://reviews.llvm.org/D61350 Files: clang-tools-extra/clang-tidy/google/AvoidNSObjectNewCheck.cpp clang-tools-ex

[PATCH] D61522: Added an assertion to constant evaluation enty points that prohibits dependent expressions

2019-05-07 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr marked an inline comment as done. gribozavr added inline comments. Comment at: clang/lib/Sema/SemaOpenMP.cpp:5784 Expr::EvalResult Result; -if (CollapseLoopCountExpr->EvaluateAsInt(Result, SemaRef.getASTContext())) +if (!CollapseLoopCountExpr->isValueDepend

[PATCH] D61522: Added an assertion to constant evaluation enty points that prohibits dependent expressions

2019-05-07 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/Sema/SemaOpenMP.cpp:5784 Expr::EvalResult Result; -if (CollapseLoopCountExpr->EvaluateAsInt(Result, SemaRef.getASTContext())) +if (!CollapseLoopCountExpr->isValueDependent() && +!CollapseLoopCountExpr->isTy

[PATCH] D61615: [COFF] Use COFF stubs for extern_weak functions

2019-05-07 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai accepted this revision. smeenai added a comment. LGTM, neat! Comment at: llvm/test/CodeGen/X86/extern_weak.ll:20-21 +; DARWIN-LABEL: _bar: +; DARWIN: cmpl $0, L_foo$non_lazy_ptr +; DARWIN: jmp _foo ## TAILCALL + I'm not parsing this too well (it's not q

[PATCH] D61509: [OpenMP] Set pragma start loc to `#pragma` loc

2019-05-07 Thread Joel E. Denny via Phabricator via cfe-commits
jdenny updated this revision to Diff 198491. jdenny retitled this revision from "[PragmaHandler] Expose `#pragma` location" to "[OpenMP] Set pragma start loc to `#pragma` loc". jdenny edited the summary of this revision. jdenny added a comment. As requested, replace this patch with just the OpenM

Re: r360109 - Recommit r359859 "[Attribute/Diagnostics] Print macro if definition is an attribute declaration"

2019-05-07 Thread Leonard Chan via cfe-commits
Yup, sorry for the delay. I submitted it overnight thinking it would be fixed this time. I have one more way that I think should fix it, but before trying it out, do you know any tips on how I can try to reproduce this locally? I see that you're running these on an x64 mac, but I can't seem to trig

[PATCH] D61644: Documentation for bugprone-inaccurate-erase: added an example of a bug that this checker catches

2019-05-07 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr created this revision. gribozavr added a reviewer: alexfh. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D61644 Files: clang-tools-extra/docs/clang-tidy/checks/bugprone-inaccurate-erase.rst Inde

[PATCH] D61643: [PragmaHandler][NFC] Expose `#pragma` location

2019-05-07 Thread Joel E. Denny via Phabricator via cfe-commits
jdenny created this revision. jdenny added reviewers: ABataev, lebedev.ri. Herald added a subscriber: jdoerfert. Herald added a project: clang. Currently, a pragma AST node's recorded location starts at the namespace token (such as `omp` in the case of OpenMP) after the `#pragma` token, and the

[PATCH] D55793: [clang-tidy] Add duplicated access specifier readability check (PR25403)

2019-05-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! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55793/new/ https://reviews.llvm.org/D55793 ___ cfe-commits mailing lis

[PATCH] D61559: Fix the crash when formatting unsupported encodings

2019-05-07 Thread Owen Pan via Phabricator via cfe-commits
owenpan added a comment. I copied the code from `clang/lib/Basic/SourceManager.cpp`. See D61628 . I will update this patch to correct the typo in SCSU or remove it along with the other rare BOMs. How do you add test cases for this kind of fixes that emit error

[PATCH] D61628: Fix a bug that reports UTF16 (LE) files as UTF32 (LE) ones

2019-05-07 Thread Owen Pan via Phabricator via cfe-commits
owenpan added a comment. This patch fixes `clang`. I copied the code from here to `clang/tools/clang-format/ClangFormat.cpp` in D61559 to fix `clang-format`. I'm not sure if the code here should be moved into a function, though. Repository: rC Clang CHANGE

[PATCH] D61130: [llvm-mc] Add reportWarning() to MCContext

2019-05-07 Thread Brian Cain via Phabricator via cfe-commits
bcain added a comment. More context for this change: - "`--no-warn`" is present already, target-independent, and it's supported by llvm-mc (and other MC tools) because it's already present in `include/llvm/MC/MCTargetOptionsCommandFlags.inc`. - Only the AsmParser has access to the `MCTargetOpti

[PATCH] D61509: [PragmaHandler] Expose `#pragma` location

2019-05-07 Thread Joel E. Denny via Phabricator via cfe-commits
jdenny added a comment. In D61509#1493729 , @lebedev.ri wrote: > I don't see why this differential can't be updated to only contain the > remaining part > of the diff (for the actual OpenMP change), after splitting the NFC > refactoring part. OK Rep

[PATCH] D61509: [PragmaHandler] Expose `#pragma` location

2019-05-07 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. I don't see why this differential can't be updated to only contain the remaining part of the diff (for the actual OpenMP change), after splitting the NFC refactoring part. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D6

Re: r360109 - Recommit r359859 "[Attribute/Diagnostics] Print macro if definition is an attribute declaration"

2019-05-07 Thread Jonas Devlieghere via cfe-commits
Hi Leonard, It appears that your patch is still triggering an assertion on GreenDragon: http://green.lab.llvm.org/green/job/clang-stage1-configure-RA/56255/consoleFull#312501878d489585b-5106-414a-ac11-3ff90657619c Can you please have a look? Thanks, Jonas On Mon, May 6, 2019 at 8:17 PM Leonard

[PATCH] D61509: [PragmaHandler] Expose `#pragma` location

2019-05-07 Thread Joel E. Denny via Phabricator via cfe-commits
jdenny added a comment. In D61509#1493718 , @lebedev.ri wrote: > In D61509#1493714 , @jdenny wrote: > > > In D61509#1493703 , @lebedev.ri > > wrote: > > > > > It would have

  1   2   >