[PATCH] D69292: Proposal to add -Wtautological-compare to -Wall

2019-11-14 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. Sorry I'm late to the party; I've been traveling for 3+ weeks. I would like to be reassured that the following code will not warn: ` long foo = ...; // some calculation if (foo < std::numeric_limits::min() || foo > std::numeric_limits::max()) . This is

[clang] 39af723 - Unbreak the clang test suite when hexagon-link is not available

2019-11-14 Thread David Zarzycki via cfe-commits
Author: David Zarzycki Date: 2019-11-15T08:47:02+02:00 New Revision: 39af72378dd0481472e267ed7f15da594de0fee3 URL: https://github.com/llvm/llvm-project/commit/39af72378dd0481472e267ed7f15da594de0fee3 DIFF:

[PATCH] D70258: [OpenMP][IR-Builder] Introduce the finalization stack

2019-11-14 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert updated this revision to Diff 229448. jdoerfert marked 5 inline comments as done. jdoerfert added a comment. Addressed comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70258/new/ https://reviews.llvm.org/D70258 Files:

[PATCH] D70258: [OpenMP][IR-Builder] Introduce the finalization stack

2019-11-14 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added inline comments. Comment at: clang/lib/CodeGen/CGOpenMPRuntime.cpp:1499-1509 +OMPBuilder->pushFinalizationCB(std::move(FI)); + } + CGOpenMPOutlinedRegionInfo CGInfo(*CS, ThreadIDVar, CodeGen, InnermostKind, HasCancel,

[PATCH] D70290: [OpenMP] Use the OpenMPIRBuilder for "omp parallel"

2019-11-14 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert created this revision. jdoerfert added reviewers: kiranchandramohan, ABataev, RaviNarayanaswamy, gtbercea, grokos, sdmitriev, JonChesterfield, hfinkel, fghanim. Herald added subscribers: guansong, bollu. Herald added a project: clang. NOTE: This patch needs tests and is missing

[PATCH] D69876: Allow output constraints on "asm goto"

2019-11-14 Thread Bill Wendling via Phabricator via cfe-commits
void added a comment. Friendly ping. :-) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69876/new/ https://reviews.llvm.org/D69876 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D70289: [OpenMP][NFCI] Use the libFrontend ProcBindKind in Clang

2019-11-14 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert created this revision. jdoerfert added reviewers: kiranchandramohan, ABataev, RaviNarayanaswamy, gtbercea, grokos, sdmitriev, JonChesterfield, hfinkel, fghanim. Herald added subscribers: cfe-commits, guansong, bollu, jholewinski. Herald added a project: clang. This removes the

[PATCH] D70157: Align branches within 32-Byte boundary

2019-11-14 Thread annita.zhang via Phabricator via cfe-commits
annita.zhang added a comment. In D70157#1744243 , @chandlerc wrote: > Thanks for sending this out! > > I've made a minor comment on the flag structure, but my bigger question would > be: can you summarize the performance hit and code size hit you've seen

[PATCH] D69853: [OpenMP][NFCI] Introduce llvm/IR/OpenMPConstants.h

2019-11-14 Thread Francesco Petrogalli via Phabricator via cfe-commits
fpetrogalli added inline comments. Comment at: clang/include/clang/Basic/OpenMPKinds.h:23 /// OpenMP directives. -enum OpenMPDirectiveKind { -#define OPENMP_DIRECTIVE(Name) \ - OMPD_##Name, -#define OPENMP_DIRECTIVE_EXT(Name, Str) \ - OMPD_##Name, -#include

[PATCH] D70280: Remove Support/Options.h, it is unused

2019-11-14 Thread Chris Bieneman via Phabricator via cfe-commits
beanz accepted this revision. beanz added a comment. This revision is now accepted and ready to land. Yea. Unfortunately the migration stalled out because there was no way to make the registration method work with the new pass manager. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D70144: clang-tidy: modernize-use-equals-default avoid adding redundant semicolons

2019-11-14 Thread Conrad Poelman via Phabricator via cfe-commits
poelmanc added a comment. > ! In D70144#1745583 , @JonasToth > wrote: > >> ! In D70144#1745532 , >> @malcolm.parsons wrote: > > Should `clang::format::cleanupAroundReplacements()` handle this instead? My

[PATCH] D70284: Constant strings emitted when `-fno-constant-cfstrings` is passed should allow dead stripping

2019-11-14 Thread Ben D. Jones via Phabricator via cfe-commits
bendjones updated this revision to Diff 229441. bendjones added a comment. Added `"objc_arc_inert"` and updated `clang/test/CodeGenObjC/ns-constant-strings.m` tests to make sure the section is emitted as we want. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D70158: [analyzer] Fix Objective-C accessor body farms after D68108.

2019-11-14 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 229437. NoQ added a comment. I discovered another problem related to this patch, which turned out to be a crash (serious!), so here's an update. We're crashing on roughly the following idiom: @interface I : NSObject @property NSObject *o; @end ​

[clang] 3466ceb - Add a test to cover structural match for recursive data types

2019-11-14 Thread Bruno Cardoso Lopes via cfe-commits
Author: Bruno Cardoso Lopes Date: 2019-11-14T18:32:27-08:00 New Revision: 3466cebe94ba461b296bb1314e76118cc2823dfb URL: https://github.com/llvm/llvm-project/commit/3466cebe94ba461b296bb1314e76118cc2823dfb DIFF:

[PATCH] D70285: Wrap C APIs with pragmas enforcing -Werror=strict-prototypes

2019-11-14 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. Note that we have C files including these headers in llvm/tools/llvm-c-test and clang/tools/c-index-test, and I tested that dropping a `(void)` to just `()` triggers the error when compiling those. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70285/new/

[PATCH] D70284: Constant strings emitted when `-fno-constant-cfstrings` is passed should allow dead stripping

2019-11-14 Thread Ben D. Jones via Phabricator via cfe-commits
bendjones added a comment. In D70284#1746853 , @dexonsmith wrote: > The code looks right, but can you add a test for this in CodeGenObjC? Also, > when you re-upload the patch with the tests, please use `-U999` to > provide full context in the diff.

[PATCH] D70284: Constant strings emitted when `-fno-constant-cfstrings` is passed should allow dead stripping

2019-11-14 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. The code looks right, but can you add a test for this in CodeGenObjC? Also, when you re-upload the patch with the tests, please use `-U999` to provide full context in the diff. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D70285: Wrap C APIs with pragmas enforcing -Werror=strict-prototypes

2019-11-14 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith created this revision. dexonsmith added reviewers: aaron.ballman, Bigcheese, jkorous-apple. Herald added subscribers: ributzka, arphaman, steven_wu, hiraditya, mehdi_amini. Herald added a reviewer: deadalnix. Herald added a project: LLVM. Force `-Werror=strict-prototypes` so that C API

[PATCH] D70157: Align branches within 32-Byte boundary

2019-11-14 Thread Xiang Zhang via Phabricator via cfe-commits
xiangzhangllvm added a comment. In D70157#1746793 , @MaskRay wrote: > On x86, the preferred function alignment is 16 > (https://github.com/llvm/llvm-project/blob/arcpatch-D70157/llvm/lib/Target/X86/X86ISelLowering.cpp#L1893), > which is the default

[PATCH] D70284: Constant strings emitted when `-fno-constant-cfstrings` is passed should allow dead stripping

2019-11-14 Thread Ben D. Jones via Phabricator via cfe-commits
bendjones created this revision. bendjones added reviewers: erik.pilkington, ahatanak. bendjones created this object with edit policy "Administrators". bendjones added a project: clang. Herald added subscribers: cfe-commits, dexonsmith. Part of rdar://56643852 that makes all possible constant

[PATCH] D70157: Align branches within 32-Byte boundary

2019-11-14 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: llvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp:173 + + bool needAlignBranch() const; + bool needAlignJcc() const; We can generalize these functions with a function that takes a parameter.

[PATCH] D70219: Make `-fmodule-file==` apply to .pcm file compilations

2019-11-14 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. Looks reasonable to me, but I don't know a great deal about the PrebuiltModuleFiles & so I'd like @rsmith to at least glance at/approve this. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70219/new/ https://reviews.llvm.org/D70219

[PATCH] D70157: Align branches within 32-Byte boundary

2019-11-14 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. On x86, the preferred function alignment is 16 (https://github.com/llvm/llvm-project/blob/arcpatch-D70157/llvm/lib/Target/X86/X86ISelLowering.cpp#L1893), which is the default function alignment in text sections. If the cross-boundary decision is made with alignment=32

[PATCH] D70265: [clang-tidy] Add clang tidy check I.2 to cppcoreguidelines

2019-11-14 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. Hi vingeldal, thanks for you contribution and welcome to LLVM :) If you have any questions or the like, feel free to ask! Best Regards, Jonas Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70265/new/

[PATCH] D70265: [clang-tidy] Add clang tidy check I.2 to cppcoreguidelines

2019-11-14 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added inline comments. Comment at: clang-tools-extra/clang-tidy/cppcoreguidelines/AvoidNonConstGlobalVariablesCheck.cpp:20 +namespace { +AST_MATCHER(VarDecl, isLocalVarDecl) { return Node.isLocalVarDecl(); } +} // namespace This matcher already exists

[PATCH] D70144: clang-tidy: modernize-use-equals-default avoid adding redundant semicolons

2019-11-14 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. In D70144#1745881 , @poelmanc wrote: > In D70144#1745583 , @JonasToth wrote: > > > In D70144#1745532 , > > @malcolm.parsons wrote: > > > > >

[PATCH] D51567: CMake: Consolidate gtest detection code

2019-11-14 Thread Tom Stellard via Phabricator via cfe-commits
tstellar abandoned this revision. tstellar added a comment. Herald added a project: clang. Dropping this since it is more Fedora specific. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D51567/new/ https://reviews.llvm.org/D51567

[PATCH] D70157: Align branches within 32-Byte boundary

2019-11-14 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: llvm/lib/MC/MCFragment.cpp:435 +OS << "\n "; +OS << "Subtype:" << MF->SubKind << "Size: " << MF->getSize(); +break; ``` error: use of overloaded operator '<<' is ambiguous (with opera nd types

[PATCH] D70119: Improve gen_ast_dump_json_test.py

2019-11-14 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson marked 2 inline comments as done. arichardson added inline comments. Comment at: clang/test/AST/gen_ast_dump_json_test.py:3 +from __future__ import print_function from collections import OrderedDict aaron.ballman wrote: > Is this needed? I don't

[PATCH] D70280: Remove Support/Options.h, it is unused

2019-11-14 Thread Reid Kleckner via Phabricator via cfe-commits
rnk created this revision. rnk added a reviewer: beanz. Herald added subscribers: cfe-commits, hiraditya, mgorny. Herald added a reviewer: jfb. Herald added projects: clang, LLVM. It was added in 2014 in 732e0aa9fb84f1 with one use in Scalarizer.cpp. That one use was then removed when porting to

[PATCH] D68578: [HIP] Fix device stub name

2019-11-14 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: clang/lib/CodeGen/CodeGenModule.cpp:1099-1108 +auto *FD = const_cast((ND)); +if (auto *TD = cast(FD)->getPrimaryTemplate()) + FD = TD->getTemplatedDecl(); +auto OldDeclName = FD->getDeclName(); +auto NewNameStr =

[PATCH] D19031: [clang-format] Flexible line endings

2019-11-14 Thread Stephan T. Lavavej via Phabricator via cfe-commits
STL_MSFT added a comment. MSVC's STL currently uses CRLF (DOS) line endings, not LF (Unix). I wrote a validator, https://github.com/microsoft/STL/blob/58bb49d63d92e7a0346a05af29816aeea6b4cf0f/tools/validate/validate.cpp , to detect LF files, mixed line endings (LF and CRLF in the same file),

[PATCH] D68578: [HIP] Fix device stub name

2019-11-14 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: clang/lib/CodeGen/CodeGenModule.cpp:1099-1108 +auto *FD = const_cast((ND)); +if (auto *TD = cast(FD)->getPrimaryTemplate()) + FD = TD->getTemplatedDecl(); +auto OldDeclName = FD->getDeclName(); +auto NewNameStr =

[PATCH] D69991: Implement __attribute__((objc_direct)), __attribute__((objc_direct_members))

2019-11-14 Thread Pierre Habouzit via Phabricator via cfe-commits
MadCoder added inline comments. Comment at: clang/lib/Sema/SemaExprObjC.cpp:1129 + } +} + rjmccall wrote: > Is this a good idea to do for arbitrary diagnostics? I feel like saying > "direct" in the note when that has nothing to do with the conflict could be a

[PATCH] D69991: Implement __attribute__((objc_direct)), __attribute__((objc_direct_members))

2019-11-14 Thread Pierre Habouzit via Phabricator via cfe-commits
MadCoder updated this revision to Diff 229410. MadCoder marked 2 inline comments as done. MadCoder added a comment. reverted the hunk about "direct methods" note. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69991/new/ https://reviews.llvm.org/D69991 Files:

[PATCH] D70133: [ARM, MVE] Add intrinsics for 'administrative' vector operations.

2019-11-14 Thread Dave Green via Phabricator via cfe-commits
dmgreen accepted this revision. dmgreen added a comment. This revision is now accepted and ready to land. Thanks. That, er, makes it slightly simpler to review. LGTM Comment at: clang/test/CodeGen/arm-mve-intrinsics/admin.c:1671 +// +float16x8_t

[PATCH] D70274: [clang][IFS] Driver pipeline change for clang-ifs: generate interface stubs after standard pipeline.

2019-11-14 Thread Puyan Lotfi via Phabricator via cfe-commits
plotfi created this revision. plotfi added a reviewer: compnerd. Herald added a project: clang. Herald added a subscriber: cfe-commits. Up until now, clang interface stubs has replaced the standard PP -> C -> BE -> ASM -> LNK pipeline. With this change, it will happen in conjunction with it. So

[PATCH] D70257: [BPF] Restrict preserve_access_index attribute to C only

2019-11-14 Thread Yonghong Song via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGdd16b3fe2559: [BPF] Restrict preserve_access_index attribute to C only (authored by yonghong-song). Changed prior to commit: https://reviews.llvm.org/D70257?vs=229355=229406#toc Repository: rG LLVM

[PATCH] D70257: [BPF] Restrict preserve_access_index attribute to C only

2019-11-14 Thread Yonghong Song via Phabricator via cfe-commits
yonghong-song marked an inline comment as done. yonghong-song added inline comments. Comment at: clang/lib/CodeGen/CGExpr.cpp:3431 -const auto *RecT = dyn_cast(ElaborateT->desugar().getTypePtr()); -if (!RecT) - return false; - -return

[clang] dd16b3f - [BPF] Restrict preserve_access_index attribute to C only

2019-11-14 Thread Yonghong Song via cfe-commits
Author: Yonghong Song Date: 2019-11-14T14:14:59-08:00 New Revision: dd16b3fe2559789adcdd7d4d0bfe2796897877a3 URL: https://github.com/llvm/llvm-project/commit/dd16b3fe2559789adcdd7d4d0bfe2796897877a3 DIFF: https://github.com/llvm/llvm-project/commit/dd16b3fe2559789adcdd7d4d0bfe2796897877a3.diff

[PATCH] D69204: [OpenMP 5.0] - Extend defaultmap

2019-11-14 Thread Chi Chun Chen via Phabricator via cfe-commits
cchen marked an inline comment as done. cchen added inline comments. Comment at: clang/test/OpenMP/target_defaultmap_codegen.cpp:1538-1546 +void declare_target_link(float A) +{ + // CK26: [[AADDR:%.+]] = alloca float* + // CK26: store float* [[A:%.+]], float** [[AADDR]] + //

[PATCH] D69204: [OpenMP 5.0] - Extend defaultmap

2019-11-14 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/test/OpenMP/target_defaultmap_codegen.cpp:1538-1546 +void declare_target_link(float A) +{ + // CK26: [[AADDR:%.+]] = alloca float* + // CK26: store float* [[A:%.+]], float** [[AADDR]] + // CK26: [[ZERO:%.+]] = load float*,

[PATCH] D70101: [X86] Fix the implementation of __readcr3/__writecr3 to work in 64-bit mode

2019-11-14 Thread Craig Topper via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG3cec2a17de74: [X86] Fix the implementation of __readcr3/__writecr3 to work in 64-bit mode (authored by craig.topper). Herald added a project: clang. Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D67460: clang-tidy: modernize-use-using work with multi-argument templates

2019-11-14 Thread Conrad Poelman via Phabricator via cfe-commits
poelmanc marked an inline comment as not done. poelmanc added a comment. In D67460#1737529 , @aaron.ballman wrote: > I'm a bit worried that this manual parsing technique will need fixing again > in the future, but I think this is at least a reasonable

[clang] 3cec2a1 - [X86] Fix the implementation of __readcr3/__writecr3 to work in 64-bit mode

2019-11-14 Thread Craig Topper via cfe-commits
Author: Craig Topper Date: 2019-11-14T13:21:36-08:00 New Revision: 3cec2a17de744900401c83aedb442e2acc1f23f8 URL: https://github.com/llvm/llvm-project/commit/3cec2a17de744900401c83aedb442e2acc1f23f8 DIFF: https://github.com/llvm/llvm-project/commit/3cec2a17de744900401c83aedb442e2acc1f23f8.diff

[PATCH] D70270: clang-tidy: modernize-use-using uses AST and now supports struct defintions and multiple types in a typedef

2019-11-14 Thread Conrad Poelman via Phabricator via cfe-commits
poelmanc created this revision. poelmanc added reviewers: alexfh, aaron.ballman. poelmanc added a project: clang-tools-extra. Herald added subscribers: cfe-commits, mgehre. Herald added a project: clang. In D67460#1737529 , @aaron.ballman wrote: > I'm a

[PATCH] D70165: clang-tidy: modernize-use-override new option AllowOverrideAndFinal

2019-11-14 Thread Conrad Poelman via Phabricator via cfe-commits
poelmanc added a comment. In D70165#1745530 , @alexfh wrote: > While I have no objections against this patch, I wonder whether someone had a > chance to ask GCC developers about this? Is it a conscious choice to suggest > `override` when `final` is

[PATCH] D70268: [clang][clang-scan-deps] Aggregate the full dependency information.

2019-11-14 Thread Michael Spencer via Phabricator via cfe-commits
Bigcheese created this revision. Herald added subscribers: cfe-commits, tschuett, dexonsmith, mgrang. Herald added a project: clang. Bigcheese added reviewers: arphaman, kousikk. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D70268 Files:

[PATCH] D62686: [RISCV] Add support for save/restore of callee-saved registers via libcalls

2019-11-14 Thread Pengxuan Zheng via Phabricator via cfe-commits
pzheng added inline comments. Comment at: llvm/lib/Target/RISCV/RISCVFrameLowering.cpp:278 // Add CFI directives for callee-saved registers. - const std::vector = MFI.getCalleeSavedInfo(); - // Iterate over list of callee-saved registers and emit .cfi_restore - //

[PATCH] D70172: [CUDA][HIP] Fix assertion due to dtor check on windows

2019-11-14 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D70172#1745998 , @rnk wrote: > Are we sure using both Itanium and MS C++ ABIs at the same time is really the > best way forward here? What are the constraints on CUDA that require the > Itanium ABI? I'm sure there are real

[PATCH] D70257: [BPF] Restrict preserve_access_index attribute to C only

2019-11-14 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 small nit. Thank you! Comment at: clang/lib/CodeGen/CGExpr.cpp:3431 -const auto *RecT = dyn_cast(ElaborateT->desugar().getTypePtr());

[PATCH] D69759: [BPF] Add preserve_access_index attribute for record definition

2019-11-14 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D69759#1746192 , @yonghong-song wrote: > Sorry about the committing. I thought all the review questions are addressed. No worries, this happens sometimes. :-) > Definitely will be more patient next time until getting

[PATCH] D69991: Implement __attribute__((objc_direct)), __attribute__((objc_direct_members))

2019-11-14 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: clang/lib/Sema/SemaExprObjC.cpp:1129 + } +} + Is this a good idea to do for arbitrary diagnostics? I feel like saying "direct" in the note when that has nothing to do with the conflict could be a little misleading.

[PATCH] D69204: [OpenMP 5.0] - Extend defaultmap

2019-11-14 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. Tests for codegen of the declare target to|link vars with the new defaultmap clauses? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69204/new/ https://reviews.llvm.org/D69204

[PATCH] D70101: [X86] Fix the implementation of __readcr3/__writecr3 to work in 64-bit mode

2019-11-14 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 CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70101/new/ https://reviews.llvm.org/D70101 ___ cfe-commits mailing list

[PATCH] D69564: Include the mangled name in -ast-dump=json

2019-11-14 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/D69564/new/ https://reviews.llvm.org/D69564

[PATCH] D70119: Improve gen_ast_dump_json_test.py

2019-11-14 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 some nits. Thank you for this! Comment at: clang/test/AST/gen_ast_dump_json_test.py:3 +from __future__ import print_function from

[PATCH] D70101: [X86] Fix the implementation of __readcr3/__writecr3 to work in 64-bit mode

2019-11-14 Thread Craig Topper via Phabricator via cfe-commits
craig.topper updated this revision to Diff 229372. craig.topper added a comment. Add __LPTRINT_TYPE__ and use that to qualify the readcr3. Use __INTPTR_TYPE__ for writecr3 CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70101/new/ https://reviews.llvm.org/D70101 Files:

[PATCH] D70265: [clang-tidy] Add clang tidy check I.2 to cppcoreguidelines

2019-11-14 Thread Kim Viggedal via Phabricator via cfe-commits
vingeldal created this revision. vingeldal added reviewers: JonasToth, aaron.ballman. Herald added subscribers: kbarton, xazax.hun, mgorny, nemanjai. Herald added a project: clang. Cpp Core Guideline I.2, a.k.a "Avoid non-const global variables" For detailed documentation, see:

[PATCH] D70258: [OpenMP][IR-Builder] Introduce the finalization stack

2019-11-14 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/CodeGen/CGOpenMPRuntime.cpp:1483 +// OpenMPIRBuilder is asked to construct a parallel (or similar) construct. +auto FiniCB = [&](llvm::OpenMPIRBuilder::InsertPointTy IP) { + assert(IP.getBlock()->end() ==

[PATCH] D68401: [Hexagon] Fix clang driver to parse -mcpu/-mvXX and -march properly.

2019-11-14 Thread Sumanth Gundapaneni via Phabricator via cfe-commits
sgundapa closed this revision. sgundapa added a comment. I forgot to update the Differential Revision in the commit. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68401/new/ https://reviews.llvm.org/D68401 ___

[PATCH] D69991: Implement __attribute__((objc_direct)), __attribute__((objc_direct_members))

2019-11-14 Thread Pierre Habouzit via Phabricator via cfe-commits
MadCoder added inline comments. Comment at: clang/include/clang/Basic/AttrDocs.td:3919 +in particular, this means that it cannot override a superclass method or satisfy +a protocol requirement. + rjmccall wrote: > Please add a new paragraph here: > > Because

[PATCH] D69991: Implement __attribute__((objc_direct)), __attribute__((objc_direct_members))

2019-11-14 Thread Pierre Habouzit via Phabricator via cfe-commits
MadCoder updated this revision to Diff 229366. MadCoder marked 7 inline comments as done. MadCoder added a comment. Updated for the new round of comments, with added tests and Sema checks errors for: - messaging super - messaging a nullable Class expression CHANGES SINCE LAST ACTION

[PATCH] D70111: [DWARF5]Addition of alignment field in the typedef for dwarf5

2019-11-14 Thread Adrian Prantl via Phabricator via cfe-commits
aprantl added inline comments. Comment at: llvm/include/llvm/IR/DIBuilder.h:243 + unsigned LineNo, DIScope *Context, + uint32_t AlignInBits = 0); awpandey wrote: > aprantl wrote: > > This should

[PATCH] D69785: [OpenMP] Introduce the OpenMP-IR-Builder

2019-11-14 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert marked an inline comment as done. jdoerfert added inline comments. Comment at: llvm/lib/Frontend/OpenMPIRBuilder.cpp:228 + getOrCreateThreadID(getOrCreateIdent(SrcLocStr))}; + bool UseCancelBarrier = !ForceSimpleCall && CancellationBlock; + Value

[PATCH] D69759: [BPF] Add preserve_access_index attribute for record definition

2019-11-14 Thread Yonghong Song via Phabricator via cfe-commits
yonghong-song marked 7 inline comments as done. yonghong-song added a comment. Sorry about the committing. I thought all the review questions are addressed. Definitely will be more patient next time until getting review confirmation and also adhering to llvm review policy. Thanks for the detailed

[PATCH] D69204: [OpenMP 5.0] - Extend defaultmap

2019-11-14 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/Sema/SemaOpenMP.cpp:2953-2954 +(!(isOpenMPTargetExecutionDirective(DKind) && Res && + (*Res == OMPDeclareTargetDeclAttr::MT_Link || +*Res == OMPDeclareTargetDeclAttr::MT_To { +

[PATCH] D70257: [BPF] Restrict preserve_access_index attribute to C only

2019-11-14 Thread Yonghong Song via Phabricator via cfe-commits
yonghong-song created this revision. yonghong-song added a reviewer: aaron.ballman. Herald added subscribers: cfe-commits, arphaman. Herald added a project: clang. yonghong-song retitled this revision from "[BPF] Restrict preserve_access_index to C only" to "[BPF] Restrict preserve_access_index

[PATCH] D69785: [OpenMP] Introduce the OpenMP-IR-Builder

2019-11-14 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert marked an inline comment as done. jdoerfert added inline comments. Comment at: llvm/lib/Frontend/OpenMPIRBuilder.cpp:200 +OpenMPIRBuilder::InsertPointTy +OpenMPIRBuilder::emitBarrierImpl(const LocationDescription , Directive Kind, +

[PATCH] D70258: [OpenMP][IR-Builder] Introduce the finalization stack

2019-11-14 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert created this revision. jdoerfert added reviewers: kiranchandramohan, ABataev, RaviNarayanaswamy, gtbercea, grokos, sdmitriev, JonChesterfield, hfinkel, fghanim. Herald added subscribers: cfe-commits, guansong, bollu, hiraditya. Herald added projects: clang, LLVM. As a permanent and

[clang] 9fcf4f3 - [Hexagon] Fix clang driver to parse -mcpu/-mvXX and -march properly.

2019-11-14 Thread Sumanth Gundapaneni via cfe-commits
Author: Sumanth Gundapaneni Date: 2019-11-14T12:59:15-06:00 New Revision: 9fcf4f372c7e08b7ee64a202cc09860a17da8152 URL: https://github.com/llvm/llvm-project/commit/9fcf4f372c7e08b7ee64a202cc09860a17da8152 DIFF:

[PATCH] D69970: [CGDebugInfo] Emit subprograms for decls when AT_tail_call is understood (reland with fixes)

2019-11-14 Thread Vedant Kumar via Phabricator via cfe-commits
vsk added a comment. In D69970#1746103 , @dblaikie wrote: > In D69970#1745038 , @vsk wrote: > > > Don't emit declaration subprograms for functions with reserved names. There > > may not be much benefit from

[PATCH] D69330: [AST] Add RecoveryExpr to retain expressions on semantic errors

2019-11-14 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. I would prefer that we have dedicated tests for them rather than scattering the tests throughout the existing test suite (for example, consider adding `-Wno-unused` to the tests producing "result unused" warnings and adding a dedicated test). Comment

[PATCH] D69922: [OpenMP] Use the OpenMP-IR-Builder

2019-11-14 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/CodeGen/CGOpenMPRuntime.cpp:3489 +OMPRegionInfo->hasCancel()) { + auto IP = CGF.Builder.saveIP(); + llvm::BasicBlock *ExitBB = Also, you need to introduce/use RAII that saves/restores

[PATCH] D69785: [OpenMP] Introduce the OpenMP-IR-Builder

2019-11-14 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: llvm/lib/Frontend/OpenMPIRBuilder.cpp:200 +OpenMPIRBuilder::InsertPointTy +OpenMPIRBuilder::emitBarrierImpl(const LocationDescription , Directive Kind, + bool ForceSimpleCall, bool CheckCancelFlag) {

[PATCH] D70249: [clang-format] Fixed edge-case with `Style.SpacesInSquareBrackets` with trailing bare `&` lambda capture

2019-11-14 Thread Mitchell via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG4ee70e00b509: [clang-format] Fixed edge-case with SpacesInSquareBrackets with trailing bare… (authored by mitchell-stellar). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D69959: [C-index] Fix test when using Debug target & MSVC STL

2019-11-14 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 Related to this discussion, I noticed `to_vector` in STLExtras.h: https://github.com/llvm/llvm-project/blob/e2369fd197d9e/llvm/include/llvm/ADT/STLExtras.h#L1329 I guess that would be the most

[PATCH] D70101: [X86] Fix the implementation of __readcr3/__writecr3 to work in 64-bit mode

2019-11-14 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. In D70101#1741565 , @craig.topper wrote: > So in order to match the long and int behavior, I need two different macros > to replace the argument? I think __INTPTR_TYPE__ will return int on 32-bit > targets so I can't use that for

[PATCH] D69970: [CGDebugInfo] Emit subprograms for decls when AT_tail_call is understood (reland with fixes)

2019-11-14 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. In D69970#1745038 , @vsk wrote: > Don't emit declaration subprograms for functions with reserved names. There > may not be much benefit from referencing these functions from call site tags > (e.g. instead of relying on call

[PATCH] D69204: [OpenMP 5.0] - Extend defaultmap

2019-11-14 Thread Chi Chun Chen via Phabricator via cfe-commits
cchen marked 2 inline comments as done. cchen added inline comments. Comment at: clang/lib/Sema/SemaOpenMP.cpp:2953-2954 +(!(isOpenMPTargetExecutionDirective(DKind) && Res && + (*Res == OMPDeclareTargetDeclAttr::MT_Link || +*Res ==

[clang] 4ee70e0 - [clang-format] Fixed edge-case with SpacesInSquareBrackets with trailing bare "&" lambda capture.

2019-11-14 Thread Mitchell Balan via cfe-commits
Author: Mitchell Balan Date: 2019-11-14T13:24:50-05:00 New Revision: 4ee70e00b509fe26bac4196df76dc7c6153f1206 URL: https://github.com/llvm/llvm-project/commit/4ee70e00b509fe26bac4196df76dc7c6153f1206 DIFF:

[PATCH] D70256: [FPEnv] clang support for constrained FP builtins

2019-11-14 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn created this revision. kpn added reviewers: rjmccall, dblaikie. Herald added projects: clang, LLVM. Herald added a subscriber: llvm-commits. Currently if constrained fp math is requested clang is still emitting calls to the non-constrained versions of math builtins. This patch corrects that

[PATCH] D19031: [clang-format] Flexible line endings

2019-11-14 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a subscriber: STL_MSFT. MyDeveloperDay added a comment. I suspect this patch might need a rebase, but I personally don't see anything wrong with it. I think this could really help. I'm pretty sure the Unix line ending requirement is in almost every major style guide (I

[PATCH] D69979: clang: Guess at some platform FTZ/DAZ default settings

2019-11-14 Thread Sanjay Patel via Phabricator via cfe-commits
spatel added a comment. In D69979#1740294 , @arsenm wrote: > In D69979#1738099 , @craig.topper > wrote: > > > I checked Redhat 7.4 that's on the server I'm using for work. And I had a > > coworker check his

[PATCH] D70253: [AArch64][SVE2] Implement remaining SVE2 floating-point intrinsics

2019-11-14 Thread Kerry McLaughlin via Phabricator via cfe-commits
kmclaughlin created this revision. kmclaughlin added reviewers: huntergr, sdesmalen, dancgr. Herald added subscribers: hiraditya, kristof.beyls, tschuett. Herald added a project: LLVM. Adds the following intrinsics: - faddp - fmaxp, fminp, fmaxnmp & fminnmp - fmlalb, fmlalt, fmlslb & fmlslt -

[PATCH] D70196: [clang-include-fixer] Skip .rc files when finding symbols

2019-11-14 Thread Reid Kleckner via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGe2369fd197d9: [clang-include-fixer] Skip .rc files when finding symbols (authored by rnk). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70196/new/

[PATCH] D70041: register cuda language activation event and activate for .cuh files

2019-11-14 Thread Paul Taylor via Phabricator via cfe-commits
ptaylor added inline comments. Comment at: clang-tools-extra/clangd/clients/clangd-vscode/src/extension.ts:92 + // *not* load itself automatically on '.cu' and '.cuh' files. + const cudaFilePatterns: {scheme: string, pattern: string}[] = [ +{scheme : 'file', pattern :

[PATCH] D69991: Implement __attribute__((objc_direct)), __attribute__((objc_direct_members))

2019-11-14 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added inline comments. Comment at: clang/test/CodeGenObjC/direct-method.m:25 + // CHECK-NEXT: store %0* %self, %0** %self.addr, + // CHECK-NEXT: store i8* %_cmd, i8** %_cmd.addr, + rjmccall wrote: > The IR names of local values aren't emitted in

[PATCH] D70249: [clang-format] Fixed edge-case with `Style.SpacesInSquareBrackets` with trailing bare `&` lambda capture

2019-11-14 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay accepted this revision. MyDeveloperDay added a comment. This revision is now accepted and ready to land. LGTM Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70249/new/ https://reviews.llvm.org/D70249

[PATCH] D70196: [clang-include-fixer] Skip .rc files when finding symbols

2019-11-14 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. This is a single .rc entry: { "directory": "C:/src/llvm-project/build", "command": "C:\\PROGRA~2\\WI3CF2~1\\10\\bin\\100183~1.0\\x64\\rc.exe -DGTEST_HAS_RTTI=0 -DUNICODE -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_ DEPRECATE

[clang-tools-extra] e2369fd - [clang-include-fixer] Skip .rc files when finding symbols

2019-11-14 Thread Reid Kleckner via cfe-commits
Author: Reid Kleckner Date: 2019-11-14T10:04:35-08:00 New Revision: e2369fd197d9ed9916bf78b2c8f6d7b8e0d66691 URL: https://github.com/llvm/llvm-project/commit/e2369fd197d9ed9916bf78b2c8f6d7b8e0d66691 DIFF: https://github.com/llvm/llvm-project/commit/e2369fd197d9ed9916bf78b2c8f6d7b8e0d66691.diff

[clang] 399e29d - [OPENMP]Add assignment operator in UDR test, NFC.

2019-11-14 Thread Alexey Bataev via cfe-commits
Author: Alexey Bataev Date: 2019-11-14T13:01:16-05:00 New Revision: 399e29ddc600a2d91e08e7029e7dade3581c9820 URL: https://github.com/llvm/llvm-project/commit/399e29ddc600a2d91e08e7029e7dade3581c9820 DIFF: https://github.com/llvm/llvm-project/commit/399e29ddc600a2d91e08e7029e7dade3581c9820.diff

[PATCH] D70172: [CUDA][HIP] Fix assertion due to dtor check on windows

2019-11-14 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. Are we sure using both Itanium and MS C++ ABIs at the same time is really the best way forward here? What are the constraints on CUDA that require the Itanium ABI? I'm sure there are real reasons you can't just use the MS ABI as is, but I'm curious what they are. Was there

[PATCH] D67833: [OpenMP 5.0] Codegen support to pass user-defined mapper functions to runtime

2019-11-14 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. I would suggest to split this patch into 2 part: the first one is NFC and just makes the ompiler to use the new interfaces and the second with the new functionality for mappers. Comment at: include/clang/AST/OpenMPClause.h:4298 + /// use_device_ptr

[PATCH] D69759: [BPF] Add preserve_access_index attribute for record definition

2019-11-14 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Why did this get committed when there were still outstanding review questions that were not answered? In D69759#1739935 , @yonghong-song wrote: > Regarding to this one "This is missing a bunch of C++ tests that show what

[PATCH] D69204: [OpenMP 5.0] - Extend defaultmap

2019-11-14 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/Sema/SemaOpenMP.cpp:2953-2954 +(!(isOpenMPTargetExecutionDirective(DKind) && Res && + (*Res == OMPDeclareTargetDeclAttr::MT_Link || +*Res == OMPDeclareTargetDeclAttr::MT_To { +

[PATCH] D69825: [Clang][Driver] Bypass cc1 process and re-enter driver main

2019-11-14 Thread Alexandre Ganea via Phabricator via cfe-commits
aganea updated this revision to Diff 229333. aganea marked an inline comment as done. aganea added a comment. Call into `ExecuteCC1Tool()` directly, as suggested by @hans Add more comments. Remove `pThis` in `CrashRecoveryContext.cpp:RunSafely()` as suggested by @zturner CHANGES SINCE LAST

[PATCH] D68578: [HIP] Fix device stub name

2019-11-14 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: clang/lib/CodeGen/CodeGenModule.cpp:1099-1108 +auto *FD = const_cast((ND)); +if (auto *TD = cast(FD)->getPrimaryTemplate()) + FD = TD->getTemplatedDecl(); +auto OldDeclName = FD->getDeclName(); +auto NewNameStr =

[PATCH] D70249: [clang-format] Fixed edge-case with `Style.SpacesInSquareBrackets` with trailing bare `&` lambda capture

2019-11-14 Thread Mitchell via Phabricator via cfe-commits
mitchell-stellar created this revision. mitchell-stellar added a reviewer: MyDeveloperDay. mitchell-stellar added a project: clang-format. Herald added a project: clang. Herald added a subscriber: cfe-commits. Lambda captures allow for a lone `&` capture, so `&]` needs to be properly handled.

[PATCH] D68578: [HIP] Fix device stub name

2019-11-14 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked an inline comment as done. yaxunl added inline comments. Comment at: clang/lib/CodeGen/CodeGenModule.cpp:1099-1108 +auto *FD = const_cast((ND)); +if (auto *TD = cast(FD)->getPrimaryTemplate()) + FD = TD->getTemplatedDecl(); +auto OldDeclName =

  1   2   >