[PATCH] D36918: [Sema] Take into account the current context when checking the accessibility of a member function pointer

2018-05-23 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 148334. ahatanak added a comment. Add a test case for the Chromium failure. Also, simplify a bit by capturing the calling context in Sema::DeduceTemplateArguments. Repository: rC Clang https://reviews.llvm.org/D36918 Files:

[PATCH] D46084: [Fixed Point Arithmetic] Addition of the Fixed Point _Accum type

2018-05-23 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: include/clang/Basic/DiagnosticCommonKinds.td:172 +def err_fixed_point_only_allowed_in_c : Error< + "Fixed point types are only allowed in C">; leonardchan wrote: > leonardchan wrote: > > leonardchan wrote: > > >

[PATCH] D47103: Implement strip.invariant.group

2018-05-23 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: clang/lib/CodeGen/CGExpr.cpp:3858 +} + } + Prazek wrote: > rjmccall wrote: > > Please add a comment explaining why this is necessary. (I'm actually not > > sure why it is, because surely the invariant groups we

[PATCH] D46084: [Fixed Point Arithmetic] Addition of the Fixed Point _Accum type

2018-05-23 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. After further discussion, we think the best approach for now would be only supporting fixed point types in C, then go back and support C++ once there is a standardized way for mangling the fixed point types under itanium. Repository: rC Clang

[PATCH] D47223: [clangd] Handle enumerators in named, unscoped enums similarly to scoped enums

2018-05-23 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added a comment. In https://reviews.llvm.org/D47223#1109247, @ilya-biryukov wrote: > I'm not sure if we have tests for that, but I remember that we kept the > enumerators in the outer scope so that completion could find them.. > Am I right that this patch will change the behavior and

[PATCH] D44954: [clangd] Add "member" symbols to the index

2018-05-23 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle updated this revision to Diff 148329. malaperle added a comment. Use "SupportGlobalCompletion", white-list decl contexts, add more tests Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D44954 Files: clangd/CodeComplete.cpp clangd/index/Index.h

[PATCH] D47305: [analyzer] pr37270: Fix binding constructed object to DeclStmt when ConstructionContext is already lost.

2018-05-23 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ created this revision. NoQ added reviewers: dcoughlin, xazax.hun, a.sidorin, george.karpenkov, szepet, rnkovacs. Herald added subscribers: cfe-commits, baloghadamsoftware. As explained in http://lists.llvm.org/pipermail/cfe-dev/2018-May/058055.html,

[PATCH] D47303: [analyzer] NFC: Merge object construction related state traits into one.

2018-05-23 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov requested changes to this revision. george.karpenkov added a comment. This revision now requires changes to proceed. Definitely looks much cleaner, some nits inline. Can we protect against API misuse? Comment at:

[PATCH] D47229: Make atomic non-member functions as nonnull

2018-05-23 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: lib/Sema/SemaChecking.cpp:3497 +else if (Form == Copy || Form == Xchg) { + if (!IsC11 && !IsN) +// The value pointer is always dereferenced, a nullptr is undefined. Nit: might make more

[PATCH] D47304: [analyzer] NFC: Merge the functions for obtaining constructed object location and storing this location for later use.

2018-05-23 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ created this revision. NoQ added reviewers: dcoughlin, xazax.hun, a.sidorin, george.karpenkov, szepet, rnkovacs. Herald added subscribers: cfe-commits, baloghadamsoftware. `getLocationForConstructedObject()` looks at the construction context and figures out what region should represent the

[PATCH] D47067: Update NRVO logic to support early return

2018-05-23 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. Thanks! This looks like exactly the right way to compute when to apply NRVO. It'd be good to track (in your commit message at least) that this addresses PR13067. Comment at: lib/Sema/SemaDecl.cpp:12760 // to deduce an implicit return type. -

[PATCH] D47280: [Sema][ObjC] Do not DiagnoseUseOfDecl in LookupMemberExpr

2018-05-23 Thread Steven Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC333148: [Sema][ObjC] Do not DiagnoseUseOfDecl in LookupMemberExpr (authored by steven_wu, committed by ). Changed prior to commit: https://reviews.llvm.org/D47280?vs=148279=148327#toc Repository: rC

r333148 - [Sema][ObjC] Do not DiagnoseUseOfDecl in LookupMemberExpr

2018-05-23 Thread Steven Wu via cfe-commits
Author: steven_wu Date: Wed May 23 18:01:43 2018 New Revision: 333148 URL: http://llvm.org/viewvc/llvm-project?rev=333148=rev Log: [Sema][ObjC] Do not DiagnoseUseOfDecl in LookupMemberExpr Summary: Remove the call to DiagnoseUseOfDecl in LookupMemberExpr because: 1. LookupMemberExpr eagerly

[PATCH] D47280: [Sema][ObjC] Do not DiagnoseUseOfDecl in LookupMemberExpr

2018-05-23 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman accepted this revision. arphaman added a comment. This revision is now accepted and ready to land. LGTM. Repository: rC Clang https://reviews.llvm.org/D47280 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D47303: [analyzer] NFC: Merge object construction related state traits into one.

2018-05-23 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ created this revision. NoQ added reviewers: dcoughlin, xazax.hun, a.sidorin, george.karpenkov, szepet, rnkovacs. Herald added subscribers: cfe-commits, baloghadamsoftware. As noticed in http://lists.llvm.org/pipermail/cfe-dev/2018-May/058055.html we need a path-sensitive program state trait

[PATCH] D46084: [Fixed Point Arithmetic] Addition of the Fixed Point _Accum type

2018-05-23 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added inline comments. Comment at: include/clang/Basic/DiagnosticCommonKinds.td:172 +def err_fixed_point_only_allowed_in_c : Error< + "Fixed point types are only allowed in C">; leonardchan wrote: > leonardchan wrote: > > rsmith wrote: > > >

[PATCH] D47299: [CodeGenCXX] Emit strip.invariant.group with -fstrict-vtable-pointers

2018-05-23 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: clang/include/clang/AST/DeclCXX.h:779 + bool mayBeDynamicClass() const { +return !isCompleteDefinition() || isDynamicClass(); + } `isCompleteDefinition` checks whether this declaration of the class is a

[PATCH] D38708: [AST] Flag the typo-corrected nodes for better tooling

2018-05-23 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. Herald added a subscriber: llvm-commits. Could you rebase this patch against ToT? Also, it's not clear to me why only four Exprs (DeclRefExpr, MemberExpr, ObjCIvarRefExpr, and ObjCPropertyRefExpr) should have the IsTypoCorrected flag. Can you elaborate on how you

[PATCH] D47157: Warning for framework headers using double quote includes

2018-05-23 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. In https://reviews.llvm.org/D47157#1110430, @bruno wrote: > Hi Eugene, > > > You could just not include new warning into -Wall and -Wextra. Those who > > will want to check #include statements correctness could enable it > > explicitly. > > This is exactly

[PATCH] D47273: [bash-completion] Fix tab separation on macOS

2018-05-23 Thread Yuka Takahashi via Phabricator via cfe-commits
yamaguchi accepted this revision. yamaguchi added a comment. LGTM https://reviews.llvm.org/D47273 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r333141 - Use zeroinitializer for (trailing zero portion of) large array initializers

2018-05-23 Thread Richard Smith via cfe-commits
Author: rsmith Date: Wed May 23 16:41:38 2018 New Revision: 333141 URL: http://llvm.org/viewvc/llvm-project?rev=333141=rev Log: Use zeroinitializer for (trailing zero portion of) large array initializers more reliably. This re-commits r333044 with a fix for PR37560. Modified:

[PATCH] D47157: Warning for framework headers using double quote includes

2018-05-23 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added a comment. Hi Eugene, > You could just not include new warning into -Wall and -Wextra. Those who will > want to check #include statements correctness could enable it explicitly. This is exactly what's happening in the patch, the new warning isn't part of `-Wall` or `-Wextra`, and

[PATCH] D45015: [Preprocessor] Allow libc++ to detect when aligned allocation is unavailable.

2018-05-23 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. In https://reviews.llvm.org/D45015#1109049, @ahatanak wrote: > - Currently clang errors out when aligned operator new is selected but the > OS's version is too old to support it. What's the reason we want to change > this now to be a warning rather than an error? I

[PATCH] D47301: Warning for framework include violation from Headers to PrivateHeaders

2018-05-23 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno updated this revision to Diff 148317. bruno added a comment. Update to a more recent version of the patch. https://reviews.llvm.org/D47301 Files: include/clang/Basic/DiagnosticGroups.td include/clang/Basic/DiagnosticLexKinds.td lib/Lex/HeaderSearch.cpp

[PATCH] D47301: Warning for framework include violation from Headers to PrivateHeaders

2018-05-23 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno created this revision. bruno added reviewers: ributzka, vsapsai, dexonsmith. Framework vendors usually layout their framework headers in the following way: Foo.framework/Headers -> "public" headers Foo.framework/PrivateHeader -> "private" headers Since both headers in both directories

[PATCH] D45897: Convert clang-interpreter to ORC JIT API

2018-05-23 Thread Lang Hames via Phabricator via cfe-commits
lhames accepted this revision. lhames added a comment. This revision is now accepted and ready to land. Herald added a subscriber: mgrang. Looks good to me. :) Repository: rC Clang https://reviews.llvm.org/D45897 ___ cfe-commits mailing list

[PATCH] D47103: Implement strip.invariant.group

2018-05-23 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek updated this revision to Diff 148313. Prazek marked 2 inline comments as done. Prazek added a comment. Slitted commit into defining and using intrinsic Repository: rL LLVM https://reviews.llvm.org/D47103 Files: llvm/docs/LangRef.rst llvm/include/llvm/IR/IRBuilder.h

[PATCH] D47103: Implement strip.invariant.group

2018-05-23 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek added inline comments. Comment at: clang/lib/CodeGen/CGExpr.cpp:3858 +} + } + rjmccall wrote: > Please add a comment explaining why this is necessary. (I'm actually not > sure why it is, because surely the invariant groups we generate don't contain

[PATCH] D47299: [CodeGenCXX] Emit strip.invariant.group with -fstrict-vtable-pointers

2018-05-23 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek created this revision. Prazek added reviewers: rjmccall, rsmith, amharc, kuhar. Herald added a subscriber: llvm-commits. Emmiting new intrinsic that strips invariant.groups to make devirtulization sound, as described in RFC: Devirtualization v2. Repository: rL LLVM

[PATCH] D47297: [Modules][ObjC] Add protocol redefinition to the current scope/context

2018-05-23 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno created this revision. bruno added a reviewer: rsmith. Not doing so causes the AST writter to assert since the decl in question never gets emitted. This is fine when modules is not used, but otherwise we need to serialize something other than garbage. rdar://problem/39844933

[PATCH] D47290: [Sema] -Wformat-pedantic only for NSInteger/NSUInteger %zu/%zi on Darwin

2018-05-23 Thread JF Bastien via Phabricator via cfe-commits
jfb marked an inline comment as done. jfb added inline comments. Comment at: test/FixIt/fixit-format-ios-nopedantic.m:21 + printf("test 4: %zd %zd", getNSInteger(), getNSInteger()); +} alexshap wrote: > maybe i'm missing smth, but i don't see any verification

[PATCH] D47290: [Sema] -Wformat-pedantic only for NSInteger/NSUInteger %zu/%zi on Darwin

2018-05-23 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap added inline comments. Comment at: test/FixIt/fixit-format-ios-nopedantic.m:21 + printf("test 4: %zd %zd", getNSInteger(), getNSInteger()); +} maybe i'm missing smth, but i don't see any verification in this test. Repository: rC Clang

[PATCH] D47291: Proposal to make rtti errors more generic.

2018-05-23 Thread Sunil Srivastava via Phabricator via cfe-commits
Sunil_Srivastava created this revision. Herald added a subscriber: cfe-commits. This patch changes the wording of two errors to make them more generic. An attempt to use dynamic_cast while rtti is disabled, curently emits the error: cannot use dynamic_cast with -fno-rtti and a similar one

[PATCH] D47290: [Sema] -Wformat-pedantic only for NSInteger/NSUInteger %zu/%zi on Darwin

2018-05-23 Thread JF Bastien via Phabricator via cfe-commits
jfb created this revision. jfb added reviewers: ahatanak, vsapsai, alexshap, aaron.ballman, javed.absar, jfb, rjmccall. Herald added subscribers: cfe-commits, aheejin, kristof.beyls. Pick https://reviews.llvm.org/D42933 back up, and make NSInteger/NSUInteger with %zu/%zi specifiers on Darwin

[PATCH] D46971: [DWARF] Get RA from RA register even if it appears unused

2018-05-23 Thread whitequark via Phabricator via cfe-commits
whitequark added a comment. @compnerd ping Repository: rUNW libunwind https://reviews.llvm.org/D46971 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D46652: [clang-cl, PCH] Implement support for MS-style PCH through headers

2018-05-23 Thread Mike Rice via Phabricator via cfe-commits
mikerice added a comment. Ping. Still looking for a reviewer, mostly Lex and clang-cl driver changes. https://reviews.llvm.org/D46652 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r333126 - Rework __builtin_classify_type support to better match GCC and to not assert on

2018-05-23 Thread Richard Smith via cfe-commits
Author: rsmith Date: Wed May 23 14:18:00 2018 New Revision: 333126 URL: http://llvm.org/viewvc/llvm-project?rev=333126=rev Log: Rework __builtin_classify_type support to better match GCC and to not assert on unusual types. Following the observed behavior of GCC, we now return -1 for vector types

[PATCH] D47108: [CodeGenCXX] Add -fforce-emit-vtables

2018-05-23 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In https://reviews.llvm.org/D47108#1109145, @Prazek wrote: > In https://reviews.llvm.org/D47108#1109014, @rjmccall wrote: > > > I thought we already had places in Sema that marked inline virtual methods > > as used, instantiated templates, etc. for devirtualization

r333124 - [X86] Move the include of clzerointrin.h from immintrin.h back to x86intrin.h.

2018-05-23 Thread Craig Topper via cfe-commits
Author: ctopper Date: Wed May 23 14:04:26 2018 New Revision: 333124 URL: http://llvm.org/viewvc/llvm-project?rev=333124=rev Log: [X86] Move the include of clzerointrin.h from immintrin.h back to x86intrin.h. This is an AMD intrinsic not an Intel intrinsic so it shouldn't be in immintrin.h

[PATCH] D47277: [modules] Mark __wmmintrin_pclmul.h/__wmmintrin_aes.h as textual

2018-05-23 Thread Raphael Isemann via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL333123: [modules] Mark __wmmintrin_pclmul.h/__wmmintrin_aes.h as textual (authored by teemperor, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

r333123 - [modules] Mark __wmmintrin_pclmul.h/__wmmintrin_aes.h as textual

2018-05-23 Thread Raphael Isemann via cfe-commits
Author: teemperor Date: Wed May 23 13:59:46 2018 New Revision: 333123 URL: http://llvm.org/viewvc/llvm-project?rev=333123=rev Log: [modules] Mark __wmmintrin_pclmul.h/__wmmintrin_aes.h as textual Summary: Since clang r332929 these two headers throw errors when included from somewhere else than

[PATCH] D45212: Add HIP toolchain

2018-05-23 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked an inline comment as done. yaxunl added inline comments. Comment at: lib/Driver/ToolChains/HIP.cpp:44 + } + if (!FoundLibDevice) +C.getDriver().Diag(diag::err_drv_no_such_file) << BCName; tra wrote: > You don't need FoundLibDevice any more as

[PATCH] D47097: [DebugInfo] Preserve scope in auto generated StoreInst

2018-05-23 Thread Adrian Prantl via Phabricator via cfe-commits
aprantl added inline comments. Comment at: lib/CodeGen/CGExpr.cpp:72 + // Set debug location in order to preserve the scope + Alloca->setDebugLoc(Builder.getCurrentDebugLocation()); if (AllocaAddr) vsk wrote: > aprantl wrote: > > vsk wrote: > > > aprantl

[PATCH] D47280: [Sema][ObjC] Do not DiagnoseUseOfDecl in LookupMemberExpr

2018-05-23 Thread Steven Wu via Phabricator via cfe-commits
steven_wu created this revision. steven_wu added reviewers: erik.pilkington, arphaman, doug.gregor. Remove the call to DiagnoseUseOfDecl in LookupMemberExpr because: 1. LookupMemberExpr eagerly lookup both getter and setter, reguardless if they are used or not. It causes wrong diagnostics if

[PATCH] D45212: Add HIP toolchain

2018-05-23 Thread Artem Belevich via Phabricator via cfe-commits
tra accepted this revision. tra added a comment. This revision is now accepted and ready to land. One small nit. LGTM otherwise. Comment at: lib/Driver/ToolChains/HIP.cpp:44 + } + if (!FoundLibDevice) +C.getDriver().Diag(diag::err_drv_no_such_file) << BCName;

[PATCH] D47273: [bash-completion] Fix tab separation on macOS

2018-05-23 Thread Rui Ueyama via Phabricator via cfe-commits
ruiu accepted this revision. ruiu added a comment. This revision is now accepted and ready to land. LGTM https://reviews.llvm.org/D47273 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D45212: Add HIP toolchain

2018-05-23 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 148277. yaxunl marked 6 inline comments as done. yaxunl added a comment. Revised by Artem's comments. https://reviews.llvm.org/D45212 Files: include/clang/Driver/Options.td lib/Driver/CMakeLists.txt lib/Driver/Driver.cpp

[PATCH] D47273: [bash-completion] Fix tab separation on macOS

2018-05-23 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir updated this revision to Diff 148278. benlangmuir edited the summary of this revision. benlangmuir added a comment. Thanks for looking up the supported bash version! Updated diff. https://reviews.llvm.org/D47273 Files: utils/bash-autocomplete.sh Index:

[PATCH] D45212: Add HIP toolchain

2018-05-23 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked 6 inline comments as done. yaxunl added inline comments. Comment at: lib/Driver/ToolChains/HIP.cpp:29-47 +static bool addBCLib(Compilation , const ArgList , + ArgStringList , ArgStringList LibraryPaths, + StringRef BCName) {

[PATCH] D47277: [modules] Mark __wmmintrin_pclmul.h/__wmmintrin_aes.h as textual

2018-05-23 Thread Craig Topper via Phabricator via cfe-commits
craig.topper accepted this revision. craig.topper added a comment. This revision is now accepted and ready to land. LGTM https://reviews.llvm.org/D47277 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D46863: [X86] Use __builtin_convertvector to implement some of the packed integer to packed float conversion intrinsics.

2018-05-23 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added a comment. Hi @aemerson, I'm not opposed to adding it back. But the clang policy for vector builtins has always been that we won't support all the builtins that gcc does and to encourage the use of the _mm_* wrappers which are guaranteed to work in both compilers. It

[PATCH] D47097: [DebugInfo] Preserve scope in auto generated StoreInst

2018-05-23 Thread Vedant Kumar via Phabricator via cfe-commits
vsk added inline comments. Comment at: lib/CodeGen/CGExpr.cpp:72 + // Set debug location in order to preserve the scope + Alloca->setDebugLoc(Builder.getCurrentDebugLocation()); if (AllocaAddr) aprantl wrote: > vsk wrote: > > aprantl wrote: > > > vsk wrote:

[PATCH] D47097: [DebugInfo] Preserve scope in auto generated StoreInst

2018-05-23 Thread Adrian Prantl via Phabricator via cfe-commits
aprantl added inline comments. Comment at: lib/CodeGen/CGExpr.cpp:72 + // Set debug location in order to preserve the scope + Alloca->setDebugLoc(Builder.getCurrentDebugLocation()); if (AllocaAddr) vsk wrote: > aprantl wrote: > > vsk wrote: > > > I think we

[PATCH] D47097: [DebugInfo] Preserve scope in auto generated StoreInst

2018-05-23 Thread Vedant Kumar via Phabricator via cfe-commits
vsk added inline comments. Comment at: lib/CodeGen/CGExpr.cpp:72 + // Set debug location in order to preserve the scope + Alloca->setDebugLoc(Builder.getCurrentDebugLocation()); if (AllocaAddr) aprantl wrote: > vsk wrote: > > I think we need to be a bit

[PATCH] D46863: [X86] Use __builtin_convertvector to implement some of the packed integer to packed float conversion intrinsics.

2018-05-23 Thread Amara Emerson via Phabricator via cfe-commits
aemerson added a comment. Hi Craig, The `__builtin_ia32_cvtdq2ps` builtin seems to be supported by gcc, and this change breaks code which has been using this without problems for years. Can we restore it? Amara Repository: rC Clang https://reviews.llvm.org/D46863

[PATCH] D47277: [modules] Mark __wmmintrin_pclmul.h/__wmmintrin_aes.h as textual

2018-05-23 Thread Raphael Isemann via Phabricator via cfe-commits
teemperor edited reviewers, added: v.g.vassilev; removed: slydiman. teemperor added a comment. (Wrong Vassil, sorry) https://reviews.llvm.org/D47277 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D47277: [modules] Mark __wmmintrin_pclmul.h/__wmmintrin_aes.h as textual

2018-05-23 Thread Raphael Isemann via Phabricator via cfe-commits
teemperor created this revision. teemperor added reviewers: rsmith, slydiman. Since clang r332929 these two headers throw errors when included from somewhere else than their wrapper header. It seems marking them as textual is the best way to fix the builds. Fixes this new module build error:

[PATCH] D47122: [clang-tidy] SimplifyBoolenExpr doesn't add parens if unary negotiation is of ExprWithCleanups type

2018-05-23 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons added inline comments. Comment at: clang-tools-extra/trunk/clang-tidy/readability/SimplifyBooleanExprCheck.cpp:198 E = E->ignoreParenBaseCasts(); + if (const auto *EC = dyn_cast(E)) +E = EC->getSubExpr(); zinovy.nis wrote: > zinovy.nis

[PATCH] D47273: [bash-completion] Fix tab separation on macOS

2018-05-23 Thread Rui Ueyama via Phabricator via cfe-commits
ruiu added a comment. (I found that information at http://wiki.bash-hackers.org/scripting/bashchanges#quoting_expansions_substitutions_and_related) Repository: rC Clang https://reviews.llvm.org/D47273 ___ cfe-commits mailing list

[PATCH] D47273: [bash-completion] Fix tab separation on macOS

2018-05-23 Thread Rui Ueyama via Phabricator via cfe-commits
ruiu added a comment. Looks like $'' is there since bash 2.0 which should be pretty safe to use in the script. So feel free to use $'' instead of $(echo ...) in this patch. Repository: rC Clang https://reviews.llvm.org/D47273 ___ cfe-commits

[PATCH] D47273: [bash-completion] Fix tab separation on macOS

2018-05-23 Thread Rui Ueyama via Phabricator via cfe-commits
ruiu added a comment. Oh, I didn't know the existence of $''. Thank you for the suggestion! I wonder which version of bash started supporting that notation. Do you know if all recent versions of bash support it? Unfortunately `$'' bash` is very hard query to google... Repository: rC Clang

[PATCH] D47273: [bash-completion] Fix tab separation on macOS

2018-05-23 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir added a comment. In https://reviews.llvm.org/D47273#1109985, @ruiu wrote: > sed -e "$(echo -e 's/\t.*//')" Yep, that works! Is there a reason you prefer that over the more succinct `$'s/\t.*//'`? Repository: rC Clang https://reviews.llvm.org/D47273

[PATCH] D45212: Add HIP toolchain

2018-05-23 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: lib/Driver/ToolChains/HIP.cpp:29-47 +static bool addBCLib(Compilation , const ArgList , + ArgStringList , ArgStringList LibraryPaths, + StringRef BCName) { + StringRef FullName; + bool

[PATCH] D47273: [bash-completion] Fix tab separation on macOS

2018-05-23 Thread Rui Ueyama via Phabricator via cfe-commits
ruiu added a comment. How about sed -e "$(echo -e 's/\t.*//')" ? Repository: rC Clang https://reviews.llvm.org/D47273 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D47267: [UnrollAndJam] Add unroll_and_jam pragma handling

2018-05-23 Thread Michael Kruse via Phabricator via cfe-commits
Meinersbur added a comment. In https://reviews.llvm.org/D47267#1109912, @dmgreen wrote: > > Could we maybe disable the #pragma clang loop unroll_and_jam spelling ftm > > to avoid compatibility issues? > > Sure, I'm not against. It sounds like you have opinions on how this should > work. That's

[PATCH] D47273: [bash-completion] Fix tab separation on macOS

2018-05-23 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir added a comment. In https://reviews.llvm.org/D47273#1109934, @ruiu wrote: > I wonder if you could replace \t with \0x09. At least it works on my machine > which has GNU sed. Unfortunately that doesn't work either on mac :-\ Repository: rC Clang https://reviews.llvm.org/D47273

[PATCH] D47274: [clangd] Serve comments for headers decls from dynamic index only

2018-05-23 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov created this revision. ilya-biryukov added a reviewer: sammccall. Herald added subscribers: jkorous, MaskRay, ioeric, klimek. To fix a crash in code completion that occurrs when reading doc comments from files that were updated after the preamble was computed. In that case, the

[PATCH] D47273: [bash-completion] Fix tab separation on macOS

2018-05-23 Thread Rui Ueyama via Phabricator via cfe-commits
ruiu added a comment. Even though Perl may be installed to 99.99% of machines that use this autocomplete script, using perl instead of sed is too much. If we could use perl, we'd have wrote this script entirely in perl in the first place. We shouldn't add a dependency to perl. I wonder if you

[PATCH] D47097: [DebugInfo] Preserve scope in auto generated StoreInst

2018-05-23 Thread Adrian Prantl via Phabricator via cfe-commits
aprantl added inline comments. Comment at: lib/CodeGen/CGExpr.cpp:72 + // Set debug location in order to preserve the scope + Alloca->setDebugLoc(Builder.getCurrentDebugLocation()); if (AllocaAddr) vsk wrote: > I think we need to be a bit more careful here.

[PATCH] D47272: [clangd] Build index on preamble changes instead of the AST changes

2018-05-23 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 148262. ilya-biryukov added a comment. - Added forgotten renames Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D47272 Files: clangd/ClangdServer.cpp clangd/ClangdUnit.cpp clangd/ClangdUnit.h clangd/TUScheduler.cpp

[PATCH] D47260: Testcase for dwarf 5 crash/assert when calculating a checksum for an expansion

2018-05-23 Thread Adrian Prantl via Phabricator via cfe-commits
aprantl added a comment. Once we encounter a # directive we are (most likely) looking at some form of preprocessed source and that means that the checksum will inevitably be different than what we would have gotten were we reading the file directly, because of the preprocessing. At this point

[PATCH] D47272: [clangd] Build index on preamble changes instead of the AST changes

2018-05-23 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. @malaperle, a slight offtopic. I was wondering which completion options do you use for clangd? Defaults? Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D47272 ___ cfe-commits mailing list

r333110 - [X86] Move all Intel defined intrinsic includes into immintrin.h

2018-05-23 Thread Craig Topper via cfe-commits
Author: ctopper Date: Wed May 23 11:32:58 2018 New Revision: 333110 URL: http://llvm.org/viewvc/llvm-project?rev=333110=rev Log: [X86] Move all Intel defined intrinsic includes into immintrin.h This matches the Intel documentation which shows them available by importing immintrin.h. x86intrin.h

[PATCH] D47272: [clangd] Build index on preamble changes instead of the AST changes

2018-05-23 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added a comment. In https://reviews.llvm.org/D47272#1109914, @ilya-biryukov wrote: > In https://reviews.llvm.org/D47272#1109909, @malaperle wrote: > > > > We do not to rely on symbols from the main file anyway, since any info > > > hat those provide can always be taken from the AST. >

[PATCH] D47182: [X86] Move all Intel defined intrinsic includes into immintrin.h

2018-05-23 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL333110: [X86] Move all Intel defined intrinsic includes into immintrin.h (authored by ctopper, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D47272: [clangd] Build index on preamble changes instead of the AST changes

2018-05-23 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. In https://reviews.llvm.org/D47272#1109909, @malaperle wrote: > > We do not to rely on symbols from the main file anyway, since any info hat > > those provide can always be taken from the AST. > > I'll be adding those soon for workspace symbols... And also for

[PATCH] D46084: [Fixed Point Arithmetic] Addition of the Fixed Point _Accum type

2018-05-23 Thread JF Bastien via Phabricator via cfe-commits
jfb added a comment. > Actually, scratch that. We will be enabling it since GCC does. Will update > this and other relevant C++ related code appropriately. Could you also add tests which mix _Accum with volatile, _Atomic, _Complex, constexpr, inline? Repository: rC Clang

[PATCH] D47267: [UnrollAndJam] Add unroll_and_jam pragma handling

2018-05-23 Thread Dave Green via Phabricator via cfe-commits
dmgreen added a comment. > In my experience, they are used. Good to know, cheers. > Could we maybe disable the #pragma clang loop unroll_and_jam spelling ftm to > avoid compatibility issues? Sure, I'm not against. It sounds like you have opinions on how this should work. That's good. If

[PATCH] D47272: [clangd] Build index on preamble changes instead of the AST changes

2018-05-23 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added a comment. > We do not to rely on symbols from the main file anyway, since any info hat > those provide can always be taken from the AST. I'll be adding those soon for workspace symbols... And also for document symbols. Repository: rCTE Clang Tools Extra

[PATCH] D47273: [bash-completion] Fix tab separation on macOS

2018-05-23 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir created this revision. benlangmuir added reviewers: yamaguchi, v.g.vassilev, ruiu, teemperor. Herald added a subscriber: cfe-commits. We have a regex that needs to match a tab character in the command output, but on macOS `sed` doesn't support '\t', causing it to split on the 't'

[PATCH] D47272: [clangd] Build index on preamble changes instead of the AST changes

2018-05-23 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov created this revision. ilya-biryukov added reviewers: ioeric, sammccall. Herald added subscribers: jkorous, MaskRay, javed.absar, klimek. This is more efficient and avoids data races when reading files that come from the preamble. The staleness can occur when reading a file from

[PATCH] D46084: [Fixed Point Arithmetic] Addition of the Fixed Point _Accum type

2018-05-23 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added inline comments. Comment at: include/clang/Basic/DiagnosticCommonKinds.td:172 +def err_fixed_point_only_allowed_in_c : Error< + "Fixed point types are only allowed in C">; leonardchan wrote: > rsmith wrote: > > Diagnostics should not be

[PATCH] D47182: [X86] Move all Intel defined intrinsic includes into immintrin.h

2018-05-23 Thread David Kreitzer via Phabricator via cfe-commits
DavidKreitzer accepted this revision. DavidKreitzer added a comment. This revision is now accepted and ready to land. Thanks, Craig. LGTM. https://reviews.llvm.org/D47182 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D45015: [Preprocessor] Allow libc++ to detect when aligned allocation is unavailable.

2018-05-23 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. Somewhat tangential, in discussion with Duncan he mentioned that `-nostdinc++` should turn off assumptions about old Darwin. So if you build libc++ yourself, you don't care what does the system stdlib support. I agree with that and think it doesn't interfere with the

[PATCH] D47182: [X86] Move all Intel defined intrinsic includes into immintrin.h

2018-05-23 Thread Craig Topper via Phabricator via cfe-commits
craig.topper updated this revision to Diff 148252. craig.topper added a comment. Add back popcntintrin.h https://reviews.llvm.org/D47182 Files: lib/Headers/cldemoteintrin.h lib/Headers/clzerointrin.h lib/Headers/immintrin.h lib/Headers/movdirintrin.h lib/Headers/pconfigintrin.h

[PATCH] D46187: [Analyzer] getRegisteredCheckers(): handle debug checkers too.

2018-05-23 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri abandoned this revision. lebedev.ri added a comment. Sad, but ok. Repository: rC Clang https://reviews.llvm.org/D46187 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D46188: [clang-tidy] Add a flag to enable debug checkers

2018-05-23 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri abandoned this revision. lebedev.ri added a comment. https://reviews.llvm.org/D46187#1098571 Sad, but ok. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D46188 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[libcxx] r333108 - Do not define template specialization __libcpp_is_floating_point<__fp16>

2018-05-23 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Wed May 23 10:50:41 2018 New Revision: 333108 URL: http://llvm.org/viewvc/llvm-project?rev=333108=rev Log: Do not define template specialization __libcpp_is_floating_point<__fp16> if the compiler is not clang. gcc doesn't allow using __fp16 on non-ARM targets. Modified:

[PATCH] D46822: [RISCV] Add driver for riscv32-unknown-elf baremetal target

2018-05-23 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang accepted this revision. mgrang added a comment. This revision is now accepted and ready to land. LGTM. Comment at: lib/Driver/ToolChains/Gnu.cpp:1885 + "riscv64-unknown-linux-gnu", +

[clang-tools-extra] r333104 - [Documentation] Fix link syntax in Release Notes.

2018-05-23 Thread Eugene Zelenko via cfe-commits
Author: eugenezelenko Date: Wed May 23 10:39:46 2018 New Revision: 333104 URL: http://llvm.org/viewvc/llvm-project?rev=333104=rev Log: [Documentation] Fix link syntax in Release Notes. Modified: clang-tools-extra/trunk/docs/ReleaseNotes.rst Modified:

[PATCH] D47097: [DebugInfo] Preserve scope in auto generated StoreInst

2018-05-23 Thread Vedant Kumar via Phabricator via cfe-commits
vsk added inline comments. Comment at: lib/CodeGen/CGExpr.cpp:72 + // Set debug location in order to preserve the scope + Alloca->setDebugLoc(Builder.getCurrentDebugLocation()); if (AllocaAddr) I think we need to be a bit more careful here. The current

[PATCH] D46867: [ASTImporter] Add unit tests for structural equivalence

2018-05-23 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin accepted this revision. a.sidorin added a comment. This revision is now accepted and ready to land. Hi Gabor, LGTM, thank you for addressing the comments! Just a minor nit, it's OK to fix it before committing without a separate review. Comment at:

[PATCH] D46084: [Fixed Point Arithmetic] Addition of the Fixed Point _Accum type

2018-05-23 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a subscriber: sammccall. leonardchan added inline comments. Comment at: include/clang/Basic/DiagnosticCommonKinds.td:172 +def err_fixed_point_only_allowed_in_c : Error< + "Fixed point types are only allowed in C">; rsmith wrote: >

r333094 - Test Commit. Fix namespace comment

2018-05-23 Thread Mikhail R. Gadelha via cfe-commits
Author: mramalho Date: Wed May 23 08:49:12 2018 New Revision: 333094 URL: http://llvm.org/viewvc/llvm-project?rev=333094=rev Log: Test Commit. Fix namespace comment Signed-off-by: Mikhail Ramalho Modified:

[libcxx] r333103 - Teach __libcpp_is_floating_point that __fp16 and _Float16 are

2018-05-23 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Wed May 23 10:31:09 2018 New Revision: 333103 URL: http://llvm.org/viewvc/llvm-project?rev=333103=rev Log: Teach __libcpp_is_floating_point that __fp16 and _Float16 are floating-point types. rdar://problem/40377353 Added:

[PATCH] D46944: [analyzer] Use sufficiently large types for index/size calculation.

2018-05-23 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin added a comment. Hi Bevin, Could you please address these comments? Comment at: include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h:89 SymMgr(context, BasicVals, alloc), MemMgr(context, alloc), -StateMgr(stateMgr),

[clang-tools-extra] r333100 - [Documentation] Move some Clang-tidy changes to proper sections.

2018-05-23 Thread Eugene Zelenko via cfe-commits
Author: eugenezelenko Date: Wed May 23 10:25:22 2018 New Revision: 333100 URL: http://llvm.org/viewvc/llvm-project?rev=333100=rev Log: [Documentation] Move some Clang-tidy changes to proper sections. Modified: clang-tools-extra/trunk/docs/ReleaseNotes.rst Modified:

[PATCH] D46943: [clangd] Boost scores for decls from current file in completion

2018-05-23 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. In https://reviews.llvm.org/D46943#1109199, @ioeric wrote: > > - Symbols store their paths as URIs ⇒ we need to parse them in order to > > apply heuristics. We could avoid that by writing a version of > > header-matching that also works on URIs, but that would

[PATCH] D47267: [UnrollAndJam] Add unroll_and_jam pragma handling

2018-05-23 Thread Michael Kruse via Phabricator via cfe-commits
Meinersbur added a comment. This is straightforward in that it clones the implementation of `#pragma unroll` for `unroll_and_jam`. Hence, it also shares the same problem of clang's LoopHints, namely that the order of loop transformations (if there are multiple on the same loop: loop

[PATCH] D47063: [clangd] Keep only a limited number of idle ASTs in memory

2018-05-23 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Having taken a closer look, I think the cache can be simplified/separated a bit more cleanly by returning shared pointers and not allowing lookups, instead restoring limited ownership in CppFile... Happy to discuss more, esp if you might disagree :)

  1   2   >