[PATCH] D53655: [ASTImporter] Fix redecl chain of classes and class templates

2018-11-28 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 175641. martong marked 2 inline comments as done. martong added a comment. - Remove containsInVector Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53655/new/ https://reviews.llvm.org/D53655 Files:

[PATCH] D53655: [ASTImporter] Fix redecl chain of classes and class templates

2018-11-28 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. @aaron.ballman Thanks for your review. I have updated the patch to remove `containsInVector`. > This seems mostly reasonable to me, but @rsmith is more well-versed in this > area and may have further comments. You should give him a few days to chime > in before

[PATCH] D54952: [clangd] DO NOT SUBMIT. Draft interfaces for build system integration.

2018-11-28 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added inline comments. Comment at: clangd/BuildSystem.h:29 +/// Default compilation database used by clangd, based on the build system. +class Integration : public GlobalCompilationDatabase { +public: 'Integration' is a bit of a weird name, as it doesn't

[PATCH] D53699: [ASTImporter] Fix inequality of functions with different attributes

2018-11-28 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 175647. martong added a comment. - Use ExtInfo in structural equivalency Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53699/new/ https://reviews.llvm.org/D53699 Files: lib/AST/ASTStructuralEquivalence.cpp

[PATCH] D54947: [OpenCL][CodeGen] Fix replacing memcpy with addrspacecast

2018-11-28 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: lib/CodeGen/CGCall.cpp:3972 + // we don't want to perform address space cast for it, since that + // leads to casting __private * (default addr space in OpenCL) to + // __global * which is not valid. Create

Re: [PATCH] D54995: [MemoryBuffer] By default assume that all files are volatile to prevent unintended file locks

2018-11-28 Thread Zachary Turner via cfe-commits
I’m afraid this is going to be too severe a performance regression if we change the default. So I don’t think this should be an LLVM-wide default On Wed, Nov 28, 2018 at 1:38 AM Ivan Donchevskii via Phabricator < revi...@reviews.llvm.org> wrote: > yvvan added a comment. > > @ilya-biryukov > > I

[PATCH] D53755: [ASTImporter] Remove import of definition from GetAlreadyImportedOrNull

2018-11-28 Thread Gabor Marton via Phabricator via cfe-commits
martong added a subscriber: teemperor. martong added a comment. Hi @shafik , Thank you for your review. I have removed the call of `getPrimaryContext`. Fortunately, we already have one patch for the `getPrimaryContext` related changes, made by @teemperor : https://reviews.llvm.org/D54898 . I

[PATCH] D53755: [ASTImporter] Remove import of definition from GetAlreadyImportedOrNull

2018-11-28 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 175639. martong marked an inline comment as done. martong added a comment. - Remove call of 'getPrimaryContext' Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53755/new/ https://reviews.llvm.org/D53755 Files:

[PATCH] D54845: [clangd] Canonicalize file path in URIForFile.

2018-11-28 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. In D54845#1309589 , @sammccall wrote: > Mostly just places that should be updated HintPath -> TUPath. Changing the > whole codebase doesn't seem important, but in places that are touched... As chatted offline, `URIForFile` is

Re: [clang-tools-extra] r347675 - [clangd] textDocument/SymbolInfo extension

2018-11-28 Thread Yvan Roux via cfe-commits
On Wed, 28 Nov 2018 at 11:16, Mikael Holmén wrote: > > > > On 11/28/18 11:09 AM, Jan Korous wrote: > > Thanks for the notice and sorry for the delay! I somehow missed the > > failure mails before I went offline yesterday. > > > > I am just running tests on my fix now and hopefully pushing

[PATCH] D54961: [AArch64] Add command-line option for SSBS

2018-11-28 Thread Sam Parker via Phabricator via cfe-commits
samparker accepted this revision. samparker added a comment. This revision is now accepted and ready to land. LGTM Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54961/new/ https://reviews.llvm.org/D54961 ___

[PATCH] D53751: [ASTImporter] Added Import functions for transition to new API.

2018-11-28 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. It is really "ugly" thing to have a Import_New and a Import for the same functionality. Without these a single large patch would have been needed for clang and another smaller one for LLDB that must be committed "at the same time". Now 1 dependent patch is under

[PATCH] D53655: [ASTImporter] Fix redecl chain of classes and class templates

2018-11-28 Thread Gabor Marton via Phabricator via cfe-commits
martong marked 4 inline comments as done. martong added inline comments. Comment at: include/clang/AST/DeclContextInternals.h:125-129 + bool containsInVector(const NamedDecl *D) { +assert(getAsVector() && "Must have a vector at this point"); +DeclsTy = *getAsVector();

Re: [clang-tools-extra] r347675 - [clangd] textDocument/SymbolInfo extension

2018-11-28 Thread Jan Korous via cfe-commits
Thanks for the notice and sorry for the delay! I somehow missed the failure mails before I went offline yesterday. I am just running tests on my fix now and hopefully pushing shortly. Since I didn’t know we are using old compilers for these builds I am now curious why. Is that intentional? For

[clang-tools-extra] r347737 - [clangd] Bump vscode-clangd v0.0.7

2018-11-28 Thread Haojian Wu via cfe-commits
Author: hokein Date: Wed Nov 28 02:23:15 2018 New Revision: 347737 URL: http://llvm.org/viewvc/llvm-project?rev=347737=rev Log: [clangd] Bump vscode-clangd v0.0.7 Modified: clang-tools-extra/trunk/clangd/clients/clangd-vscode/package.json Modified:

[PATCH] D54845: [clangd] Canonicalize file path in URIForFile.

2018-11-28 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE347739: [clangd] Canonicalize file path in URIForFile. (authored by ioeric, committed by ). Changed prior to commit: https://reviews.llvm.org/D54845?vs=175466=175642#toc Repository: rCTE Clang

[PATCH] D54903: [Sema] Improve static_assert diagnostics.

2018-11-28 Thread Clement Courbet via Phabricator via cfe-commits
courbet updated this revision to Diff 175638. courbet marked 5 inline comments as done. courbet edited the summary of this revision. courbet added a comment. Address Aaron's comments. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54903/new/

[PATCH] D54781: [clangd] Add 'Switch header/source' command in clangd-vscode

2018-11-28 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. Just made a new release v0.0.7, please try to use it (it works on my machine). Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54781/new/ https://reviews.llvm.org/D54781 ___ cfe-commits mailing

Re: r345099 - [analyzer] Trust summaries for OSObject::retain and OSObject::release

2018-11-28 Thread Mikael Holmén via cfe-commits
Hi, On 11/27/18 12:23 AM, George Karpenkov wrote: > The error is indeed strange. > The body is declared as > >   LazyDeclStmtPtr Body; > > where > > using LazyDeclStmtPtr = >     LazyOffsetPtr; > > where > > template Offset)> > struct LazyOffsetPtr { >   mutable uint64_t Ptr = 0; > (…) >

Re: Dumping AST information to other formats

2018-11-28 Thread Stephen Kelly via cfe-commits
On 27/11/2018 09:49, Stephen Kelly via cfe-commits wrote: On 26/11/2018 19:20, Aaron Ballman via cfe-commits wrote: Once upon a time, there was -ast-print-xml. This -cc1 option was dropped because it was frequently out of sync with the AST data. It is right to ask: why would JSON, etc be any

[PATCH] D54862: [OpenCL] Add generic AS to 'this' pointer

2018-11-28 Thread Mikael Nilsson via Phabricator via cfe-commits
mikael updated this revision to Diff 175646. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54862/new/ https://reviews.llvm.org/D54862 Files: lib/AST/DeclCXX.cpp lib/CodeGen/CGCall.cpp lib/CodeGen/CGClass.cpp lib/CodeGen/CGDeclCXX.cpp lib/CodeGen/CGExprCXX.cpp

[PATCH] D53818: [ASTImporter] Changed use of Import to Import_New in ASTImporter.

2018-11-28 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 175649. balazske added a comment. Rebase to newest master. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53818/new/ https://reviews.llvm.org/D53818 Files: include/clang/AST/ASTImporter.h lib/AST/ASTImporter.cpp Index:

Re: [clang-tools-extra] r347675 - [clangd] textDocument/SymbolInfo extension

2018-11-28 Thread Yvan Roux via cfe-commits
On Wed, 28 Nov 2018 at 12:28, Yvan Roux wrote: > > On Wed, 28 Nov 2018 at 11:16, Mikael Holmén > wrote: > > > > > > > > On 11/28/18 11:09 AM, Jan Korous wrote: > > > Thanks for the notice and sorry for the delay! I somehow missed the > > > failure mails before I went offline yesterday. > > > >

[PATCH] D54995: [MemoryBuffer] By default assume that all files are volatile to prevent unintended file locks

2018-11-28 Thread Ivan Donchevskii via Phabricator via cfe-commits
yvvan created this revision. yvvan added reviewers: ilya-biryukov, Dmitry.Kozhevnikov. There are reported cases of non-system files being locked by libclang on Windows (and likely by other clients as well). I tried to solve that with https://reviews.llvm.org/D47460 but it might be not the only

[PATCH] D54996: [libclang] Fix clang_Cursor_isAnonymous

2018-11-28 Thread Ivan Donchevskii via Phabricator via cfe-commits
yvvan created this revision. yvvan added reviewers: nik, marcobubke. Herald added a subscriber: arphaman. Use the same logic as in TypePrinter::printTag to determine that the tag is anonymous and the separate check for namespaces. https://reviews.llvm.org/D54996 Files:

Re: [clang-tools-extra] r347675 - [clangd] textDocument/SymbolInfo extension

2018-11-28 Thread Mikael Holmén via cfe-commits
Hi Jan, This code doesn't compile with clang 3.6.0: ../tools/clang/tools/extra/clangd/Protocol.cpp:456:10: error: no viable conversion from 'json::Object' to 'llvm::json::Value' return result; ^~ ../include/llvm/Support/JSON.h:291:3: note: candidate constructor not viable: no

[PATCH] D54995: [MemoryBuffer] By default assume that all files are volatile to prevent unintended file locks

2018-11-28 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov requested changes to this revision. ilya-biryukov added a comment. This revision now requires changes to proceed. I don't think isVolatile is the right default at the FileManager level, even on Windows. E.g. memory mapping is probably optimal for compiler, even though it

Re: [clang-tools-extra] r347675 - [clangd] textDocument/SymbolInfo extension

2018-11-28 Thread Mikael Holmén via cfe-commits
On 11/28/18 11:09 AM, Jan Korous wrote: > Thanks for the notice and sorry for the delay! I somehow missed the > failure mails before I went offline yesterday. > > I am just running tests on my fix now and hopefully pushing shortly. > > Since I didn’t know we are using old compilers for these

[clang-tools-extra] r347738 - [clangd] Fix backward-compatibility - follow-up to textDocument/SymbolInfo

2018-11-28 Thread Jan Korous via cfe-commits
Author: jkorous Date: Wed Nov 28 02:24:07 2018 New Revision: 347738 URL: http://llvm.org/viewvc/llvm-project?rev=347738=rev Log: [clangd] Fix backward-compatibility - follow-up to textDocument/SymbolInfo Apparently clang 3.6 couldn't build the preceding patch. Modified:

[clang-tools-extra] r347739 - [clangd] Canonicalize file path in URIForFile.

2018-11-28 Thread Eric Liu via cfe-commits
Author: ioeric Date: Wed Nov 28 02:30:42 2018 New Revision: 347739 URL: http://llvm.org/viewvc/llvm-project?rev=347739=rev Log: [clangd] Canonicalize file path in URIForFile. Summary: File paths in URIForFile can come from index or local AST. Path from index goes through URI transformation and

[PATCH] D53699: [ASTImporter] Fix inequality of functions with different attributes

2018-11-28 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. Hi @a_sidorin , I have updated the patch as you suggested, to check the equivalence based on `ASTContext::mergeFunctionTypes()`. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53699/new/ https://reviews.llvm.org/D53699

[PATCH] D54995: [MemoryBuffer] By default assume that all files are volatile to prevent unintended file locks

2018-11-28 Thread Ivan Donchevskii via Phabricator via cfe-commits
yvvan updated this revision to Diff 175635. yvvan added a comment. VFS is moved to llvm in 8.0, update the diff CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54995/new/ https://reviews.llvm.org/D54995 Files: include/llvm/Support/MemoryBuffer.h

Re: [clang-tools-extra] r347675 - [clangd] textDocument/SymbolInfo extension

2018-11-28 Thread Yvan Roux via cfe-commits
On Wed, 28 Nov 2018 at 09:56, Mikael Holmén via cfe-commits wrote: > > Hi Jan, > > This code doesn't compile with clang 3.6.0: And broke ARM bots, logs available here: http://lab.llvm.org:8011/builders/clang-cmake-armv7-quick/builds/5582/steps/build%20stage%201/logs/stdio Cheers, Yvan >

[PATCH] D54903: [Sema] Improve static_assert diagnostics.

2018-11-28 Thread Clement Courbet via Phabricator via cfe-commits
courbet marked an inline comment as done. courbet added a comment. Thanks for the comments. Comment at: lib/Sema/SemaTemplate.cpp:3070 +// and returns true. +static bool prettyPrintTypeTrait(const NestedNameSpecifier *const NNS, +

[PATCH] D54995: [MemoryBuffer] By default assume that all files are volatile to prevent unintended file locks

2018-11-28 Thread Ivan Donchevskii via Phabricator via cfe-commits
yvvan added a comment. @ilya-biryukov I have the reported evidence but didn't yet have time to investigate myself. This is probably caused by our upgrade to Clang-7 which shows that we can't rely on the aimed fixes like the one I mention (D47460 ). Another

[PATCH] D53751: [ASTImporter] Added Import functions for transition to new API.

2018-11-28 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. > I didn't actually see this comment get addressed other than to say it won't > be a problem in practice, which I'm not certain I agree with. Was there a > reason why this got commit before finding out if the reviewer with the > concern agrees with your rationale?

[PATCH] D55039: [sema] Warn of mangling change if function parameters are noexcept.

2018-11-28 Thread Matt Davis via Phabricator via cfe-commits
mattd created this revision. mattd added reviewers: erik.pilkington, rsmith. The flag: `-Wc++17-compat-mangling` was not emitting a warning diagnostic in all cases, specifically if a function has parameters that happen to have function pointers that have noexecept parameters. For example:

[PATCH] D54379: Add Hurd toolchain support to Clang

2018-11-28 Thread Kristina Brooks via Phabricator via cfe-commits
kristina accepted this revision as: kristina. kristina added a comment. Actually nevermind, I'll just create them myself, seems like a strange bug. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54379/new/ https://reviews.llvm.org/D54379

[PATCH] D54781: [clangd] Add 'Switch header/source' command in clangd-vscode

2018-11-28 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added a comment. In D54781#1311038 , @hokein wrote: > Just made a new release v0.0.7, please try to use it (it works on my machine). Works great! Thanks a lot! Repository: rL LLVM CHANGES SINCE LAST ACTION

[PATCH] D55048: [ThinLTO] Allow importing of multiple symbols with same GUID

2018-11-28 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson created this revision. tejohnson added a reviewer: evgeny777. Herald added subscribers: dexonsmith, steven_wu, eraman, inglorion, mehdi_amini. The is the clang side of the fix in D55047 , to handle the case where two different modules have local

[PATCH] D53757: [ASTImporter] Changed use of Import to Import_New in ASTNodeImporter.

2018-11-28 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 175821. balazske added a comment. - Changed every use of ASTImporter::Import to Import_New Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53757/new/ https://reviews.llvm.org/D53757 Files: lib/AST/ASTImporter.cpp

[PATCH] D55039: [sema] Warn of mangling change if function parameters are noexcept.

2018-11-28 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete added a comment. You're missing the case of the function return type of a parameter. void f(void (*g())() noexcept); // no warning with trunk nor with your patch CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55039/new/ https://reviews.llvm.org/D55039

[PATCH] D53708: [ASTImporter] Add importer specific lookup

2018-11-28 Thread Aleksei Sidorin via Phabricator via cfe-commits
a_sidorin added a comment. Hi Gabor, Here are some new comments. Comment at: lib/AST/ASTImporter.cpp:7658 +ASTImporter::FoundDeclsTy +ASTImporter::FindDeclsInToCtx(DeclContext *DC, DeclarationName Name) { + // We search in the redecl context because of transparent contexts.

[PATCH] D55049: Changed every use of ASTImporter::Import to Import_New

2018-11-28 Thread Balázs Kéri via Phabricator via cfe-commits
balazske created this revision. Herald added subscribers: cfe-commits, gamesh411, Szelethus, martong, dkrupp. Herald added a reviewer: a.sidorin. Herald added a reviewer: shafik. Repository: rC Clang https://reviews.llvm.org/D55049 Files: lib/AST/ExternalASTMerger.cpp

[PATCH] D53757: [ASTImporter] Changed use of Import to Import_New in ASTNodeImporter.

2018-11-28 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 175822. balazske added a comment. Removing previous wrong update. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53757/new/ https://reviews.llvm.org/D53757 Files: lib/AST/ASTImporter.cpp Index: lib/AST/ASTImporter.cpp

[PATCH] D55037: [-gmodules] Honor -fdebug-prefix-map in the debug info inside PCMs.

2018-11-28 Thread Adrian Prantl via Phabricator via cfe-commits
aprantl created this revision. aprantl added reviewers: bruno, rsmith. This patch passes -fdebug-prefix-map (a feature for renaming source paths in the debug info) through to the per-module codegen options and adds the debug prefix map to the module hash. rdar://problem/46045865

[PATCH] D54379: Add Hurd toolchain support to Clang

2018-11-28 Thread Kristina Brooks via Phabricator via cfe-commits
kristina added a comment. Hm, yes you're right, the files aren't in the diff that Phab gives me, this is annoying. I wonder if it's stripping them from the diff for some reason, can you upload the raw diff? Repository: rC Clang CHANGES SINCE LAST ACTION

[PATCH] D55044: [cfe-dev] clang-tidy check for Abseil make_unique

2018-11-28 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. Thanks for working on this. Semi-duplicate of D50852 Please see discussion there. It should not be an abseil-specific check, the prefix (`std`,`abseil`), and the function (`make_unique`) should be a config option, and it should

[clang-tools-extra] r347825 - [Documentation] Try to fix build failure in cppcoreguidelines-narrowing-conversions documentation

2018-11-28 Thread Eugene Zelenko via cfe-commits
Author: eugenezelenko Date: Wed Nov 28 18:13:25 2018 New Revision: 347825 URL: http://llvm.org/viewvc/llvm-project?rev=347825=rev Log: [Documentation] Try to fix build failure in cppcoreguidelines-narrowing-conversions documentation Modified:

[PATCH] D51568: [modules] Add `-fno-absolute-module-directory` flag for relocatable modules

2018-11-28 Thread Brian Gesiak via Phabricator via cfe-commits
modocache added subscribers: manmanren, bruno, modocache. modocache added reviewers: manmanren, bruno. modocache added a comment. Herald added a subscriber: arphaman. Friendly ping! Could someone recommend a reviewer for this? Or is there something wrong with the patch? Looking at the blame I

[PATCH] D44100: [ASTImporter] Reorder fields after structure import is finished

2018-11-28 Thread Aleksei Sidorin via Phabricator via cfe-commits
a_sidorin added a comment. Hi Adrian, I've already done check-all (this includes LLDB) with this patch. As you can see in this thread, I didn't manage to reproduce some issues on Linux. Luckily, one test still failed on Linux so I could find the problem. However , it will be good to ensure

[PATCH] D54986: Make CodeGen choose when to emit vtables.

2018-11-28 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. Will `-fforce-emit-vtables` still work? Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54986/new/ https://reviews.llvm.org/D54986 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D54986: Make CodeGen choose when to emit vtables.

2018-11-28 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith updated this revision to Diff 175791. rsmith added a comment. - Do not emit unused discardable vtables. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54986/new/ https://reviews.llvm.org/D54986 Files: lib/AST/ASTContext.cpp

[PATCH] D54379: Add Hurd toolchain support to Clang

2018-11-28 Thread Samuel Thibault via Phabricator via cfe-commits
sthibaul added a comment. I don't have this issue with make check-all in clang/. Just to make sure: are the .keep files of the patch getting created? Otherwise the i386-gnu/ directories will not get created and then it's not surprising that clang doesn't add them to the research paths.

[PATCH] D54379: Add Hurd toolchain support to Clang

2018-11-28 Thread Kristina Brooks via Phabricator via cfe-commits
kristina accepted this revision. kristina added a comment. This revision is now accepted and ready to land. Yes everything passes now, my bad for not noticing. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54379/new/ https://reviews.llvm.org/D54379

[PATCH] D54872: [clangd] Add ability to not use -resource-dir at all

2018-11-28 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added a comment. Reading D54630 , I think that's what might be happening. Here's how to reproduce the problem though: - Clangd compiled from source with Visual Studio 2017 (i.e. not from win installer) - LLVM win installer from http://llvm.org/builds/

[PATCH] D55044: [cfe-dev] clang-tidy check for Abseil make_unique

2018-11-28 Thread Andy Zhang via Phabricator via cfe-commits
axzhang created this revision. axzhang added reviewers: klimek, EricWF. axzhang added a project: clang-tools-extra. Herald added a subscriber: mgorny. Add a new check for https://abseil.io/tips/126, to detect uses of constructing a std::unique_ptr with a call to new, and recommend substituting

[PATCH] D54945: This commit adds a chapter about clang-tidy integrations

2018-11-28 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/clang-tidy/index.rst:304 +CLion_ 2017.2 and later `integrates clang-tidy`_ as an extension to the built-in code analyzer. +Inspections and applicable quick-fixes are performed on the fly, and checks can be configured in

[PATCH] D54379: Add Hurd toolchain support to Clang

2018-11-28 Thread Kristina Brooks via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC347833: Add Hurd target to Clang driver (2/2) (authored by kristina, committed by ). Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54379/new/

r347833 - Add Hurd target to Clang driver (2/2)

2018-11-28 Thread Kristina Brooks via cfe-commits
Author: kristina Date: Wed Nov 28 19:49:14 2018 New Revision: 347833 URL: http://llvm.org/viewvc/llvm-project?rev=347833=rev Log: Add Hurd target to Clang driver (2/2) This adds Hurd toolchain support to Clang's driver in addition to handling translating the triple from Hurd-compatible form to

[PATCH] D54905: [AddressSanitizer] Add flag to disable linking with CXX runtime

2018-11-28 Thread Eugene Leviant via Phabricator via cfe-commits
evgeny777 added a comment. Unfortunately, this is not an option. I have very custom heap implementation (in fact multiple heap types sharing contiguous memory block), so ASAN heap can't be a drop-in replacement. I'm using manual poisoning and it works pretty well, but have to disable C++

[PATCH] D54999: [clangd] Populate include graph during static indexing action.

2018-11-28 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: ilya-biryukov. Herald added subscribers: cfe-commits, arphaman, jkorous, MaskRay, ioeric, mgorny. This is the second part for introducing include hierarchy into index files produced by clangd. You can see the base patch that introduces

[PATCH] D54901: [Haiku] Support __float128 for Haiku x86 and x86_64

2018-11-28 Thread Kristina Brooks via Phabricator via cfe-commits
kristina accepted this revision. kristina added a comment. This revision is now accepted and ready to land. LGTM. (Revision of D53696 ) Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54901/new/ https://reviews.llvm.org/D54901

[PATCH] D54858: [OpenCL] Improve diagnostics for address spaces in template instantiation

2018-11-28 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 175665. Anastasia added a comment. - Changing qualifiers while rebuilding types in TreeTransform is incorrect -> prevent deducing address space instead. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54858/new/ https://reviews.llvm.org/D54858

[PATCH] D54995: [MemoryBuffer] By default assume that all files are volatile to prevent unintended file locks

2018-11-28 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. In D54995#1311010 , @yvvan wrote: > @ilya-biryukov > > I have the reported evidence but didn't yet have time to investigate myself. > This is probably caused by our upgrade to Clang-7 which shows that we can't > rely on

[PATCH] D54903: [Sema] Improve static_assert diagnostics.

2018-11-28 Thread Clement Courbet via Phabricator via cfe-commits
courbet marked an inline comment as done. courbet added inline comments. Comment at: test/SemaCXX/static-assert.cpp:111 +static_assert(std::is_same::value, "message"); // expected-error{{static_assert failed due to requirement 'std::is_same::value' "message"}}

[clang-tools-extra] r347754 - [clangd] Less penalty for cross-namespace completions.

2018-11-28 Thread Eric Liu via cfe-commits
Author: ioeric Date: Wed Nov 28 05:45:25 2018 New Revision: 347754 URL: http://llvm.org/viewvc/llvm-project?rev=347754=rev Log: [clangd] Less penalty for cross-namespace completions. Modified: clang-tools-extra/trunk/clangd/Quality.cpp Modified: clang-tools-extra/trunk/clangd/Quality.cpp

[clang-tools-extra] r347755 - [clangd] Fix test broken in r347754.

2018-11-28 Thread Eric Liu via cfe-commits
Author: ioeric Date: Wed Nov 28 06:00:09 2018 New Revision: 347755 URL: http://llvm.org/viewvc/llvm-project?rev=347755=rev Log: [clangd] Fix test broken in r347754. Modified: clang-tools-extra/trunk/clangd/Quality.cpp Modified: clang-tools-extra/trunk/clangd/Quality.cpp URL:

[PATCH] D51865: [clang-tidy] Added a test -export-fixes with relative paths.

2018-11-28 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE347760: [clang-tidy] Added a test -export-fixes with relative paths. (authored by ibiryukov, committed by ). Changed prior to commit: https://reviews.llvm.org/D51865?vs=164688=175682#toc Repository:

[clang-tools-extra] r347760 - [clang-tidy] Added a test -export-fixes with relative paths.

2018-11-28 Thread Ilya Biryukov via cfe-commits
Author: ibiryukov Date: Wed Nov 28 06:43:26 2018 New Revision: 347760 URL: http://llvm.org/viewvc/llvm-project?rev=347760=rev Log: [clang-tidy] Added a test -export-fixes with relative paths. Summary: A test for D51864. Reviewers: ioeric, steveire Reviewed By: steveire Subscribers: xazax.hun,

[PATCH] D54995: [MemoryBuffer] By default assume that all files are volatile to prevent unintended file locks

2018-11-28 Thread Ivan Donchevskii via Phabricator via cfe-commits
yvvan added a comment. "could we figure out the exact cause of the issue?" I'm pretty sure we can. Currently the issue is mentioned in our bugreports (https://bugreports.qt.io/secure/attachment/78582/clang-locks.png) and i plan to reproduce it and track the exact issue. And this review was not

[PATCH] D54995: [MemoryBuffer] By default assume that all files are volatile to prevent unintended file locks

2018-11-28 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. In D54995#1311303 , @yvvan wrote: > "could we figure out the exact cause of the issue?" > And this review was not meant to proceed immediately but rather state the > intention and get some feedback because I still don't

[PATCH] D54995: [MemoryBuffer] By default assume that all files are volatile to prevent unintended file locks

2018-11-28 Thread Ivan Donchevskii via Phabricator via cfe-commits
yvvan added a comment. @ilya-biryukov https://bugreports.qt.io/browse/QTCREATORBUG-15449 I was able to lock files last time with mmap. The Windows API calls are CreateFileMappingW (it's in the Path.inc, line 794) and MapViewOfFile (further down). As far as I remember the second call actually

Re: [PATCH] D54998: [clangd] Build and test IndexBenchmark in check-clangd

2018-11-28 Thread Tom Weaver via cfe-commits
Hiya Haojian, I've been looking over the build bots recently and believe r347753 may have caused the following test: clangd/index-tools.test to start failing. You can see the failing test in the logs of the following build bot:

[PATCH] D54858: [OpenCL] Improve diagnostics for address spaces in template instantiation

2018-11-28 Thread Alexey Bader via Phabricator via cfe-commits
bader added inline comments. Comment at: lib/Sema/TreeTransform.h:5276 +// Return type cann't be qualified with an address space. +if (ResultType.getAddressSpace() != LangAS::Default) { "cann't" - typo? cann't - > can't or cannot.

[PATCH] D54757: [clang-tidy] new check: bugprone-branch-clone

2018-11-28 Thread Donát Nagy via Phabricator via cfe-commits
donat.nagy updated this revision to Diff 175697. donat.nagy marked 5 inline comments as done. donat.nagy added a comment. Minor simplifications, add tests for macro handling Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54757/new/

[PATCH] D54858: [OpenCL] Improve diagnostics for address spaces in template instantiation

2018-11-28 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 175698. Anastasia added a comment. Corrected a typo in comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54858/new/ https://reviews.llvm.org/D54858 Files: lib/Sema/SemaDecl.cpp lib/Sema/SemaType.cpp lib/Sema/TreeTransform.h

[PATCH] D54995: [MemoryBuffer] By default assume that all files are volatile to prevent unintended file locks

2018-11-28 Thread Ivan Donchevskii via Phabricator via cfe-commits
yvvan added a comment. @ilya-biryukov According to https://stackoverflow.com/a/7414798 (if it's true) we can't prevent locks. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54995/new/ https://reviews.llvm.org/D54995 ___ cfe-commits

[PATCH] D55006: [clang] - Simplify tools::SplitDebugName

2018-11-28 Thread George Rimar via Phabricator via cfe-commits
grimar created this revision. grimar added reviewers: dblaikie, JonasToth. This is an updated version of the D54576 , which was reverted. Problem was that `SplitDebugName` calls the `InputInfo::getFilename` which asserts if `InputInfo` given is not of type

[PATCH] D55006: [clang] - Simplify tools::SplitDebugName

2018-11-28 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. In D55006#1311398 , @grimar wrote: > In D55006#1311391 , @dblaikie wrote: > > > Cool - thanks! Any chance/way to add a test for this that'd show up sooner > > than the breakage caused by

[PATCH] D54999: [clangd] Populate include graph during static indexing action.

2018-11-28 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clangd/index/IndexAction.cpp:45 +auto = I->getValue(); +if (auto Digest = digestFile(SM, FileID)) + Node.Digest = std::move(*Digest); kadircet wrote: > ilya-biryukov wrote: > > What happens if we

[PATCH] D54858: [OpenCL] Improve diagnostics for address spaces in template instantiation

2018-11-28 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added a comment. This revision is now accepted and ready to land. LGTM. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54858/new/ https://reviews.llvm.org/D54858 ___ cfe-commits mailing list

[PATCH] D55006: [clang] - Simplify tools::SplitDebugName

2018-11-28 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. Cool - thanks! Any chance/way to add a test for this that'd show up sooner than the breakage caused by the previous version? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55006/new/ https://reviews.llvm.org/D55006

[PATCH] D55006: [clang] - Simplify tools::SplitDebugName

2018-11-28 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. Thank you for the fix! I will try this version as soon as I am at home (~2 hours from now) and report back if the issues I had are gone. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55006/new/ https://reviews.llvm.org/D55006

[PATCH] D54757: [clang-tidy] new check: bugprone-branch-clone

2018-11-28 Thread Donát Nagy via Phabricator via cfe-commits
donat.nagy updated this revision to Diff 175701. donat.nagy added a comment. Correct a typo (ELSE instead of else) Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54757/new/ https://reviews.llvm.org/D54757 Files:

Re: [PATCH] D54995: [MemoryBuffer] By default assume that all files are volatile to prevent unintended file locks

2018-11-28 Thread Ilya Biryukov via cfe-commits
I don't have a Windows machine, but I tried it on the VM and couldn't come up with a combination of flags that breaks it. Which is weird because the linked stackoverflow question mentions Windows locks all files on mmap, but that's not what I was seeing. I'll repeat the experiment. On Wed, Nov

[PATCH] D55007: [Analyzer] Constraint Manager - Calculate Effective Range for Differences

2018-11-28 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware created this revision. baloghadamsoftware added a reviewer: NoQ. baloghadamsoftware added a project: clang. Herald added subscribers: donat.nagy, mikhail.ramalho, a.sidorin, szepet. Herald added a reviewer: george.karpenkov. Since rL335814 ,

[PATCH] D54986: Make CodeGen choose when to emit vtables.

2018-11-28 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/CodeGen/CodeGenModule.cpp:3991-3992 + if (auto *MD = dyn_cast(D)) { +// FIXME: There's no reason to do this if the key function is inline. +// Formally, the ABI requires it, but the difference is not observable. +if

[PATCH] D54858: [OpenCL] Improve diagnostics for address spaces in template instantiation

2018-11-28 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 175699. Anastasia marked an inline comment as done. Anastasia added a comment. Removed commented code in the test. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54858/new/ https://reviews.llvm.org/D54858 Files: lib/Sema/SemaDecl.cpp

[PATCH] D54858: [OpenCL] Improve diagnostics for address spaces in template instantiation

2018-11-28 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia marked 2 inline comments as done. Anastasia added inline comments. Comment at: lib/Sema/TreeTransform.h:5276 +// Return type cann't be qualified with an address space. +if (ResultType.getAddressSpace() != LangAS::Default) { bader wrote: >

[PATCH] D54757: [clang-tidy] new check: bugprone-branch-clone

2018-11-28 Thread Donát Nagy via Phabricator via cfe-commits
donat.nagy marked 3 inline comments as done. donat.nagy added a comment. **AstDiff:** I looked at the AstDiff library, but I think that it is overkill for my goals. The main feat of the AstDiff library is analyzing and presenting the differences between two AST subtrees, while this checker

[PATCH] D54999: [clangd] Populate include graph during static indexing action.

2018-11-28 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 175684. kadircet marked 11 inline comments as done. kadircet added a comment. - Address comments. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54999/new/ https://reviews.llvm.org/D54999 Files:

[PATCH] D54999: [clangd] Populate include graph during static indexing action.

2018-11-28 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clangd/index/IndexAction.cpp:45 +auto = I->getValue(); +if (auto Digest = digestFile(SM, FileID)) + Node.Digest = std::move(*Digest); ilya-biryukov wrote: > What happens if we can't compute a digest for a

[clang-tools-extra] r347761 - Fix false positive with lambda assignments in cert-err58-cpp.

2018-11-28 Thread Aaron Ballman via cfe-commits
Author: aaronballman Date: Wed Nov 28 07:04:38 2018 New Revision: 347761 URL: http://llvm.org/viewvc/llvm-project?rev=347761=rev Log: Fix false positive with lambda assignments in cert-err58-cpp. This check is about preventing exceptions from being thrown before main() executes, and assigning a

[PATCH] D55006: [clang] - Simplify tools::SplitDebugName

2018-11-28 Thread George Rimar via Phabricator via cfe-commits
grimar added a comment. With that the original issue mentioned in the following comment is fixed for me: https://reviews.llvm.org/rL347035#299232 CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55006/new/ https://reviews.llvm.org/D55006 ___

[PATCH] D55006: [clang] - Simplify tools::SplitDebugName

2018-11-28 Thread George Rimar via Phabricator via cfe-commits
grimar added a comment. In D55006#1311391 , @dblaikie wrote: > Cool - thanks! Any chance/way to add a test for this that'd show up sooner > than the breakage caused by the previous version? Maybe, I am not sure. I was not able to trigger this without

Re: [PATCH] D54995: [MemoryBuffer] By default assume that all files are volatile to prevent unintended file locks

2018-11-28 Thread Zachary Turner via cfe-commits
Do you all have Windows machines? The easiest thing to do is just write a sample program that mmaps a file and then tries to delete it, iterating over every possible set of flags. On Wed, Nov 28, 2018 at 7:25 AM Ivan Donchevskii via Phabricator < revi...@reviews.llvm.org> wrote: > yvvan added a

[PATCH] D55006: [clang] - Simplify tools::SplitDebugName

2018-11-28 Thread George Rimar via Phabricator via cfe-commits
grimar added a comment. In D55006#1311400 , @dblaikie wrote: > In D55006#1311398 , @grimar wrote: > > > In D55006#1311391 , @dblaikie > > wrote: > > > > > Cool - thanks!

[PATCH] D54995: [MemoryBuffer] By default assume that all files are volatile to prevent unintended file locks

2018-11-28 Thread Zachary Turner via Phabricator via cfe-commits
zturner added a comment. In D54995#1311399 , @ilya-biryukov wrote: > In D54995#1311303 , @yvvan wrote: > > > "could we figure out the exact cause of the issue?" > > And this review was not meant to proceed

[PATCH] D54862: [OpenCL] Add generic AS to 'this' pointer

2018-11-28 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/AST/DeclCXX.cpp:2187 ClassTy = C.getQualifiedType(ClassTy, Qualifiers::fromCVRUMask(getTypeQualifiers())); + I feel like the right design now is for `getTypeQualifiers()` to

  1   2   >