[PATCH] D64074: [OpenCL][Sema] Fix builtin rewriting

2019-07-03 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia accepted this revision. Anastasia added a comment. This revision is now accepted and ready to land. LGTM! Thanks! Comment at: clang/include/clang/Basic/Builtins.def:1516 // OpenCL v2.0 s6.13.9 - Address space qualifier functions. +// FIXME Pointer parameters of OpenC

[PATCH] D64147: [clangd] Make HadErrors part of background index's internal state

2019-07-03 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: sammccall. Herald added subscribers: cfe-commits, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D64147 Files: clang-tools-extra/clangd/index/Ba

[PATCH] D53157: Teach the IRBuilder about constrained fadd and friends

2019-07-03 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn updated this revision to Diff 207829. kpn added a comment. I was convinced in email that having the constrained intrinsics take fast math flags could be useful in some circumstances. The example that was given was that perhaps FMA contraction could be requested. So, when generating constrai

[PATCH] D63538: [CFG] Add a new function to get the proper condition of a CFGBlock

2019-07-03 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus updated this revision to Diff 207833. Szelethus retitled this revision from "[analyzer][CFG] Return the correct terminator condition" to "[CFG] Add a new function to get the proper condition of a CFGBlock". Szelethus edited the summary of this revision. Szelethus added a comment. Let's

[PATCH] D64133: [clangd] Add HadErrors field into shards

2019-07-03 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 207832. kadircet added a comment. - Populate HadErrors in background index Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64133/new/ https://reviews.llvm.org/D64133 Files: clang-tools-extra/clangd/Headers.h

[PATCH] D53157: Teach the IRBuilder about constrained fadd and friends

2019-07-03 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn marked 2 inline comments as done. kpn added inline comments. Comment at: include/llvm/IR/IRBuilder.h:1324 + return CreateConstrainedFPBinOp(Intrinsic::experimental_constrained_fadd, + L, R, nullptr, Name); + rjmccall

[PATCH] D64140: [CMake][Fuchsia] Define asan+noexcept multilib

2019-07-03 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr accepted this revision. mcgrathr added a comment. This revision is now accepted and ready to land. lgtm Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64140/new/ https://reviews.llvm.org/D64140 ___ cfe-commit

[PATCH] D64140: [CMake][Fuchsia] Define asan+noexcept multilib

2019-07-03 Thread Petr Hosek via Phabricator via cfe-commits
phosek created this revision. phosek added a reviewer: mcgrathr. Herald added subscribers: cfe-commits, mgorny. Herald added a project: clang. Using noexcept multilib with -fno-exceptions can lead to significant space savings when statically linking libc++abi because we don't need all the unwindin

[PATCH] D64133: [clangd] Add HadErrors field into shards

2019-07-03 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet marked an inline comment as done. kadircet added inline comments. Comment at: clang-tools-extra/clangd/Headers.h:65 struct IncludeGraphNode { - // True if current file is a main file rather than a header. - bool IsTU = false; + enum class SourceFlag : uint8_t { +

[PATCH] D64133: [clangd] Add HadErrors field into shards

2019-07-03 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added inline comments. This revision is now accepted and ready to land. Comment at: clang-tools-extra/clangd/Headers.h:65 struct IncludeGraphNode { - // True if current file is a main file rather than a header. - bool IsTU = false; +

[PATCH] D43159: Modernize: Use nullptr more.

2019-07-03 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added inline comments. Comment at: include/algorithm:4431 value_type* __p = __buff; -for (_BidirectionalIterator __i = __first; __i != __middle; __d.__incr((value_type*)0), (void) ++__i, ++__p) +for (_BidirectionalIterator __i = __first; __i

[PATCH] D43159: Modernize: Use nullptr more.

2019-07-03 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. In ``, you missed a couple of `(value_type*)0`. Line 3356, 3369, 3486 and 3499. Repository: rCXX libc++ CHANGES SINCE LAST ACTION https://reviews.llvm.org/D43159/new/ https://reviews.llvm.org/D43159 ___ cfe-commit

[PATCH] D43159: Modernize: Use nullptr more.

2019-07-03 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists requested changes to this revision. mclow.lists added a comment. This revision now requires changes to proceed. Did you try to build libc++ or run the tests before submitting this? Comment at: include/__threading_support:323 bool __libcpp_thread_isnull(const __libc

[PATCH] D64067: [X86][PPC] Support -mlong-double-64

2019-07-03 Thread Andy Kaylor via Phabricator via cfe-commits
andrew.w.kaylor added a comment. In this review (https://reviews.llvm.org/D6260) @rsmith mentions that this should also have an effect on name mangling. What will this do if the user calls a library function that expects a long double? What does gcc do in that case? Repository: rC Clang CH

[PATCH] D64137: [clangd] Add a hidden tweak to annotate all highlighting tokens of the file.

2019-07-03 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added reviewers: sammccall, jvikstrom. Herald added subscribers: kadircet, arphaman, jkorous, MaskRay, ilya-biryukov, mgorny. Herald added a project: clang. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D64137 Files: clang-tools-extra/clan

[PATCH] D61749: [clang-tidy] initial version of readability-static-const-method

2019-07-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tools-extra/clang-tidy/readability/ReadabilityTidyModule.cpp:96 +CheckFactories.registerCheck( +"readability-static-method"); CheckFactories.registerCheck( I'm not super keen on the check na

[PATCH] D64067: [X86][PPC] Support -mlong-double-64

2019-07-03 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 207795. MaskRay added a comment. Make powerpc* musl default to 64-bit long double Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64067/new/ https://reviews.llvm.org/D64067 Files: include/clang/Basic/LangOptions.def includ

[PATCH] D62329: [ASTImporter] Structural eq: handle DependentScopeDeclRefExpr

2019-07-03 Thread Gabor Marton via Phabricator via cfe-commits
martong marked 2 inline comments as done. martong added inline comments. Comment at: cfe/trunk/lib/AST/ASTStructuralEquivalence.cpp:173 +DE2->getQualifier()); + } else if (auto CastE1 = dyn_cast(E1)) { +auto *CastE2 = dyn_cast(E2); ---

[PATCH] D64133: [clangd] Add HadErrors field into shards

2019-07-03 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 207793. kadircet added a comment. - Delete leftover header swap Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64133/new/ https://reviews.llvm.org/D64133 Files: clang-tools-extra/clangd/Headers.h clang-too

[PATCH] D64133: [clangd] Add HadErrors field into shards

2019-07-03 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: sammccall. Herald added subscribers: cfe-commits, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D64133 Files: clang-tools-extra/clangd/Headers.

[PATCH] D63920: [CTU] Add support for virtual functions

2019-07-03 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. In D63920#1568269 , @martong wrote: > So, we would like to have a test which indicates that we can inline a virtual > function from another TU. These tests are at line 110 and 111. > > At line 113 we would like to have a test wh

[PATCH] D63767: [NFC] Make some ObjectFormatType switches covering

2019-07-03 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. Ping. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63767/new/ https://reviews.llvm.org/D63767 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://li

[PATCH] D63919: [clangd] Emit publishSemanticHighlighting in LSP if enabled

2019-07-03 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 207783. jvikstrom marked 7 inline comments as done. jvikstrom added a comment. Addressed comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63919/new/ https://reviews.llvm.org/D63919 Files: clang-tool

[PATCH] D63919: [clangd] Emit publishSemanticHighlighting in LSP if enabled

2019-07-03 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. mostly good, a few more nits. Comment at: clang-tools-extra/clangd/Protocol.h:1187 +}; + +bool operator==(const SemanticHighlightingInformation &Lhs, nit: remove the blank line to be consistent with the existing style in this file. ==

[PATCH] D63538: [analyzer][CFG] Return the correct terminator condition

2019-07-03 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus reopened this revision. Szelethus added a comment. This revision is now accepted and ready to land. Causes crashes on Sema. Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63538/new/ https://reviews.llvm.org/D63538 __

[PATCH] D64073: [ASTImporter] Fix import of lambda in function param

2019-07-03 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 207776. martong marked an inline comment as done. martong added a comment. - 'the ' -> 'the ' - Use std::distance() Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64073/new/ https://reviews.llvm.org/D64073 Fil

[PATCH] D64073: [ASTImporter] Fix import of lambda in function param

2019-07-03 Thread Gabor Marton via Phabricator via cfe-commits
martong marked 3 inline comments as done. martong added a comment. Thanks for the review Alexei! Comment at: clang/unittests/AST/ASTImporterTest.cpp:5103 + // count. + for (auto &D : ToL->decls()) { +(void)D; a_sidorin wrote: > Can we use std::distance in

[PATCH] D64075: [ASTImporter] Fix structural eq of lambdas

2019-07-03 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 207774. martong marked an inline comment as done. martong added a comment. - Add check for isLambda() Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64075/new/ https://reviews.llvm.org/D64075 Files: clang/lib

[PATCH] D64075: [ASTImporter] Fix structural eq of lambdas

2019-07-03 Thread Gabor Marton via Phabricator via cfe-commits
martong marked 2 inline comments as done. martong added inline comments. Comment at: clang/lib/AST/ASTStructuralEquivalence.cpp:1182 + if (D1CXX->isLambda()) { +if (!D2CXX->isLambda()) a_sidorin wrote: > Should we return false if `D1CXX->isLambda()

[PATCH] D63417: [RISCV] Specify registers used for exception handling

2019-07-03 Thread Alex Bradbury via Phabricator via cfe-commits
asb added a comment. Ed, if you haven't already could you request commit access so you can commit these approved patches yourself? See https://llvm.org/docs/DeveloperPolicy.html#obtaining-commit-access for details. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63417/new/ https://revie

r365037 - Revert "[analyzer][CFG] Return the correct terminator condition"

2019-07-03 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Wed Jul 3 06:03:33 2019 New Revision: 365037 URL: http://llvm.org/viewvc/llvm-project?rev=365037&view=rev Log: Revert "[analyzer][CFG] Return the correct terminator condition" This reverts commit 7a57118a6fcfa3770f984453543bbdfd0b233e84. Causes a bunch of crashes, I need

[PATCH] D63936: [clang][Driver][ARM] Favor -mfpu over default CPU features

2019-07-03 Thread Alexandros Lamprineas via Phabricator via cfe-commits
labrinea added inline comments. Comment at: llvm/lib/Support/ARMTargetParser.cpp:412 - if (Extensions & AEK_CRC) -Features.push_back("+crc"); - else -Features.push_back("-crc"); - - if (Extensions & AEK_DSP) -Features.push_back("+dsp"); - else -Features.push

[PATCH] D63538: [analyzer][CFG] Return the correct terminator condition

2019-07-03 Thread Kristóf Umann via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL365036: [analyzer][CFG] Return the correct terminator condition (authored by Szelethus, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: ht

[PATCH] D63920: [CTU] Add support for virtual functions

2019-07-03 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. In D63920#1568049 , @Szelethus wrote: > In D63920#1568031 , @martong wrote: > > > In D63920#1566035 , > > @baloghadamsoftware wrote: > > > > > Try t

r365036 - [analyzer][CFG] Return the correct terminator condition

2019-07-03 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Wed Jul 3 05:53:19 2019 New Revision: 365036 URL: http://llvm.org/viewvc/llvm-project?rev=365036&view=rev Log: [analyzer][CFG] Return the correct terminator condition For the following terminator statement: if (A && B && C && D) The built CFG is the following: [B5 (ENTR

[PATCH] D63538: [analyzer][CFG] Return the correct terminator condition

2019-07-03 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus requested review of this revision. Szelethus added a comment. This revision is now accepted and ready to land. Seems fine over here let's see what happens if I try to land it? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63538/new/ https://reviews.llvm.org/D63538 _

[PATCH] D63417: [RISCV] Specify registers used for exception handling

2019-07-03 Thread Edward Jones via Phabricator via cfe-commits
edward-jones updated this revision to Diff 207769. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63417/new/ https://reviews.llvm.org/D63417 Files: lib/Basic/Targets/RISCV.h test/CodeGen/builtins-riscv.c Index: test/CodeGen/builtins-riscv.c ==

r365031 - Fix -Wcast-qual const warning. NFCI.

2019-07-03 Thread Simon Pilgrim via cfe-commits
Author: rksimon Date: Wed Jul 3 05:20:28 2019 New Revision: 365031 URL: http://llvm.org/viewvc/llvm-project?rev=365031&view=rev Log: Fix -Wcast-qual const warning. NFCI. Modified: cfe/trunk/lib/AST/ExprConstant.cpp Modified: cfe/trunk/lib/AST/ExprConstant.cpp URL: http://llvm.org/viewvc/ll

[PATCH] D63417: [RISCV] Specify registers used for exception handling

2019-07-03 Thread Alex Bradbury via Phabricator via cfe-commits
asb added inline comments. Comment at: test/CodeGen/builtins-riscv.c:4 + +void test_eh_return_data_regno() +{ Nit: having `{` on this line would be more consistent with usual LLVM style CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63417/new/ https://r

[PATCH] D64128: [CodeGen] Generate llvm.ptrmask instead of inttoptr(and(ptrtoint, C)) if possible.

2019-07-03 Thread Florian Hahn via Phabricator via cfe-commits
fhahn updated this revision to Diff 207761. fhahn marked 2 inline comments as done. fhahn added a comment. Use IgnoreParens(). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64128/new/ https://reviews.llvm.org/D64128 Files: clang/lib/CodeGen/CGEx

[PATCH] D64128: [CodeGen] Generate llvm.ptrmask instead of inttoptr(and(ptrtoint, C)) if possible.

2019-07-03 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added inline comments. Comment at: clang/lib/CodeGen/CGExprScalar.cpp:2025 + + auto *CE = dyn_cast(peelParens(BO->getLHS())); + if (!CE || CE->getCastKind() != CK_PointerToIntegral) xbolva00 wrote: > BO->getLHS()->IgnoreParens() ? That's very useful, than

[PATCH] D63417: [RISCV] Specify registers used for exception handling

2019-07-03 Thread Alex Bradbury via Phabricator via cfe-commits
asb accepted this revision. asb added a comment. This revision is now accepted and ready to land. Thanks, looks good to me! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63417/new/ https://reviews.llvm.org/D63417 ___ cfe-commits mailing lis

[PATCH] D62611: [analyzer][Dominators] Add unittests

2019-07-03 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus updated this revision to Diff 207759. Szelethus added a comment. Fixes according to reviewer comments! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62611/new/ https://reviews.llvm.org/D62611 Files: clang/unittests/Analysis/CFGBuildResult.h clang/unittests/Analysis/CFGDom

r365030 - Make a buildbot using a buggy gcc happy

2019-07-03 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Wed Jul 3 05:06:10 2019 New Revision: 365030 URL: http://llvm.org/viewvc/llvm-project?rev=365030&view=rev Log: Make a buildbot using a buggy gcc happy When specializing a template in a namespace, it has to be in a namespace block, else gcc will get confused. Hopefully thi

[PATCH] D64128: [CodeGen] Generate llvm.ptrmask instead of inttoptr(and(ptrtoint, C)) if possible.

2019-07-03 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added inline comments. Comment at: clang/lib/CodeGen/CGExprScalar.cpp:2025 + + auto *CE = dyn_cast(peelParens(BO->getLHS())); + if (!CE || CE->getCastKind() != CK_PointerToIntegral) BO->getLHS()->IgnoreParens() ? Repository: rG LLVM Github Monorepo

[PATCH] D64127: [clangd] Deduplicate clang-tidy diagnostic messages.

2019-07-03 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 207760. hokein added a comment. Revert the LSPDiagnosticCompare change in rL363889 . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64127/new/ https://reviews.llvm.org/D64127

[PATCH] D64127: [clangd] Deduplicate clang-tidy diagnostic messages.

2019-07-03 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. In D64127#1568093 , @kadircet wrote: > Could you also revert changes in `LSPDiagnosticCompare` in `Protocol.h`, that > were introduced by rL363889 ? (or bring > back `fixits-duplication.test`)

[PATCH] D63919: [clangd] Emit publishSemanticHighlighting in LSP if enabled

2019-07-03 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom marked an inline comment as done. jvikstrom added inline comments. Comment at: clang-tools-extra/clangd/SemanticHighlighting.cpp:138 + for (const auto &Line : TokenLines) { +llvm::SmallVector LineHighlights; +llvm::raw_svector_ostream OS(LineHighlights); --

[PATCH] D63919: [clangd] Emit publishSemanticHighlighting in LSP if enabled

2019-07-03 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 207758. jvikstrom marked 8 inline comments as done. jvikstrom added a comment. Not sending TextMate scopes over LSP if semantic highlighting is not enabled. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63919/

r365029 - Specialize an anchor() function in the correct namespace

2019-07-03 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Wed Jul 3 04:54:47 2019 New Revision: 365029 URL: http://llvm.org/viewvc/llvm-project?rev=365029&view=rev Log: Specialize an anchor() function in the correct namespace Modified: cfe/trunk/lib/Analysis/Dominators.cpp Modified: cfe/trunk/lib/Analysis/Dominators.cpp URL

[PATCH] D62551: [analyzer][Dominator] Add post dominator tree builder for the CFG + a debug checker

2019-07-03 Thread Kristóf Umann via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL365028: [analyzer][Dominator] Add post dominators to CFG + a new debug checker (authored by Szelethus, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior

r365028 - [analyzer][Dominator] Add post dominators to CFG + a new debug checker

2019-07-03 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Wed Jul 3 04:39:12 2019 New Revision: 365028 URL: http://llvm.org/viewvc/llvm-project?rev=365028&view=rev Log: [analyzer][Dominator] Add post dominators to CFG + a new debug checker Transform clang::DominatorTree to be able to also calculate post dominators. * Tidy up th

[PATCH] D63915: [analyzer] ReturnValueChecker: Model the guaranteed boolean return value of function calls

2019-07-03 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. This checker seems to only check LLVM functions, but doesn't check whether these methods lie in the LLVM namespace. Is this intended? Comment at: clang/include/clang/StaticAnalyzer/Checkers/Checkers.td:98-100 +// The APIModeling package is for checke

[PATCH] D64128: [CodeGen] Generate llvm.ptrmask instead of inttoptr(and(ptrtoint, C)) if possible.

2019-07-03 Thread Florian Hahn via Phabricator via cfe-commits
fhahn updated this revision to Diff 207754. fhahn added a comment. Strip away llvm changes, use ABIAlignment for address space. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64128/new/ https://reviews.llvm.org/D64128 Files: clang/lib/CodeGen/CGE

[PATCH] D62507: [Dominators] PR42041: Skip nullpointer successors

2019-07-03 Thread Kristóf Umann via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL365026: [Dominators] PR42041: Skip nullpointer successors (authored by Szelethus, committed by ). Changed prior to commit: https://reviews.llvm.org/D62507?vs=201994&id=207753#toc Repository: rL LLVM

r365026 - [Dominators] PR42041: Skip nullpointer successors

2019-07-03 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Wed Jul 3 04:14:42 2019 New Revision: 365026 URL: http://llvm.org/viewvc/llvm-project?rev=365026&view=rev Log: [Dominators] PR42041: Skip nullpointer successors https://bugs.llvm.org/show_bug.cgi?id=42041 In Clang's CFG, we use nullpointers to represent unreachable nodes

[PATCH] D64129: [clang-scan-view] Force utf-8 when handling report (python2 only)

2019-07-03 Thread serge via Phabricator via cfe-commits
serge-sans-paille created this revision. serge-sans-paille added a reviewer: michaelplatings. Herald added a project: clang. Herald added a subscriber: cfe-commits. If the report file contains unicode characters, under Python2, opening the file does not decode it to utf-8 by default. Repository

[PATCH] D64128: [CodeGen] Generate llvm.ptrmask instead of inttoptr(and(ptrtoint, C)) if possible.

2019-07-03 Thread Florian Hahn via Phabricator via cfe-commits
fhahn created this revision. fhahn added reviewers: jfb, rsmith, rjmccall, efriedma, hfinkel. Herald added subscribers: llvm-commits, dexonsmith, hiraditya. Herald added projects: clang, LLVM. I am not sure if this is the best way to do the matching and would appreciate any pointers for improving

[PATCH] D63919: [clangd] Emit publishSemanticHighlighting in LSP if enabled

2019-07-03 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clang-tools-extra/clangd/ClangdLSPServer.cpp:409 }}, +{"semanticHighlighting", + llvm::json::Object{{"scopes", getTextMateScopeLookupTable()}}}, The proposal says `If the client decla

[PATCH] D64123: Add clang-llvm-rename tool.

2019-07-03 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. There is clang-rename already. May be new functionality should be added there? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64123/new/ ht

[PATCH] D59798: [analyzer] Add analyzer option to limit the number of imported TUs

2019-07-03 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added inline comments. Comment at: test/Analysis/ctu-import-threshold.c:1-5 +// Ensure analyzer option 'ctu-import-threshold' is a recognized option. +// +// RUN: %clang_cc1 -analyze -analyzer-config ctu-import-threshold=30 -verify %s +// +// expected-no-diagnostics ---

[PATCH] D64127: [clangd] Deduplicate clang-tidy diagnostic messages.

2019-07-03 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. Could you also revert changes in `LSPDiagnosticCompare` in `Protocol.h`, that were introduced by rL363889 ? (or bring back `fixits-duplication.test`) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.

[PATCH] D63876: [OpenCL] Define CLK_NULL_EVENT without cast

2019-07-03 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh added a comment. In D63876#1565004 , @Anastasia wrote: > btw, there seems to be the same issue with `reserve_id_t`? Yes, `CLK_NULL_RESERVE_ID` has the same cast. I don't have any use case that is affected by it at the moment, so I left it out of

r365019 - Fix MSVC "signed/unsigned mismatch" warning. NFCI.

2019-07-03 Thread Simon Pilgrim via cfe-commits
Author: rksimon Date: Wed Jul 3 03:26:28 2019 New Revision: 365019 URL: http://llvm.org/viewvc/llvm-project?rev=365019&view=rev Log: Fix MSVC "signed/unsigned mismatch" warning. NFCI. Fixes PR42426. Modified: cfe/trunk/lib/Basic/SourceManager.cpp Modified: cfe/trunk/lib/Basic/SourceManager

r365017 - [clang-tidy] Fix the YAML created for checks like modernize-pass-by-value

2019-07-03 Thread Ivan Donchevskii via cfe-commits
Author: yvvan Date: Wed Jul 3 03:21:50 2019 New Revision: 365017 URL: http://llvm.org/viewvc/llvm-project?rev=365017&view=rev Log: [clang-tidy] Fix the YAML created for checks like modernize-pass-by-value Currently this check generates the replacement with the newline in the end. The proper way

[PATCH] D63482: [clang-tidy] Fix the YAML created for checks like modernize-pass-by-value

2019-07-03 Thread Ivan Donchevskii via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL365017: [clang-tidy] Fix the YAML created for checks like modernize-pass-by-value (authored by yvvan, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior t

[PATCH] D61879: WIP: Prototype of DSE optimizations for -ftrivial-auto-var-init

2019-07-03 Thread Alexander Potapenko via Phabricator via cfe-commits
glider added inline comments. Comment at: llvm/lib/Transforms/Scalar/DeadStoreEliminationExpGlobal.cpp:20 + +static const GlobalValue::GUID GUIDS_LOOKUP[] = { +// grep -P -o "(?<=LOOKUP_FN: ).*" | sort -u > error: zero-size array ‘llvm::GUIDS_LOOKUP’ Can you p

[PATCH] D63482: [clang-tidy] Fix the YAML created for checks like modernize-pass-by-value

2019-07-03 Thread Ivan Donchevskii via Phabricator via cfe-commits
yvvan added a comment. ok, will do it through svn. i forgot that clang repo is called "cfe" so it's there CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63482/new/ https://reviews.llvm.org/D63482 ___ cfe-commits mailing list cfe-commits@lis

[PATCH] D59798: [analyzer] Add analyzer option to limit the number of imported TUs

2019-07-03 Thread Gabor Marton via Phabricator via cfe-commits
martong accepted this revision. martong added inline comments. This revision is now accepted and ready to land. Comment at: include/clang/StaticAnalyzer/Core/AnalyzerOptions.def:297 +"for import when inlining functions during CTU analysis. " +"Lowe

[PATCH] D61879: WIP: Prototype of DSE optimizations for -ftrivial-auto-var-init

2019-07-03 Thread Alexander Potapenko via Phabricator via cfe-commits
glider added a comment. Vitaly, can you please rebase the patch? As far as I can see, you've submitted parts of it already. (not that I can't resolve the conflicts locally, but keeping it up-to-date may save others some time) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION ht

[PATCH] D63920: [CTU] Add support for virtual functions

2019-07-03 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. In D63920#1568031 , @martong wrote: > In D63920#1566035 , > @baloghadamsoftware wrote: > > > Try to set analyzer option `IPAMode` to something different from its > > default value which

[PATCH] D64127: [clangd] Deduplicate clang-tidy diagnostic messages.

2019-07-03 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: sammccall. Herald added subscribers: kadircet, arphaman, mgrang, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. Clang-tidy checks may emit duplicated messages (clang-tidy tool deduplicate them in its custom diagnostic consume

r365012 - Fix MSVC "not all control paths return a value" warnings. NFCI.

2019-07-03 Thread Simon Pilgrim via cfe-commits
Author: rksimon Date: Wed Jul 3 02:54:25 2019 New Revision: 365012 URL: http://llvm.org/viewvc/llvm-project?rev=365012&view=rev Log: Fix MSVC "not all control paths return a value" warnings. NFCI. Modified: cfe/trunk/lib/AST/ExprConstant.cpp Modified: cfe/trunk/lib/AST/ExprConstant.cpp URL:

[PATCH] D63482: [clang-tidy] Fix the YAML created for checks like modernize-pass-by-value

2019-07-03 Thread Ivan Donchevskii via Phabricator via cfe-commits
yvvan added a comment. This script does not seem to work properly on windows. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63482/new/ https://reviews.llvm.org/D63482 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llv

[PATCH] D63920: [CTU] Add support for virtual functions

2019-07-03 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 207738. martong added a comment. - Use -analyzer-config ipa=inlining in the test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63920/new/ https://reviews.llvm.org/D63920 Files: clang/lib/StaticAnalyzer/Core/

[PATCH] D63920: [CTU] Add support for virtual functions

2019-07-03 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. In D63920#1566035 , @baloghadamsoftware wrote: > Try to set analyzer option `IPAMode` to something different from its default > value which is `dynamic-bifurcate` in the test file. Ok I set it to `ipa=inlining` and then we rece

[PATCH] D63417: [RISCV] Specify registers used for exception handling

2019-07-03 Thread Edward Jones via Phabricator via cfe-commits
edward-jones updated this revision to Diff 207736. edward-jones added a comment. Add riscv64 target run line, renamed test file to builtins-riscv.c, and rebased. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63417/new/ https://reviews.llvm.org/D63417 Files: lib/Basic/Targets/RISCV.h

[PATCH] D63623: [clang-tidy] new check: bugprone-posix-return

2019-07-03 Thread Dmitri Gribenko via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL365007: [clang-tidy] new check: bugprone-posix-return (authored by gribozavr, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: https://revi

[PATCH] D63623: [clang-tidy] new check: bugprone-posix-return

2019-07-03 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr added a comment. Committed revision 365007. Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63623/new/ https://reviews.llvm.org/D63623 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm

[clang-tools-extra] r365007 - [clang-tidy] new check: bugprone-posix-return

2019-07-03 Thread Dmitri Gribenko via cfe-commits
Author: gribozavr Date: Wed Jul 3 02:20:18 2019 New Revision: 365007 URL: http://llvm.org/viewvc/llvm-project?rev=365007&view=rev Log: [clang-tidy] new check: bugprone-posix-return Summary: Checks if any calls to posix functions (except posix_openpt) expect negative return values. These functio

[PATCH] D64048: [TargetParser][ARM] Account dependencies when processing target features

2019-07-03 Thread Oliver Stannard (Linaro) via Phabricator via cfe-commits
ostannard accepted this revision. ostannard 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/D64048/new/ https://reviews.llvm.org/D64048 _

[PATCH] D63482: [clang-tidy] Fix the YAML created for checks like modernize-pass-by-value

2019-07-03 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr added a comment. SVN repo is still there. However, I don't know how to commit using SVN, I commit using the git-svn integration (which still commits using the "svn" command under the hood, but as a user you will be interacting with a git repo). git clone https://github.com/llvm/llv

[PATCH] D63482: [clang-tidy] Fix the YAML created for checks like modernize-pass-by-value

2019-07-03 Thread Nikolai Kosjar via Phabricator via cfe-commits
nik added a comment. In D63482#1567897 , @yvvan wrote: > I have a commit access but I don't understand how am I supposed to commit > (haven't done that for a while). There's no clang svn repo anymore. Do you > know what's the current state of repositorie

[PATCH] D63482: [clang-tidy] Fix the YAML created for checks like modernize-pass-by-value

2019-07-03 Thread Nikolai Kosjar via Phabricator via cfe-commits
nik added a comment. In D63482#1567927 , @nik wrote: > In D63482#1567897 , @yvvan wrote: > > > I have a commit access but I don't understand how am I supposed to commit > > (haven't done that for a while). There's

[PATCH] D63936: [clang][Driver][ARM] Favor -mfpu over default CPU features

2019-07-03 Thread Oliver Stannard (Linaro) via Phabricator via cfe-commits
ostannard added inline comments. Comment at: llvm/lib/Support/ARMTargetParser.cpp:412 - if (Extensions & AEK_CRC) -Features.push_back("+crc"); - else -Features.push_back("-crc"); - - if (Extensions & AEK_DSP) -Features.push_back("+dsp"); - else -Features.pus

[PATCH] D64123: Add clang-llvm-rename tool.

2019-07-03 Thread Rui Ueyama via Phabricator via cfe-commits
ruiu created this revision. Herald added subscribers: cfe-commits, jfb, mgorny. Herald added a project: clang. ruiu planned changes to this revision. Currently, this tool can rename variables in lld's source tree without breaking it, but it is very unlikely that it will work on any other LLVM subd

[PATCH] D63482: [clang-tidy] Fix the YAML created for checks like modernize-pass-by-value

2019-07-03 Thread Ivan Donchevskii via Phabricator via cfe-commits
yvvan added a comment. I have a commit access but I don't understand how am I supposed to commit (haven't done that for a while). There's no clang svn repo anymore. Do you know what's the current state of repositories and where to commit? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D6

[PATCH] D48866: [clang-tidy] Add incorrect-pointer-cast checker

2019-07-03 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added a comment. What do you think, what should I improve in this checker? Your remarks, @lebedev.ri, were really valuable. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D48866/new/ https://reviews.llvm.org/D48866 ___ cfe-commits ma

r365006 - Change std::{lower, upper}_bound to llvm::{lower, upper}_bound or llvm::partition_point. NFC

2019-07-03 Thread Fangrui Song via cfe-commits
Author: maskray Date: Wed Jul 3 01:13:17 2019 New Revision: 365006 URL: http://llvm.org/viewvc/llvm-project?rev=365006&view=rev Log: Change std::{lower,upper}_bound to llvm::{lower,upper}_bound or llvm::partition_point. NFC Modified: cfe/trunk/include/clang/Serialization/ContinuousRangeMap.

[PATCH] D64018: [clangd] Store hash of command line in index shards.

2019-07-03 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 207721. kadircet marked 2 inline comments as done. kadircet added a comment. - Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64018/new/ https://reviews.llvm.org/D64018 Files: clang-tools-ex

r365005 - [clang][HeaderSearch] Shorten paths for includes in mainfile's directory

2019-07-03 Thread Kadir Cetinkaya via cfe-commits
Author: kadircet Date: Wed Jul 3 00:47:19 2019 New Revision: 365005 URL: http://llvm.org/viewvc/llvm-project?rev=365005&view=rev Log: [clang][HeaderSearch] Shorten paths for includes in mainfile's directory Summary: Currently HeaderSearch only looks at SearchDir's passed into it, but in addition

[PATCH] D63295: [clang][HeaderSearch] Shorten paths for includes in mainfile's directory

2019-07-03 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. kadircet marked an inline comment as done. Closed by commit rL365005: [clang][HeaderSearch] Shorten paths for includes in mainfile's directory (authored by kadircet, committed by ). Herald added subscribers: llvm-commits, il

[clang-tools-extra] r365005 - [clang][HeaderSearch] Shorten paths for includes in mainfile's directory

2019-07-03 Thread Kadir Cetinkaya via cfe-commits
Author: kadircet Date: Wed Jul 3 00:47:19 2019 New Revision: 365005 URL: http://llvm.org/viewvc/llvm-project?rev=365005&view=rev Log: [clang][HeaderSearch] Shorten paths for includes in mainfile's directory Summary: Currently HeaderSearch only looks at SearchDir's passed into it, but in addition

[PATCH] D63295: [clang][HeaderSearch] Shorten paths for includes in mainfile's directory

2019-07-03 Thread Haojian Wu via Phabricator via cfe-commits
hokein accepted this revision. hokein added inline comments. Comment at: clang-tools-extra/clangd/Headers.h:155 + /// \param IncludingFile is the absolute path of the file that InsertedHeader + /// will be instered. + /// nit: instered => inserted. Repositor

[PATCH] D63919: [clangd] Emit publishSemanticHighlighting in LSP if enabled

2019-07-03 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 207714. jvikstrom added a comment. Removed unused headers Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63919/new/ https://reviews.llvm.org/D63919 Files: clang-tools-extra/clangd/ClangdLSPServer.cpp clan

[PATCH] D59798: [analyzer] Add analyzer option to limit the number of imported TUs

2019-07-03 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 updated this revision to Diff 207712. gamesh411 added a comment. Rebase again Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59798/new/ https://reviews.llvm.org/D59798 Files: include/clang/CrossTU/CrossTranslationUnit.h include/clang/StaticAnalyzer/

<    1   2