r354723 - Remove OpenBSD case for old system libstdc++ header path as OpenBSD

2019-02-22 Thread Brad Smith via cfe-commits
Author: brad Date: Fri Feb 22 23:21:19 2019 New Revision: 354723 URL: http://llvm.org/viewvc/llvm-project?rev=354723&view=rev Log: Remove OpenBSD case for old system libstdc++ header path as OpenBSD has switched to libc++. Modified: cfe/trunk/lib/Frontend/InitHeaderSearch.cpp Modified: cfe/t

[PATCH] D58418: [clang][DirectoryWatcher] Upstream DirectoryWatcher

2019-02-22 Thread Michał Górny via Phabricator via cfe-commits
mgorny added inline comments. Comment at: clang/lib/DirectoryWatcher/DirectoryWatcher-linux.inc.h:196 + while (true) { +if (close(inotifyFD) == -1 && errno == EINTR) + continue; There's some fancy function for this in LLVM. `RetryAfterSignal`, I think.

[PATCH] D50488: [Analyzer] Checker for non-determinism caused by sorting of pointer-like elements

2019-02-22 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. In D50488#1405094 , @mgrang wrote: > So I was able compile a couple of C++ code bases through csa-testbench. I > built cppcheck and tinyxml2 without any problems. cppcheck has one invocation > std::sort but the keys are not poi

r354721 - Remove sanitizer context workaround no longer necessary

2019-02-22 Thread Brad Smith via cfe-commits
Author: brad Date: Fri Feb 22 22:19:28 2019 New Revision: 354721 URL: http://llvm.org/viewvc/llvm-project?rev=354721&view=rev Log: Remove sanitizer context workaround no longer necessary The base linker is now lld. Modified: cfe/trunk/lib/Driver/ToolChains/OpenBSD.cpp Modified: cfe/trunk/li

[PATCH] D58571: [libclang] Fix a trivial error introduced in D57946.

2019-02-22 Thread Emilio Cobos Álvarez via Phabricator via cfe-commits
emilio created this revision. emilio added reviewers: Anastasia, arphaman. Herald added a reviewer: serge-sans-paille. Herald added a project: clang. Herald added a subscriber: cfe-commits. The value for CXCursor_ConvergentAttr is not 420. I'm not really sure how easy it is to test this, and I'm n

[PATCH] D58570: [libclang] Expose warn_unused and warn_unused_result attributes.

2019-02-22 Thread Emilio Cobos Álvarez via Phabricator via cfe-commits
emilio created this revision. emilio added reviewers: arphaman, Anastasia. Herald added subscribers: cfe-commits, JDevlieghere. Herald added a project: clang. This is helpful to properly detect them, and fixing issues like https://github.com/rust-lang/rust-bindgen/issues/1518. Repository: rG L

[PATCH] D58569: [libclang] Avoid crashing when getting layout info of an undeduced type.

2019-02-22 Thread Emilio Cobos Álvarez via Phabricator via cfe-commits
emilio created this revision. Herald added subscribers: cfe-commits, arphaman. Herald added a project: clang. When the type is not deducible, return an error instead of crashing. This fixes https://bugs.llvm.org/show_bug.cgi?id=40813. Repository: rG LLVM Github Monorepo https://reviews.llvm.

[PATCH] D58559: emit '(assertions enabled)' in the version string for a build of clang with assertions enabled

2019-02-22 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. In D58559#1407742 , @dexonsmith wrote: > I like this. Can you start a discussion on cfe-dev (if you haven't already)? > This is user-visible so I want to be sure other vendors are happy with this; > if not, we can hide it behi

[PATCH] D58559: emit '(assertions enabled)' in the version string for a build of clang with assertions enabled

2019-02-22 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman updated this revision to Diff 188023. arphaman marked an inline comment as done. arphaman added a comment. Use `"(+asserts)"` as suggested. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58559/new/ https://reviews.llvm.org/D58559 Files: lib/Basic/Versi

[PATCH] D56924: Handle ObjCCategoryDecl class extensions for print

2019-02-22 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. Please add a test that covers the '(class extension)' output as well. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56924/new/ https://reviews.llvm.org/D56924 ___ cfe-commits mailing list cf

[PATCH] D58418: [clang][DirectoryWatcher] Upstream DirectoryWatcher

2019-02-22 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added inline comments. Comment at: clang/lib/DirectoryWatcher/DirectoryWatcher-linux.inc.h:154 +errorMsg += llvm::sys::StrError(); +return true; + }; jkorous wrote: > mgorny wrote: > > The return values seem to be confusing. Any reason not to

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

2019-02-22 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 updated this revision to Diff 188021. jyu2 added a comment. Rebase CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56571/new/ https://reviews.llvm.org/D56571 Files: include/clang/AST/Stmt.h include/clang/Basic/DiagnosticParseKinds.td include/clang/Basic/DiagnosticSemaKinds.td

[PATCH] D58418: [clang][DirectoryWatcher] Upstream DirectoryWatcher

2019-02-22 Thread Jan Korous via Phabricator via cfe-commits
jkorous marked 4 inline comments as done. jkorous added inline comments. Comment at: clang/lib/DirectoryWatcher/DirectoryWatcher-linux.inc.h:116 + + DirectoryWatcher::EventKind K = DirectoryWatcher::EventKind::Added; + if (ievt->mask & IN_MODIFY) { mgor

LLVM buildmaster will be updated and restarted soon

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

[PATCH] D58559: emit '(assertions enabled)' in the version string for a build of clang with assertions enabled

2019-02-22 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. I like this. Can you start a discussion on cfe-dev (if you haven't already)? This is user-visible so I want to be sure other vendors are happy with this; if not, we can hide it behind a CMake flag. Comment at: lib/Basic/Version.cpp:117 +#ifndef N

[PATCH] D50488: [Analyzer] Checker for non-determinism caused by sorting of pointer-like elements

2019-02-22 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. In D50488#1407695 , @Charusso wrote: > bitcoin: > > sudo apt-get install build-essential libtool autotools-dev automake > pkg-config libssl-dev libevent-dev bsdmainutils python3 libboost-all-dev > software-properties-common libm

[PATCH] D50488: [Analyzer] Checker for non-determinism caused by sorting of pointer-like elements

2019-02-22 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added a comment. bitcoin: sudo apt-get install build-essential libtool autotools-dev automake pkg-config libssl-dev libevent-dev bsdmainutils python3 libboost-all-dev software-properties-common libminiupnpc-dev libzmq3-dev libqt5gui5 libqt5core5a libqt5dbus5 qttools5-dev qttools5-de

[PATCH] D58559: emit '(assertions enabled)' in the version string for a build of clang with assertions enabled

2019-02-22 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman created this revision. arphaman added a reviewer: dexonsmith. Herald added a subscriber: jkorous. Herald added a project: clang. This patch adds an additional '(assertions enabled)' in the version string for a build of clang with assertions enabled. This is a useful way to differentiate

[PATCH] D58518: [HIP] change kernel stub name

2019-02-22 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: lib/CodeGen/CodeGenModule.cpp:1059 +FD->hasAttr()) + MangledName = MangledName + ".stub"; + tra wrote: > Changing mangled name exposes this change to a wider scope of potential > issues. Is the mangled name

[PATCH] D58514: Avoid needlessly copying blocks that initialize or are assigned to local auto variables to the heap

2019-02-22 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 187998. ahatanak marked 3 inline comments as done. ahatanak added a comment. Address review comments. Add CodeGen test cases for parentheses expressions. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58514/new/ https://revie

[PATCH] D58095: [clang-tidy] Make google-objc-function-naming ignore implicit functions 🙈

2019-02-22 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore added a comment. Thanks for the review! Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58095/new/ https://reviews.llvm.org/D58095 ___ cfe-commits mailing list cfe-commits@lists.llvm.org htt

[PATCH] D58548: IR: Support parsing numeric block ids, and emit them in textual output.

2019-02-22 Thread James Y Knight via Phabricator via cfe-commits
jyknight updated this revision to Diff 187994. jyknight marked 4 inline comments as done. jyknight added a comment. Minor tweaks per comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58548/new/ https://reviews.llvm.org/D58548 Files: clang/

[PATCH] D58292: Add support for importing ChooseExpr AST nodes.

2019-02-22 Thread Tom Roeder via Phabricator via cfe-commits
tmroeder updated this revision to Diff 187990. tmroeder added a comment. Fixed a minor style typo. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58292/new/ https://reviews.llvm.org/D58292 Files: docs/LibASTMatchersReference.html include/clang/ASTMatchers/AST

[PATCH] D58292: Add support for importing ChooseExpr AST nodes.

2019-02-22 Thread Tom Roeder via Phabricator via cfe-commits
tmroeder updated this revision to Diff 187989. tmroeder added a comment. Added more unit tests. Sorry for the delay; I had to dig into the details to figure out where to put these tests and how to structure them. Please let me know if there are better ways to do this. I don't know any way to w

[PATCH] D58556: [LibTooling] Add "smart" retrieval of AST-node source to FixIt library

2019-02-22 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel created this revision. ymandel added a reviewer: ilya-biryukov. ymandel added a project: clang. Herald added a subscriber: jdoerfert. Introduces variants of `getText` and `getSourceRange` that extract the source text of an AST node based on contextual considerations. This revision intro

[PATCH] D58523: [OpenMP 5.0] Parsing/sema support for to clause with mapper modifier

2019-02-22 Thread Michael Kruse via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL354698: [OpenMP 5.0] Parsing/sema support for to clause with mapper modifier. (authored by Meinersbur, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior

r354698 - [OpenMP 5.0] Parsing/sema support for to clause with mapper modifier.

2019-02-22 Thread Michael Kruse via cfe-commits
Author: meinersbur Date: Fri Feb 22 14:29:42 2019 New Revision: 354698 URL: http://llvm.org/viewvc/llvm-project?rev=354698&view=rev Log: [OpenMP 5.0] Parsing/sema support for to clause with mapper modifier. This patch implements the parsing and sema support for OpenMP to clause with potential use

[PATCH] D58518: [HIP] change kernel stub name

2019-02-22 Thread Artem Belevich via Phabricator via cfe-commits
tra requested changes to this revision. tra added a subscriber: echristo. tra added inline comments. This revision now requires changes to proceed. Comment at: lib/CodeGen/CodeGenModule.cpp:1059 +FD->hasAttr()) + MangledName = MangledName + ".stub"; + ---

[PATCH] D56924: Handle ObjCCategoryDecl class extensions for print

2019-02-22 Thread David Goldman via Phabricator via cfe-commits
dgoldman added a comment. ping, looking to get this in to fix a clangd assertion failure Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56924/new/ https://reviews.llvm.org/D56924 ___ cfe-commits mailing list cfe-commi

[PATCH] D58518: [HIP] change kernel stub name

2019-02-22 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 187980. yaxunl added a comment. Fixed regressions. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58518/new/ https://reviews.llvm.org/D58518 Files: lib/CodeGen/CGCUDANV.cpp lib/CodeGen/CodeGenModule.cpp test/CodeGenCUDA/kernel-stub-name.cu In

[PATCH] D47394: [OpenMP][Clang][NVPTX] Replace bundling with partial linking for the OpenMP NVPTX device offloading toolchain

2019-02-22 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea added a comment. ping Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D47394/new/ https://reviews.llvm.org/D47394 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/l

[PATCH] D47394: [OpenMP][Clang][NVPTX] Replace bundling with partial linking for the OpenMP NVPTX device offloading toolchain

2019-02-22 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 187979. gtbercea added a comment. Herald added a subscriber: jdoerfert. Herald added a project: clang. - Update. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D47394/new/ https://reviews.llvm.org/D47394 Files: include/clan

[PATCH] D58548: IR: Support parsing numeric block ids, and emit them in textual output.

2019-02-22 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. I have a few nitpicks, but otherwise this seems right. I'll wait for the llvm-dev discussion before LGTM'ing though. Comment at: llvm/lib/AsmParser/LLParser.cpp:2930-2931 +if (NameID != -1 && unsigned(NameID) != NumberedVals.size()) { + P.

[PATCH] D58289: [clang] Only provide C11 features in starting with C++17

2019-02-22 Thread Louis Dionne via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL354691: [clang] Only provide C11 features in starting with C++17 (authored by ldionne, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to com

r354691 - [clang] Only provide C11 features in starting with C++17

2019-02-22 Thread Louis Dionne via cfe-commits
Author: ldionne Date: Fri Feb 22 12:48:54 2019 New Revision: 354691 URL: http://llvm.org/viewvc/llvm-project?rev=354691&view=rev Log: [clang] Only provide C11 features in starting with C++17 Summary: In r353970, I enabled those features in C++11 and above. To be strictly conforming, those featur

[PATCH] D58523: [OpenMP 5.0] Parsing/sema support for to clause with mapper modifier

2019-02-22 Thread Lingda Li via Phabricator via cfe-commits
lildmh updated this revision to Diff 187970. lildmh added a comment. Rebase CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58523/new/ https://reviews.llvm.org/D58523 Files: include/clang/AST/OpenMPClause.h include/clang/Basic/DiagnosticParseKinds.td include/clang/Basic/OpenMPKinds

r354690 - [OPENMP] Delayed diagnostics for VLA support.

2019-02-22 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Fri Feb 22 12:36:10 2019 New Revision: 354690 URL: http://llvm.org/viewvc/llvm-project?rev=354690&view=rev Log: [OPENMP] Delayed diagnostics for VLA support. Generalized processing of the deferred diagnostics for OpenMP/CUDA code. Modified: cfe/trunk/include/clang/Sema/

[PATCH] D58404: [clang-format] Add basic support for formatting C# files

2019-02-22 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay updated this revision to Diff 187969. MyDeveloperDay added a comment. Increase C# formatting capabilities - don't split regions markers across lines - lexer support for verbatim string literals - support for interpolated string literals (C#6) - support for interpolated verbatim st

[PATCH] D58523: [OpenMP 5.0] Parsing/sema support for to clause with mapper modifier

2019-02-22 Thread Lingda Li via Phabricator via cfe-commits
lildmh added a comment. Thanks a lot! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58523/new/ https://reviews.llvm.org/D58523 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commi

[PATCH] D58137: [clang-tidy] Add the abseil-time-subtraction check

2019-02-22 Thread Hyrum Wright via Phabricator via cfe-commits
hwright added inline comments. Comment at: clang-tidy/abseil/TimeSubtractionCheck.cpp:97 +void TimeSubtractionCheck::check(const MatchFinder::MatchResult &Result) { + const auto *BinOp = Result.Nodes.getNodeAs("binop"); + std::string inverse_name = JonasToth wr

[PATCH] D58523: [OpenMP 5.0] Parsing/sema support for to clause with mapper modifier

2019-02-22 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev accepted this revision. ABataev added a comment. This revision is now accepted and ready to land. LG CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58523/new/ https://reviews.llvm.org/D58523 ___ cfe-commits mailing list cfe-commits@l

[PATCH] D58137: [clang-tidy] Add the abseil-time-subtraction check

2019-02-22 Thread Hyrum Wright via Phabricator via cfe-commits
hwright updated this revision to Diff 187967. hwright marked 15 inline comments as done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58137/new/ https://reviews.llvm.org/D58137 Files: clang-tidy/abseil/AbseilTidyModule.cpp clang-tidy/abseil/CMakeLists.txt clang-tidy/abseil/Duratio

[PATCH] D58523: [OpenMP 5.0] Parsing/sema support for to clause with mapper modifier

2019-02-22 Thread Lingda Li via Phabricator via cfe-commits
lildmh updated this revision to Diff 187964. lildmh marked 4 inline comments as done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58523/new/ https://reviews.llvm.org/D58523 Files: include/clang/AST/OpenMPClause.h include/clang/Basic/DiagnosticParseKinds.td include/clang/Basic/Ope

[PATCH] D58523: [OpenMP 5.0] Parsing/sema support for to clause with mapper modifier

2019-02-22 Thread Lingda Li via Phabricator via cfe-commits
lildmh added inline comments. Comment at: lib/Sema/SemaOpenMP.cpp:13195 - } else { -MVLI.UDMapperList.push_back(nullptr); } ABataev wrote: > Is this correct for `from` clause? Yes, it's correct for `from`, which will never use `MVLI.UDMapperLi

[PATCH] D58548: IR: Support parsing numeric block ids, and emit them in textual output.

2019-02-22 Thread James Y Knight via Phabricator via cfe-commits
jyknight added a comment. In D58548#1407164 , @dexonsmith wrote: > I like this idea, and I don’t think the textual IR central is too important. > A few things: > > - Changes to the IR should always be discussed on llvm-dev. Did this already > happen?

[PATCH] D58548: IR: Support parsing numeric block ids, and emit them in textual output.

2019-02-22 Thread James Y Knight via Phabricator via cfe-commits
jyknight updated this revision to Diff 187963. jyknight added a comment. Add some wording to LangRef and clang-format. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58548/new/ https://reviews.llvm.org/D58548 Files: clang/test/CodeGenCXX/discard-

[PATCH] D58523: [OpenMP 5.0] Parsing/sema support for to clause with mapper modifier

2019-02-22 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/Sema/SemaOpenMP.cpp:13195 - } else { -MVLI.UDMapperList.push_back(nullptr); } Is this correct for `from` clause? Comment at: lib/Sema/SemaOpenMP.cpp:13237 - } else { -

[PATCH] D58346: [Sema] Change addr space diagnostics in casts to follow C++ style

2019-02-22 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. One comment, but otherwise LGTM. Comment at: lib/Sema/SemaCast.cpp:2309 +auto DestPointeeTypeWithoutAS = Self.Context.removeAddrSpaceQualType( +DestPointeeType.getCanonicalType()); +return Self.Context.hasSameType(SrcPointeeTypeWithoutA

[PATCH] D58523: [OpenMP 5.0] Parsing/sema support for to clause with mapper modifier

2019-02-22 Thread Lingda Li via Phabricator via cfe-commits
lildmh updated this revision to Diff 187958. lildmh retitled this revision from "[OpenMP 5.0] Parsing/sema support for to and from clauses with mapper modifier" to "[OpenMP 5.0] Parsing/sema support for to clause with mapper modifier". lildmh edited the summary of this revision. lildmh added a co

[PATCH] D20749: Introduce support for relative C++ ABI gated on LTO visibility.

2019-02-22 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. Herald added a subscriber: jdoerfert. Hi @pcc , I'm working on revisiting this to see if this could help when building Fuchsia (D58321 ) and had a few questions I left inline. Comment at: lib/CodeGen/CGVTables.cpp:

[PATCH] D58548: IR: Support parsing numeric block ids, and emit them in textual output.

2019-02-22 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. In D58548#1407355 , @dexonsmith wrote: > In D58548#1407331 , @greened wrote: > > > +1. Is there any reason not to use "%4" in the definition? > > > > define i32 @f(i32, i32) { > >

[PATCH] D58321: [WIP] Support for relative vtables

2019-02-22 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added a comment. Can we start with a patch that just exposes a flag that enables the relative ABI unconditionally, and remove all the platform ABI compatibility stuff? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58321/new/ https://reviews.ll

[PATCH] D58548: IR: Support parsing numeric block ids, and emit them in textual output.

2019-02-22 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. In D58548#1407331 , @greened wrote: > +1. Is there any reason not to use "%4" in the definition? > > define i32 @f(i32, i32) { > %3 = add i32 %0, %1 > br label %4 > > %4: > ret i32 %3 > } > > > Maybe it crea

[PATCH] D58548: IR: Support parsing numeric block ids, and emit them in textual output.

2019-02-22 Thread David Greene via Phabricator via cfe-commits
greened added a comment. +1. Is there any reason not to use "%4" in the definition? define i32 @f(i32, i32) { %3 = add i32 %0, %1 br label %4 %4: ret i32 %3 } Maybe it creates an ambiguity in the grammar or something. Repository: rG LLVM Github Monorepo CHANGES SINCE L

[PATCH] D50488: [Analyzer] Checker for non-determinism caused by sorting of pointer-like elements

2019-02-22 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. In D50488#1405094 , @mgrang wrote: > So I was able compile a couple of C++ code bases through csa-testbench. I > built cppcheck and tinyxml2 without any problems. cppcheck has one invocation > std::sort but the keys are not pointe

[PATCH] D28462: clang-format: Add new style option AlignConsecutiveMacros

2019-02-22 Thread Micah S. via Phabricator via cfe-commits
micah-s added a comment. ClamAV recently started using clang-format. We published this blog post about how we're using it: https://blog.clamav.net/2019/02/clamav-adopts-clang-format.html One of the things I called out in the blog post is that we really want this feature, and presently we hav

[PATCH] D17741: adds __FILE_BASENAME__ builtin macro

2019-02-22 Thread Nolan O'Brien via Phabricator via cfe-commits
NSProgrammer added a comment. We would prefer a macro like `__FILE_NAME__` over a build flag for code reading consistency (they would clearly do different things vs varying based on an obscure flag being present/absent). This patch is languishing, unless the original author thinks otherwise, a

r354681 - Fix "not all control paths return" warning. NFCI.

2019-02-22 Thread Simon Pilgrim via cfe-commits
Author: rksimon Date: Fri Feb 22 09:37:59 2019 New Revision: 354681 URL: http://llvm.org/viewvc/llvm-project?rev=354681&view=rev Log: Fix "not all control paths return" warning. NFCI. Modified: cfe/trunk/include/clang/Analysis/AnyCall.h Modified: cfe/trunk/include/clang/Analysis/AnyCall.h UR

r354680 - Revert "[OPENMP] Delayed diagnostics for VLA support."

2019-02-22 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Fri Feb 22 09:16:50 2019 New Revision: 354680 URL: http://llvm.org/viewvc/llvm-project?rev=354680&view=rev Log: Revert "[OPENMP] Delayed diagnostics for VLA support." This reverts commit r354679 to fix the problem with the Windows buildbots Modified: cfe/trunk/lib/Sema/

r354679 - [OPENMP] Delayed diagnostics for VLA support.

2019-02-22 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Fri Feb 22 08:49:13 2019 New Revision: 354679 URL: http://llvm.org/viewvc/llvm-project?rev=354679&view=rev Log: [OPENMP] Delayed diagnostics for VLA support. Generalized processing of the deferred diagnostics for OpenMP/CUDA code. Modified: cfe/trunk/lib/Sema/SemaType.c

[PATCH] D57716: [CUDA][HIP] Check calling convention based on function target

2019-02-22 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 187943. yaxunl added a comment. modify test to use non-template functions. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57716/new/ https://reviews.llvm.org/D57716 Files: lib/Sema/SemaDeclAttr.cpp test/SemaCUDA/amdgpu-windows-vectorcall.cu Ind

[PATCH] D57716: [CUDA][HIP] Check calling convention based on function target

2019-02-22 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked an inline comment as done. yaxunl added inline comments. Comment at: test/SemaCUDA/amdgpu-windows-vectorcall.cu:9-10 + +template struct A<_Ret (__cdecl _Arg0::*)(_Types) > { }; +template struct A<_Ret (__vectorcall _Arg0::*)(_Types) > {}; + tra wr

r354678 - CodeGen: use COMDAT for block copy/destroy helpers

2019-02-22 Thread Saleem Abdulrasool via cfe-commits
Author: compnerd Date: Fri Feb 22 08:29:50 2019 New Revision: 354678 URL: http://llvm.org/viewvc/llvm-project?rev=354678&view=rev Log: CodeGen: use COMDAT for block copy/destroy helpers SVN r339438 added support to deduplicate the helpers by using a consistent naming scheme and using LinkOnceODR

[PATCH] D58548: IR: Support parsing numeric block ids, and emit them in textual output.

2019-02-22 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. In D58548#1407164 , @dexonsmith wrote: > I like this idea, and I don’t think the textual IR central is too important. Textual IR *change*; typing on a phone while walking :/. By which I mean that IMO it’s fine to break/chang

[PATCH] D58548: IR: Support parsing numeric block ids, and emit them in textual output.

2019-02-22 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. I like this idea, and I don’t think the textual IR central is too important. A few things: - Changes to the IR should always be discussed on llvm-dev. Did this already happen? - Please update LangRef. - Did you write a script for updating the test cases? If so, yo

[PATCH] D58548: IR: Support parsing numeric block ids, and emit them in textual output.

2019-02-22 Thread James Y Knight via Phabricator via cfe-commits
jyknight created this revision. jyknight added a reviewer: philip.pfaffe. Herald added subscribers: cfe-commits, jdoerfert, jfb, dexonsmith, steven_wu, hiraditya, mehdi_amini. Herald added projects: clang, LLVM. Just as as llvm IR supports explicitly specifying numeric value ids for instructions,

[PATCH] D58547: [clangd] Introduce intermediate representation of formatted text

2019-02-22 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. This is a follow-up for a discussion from D55250 . Still missing test, wanted to get some input on the API first. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58547/new/ https://revi

[PATCH] D55250: [clangd] Enhance macro hover to see full definition

2019-02-22 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. More concretely, here's the proposed API for the intermediate representation of formatted string: D58547 Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55250/new/ https://reviews.llvm.

[PATCH] D58547: [clangd] Introduce intermediate representation of formatted text

2019-02-22 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov created this revision. ilya-biryukov added reviewers: malaperle, sammccall, ioeric. Herald added subscribers: kadircet, arphaman, jkorous, MaskRay, mgorny. Herald added a project: clang. That can render to markdown or plain text. Used for findHover requests. Repository: rG LLVM G

[PATCH] D58035: [clang/DIVar] Emit flag for params that have unchanged values

2019-02-22 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: lib/Sema/SemaExpr.cpp:11301 +EmitArgumentsValueModification(E); + SourceLocation OrigLoc = Loc; riccibruno wrote: > Comments: > > 1. Shouldn't you mark the variable to be modified only if > `CheckForModifiabl

[PATCH] D58035: [clang/DIVar] Emit flag for params that have unchanged values

2019-02-22 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno added inline comments. Comment at: lib/Sema/SemaExpr.cpp:11301 +EmitArgumentsValueModification(E); + SourceLocation OrigLoc = Loc; Comments: 1. Shouldn't you mark the variable to be modified only if `CheckForModifiableLvalue` returns true ? 2

r354671 - [CUDA]Delayed diagnostics for the asm instructions.

2019-02-22 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Fri Feb 22 06:42:48 2019 New Revision: 354671 URL: http://llvm.org/viewvc/llvm-project?rev=354671&view=rev Log: [CUDA]Delayed diagnostics for the asm instructions. Adapted targetDiag for the CUDA and used for the delayed diagnostics in asm constructs. Works for both host and

[PATCH] D58035: [clang/DIVar] Emit flag for params that have unchanged values

2019-02-22 Thread Djordje Todorovic via Phabricator via cfe-commits
djtodoro updated this revision to Diff 187931. djtodoro added a comment. - Add a field in `ParmVarDecl` instead of `VarDecl` - Use a bit in `ParmVarDeclBitfields` to indicate parameter modification - Add support for the bit in `ASTReaderDecl.cpp` / `ASTWriterDecl.cpp` - Add test case for template

[PATCH] D58345: [clangd] Using symbol name to map includes for STL symbols.

2019-02-22 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added a comment. In D58345#1406892 , @sammccall wrote: > Sorry to be a pain here, but I'm not sure introducing Javascript is a good > idea unless there's a strong reason for it. > All LLVM developers have python installed, many are comfortable wit

[PATCH] D58035: [clang/DIVar] Emit flag for params that have unchanged values

2019-02-22 Thread Djordje Todorovic via Phabricator via cfe-commits
djtodoro marked an inline comment as done. djtodoro added a comment. @riccibruno Thanks for your comments! > Oh and I think that you will also have to update the serialization > code/de-serialization code in ASTReaderDecl.cpp / ASTWriterDecl.cpp. You > might also have to update TreeTransform bu

[PATCH] D58035: [clang/DIVar] Emit flag for params that have unchanged values

2019-02-22 Thread Djordje Todorovic via Phabricator via cfe-commits
djtodoro marked 2 inline comments as done. djtodoro added a comment. > I was under the impression that space inside VarDecl was quite constrained. > Pardon the likely naive question, but: is there any way to make the > representation more compact (maybe sneak a bit into ParmVarDeclBitfields)? @

[PATCH] D58523: [OpenMP 5.0] Parsing/sema support for to and from clauses with mapper modifier

2019-02-22 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/AST/OpenMPClause.cpp:1469 void OMPClausePrinter::VisitOMPFromClause(OMPFromClause *Node) { if (!Node->varlist_empty()) { lildmh wrote: > ABataev wrote: > > Better to split this patch into 2: one for `to` clause

[PATCH] D16351: [FIX] Bug 25404 - Crash on typedef in OpenCL 2.0

2019-02-22 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia abandoned this revision. Anastasia added a comment. I just took the ownership of this to be able to close it. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D16351/new/ https://reviews.llvm.org/D16351 ___ cfe-commits mailing list cf

[PATCH] D16351: [FIX] Bug 25404 - Crash on typedef in OpenCL 2.0

2019-02-22 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia commandeered this revision. Anastasia added a reviewer: ichesnokov. Anastasia added a comment. Herald added a subscriber: ebevhan. I just closed the bug because it's no longer failing on the master branch. So I don't think this is needed. CHANGES SINCE LAST ACTION https://reviews.ll

[PATCH] D58545: fix the message

2019-02-22 Thread Mikhail Goncharov via Phabricator via cfe-commits
goncharov created this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. please ignore Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D58545 Files: clang/include/clang/Basic/DiagnosticSemaKinds.td clang/test/SemaCXX/warn-infinite-recursion.cpp

[PATCH] D58492: [clangd] Add thread priority lowering for MacOS as well

2019-02-22 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr accepted this revision. gribozavr added a comment. This revision is now accepted and ready to land. I see, there's no SCHED_IDLE in the macOS SDK. OK then, I trust that people who wrote CIndex.cpp support for macOS probably have got it correctly working for macOS, so it makes sense to

[PATCH] D58544: [AST] Improve support of external layouts in `MicrosoftRecordLayoutBuilder`

2019-02-22 Thread Aleksandr Urakov via Phabricator via cfe-commits
aleksandr.urakov created this revision. aleksandr.urakov added reviewers: rnk, zturner, rsmith. aleksandr.urakov added a project: clang. Herald added subscribers: cfe-commits, jdoerfert. This patch fixes several small problems with external layouts support in `MicrosoftRecordLayoutBuilder`: - al

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

2019-02-22 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno added inline comments. Comment at: include/clang/Basic/Sanitizers.h:173 + SanitizerMask::bitPosToMask(SO_##ID##Group); \ + static const SanitizerMask &ID##Group = SanitizerMasks<>::ID##Group; #include "clang/Basic/Sanitizers.def" ---

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

2019-02-22 Thread pierre gousseau via Phabricator via cfe-commits
pgousseau marked 2 inline comments as done. pgousseau added inline comments. Comment at: include/clang/Basic/Sanitizers.h:148 +// workaround from n4424 to avoid odr issues. +// FIXME: Can be replaced by constexpr once c++14 can be used in llvm. +template struct SanitizerMasks {

[PATCH] D58035: [clang/DIVar] Emit flag for params that have unchanged values

2019-02-22 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno added a comment. I am wondering about the semantics of this bit. I don't think that you can know for sure within clang whether a variable has been modified. The best you can do is know for sure that some variable has been modified, but I don't think you can prove that it has not been

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

2019-02-22 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno added inline comments. Comment at: include/clang/Basic/Sanitizers.h:148 +// workaround from n4424 to avoid odr issues. +// FIXME: Can be replaced by constexpr once c++14 can be used in llvm. +template struct SanitizerMasks { Not replaced. `constexpr`

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

2019-02-22 Thread pierre gousseau via Phabricator via cfe-commits
pgousseau updated this revision to Diff 187917. pgousseau added a comment. Rework FIXME comment. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57914/new/ https://reviews.llvm.org/D57914 Files: include/clang/Basic/Attr.td include/clang/Basic/Sanitizers.def include/clang/Basic/Sani

[PATCH] D58541: [CodeComplete] Propagate preferred type for function arguments in more cases

2019-02-22 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov created this revision. ilya-biryukov added a reviewer: kadircet. Herald added a subscriber: jdoerfert. Herald added a project: clang. See the added test for some new cases. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D58541 Files: clang/include/clang/Parse/Pa

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

2019-02-22 Thread pierre gousseau via Phabricator via cfe-commits
pgousseau updated this revision to Diff 187913. pgousseau added a comment. Fix odr violation issue using static data member of a class template as suggested. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57914/new/ https://reviews.llvm.org/D57914 Files: include/clang/Basic/Attr.td

[PATCH] D58278: Prepare ground for re-lexing modular headers.

2019-02-22 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clang/include/clang/Lex/PPCallbacks.h:346 + + virtual void setPreprocessor(Preprocessor *preprocessor) { +preprocessor_ = preprocessor; alexfh wrote: > sammccall wrote: > > This seems pretty tangly from a layering

[PATCH] D58278: Prepare ground for re-lexing modular headers.

2019-02-22 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh marked an inline comment as done. alexfh added inline comments. Comment at: clang/include/clang/Lex/PPCallbacks.h:346 + + virtual void setPreprocessor(Preprocessor *preprocessor) { +preprocessor_ = preprocessor; sammccall wrote: > This seems pretty ta

[PATCH] D58525: [clangd] Don't attach FixIt to the source code in macro.

2019-02-22 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL354664: [clangd] Don't attach FixIt to the source code in macro. (authored by hokein, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Repository: rL LLVM CHANGES

[clang-tools-extra] r354664 - [clangd] Don't attach FixIt to the source code in macro.

2019-02-22 Thread Haojian Wu via cfe-commits
Author: hokein Date: Fri Feb 22 01:43:56 2019 New Revision: 354664 URL: http://llvm.org/viewvc/llvm-project?rev=354664&view=rev Log: [clangd] Don't attach FixIt to the source code in macro. Summary: We are less certain it is the correct fix. Also, clang doesn't apply FixIt to the source code in m

[PATCH] D58492: [clangd] Add thread priority lowering for MacOS as well

2019-02-22 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 187908. kadircet marked an inline comment as done. kadircet added a comment. - Add required header Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58492/new/ https://reviews.llvm.org/D58492 Files: clangd/Threa

[PATCH] D58492: [clangd] Add thread priority lowering for MacOS as well

2019-02-22 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet marked an inline comment as done. kadircet added inline comments. Comment at: clangd/Threading.cpp:125 +#elif defined(__APPLE__) + // https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man2/getpriority.2.html + setpriority(PR

[PATCH] D58345: [clangd] Using symbol name to map includes for STL symbols.

2019-02-22 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a subscriber: klimek. sammccall added a comment. Sorry to be a pain here, but I'm not sure introducing Javascript is a good idea unless there's a strong reason for it. All LLVM developers have python installed, many are comfortable with the language - it seems less likely to be a

[PATCH] D58525: [clangd] Don't attach FixIt to the source code in macro.

2019-02-22 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov accepted this revision. ilya-biryukov added a comment. This revision is now accepted and ready to land. LGTM. Thanks! Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58525/new/ https://reviews.llvm.org/D58525 _

[PATCH] D55250: [clangd] Enhance macro hover to see full definition

2019-02-22 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov accepted this revision. ilya-biryukov added a comment. This revision is now accepted and ready to land. LGTM. Thanks! Comment at: clangd/ClangdLSPServer.cpp:816 +// If the client supports Markdown, convert from plaintext here. +if (*H && Ho

[PATCH] D58492: [clangd] Add thread priority lowering for MacOS as well

2019-02-22 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. This one was used in a few different places in clang, for ex: https://github.com/llvm-mirror/clang/blob/master/tools/libclang/CIndex.cpp#L8713. Therefore I've used the same funcitonality. Regarding `pthread_setschedparam` does setting prioirty to `PTHREAD_MIN_PRIORITY

[PATCH] D58278: Prepare ground for re-lexing modular headers.

2019-02-22 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clang/include/clang/Lex/PPCallbacks.h:346 + + virtual void setPreprocessor(Preprocessor *preprocessor) { +preprocessor_ = preprocessor; This seems pretty tangly from a layering point of view, giving each object a

  1   2   >