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

2019-07-02 Thread Ivan Donchevskii via Phabricator via cfe-commits
yvvan marked an inline comment as done. yvvan added inline comments. Comment at: clang/include/clang/Tooling/ReplacementsYaml.h:35 +: FilePath(""), Offset(0), Length(0), ReplacementText("") { + size_t lineBreakPos = ReplacementText.find('\n'); + while (lineBreak

r364889 - [ASTImporter] Structural eq: handle DependentScopeDeclRefExpr

2019-07-02 Thread Gabor Marton via cfe-commits
Author: martong Date: Tue Jul 2 00:36:39 2019 New Revision: 364889 URL: http://llvm.org/viewvc/llvm-project?rev=364889&view=rev Log: [ASTImporter] Structural eq: handle DependentScopeDeclRefExpr Summary: Structural equivalence did not handle dependent template args properly when the arg containe

[PATCH] D64062: Remove both -dumpversion and __VERSION__

2019-07-02 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru created this revision. sylvestre.ledru added reviewers: rnk, dexonsmith. Herald added subscribers: cfe-commits, arphaman, fedor.sergeev, aheejin, dschuff. Herald added a project: clang. It has been introduced in 2011 for gcc compat: https://github.com/llvm-mirror/clang/commit/95a9

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

2019-07-02 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. This makes sense but is hard to debug - is there a reason we don't just store (the relevant parts of) the actual compile command? Size? Comment at: clang-tools-extra/clangd/index/Background.cpp:434 SPAN_ATTACH(Tracer, "file", Cmd.Filename); + siz

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

2019-07-02 Thread Gabor Marton via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL364889: [ASTImporter] Structural eq: handle DependentScopeDeclRefExpr (authored by martong, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D63986: [clangd] Also cache failures while indexing

2019-07-02 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 207484. kadircet marked 2 inline comments as done. kadircet added a comment. - Update fixme to mention error case in addition to the missing files. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63986/new/ http

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

2019-07-02 Thread Ivan Donchevskii via Phabricator via cfe-commits
yvvan updated this revision to Diff 207483. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63482/new/ https://reviews.llvm.org/D63482 Files: clang/include/clang/Tooling/ReplacementsYaml.h clang/unittests/Tooling/ReplacementsYamlTest.cpp Index: clang/unittests/Tooling/ReplacementsYam

[PATCH] D64019: [clangd] Turn background-index on by default

2019-07-02 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added a comment. This revision is now accepted and ready to land. Great! please land once D64018 is done. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64019/new/ https:/

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

2019-07-02 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. In D64018#1566085 , @sammccall wrote: > This makes sense but is hard to debug - is there a reason we don't just store > (the relevant parts of) the actual compile command? Size? Yes I had the size in mind, also didn't see any u

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

2019-07-02 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. Thanks! Do you have commit access? Would you like me to commit this patch for you? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63482/new/ https://reviews.llvm.org/D63482 _

r364891 - [ASTImporter] Make headers self-contained

2019-07-02 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Tue Jul 2 01:01:41 2019 New Revision: 364891 URL: http://llvm.org/viewvc/llvm-project?rev=364891&view=rev Log: [ASTImporter] Make headers self-contained Modified: cfe/trunk/include/clang/AST/ASTImporter.h cfe/trunk/include/clang/AST/ASTImporterSharedState.h Modified: c

[PATCH] D64019: [clangd] Turn background-index on by default

2019-07-02 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clang-tools-extra/clangd/tool/ClangdMain.cpp:191 "Index project code in the background and persist index on disk. " "Experimental"), +llvm::cl::init(true)); should we remove the `experimental` term h

[PATCH] D64015: [WIP][CUDA] Use shared MangleContext for CUDA and CXX CG

2019-07-02 Thread Philip Salzmann via Phabricator via cfe-commits
psalz updated this revision to Diff 207488. psalz added a comment. Move ownership of shared `MangleContext`s to `ASTContext`, return references from `getSharedMangleContext`. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64015/new/ https://reviews.llvm.org/D6401

[clang-tools-extra] r364893 - [clangd] Collect the refs when the main file is header.

2019-07-02 Thread Haojian Wu via cfe-commits
Author: hokein Date: Tue Jul 2 02:16:21 2019 New Revision: 364893 URL: http://llvm.org/viewvc/llvm-project?rev=364893&view=rev Log: [clangd] Collect the refs when the main file is header. Summary: Previously, we only collect refs of the symbols which are declared in the preamble and referenced i

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

2019-07-02 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 207489. kadircet added a comment. - Store Cmdline itself instead of hash Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64018/new/ https://reviews.llvm.org/D64018 Files: clang-tools-extra/clangd/index/Backgr

[PATCH] D63818: [clangd] Collect the refs when the main file is header.

2019-07-02 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL364893: [clangd] Collect the refs when the main file is header. (authored by hokein, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: https

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

2019-07-02 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. looks mostly good, a few nits. Comment at: clang/include/clang/Lex/HeaderSearch.h:724 + /// slashes as separators. MainFile is the absolute path of the file that we + /// are generating the diagnostics for. It can be empty. /// I th

[PATCH] D64063: [clang][ArgumentAdjusters] Do not add fsyntax-only if already exists

2019-07-02 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: hokein. Herald added a project: clang. Herald added a subscriber: cfe-commits. kadircet added a child revision: D64018: [clangd] Store hash of command line in index shards.. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/

r364895 - [clang][Driver][ARM] NFC: Remove unused function parameter

2019-07-02 Thread Alexandros Lamprineas via cfe-commits
Author: alelab01 Date: Tue Jul 2 02:45:24 2019 New Revision: 364895 URL: http://llvm.org/viewvc/llvm-project?rev=364895&view=rev Log: [clang][Driver][ARM] NFC: Remove unused function parameter Removes a vector reference that was added by D62998, since the preexisting function parameter is suffic

[PATCH] D64044: [clang][Driver][ARM] NFC: Remove unused function parameter

2019-07-02 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL364895: [clang][Driver][ARM] NFC: Remove unused function parameter (authored by alelab01, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit:

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

2019-07-02 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Still LG Comment at: clang-tools-extra/clangd/index/Serialization.h:48 llvm::Optional Sources; + llvm::Optional Cmd; }; Need to document that this contains only Directory and CommandLine (or use another struct) Repository: r

[PATCH] D64063: [clang][ArgumentAdjusters] Do not add fsyntax-only if already exists

2019-07-02 Thread Haojian Wu via Phabricator via cfe-commits
hokein accepted this revision. hokein added inline comments. This revision is now accepted and ready to land. Comment at: clang/unittests/Tooling/ToolingTest.cpp:403 +TEST(ClangToolTest, NoDoubleSyntaxOnly) { + FixedCompilationDatabase Compilations("/", {"-fsyntax-only"}); ---

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

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

[PATCH] D63976: Allow clang -Os and -Oz to work with -flto and lld

2019-07-02 Thread Rui Ueyama via Phabricator via cfe-commits
ruiu added a comment. I agree with Teresa. I don't think automatically setting O3 for Os and Oz is a good idea because these three options are different (that's why we have three different options in the first place). Adding an Os and Oz to lld's LTO

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

2019-07-02 Thread Alex Bradbury via Phabricator via cfe-commits
asb requested changes to this revision. asb added a comment. This revision now requires changes to proceed. Could you please add a riscv64 RUN line too, for completeness? Other archs seem to call the equivalent test file `builtins-archname.c` rather than `builtin-archname.c`, so I'd adjust the n

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

2019-07-02 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/index/Serialization.cpp:418 + +tooling::CompileCommand +readCompileCommand(Reader CmdReader, llvm::ArrayRef Strings) {

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

2019-07-02 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clang-tools-extra/clangd/ClangdLSPServer.cpp:333 + ClangdServerOpts.SemanticHighlighting = + Params.capabilities.SemanticHighlighting; if (Params.rootUri && *Params.rootUri) I'd put the logic here rather than in

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

2019-07-02 Thread LingVu via Phabricator via cfe-commits
LingDev added a comment. We need this feature as well, we are also waiting for it. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D28462/new/ https://reviews.llvm.org/D28462 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://list

r364901 - clang-cl: Make /d1reportAllClassLayout actually work and improve test

2019-07-02 Thread Nico Weber via cfe-commits
Author: nico Date: Tue Jul 2 03:22:11 2019 New Revision: 364901 URL: http://llvm.org/viewvc/llvm-project?rev=364901&view=rev Log: clang-cl: Make /d1reportAllClassLayout actually work and improve test See review thread for r301567. Modified: cfe/trunk/include/clang/Driver/CLCompatOptions.td

Re: r301567 - clang-cl: Alias /d1reportAllClassLayout to -fdump-record-layouts (PR32826)

2019-07-02 Thread Nico Weber via cfe-commits
Ah, Hans is away for a while. I landed the simple-but-unfulfilling fix in r364901 to unblock my other change for now. Maybe we can tweak it once Hans is back. On Mon, Jul 1, 2019 at 9:21 PM Nico Weber wrote: > Turns out this doesn't actually work: -fdump-records-layout is a cc1 > option, not a c

[PATCH] D62960: SVE opaque type for C intrinsics demo

2019-07-02 Thread Diana Picus via Phabricator via cfe-commits
rovka added a comment. This looks much better, thanks! Shouldn't there be more tests, e.g. for mangling and maybe the ASTImporter? Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62960/new/ https://reviews.llvm.org/D62960 ___

[PATCH] D62574: Initial draft of target-configurable address spaces.

2019-07-02 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: include/clang/AST/ASTContext.h:2598 + /// Returns true if address space A overlaps with B. + bool isAddressSpaceOverlapping(LangAS A, LangAS B) const { +// A overlaps with B if either is a superset of the other.

Re: [PATCH] D61909: Add Clang shared library with C++ exports

2019-07-02 Thread Kim Gräsman via cfe-commits
The Clang module libraries are all called libClang[A-Z][a-zA-Z]+.{a,so}, so libclangcpp doesn't conflict with that, but I wonder if a dash would set it apart even more clearly: libclang-cpp. Or something like clang-all to show that it houses all clang modules? Bikesheds are the best sheds. - Kim

r364904 - [clang][ArgumentAdjusters] Do not add fsyntax-only if already exists

2019-07-02 Thread Kadir Cetinkaya via cfe-commits
Author: kadircet Date: Tue Jul 2 03:45:53 2019 New Revision: 364904 URL: http://llvm.org/viewvc/llvm-project?rev=364904&view=rev Log: [clang][ArgumentAdjusters] Do not add fsyntax-only if already exists Reviewers: hokein Subscribers: cfe-commits Tags: #clang Differential Revision: https://rev

[PATCH] D64063: [clang][ArgumentAdjusters] Do not add fsyntax-only if already exists

2019-07-02 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL364904: [clang][ArgumentAdjusters] Do not add fsyntax-only if already exists (authored by kadircet, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to

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

2019-07-02 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. MaskRay added reviewers: awilfox, echristo, hfinkel, rnk, rsmith. Herald added subscribers: cfe-commits, jsji, kbarton, nemanjai. Herald added a project: clang. -mlong-double-64 is supported on some ports of gcc (i386, x86_64, and ppc{32,64}). On many other targets,

[PATCH] D63773: [clangd] dummy variable extraction on a function scope

2019-07-02 Thread Shaurya Gupta via Phabricator via cfe-commits
SureYeaah updated this revision to Diff 207522. SureYeaah added a comment. Removed check for braces and fixed code for finding insertionpoint Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63773/new/ https://reviews.llvm.org/D63773 Files: clang-

[PATCH] D64062: Remove both -dumpversion and __VERSION__

2019-07-02 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru added a comment. Actually, I don't think removing -dumpversion is a great idea. it will remove the capability of clang to be a dropped in replacement. I see a lot of occurrences: https://github.com/search?q=%22-dumpversion%22&type=Code https://codesearch.debian.net/search?q=%22-d

[PATCH] D63048: Update __VERSION__ to remove the hardcoded 4.2.1 version

2019-07-02 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru added a comment. Actually, not sure it is a good idea to remove them: https://reviews.llvm.org/D64062#1566460 Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63048/new/ https://reviews.llvm.org/D63048

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

2019-07-02 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 207532. MaskRay added a comment. Improve a test Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64067/new/ https://reviews.llvm.org/D64067 Files: include/clang/Basic/LangOptions.def include/clang/Driver/Options.td lib/Ba

r364917 - [LibTooling] Extend `RewriteRule` with support for adding includes.

2019-07-02 Thread Yitzhak Mandelbaum via cfe-commits
Author: ymandel Date: Tue Jul 2 06:11:04 2019 New Revision: 364917 URL: http://llvm.org/viewvc/llvm-project?rev=364917&view=rev Log: [LibTooling] Extend `RewriteRule` with support for adding includes. Summary: This revision allows users to specify the insertion of an included directive (at the t

[PATCH] D63892: [LibTooling] Extend `RewriteRule` with support for adding includes.

2019-07-02 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL364917: [LibTooling] Extend `RewriteRule` with support for adding includes. (authored by ymandel, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to co

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

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

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

2019-07-02 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom added inline comments. Comment at: clang-tools-extra/clangd/SemanticHighlighting.cpp:144 + write32be(Token.R.start.character, OS); + write16be(Token.R.end.character - Token.R.start.character, OS); + write16be(static_cast(Token.Kind), OS);

[PATCH] D63893: [clang-tidy] Extend TransformerClangTidyCheck to support adding includes.

2019-07-02 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 207538. ymandel added a comment. switched to llvm::any_of. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63893/new/ https://reviews.llvm.org/D63893 Files: clang-tools-extra/clang-tidy/utils/TransformerClangT

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

2019-07-02 Thread Gabor Marton via Phabricator via cfe-commits
martong created this revision. martong added a reviewer: a_sidorin. Herald added subscribers: cfe-commits, gamesh411, Szelethus, dkrupp, rnkovacs. Herald added a reviewer: a.sidorin. Herald added a reviewer: shafik. Herald added a project: clang. The current import implementation fails to import t

[clang-tools-extra] r364922 - [clang-tidy] Extend TransformerClangTidyCheck to support adding includes.

2019-07-02 Thread Yitzhak Mandelbaum via cfe-commits
Author: ymandel Date: Tue Jul 2 06:25:07 2019 New Revision: 364922 URL: http://llvm.org/viewvc/llvm-project?rev=364922&view=rev Log: [clang-tidy] Extend TransformerClangTidyCheck to support adding includes. Summary: This revision implements support for the `AddedIncludes` field in RewriteRule ca

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

2019-07-02 Thread Marco Antognini via Phabricator via cfe-commits
mantognini created this revision. mantognini added reviewers: rjmccall, Anastasia. Herald added subscribers: cfe-commits, yaxunl. Herald added a project: clang. This patch ensures built-in functions are rewritten using the proper parent declaration. Tests are added to ensure the functionality work

[PATCH] D63893: [clang-tidy] Extend TransformerClangTidyCheck to support adding includes.

2019-07-02 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel marked 2 inline comments as done. ymandel added inline comments. Comment at: clang-tools-extra/clang-tidy/utils/TransformerClangTidyCheck.cpp:51 + // includes. + if (Rule && std::any_of(Rule->Cases.begin(), Rule->Cases.end(), + [](const RewriteR

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

2019-07-02 Thread Gabor Marton via Phabricator via cfe-commits
martong created this revision. martong added a reviewer: a_sidorin. Herald added subscribers: cfe-commits, gamesh411, Szelethus, dkrupp, rnkovacs. Herald added a reviewer: a.sidorin. Herald added a project: clang. The structural equivalence check reported false eq between lambda classes with diffe

[PATCH] D63893: [clang-tidy] Extend TransformerClangTidyCheck to support adding includes.

2019-07-02 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. ymandel marked an inline comment as done. Closed by commit rL364922: [clang-tidy] Extend TransformerClangTidyCheck to support adding includes. (authored by ymandel, committed by ). Herald added a project: LLVM. Herald added

[PATCH] D62619: [analyzer][IDF] Add a control dependency calculator + a new debug checker

2019-07-02 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. Gentle ping :^) CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62619/new/ https://reviews.llvm.org/D62619 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-

[PATCH] D64078: [ASTImporter] Fix structural ineq of lambdas with different sloc

2019-07-02 Thread Gabor Marton via Phabricator via cfe-commits
martong created this revision. martong added a reviewer: a_sidorin. Herald added subscribers: cfe-commits, gamesh411, Szelethus, dkrupp, rnkovacs. Herald added a reviewer: a.sidorin. Herald added a reviewer: shafik. Herald added a project: clang. Currently we do not differentiate lambda classes ba

Re: r301567 - clang-cl: Alias /d1reportAllClassLayout to -fdump-record-layouts (PR32826)

2019-07-02 Thread Hans Wennborg via cfe-commits
Oh cool, you made it work. I think just leaving it unsupported (but parsed) would have been fine too since as you say nobody would have been using it anyway. But making it work is nicer. On Tue, Jul 2, 2019 at 12:23 PM Nico Weber via cfe-commits wrote: > > Ah, Hans is away for a while. I landed

[PATCH] D62584: [OpenCL][PR42033] Deducing addr space with template parameter types

2019-07-02 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia marked an inline comment as done. Anastasia added inline comments. Comment at: lib/Sema/TreeTransform.h:5363 +if (ResultType.getAddressSpace() != LangAS::Default && +(ResultType.getAddressSpace() != LangAS::opencl_private)) { SemaRef.Diag(TL.getReturn

[PATCH] D62619: [analyzer][IDF] Add a control dependency calculator + a new debug checker

2019-07-02 Thread Jakub Kuderski via Phabricator via cfe-commits
kuhar added a comment. The non-static-analyzer bits look good to me, I added a few nits. Comment at: clang/include/clang/Analysis/Analyses/Dominators.h:230 + + virtual void releaseMemory() { +PostDomTree.releaseMemory(); If the virtual function is introduc

[PATCH] D62584: [OpenCL][PR42033] Deducing addr space with template parameter types

2019-07-02 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 207562. Anastasia added a comment. - Removed diagnostic for address space in return type in tree transforms CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62584/new/ https://reviews.llvm.org/D62584 Files: lib/Sema/SemaDecl.cpp lib/Sema/SemaTyp

[PATCH] D59254: [RFC] Implementation of Clang randstruct

2019-07-02 Thread Shawn Landden via Phabricator via cfe-commits
shawnl added a comment. I think the essential functionality of this patch should be in LLVM and not Clang, so that all front-ends can benefit. Too many generally useful things are in Clang when they should be in LLVM (e.g. C ABI for ARM and x86; ranged switch statements). I opened an upstream b

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

2019-07-02 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. I would say in the interest of saving testing time running one of those test in C++ mode should be enough. Comment at: clang/lib/Sema/SemaExpr.cpp:5411 OverloadParams, EPI); - DeclContext *Parent = Co

[PATCH] D56650: [lld] [ELF] Support customizing behavior on target triple

2019-07-02 Thread Kamil Rytarowski via Phabricator via cfe-commits
krytarowski added a comment. > Personally I am opposed to this change. The compiler driver (gcc,clang) has a > set of arch/OS dependent defaults. It seems weird/redundant to add another > sets of defaults on the linker side. The NetBSD toolchain relies on internal knowledge in a linker that can

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

2019-07-02 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 207563. jvikstrom added a comment. Removed from hiding under hidden flag . 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/ClangdLSP

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

2019-07-02 Thread Marco Antognini via Phabricator via cfe-commits
mantognini updated this revision to Diff 207569. mantognini added a comment. Address comments: reduce testing & add FIXME. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64074/new/ https://reviews.llvm.org/D64074 Files: clang/include/clang/Basic/

r364938 - clang-format: Add new style option AlignConsecutiveMacros

2019-07-02 Thread Sam McCall via cfe-commits
Author: sammccall Date: Tue Jul 2 08:53:14 2019 New Revision: 364938 URL: http://llvm.org/viewvc/llvm-project?rev=364938&view=rev Log: clang-format: Add new style option AlignConsecutiveMacros This option behaves similarly to AlignConsecutiveDeclarations and AlignConsecutiveAssignments, aligning

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

2019-07-02 Thread Marco Antognini via Phabricator via cfe-commits
mantognini marked an inline comment as done. mantognini added a comment. I added the FIXME and reduced the amount of testing. Let me know if it looks alright. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64074/new/ https://reviews.llvm.org/D64074

[PATCH] D64083: [OpenCL][Sema] Improve address space support for blocks

2019-07-02 Thread Marco Antognini via Phabricator via cfe-commits
mantognini created this revision. mantognini added reviewers: rjmccall, Anastasia. Herald added subscribers: cfe-commits, yaxunl. Herald added a project: clang. This patch ensures that the following code is compiled identically with -cl-std=CL2.0 and -fblocks -cl-std=c++. kernel void test(void)

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

2019-07-02 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus planned changes to this revision. Szelethus added a comment. Something's off. `test/Analysis/edges-new.mm` fails, but I don't remember any test failures at home -- I'll investigate. Before this patch: F9448950: image.png After this patch: F9448940: i

[PATCH] D62413: [OpenCL][PR41727] Prevent ICE on global dtors

2019-07-02 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 207574. Anastasia added a comment. Added a target hook to query address spaces with the largest pointer width. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62413/new/ https://reviews.llvm.org/D62413 Files: lib/CodeGen/CGDeclCXX.cpp lib/CodeG

[PATCH] D64083: [OpenCL][Sema] Improve address space support for blocks

2019-07-02 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! I would suggest to wait a day or two before committing just in case John has any feedback. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://revie

[PATCH] D59254: [RFC] Implementation of Clang randstruct

2019-07-02 Thread JF Bastien via Phabricator via cfe-commits
jfb added a comment. In D59254#1566711 , @shawnl wrote: > I think the essential functionality of this patch should be in LLVM and not > Clang, so that all front-ends can benefit. Too many generally useful things > are in Clang when they should be in LLVM

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

2019-07-02 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 207578. kadircet marked 3 inline comments as done. kadircet added a comment. - Use an InternedCompileCommand struct rather than a pack of StringRefs. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64018/new/ ht

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

2019-07-02 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. It sounds like this is fairly low-risk (it's behind a flag that's off by default), has been approved, and we want it in clang-format 9, so I'm going to rebase and land it. I don't understand the patch in detail so if there is significant fallout I'll have to revert a

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

2019-07-02 Thread Sam McCall via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL364938: clang-format: Add new style option AlignConsecutiveMacros (authored by sammccall, committed by ). Herald added a project: LLVM. Changed prior to commit: https://reviews.llvm.org/D28462?vs=192694

[PATCH] D43159: Modernize: Use nullptr more.

2019-07-02 Thread Louis Dionne via Phabricator via cfe-commits
ldionne accepted this revision. ldionne added a comment. This revision is now accepted and ready to land. Herald added a subscriber: dexonsmith. I'm fine with this given what the author said about `nullptr` already being used in those headers. Repository: rCXX libc++ CHANGES SINCE LAST ACTIO

[PATCH] D63976: Allow clang -Os and -Oz to work with -flto and lld

2019-07-02 Thread Mehdi AMINI via Phabricator via cfe-commits
mehdi_amini added a comment. In D63976#1566236 , @ruiu wrote: > I agree with Teresa. I don't think automatically setting O3 > for Os and Oz is a good idea > because these three options are different (that's wh

[PATCH] D64087: [clang] Correct source locations for instantiations of out-of-line defaulted special member functions. (PR25683)

2019-07-02 Thread Tom Honermann via Phabricator via cfe-commits
tahonermann created this revision. tahonermann added a reviewer: rsmith. Herald added a project: clang. Herald added a subscriber: cfe-commits. Fixes PR25683 (https://bugs.llvm.org/show_bug.cgi?id=25683) This change completes adjustments of source locations for FunctionDecl definitions correspond

[PATCH] D64087: [clang] Correct source locations for instantiations of out-of-line defaulted special member functions. (PR25683)

2019-07-02 Thread Tom Honermann via Phabricator via cfe-commits
tahonermann added a comment. See PR25683 (https://bugs.llvm.org/show_bug.cgi?id=25683) for more details. The patch posted here differs slightly from what is posted in the PR; `getLocation()` is called instead of `getBeginLoc()` since the latter may return a customized begin location. I believ

[PATCH] D59254: [RFC] Implementation of Clang randstruct

2019-07-02 Thread Shawn Landden via Phabricator via cfe-commits
shawnl added a comment. My point is that most languages these days that intend to be compiled to machine code want compatibility with the C ABI, and randstruct will be part of that (and can be made compatible between languages by sharing the seed). LLVM knows what a struct is. Repository: r

[PATCH] D59254: [RFC] Implementation of Clang randstruct

2019-07-02 Thread JF Bastien via Phabricator via cfe-commits
jfb added a comment. In D59254#1566895 , @shawnl wrote: > My point is that most languages these days that intend to be compiled to > machine code want compatibility with the C ABI, and randstruct will be part > of that (and can be made compatible between

[PATCH] D62619: [analyzer][IDF] Add a control dependency calculator + a new debug checker

2019-07-02 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Static Analyzer bits look great to me as well! Comment at: clang/include/clang/Analysis/Analyses/Dominators.h:257 + // Dumps immediate control dependencies for each block. + void dump() { +CFG *cfg = PostDomTree.getCFG(); kuhar wrote:

[clang-tools-extra] r364949 - [clang-doc] Fix segfault in comment sorting

2019-07-02 Thread Julie Hockett via cfe-commits
Author: juliehockett Date: Tue Jul 2 10:57:11 2019 New Revision: 364949 URL: http://llvm.org/viewvc/llvm-project?rev=364949&view=rev Log: [clang-doc] Fix segfault in comment sorting Differential Revision: https://reviews.llvm.org/D63962 Modified: clang-tools-extra/trunk/clang-doc/Representa

[PATCH] D63962: [clang-doc] Fix segfault in comment sorting

2019-07-02 Thread Julie Hockett via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL364949: [clang-doc] Fix segfault in comment sorting (authored by juliehockett, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: https://rev

[PATCH] D64089: [Driver] Introduce -stdlib++-isystem

2019-07-02 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai created this revision. smeenai added reviewers: compnerd, phosek, rsmith, zer0. Herald added a subscriber: srhines. Herald added a project: clang. There are times when we wish to explicitly control the C++ standard library search paths used by the driver. For example, when we're building a

r364954 - [C++2a] Add __builtin_bit_cast, used to implement std::bit_cast

2019-07-02 Thread Erik Pilkington via cfe-commits
Author: epilk Date: Tue Jul 2 11:28:13 2019 New Revision: 364954 URL: http://llvm.org/viewvc/llvm-project?rev=364954&view=rev Log: [C++2a] Add __builtin_bit_cast, used to implement std::bit_cast This commit adds a new builtin, __builtin_bit_cast(T, v), which performs a bit_cast from a value v to

[PATCH] D62825: [C++2a] Add __builtin_bit_cast, used to implement std::bit_cast

2019-07-02 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL364954: [C++2a] Add __builtin_bit_cast, used to implement std::bit_cast (authored by epilk, committed by ). Changed prior to commit: https://reviews.llvm.org/D62825?vs=206304&id=207596#toc Repository:

[PATCH] D63503: cmake: Add CLANG_LINK_CLANG_DYLIB option

2019-07-02 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. One comment inline. Otherwise LGTM. Comment at: clang/CMakeLists.txt:327 +set(CLANG_LINK_CLANG_DYLIB ${LLVM_LINK_LLVM_DYLIB} CACHE BOOL +"Link tools against libclang_shared.so") + We should generate a config error if `LLVM_LINK_LLVM_D

[PATCH] D63845: [WIP] Create a clang attribute that lets users specify LLVM attributes

2019-07-02 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. In D63845#1561983 , @lebedev.ri wrote: > In D63845#1561793 , @jdoerfert wrote: > > > In D63845#1560605 , @aaron.ballman > > wrote: > > > > > In D6

[PATCH] D63753: [Sema] Instead of rejecting C unions with non-trivial fields, detect attempts to destruct/initialize/copy them.

2019-07-02 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 207600. ahatanak added a comment. Call `hasNonTrivialPrimitiveCStruct` to check whether the type is a non-trivial C struct/union before calling `checkNonTrivialCUnion`. Fix comments. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.

[PATCH] D63753: [Sema] Instead of rejecting C unions with non-trivial fields, detect attempts to destruct/initialize/copy them.

2019-07-02 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak marked an inline comment as done. ahatanak added inline comments. Comment at: lib/Sema/SemaExpr.cpp:16218 +checkNonTrivialCUnion(E->getType(), E->getExprLoc(), + Sema::NTCUC_LValueToRValueVolatile); + rjmccall wrote: > ahatan

[PATCH] D63753: [Sema] Instead of rejecting C unions with non-trivial fields, detect attempts to destruct/initialize/copy them.

2019-07-02 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak marked an inline comment as done. ahatanak added inline comments. Comment at: lib/Sema/SemaExpr.cpp:16218 +checkNonTrivialCUnion(E->getType(), E->getExprLoc(), + Sema::NTCUC_LValueToRValueVolatile); + ahatanak wrote: > rjmcca

[PATCH] D64089: [Driver] Introduce -stdlib++-isystem

2019-07-02 Thread Dan Albert via Phabricator via cfe-commits
danalbert added a comment. > For example, when we're building against the Android NDK, we might want to > use the NDK's C++ headers (which have a custom inline namespace) even if we > have C++ headers installed next to the driver. Since NDK r19 the NDK libc++ headers are already installed along

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

2019-07-02 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. This is starting to look great, thanks! Comment at: clang/lib/StaticAnalyzer/Checkers/ReturnValueChecker.cpp:96 + + Out << '\'' << Name << "' always returns " + << (Value ? "true" : "false"); Let's omit the word "alway

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

2019-07-02 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/ReturnValueChecker.cpp:86 + std::string Name = ""; + Name += dyn_cast(Call.getDecl())->getParent()->getName(); + Name += "::"; Either `cast<>` or check for null. Commen

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

2019-07-02 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/ReturnValueChecker.cpp:71 + SVal RetV = Call.getReturnValue(); + Optional RetDV = RetV.getAs(); + if (!RetDV.hasValue()) `auto` is encouraged here. CHANGES SINCE LAST ACTION https://r

[PATCH] D63911: [clang-doc] Serialize child namespaces and records

2019-07-02 Thread Diego Astiazarán via Phabricator via cfe-commits
DiegoAstiazaran updated this revision to Diff 207605. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63911/new/ https://reviews.llvm.org/D63911 Files: clang-tools-extra/clang-doc/Mapper.cpp clang-tools-extra/clang-doc/Serialize.cpp clang-tools-extra/clang-doc/Serialize.h clang-too

[clang-tools-extra] r364963 - [clang-doc] Serialize child namespaces and records

2019-07-02 Thread Julie Hockett via cfe-commits
Author: juliehockett Date: Tue Jul 2 12:59:56 2019 New Revision: 364963 URL: http://llvm.org/viewvc/llvm-project?rev=364963&view=rev Log: [clang-doc] Serialize child namespaces and records Serialization of child namespaces and records is now handled. Namespaces can have child records and child n

[PATCH] D63911: [clang-doc] Serialize child namespaces and records

2019-07-02 Thread Julie Hockett via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL364963: [clang-doc] Serialize child namespaces and records (authored by juliehockett, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: http

[PATCH] D63663: [clang-doc] Add html links to references

2019-07-02 Thread Diego Astiazarán via Phabricator via cfe-commits
DiegoAstiazaran updated this revision to Diff 207611. DiegoAstiazaran edited the summary of this revision. DiegoAstiazaran added a parent revision: D63857: [clang-doc] Add a structured HTML generator. DiegoAstiazaran added a comment. The links are now generated using the nodes structure introduce

[PATCH] D63954: Add lifetime categories attributes

2019-07-02 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre updated this revision to Diff 207613. mgehre added a comment. - Make the list of attribute properties more consistent. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63954/new/ https://reviews.llvm.org/D63954 Files: clang/include/clang/Bas

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

2019-07-02 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre added a comment. Friendly ping. Are there outstanding concerns that I could address? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61749/new/ https://reviews.llvm.org/D61749 ___ cfe-commits mail

[PATCH] D62619: [analyzer][IDF] Add a control dependency calculator + a new debug checker

2019-07-02 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. Can you formally accept then? :) (I'll address inlines before commiting of course!) In D62619#1566693 , @kuhar wrote: > The non-static-analyzer bits look good to me, I added a few nits. Thank you! This part of the project was

  1   2   >