[PATCH] D47111: : Implement monotonic_buffer_resource.

2018-07-04 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. In https://reviews.llvm.org/D47111#1151714, @Quuxplusone wrote: > > I'll take a pass at the tests tomorrow. Some pointers in general: > > > > - Tests should be named after the component they test, not how they're > > testing it. > > - All the tests for a single

[PATCH] D48941: [ASTImporter] import FunctionDecl end locations

2018-07-04 Thread Aleksei Sidorin via Phabricator via cfe-commits
a_sidorin added a comment. Hello Rafael. This change is good, just some cleanup is needed. Comment at: lib/AST/ASTImporter.cpp:2559 D->isImplicit()); +ToFunction->setRangeEnd(Importer.Import(D->getLocEnd())); } else if (auto

[PATCH] D48753: [libcxx] Use custom allocator's `construct` in C++03 when available.

2018-07-04 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added inline comments. Comment at: libcxx/test/std/containers/sequences/vector/vector.cons/construct_iter_iter_alloc.pass.cpp:60 + + void construct(pointer p, const value_type& val) + { Quuxplusone wrote: > Per my comments on D48342, I think it would

[PATCH] D48342: [libcxx] Optimize vectors construction of trivial types from an iterator range with const-ness mismatch.

2018-07-04 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added inline comments. Comment at: libcxx/include/memory:1479 +struct __has_construct_missing +: false_type +{ Quuxplusone wrote: > vsapsai wrote: > > Quuxplusone wrote: > > > vsapsai wrote: > > > > vsapsai wrote: > > > > > vsapsai wrote: > > > > > >

[PATCH] D48044: [Power9] Update fp128 as a valid homogenous aggregate base type

2018-07-04 Thread Lei Huang via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL336308: [Power9] Update fp128 as a valid homogenous aggregate base type (authored by lei, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D48773: [ASTImporter] Fix import of objects with anonymous types

2018-07-04 Thread Aleksei Sidorin via Phabricator via cfe-commits
a_sidorin accepted this revision. a_sidorin added a comment. This revision is now accepted and ready to land. Nice! Repository: rC Clang https://reviews.llvm.org/D48773 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D48903: [VirtualFileSystem] InMemoryFileSystem::status: Return a Status with the requested name

2018-07-04 Thread Simon Marchi via Phabricator via cfe-commits
simark added a comment. I opened https://reviews.llvm.org/D48951 to fix the failures in clang-move. Repository: rC Clang https://reviews.llvm.org/D48903 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang-tools-extra] r336302 - Adding some documentation changes that were missed in r336301.

2018-07-04 Thread Aaron Ballman via cfe-commits
Author: aaronballman Date: Wed Jul 4 18:35:49 2018 New Revision: 336302 URL: http://llvm.org/viewvc/llvm-project?rev=336302=rev Log: Adding some documentation changes that were missed in r336301. Added: clang-tools-extra/trunk/docs/clang-tidy/checks/cert-msc51-cpp.rst Modified:

[PATCH] D48342: [libcxx] Optimize vectors construction of trivial types from an iterator range with const-ness mismatch.

2018-07-04 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. In https://reviews.llvm.org/D48342#1152063, @EricWF wrote: > Are there any tests which actually exercise the new behavior? Added tests only verify we don't use memcpy erroneously. And existing tests make sure there are no functionality regressions. But there is

[PATCH] D44143: [clang-tidy] Create properly seeded random generator check

2018-07-04 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman closed this revision. aaron.ballman added a comment. In https://reviews.llvm.org/D44143#1152550, @boga95 wrote: > How can I commit it? You need to have obtained commit access first. I went ahead and committed on your behalf in r336301. Thank you for the patch!

r336300 - [Index] Remove unused index::IndexDataConsumer::_anchor()

2018-07-04 Thread Fangrui Song via cfe-commits
Author: maskray Date: Wed Jul 4 17:33:03 2018 New Revision: 336300 URL: http://llvm.org/viewvc/llvm-project?rev=336300=rev Log: [Index] Remove unused index::IndexDataConsumer::_anchor() It was supposed to serve as a key function, but it was invalid as it was not the first out-of-line non-pure

[PATCH] D48628: [AST] Structural equivalence of methods

2018-07-04 Thread Aleksei Sidorin via Phabricator via cfe-commits
a_sidorin accepted this revision. a_sidorin added a comment. LG with a nit. Thank you! Comment at: unittests/AST/StructuralEquivalenceTest.cpp:489 + +TEST_F(StructuralEquivalenceRecordTest, DISABLED_Methods) { + auto t = makeNamedDecls( Could you add a

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

2018-07-04 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. @rsmith Ping. This needs to land before the next branch for release. https://reviews.llvm.org/D45015 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] r336301 - Add the cert-msc51-cpp and cert-msc32-c checks.

2018-07-04 Thread Aaron Ballman via cfe-commits
Author: aaronballman Date: Wed Jul 4 18:16:31 2018 New Revision: 336301 URL: http://llvm.org/viewvc/llvm-project?rev=336301=rev Log: Add the cert-msc51-cpp and cert-msc32-c checks. These checks flag use of random number generators with poor seeds that would possibly lead to degraded random

r336261 - Add missing include for size_t

2018-07-04 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Wed Jul 4 04:14:18 2018 New Revision: 336261 URL: http://llvm.org/viewvc/llvm-project?rev=336261=rev Log: Add missing include for size_t Modified: cfe/trunk/include/clang/Basic/Stack.h Modified: cfe/trunk/include/clang/Basic/Stack.h URL:

r336263 - NFC - Fix typo in test/CodeGenObjC/gnustep2-class.m

2018-07-04 Thread Gabor Buella via cfe-commits
Author: gbuella Date: Wed Jul 4 04:26:09 2018 New Revision: 336263 URL: http://llvm.org/viewvc/llvm-project?rev=336263=rev Log: NFC - Fix typo in test/CodeGenObjC/gnustep2-class.m Modified: cfe/trunk/test/CodeGenObjC/gnustep2-class.m Modified: cfe/trunk/test/CodeGenObjC/gnustep2-class.m

[PATCH] D46190: For a used declaration, mark any associated usings as referenced.

2018-07-04 Thread Carlos Alberto Enciso via Phabricator via cfe-commits
CarlosAlbertoEnciso added inline comments. Comment at: lib/Sema/Sema.cpp:1884-1885 + ND = NA->getAliasedNamespace(); + if (auto *NNS = NA->getQualifier()) +MarkNamespaceAliasReferenced(NNS->getAsNamespaceAlias()); +} rsmith wrote: > The

[PATCH] D48314: [Frontend] Cache preamble-related data

2018-07-04 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. I agree that the optimization is compelling, we do also share preamble in clangd and run code completion in parallel with other actions that need an AST. However, I would argue that a proper way to introduce the optimization would be to change interface of

[clang-tools-extra] r336260 - [clangd] only ignore collected symbols if TU has uncompilable errors.

2018-07-04 Thread Eric Liu via cfe-commits
Author: ioeric Date: Wed Jul 4 03:39:48 2018 New Revision: 336260 URL: http://llvm.org/viewvc/llvm-project?rev=336260=rev Log: [clangd] only ignore collected symbols if TU has uncompilable errors. Modified: clang-tools-extra/trunk/clangd/global-symbol-builder/GlobalSymbolBuilderMain.cpp

[PATCH] D48441: [clangd] Incorporate transitive #includes into code complete proximity scoring.

2018-07-04 Thread Carlos Alberto Enciso via Phabricator via cfe-commits
CarlosAlbertoEnciso added a comment. In https://reviews.llvm.org/D48441#1151889, @ioeric wrote: > Hi Carlos, thanks for letting us know! I sent r336249 to fix the windows > test. Hi @ioeric, Thanks very much. Happy to help. Repository: rL LLVM https://reviews.llvm.org/D48441

[PATCH] D48314: [Frontend] Cache preamble-related data

2018-07-04 Thread Ivan Donchevskii via Phabricator via cfe-commits
yvvan added a comment. @ilya-biryukov Sorry. I didn't have time to post comments here. The usecase that we have is a supportive translation unit for code completion. Probably you use something similar in clangd not to wait for the TU to be reparsed after a change? The gain from this change is

r336262 - NFC - Fix typo in test/Layout/itanium-pack-and-align.cpp

2018-07-04 Thread Gabor Buella via cfe-commits
Author: gbuella Date: Wed Jul 4 04:21:44 2018 New Revision: 336262 URL: http://llvm.org/viewvc/llvm-project?rev=336262=rev Log: NFC - Fix typo in test/Layout/itanium-pack-and-align.cpp Modified: cfe/trunk/test/Layout/itanium-pack-and-align.cpp Modified:

r336264 - NFC - Fix type in builtins-ppc-p9vector.c test

2018-07-04 Thread Gabor Buella via cfe-commits
Author: gbuella Date: Wed Jul 4 04:29:21 2018 New Revision: 336264 URL: http://llvm.org/viewvc/llvm-project?rev=336264=rev Log: NFC - Fix type in builtins-ppc-p9vector.c test Modified: cfe/trunk/test/CodeGen/builtins-ppc-p9vector.c Modified: cfe/trunk/test/CodeGen/builtins-ppc-p9vector.c

[PATCH] D48441: [clangd] Incorporate transitive #includes into code complete proximity scoring.

2018-07-04 Thread Carlos Alberto Enciso via Phabricator via cfe-commits
CarlosAlbertoEnciso added a comment. Hi, It seems that your patch is causing an error in the tests for http://lab.llvm.org:8011/builders/clang-x64-ninja-win7

[PATCH] D48917: [SemaCodeComplete] Make sure visited contexts are passed to completion results handler.

2018-07-04 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. ioeric added a reviewer: ilya-biryukov. Herald added a subscriber: cfe-commits. Repository: rC Clang https://reviews.llvm.org/D48917 Files: lib/Sema/SemaCodeComplete.cpp unittests/Sema/CodeCompleteTest.cpp Index: unittests/Sema/CodeCompleteTest.cpp

r336243 - NFC - typo fix in test/CodeGen/avx512f-builtins.c

2018-07-04 Thread Gabor Buella via cfe-commits
Author: gbuella Date: Wed Jul 4 01:32:02 2018 New Revision: 336243 URL: http://llvm.org/viewvc/llvm-project?rev=336243=rev Log: NFC - typo fix in test/CodeGen/avx512f-builtins.c Modified: cfe/trunk/test/CodeGen/avx512f-builtins.c Modified: cfe/trunk/test/CodeGen/avx512f-builtins.c URL:

[PATCH] D48916: Fix setting of empty implicit-section-name attribute for functions affected by '#pragma clang section'

2018-07-04 Thread Momchil Velikov via Phabricator via cfe-commits
chill added inline comments. Comment at: test/CodeGen/clang-sections-attribute.c:1 +// RUN: %clang_cc1 -emit-llvm -triple arm-none-eabi -o - %s | FileCheck %s + Isn't it possible for the test to fail if the Arm target is not configured? Repository: rC Clang

[PATCH] D48903: [VirtualFileSystem] InMemoryFileSystem::status: Return a Status with the requested name

2018-07-04 Thread Haojian Wu via Phabricator via cfe-commits
hokein added subscribers: bkramer, hokein. hokein added a comment. I'm not familiar with this part of code, but the change looks fine to me. I think @bkramer is the right person to review it. Please make sure the style align with LLVM code style. Comment at:

[PATCH] D48903: [VirtualFileSystem] InMemoryFileSystem::status: Return a Status with the requested name

2018-07-04 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. Sorry, have missed the @hokein 's comments, so one of mine seems like a duplicate. Repository: rC Clang https://reviews.llvm.org/D48903 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D48916: Fix setting of empty implicit-section-name attribute for functions affected by '#pragma clang section'

2018-07-04 Thread Petr Pavlu via Phabricator via cfe-commits
petpav01 added inline comments. Comment at: test/CodeGen/clang-sections-attribute.c:1 +// RUN: %clang_cc1 -emit-llvm -triple arm-none-eabi -o - %s | FileCheck %s + chill wrote: > Isn't it possible for the test to fail if the Arm target is not configured? I think

[PATCH] D46190: For a referenced declaration, mark any associated usings as referenced.

2018-07-04 Thread Carlos Alberto Enciso via Phabricator via cfe-commits
CarlosAlbertoEnciso added a comment. In https://reviews.llvm.org/D46190#1135688, @rsmith wrote: > The right way to handle this is to pass both the ultimately-selected > declaration and the declaration found by name lookup into the calls to > `MarkAnyDeclReferenced` and friends. We should mark

[PATCH] D48917: [SemaCodeComplete] Make sure visited contexts are passed to completion results handler.

2018-07-04 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov accepted this revision. ilya-biryukov added a comment. This revision is now accepted and ready to land. LGTM Repository: rC Clang https://reviews.llvm.org/D48917 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D46190: For a used declaration, mark any associated usings as referenced.

2018-07-04 Thread Carlos Alberto Enciso via Phabricator via cfe-commits
CarlosAlbertoEnciso updated this revision to Diff 154091. CarlosAlbertoEnciso added a comment. Update the patch to address the comments from the reviewers. https://reviews.llvm.org/D46190 Files: include/clang/Sema/Lookup.h include/clang/Sema/Sema.h include/clang/Sema/SemaInternal.h

[PATCH] D48933: [clangd] Treat class constructor as in the same scope as the class in ranking.

2018-07-04 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. ioeric added a reviewer: sammccall. Herald added subscribers: cfe-commits, jkorous, MaskRay, ilya-biryukov. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D48933 Files: clangd/Quality.cpp unittests/clangd/QualityTests.cpp Index:

[PATCH] D48342: [libcxx] Optimize vectors construction of trivial types from an iterator range with const-ness mismatch.

2018-07-04 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. Are there any tests which actually exercise the new behavior? Comment at: libcxx/include/memory:1665 +(is_same::type> >::value +|| is_same >::value +|| !__has_construct::value) && I'm not sure

r336239 - [Sema] Consider all format_arg attributes.

2018-07-04 Thread Michael Kruse via cfe-commits
Author: meinersbur Date: Tue Jul 3 18:37:11 2018 New Revision: 336239 URL: http://llvm.org/viewvc/llvm-project?rev=336239=rev Log: [Sema] Consider all format_arg attributes. If a function has multiple format_arg attributes, clang only considers the first it finds (because AttributeLists are in

r336244 - [Sema] Fix crash in getConstructorName.

2018-07-04 Thread Ilya Biryukov via cfe-commits
Author: ibiryukov Date: Wed Jul 4 01:50:12 2018 New Revision: 336244 URL: http://llvm.org/viewvc/llvm-project?rev=336244=rev Log: [Sema] Fix crash in getConstructorName. Summary: Can happen when getConstructorName is called on invalid decls, specifically the ones that do not have the injected

[PATCH] D48880: [Sema] Fix crash in getConstructorName.

2018-07-04 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC336244: [Sema] Fix crash in getConstructorName. (authored by ibiryukov, committed by ). Changed prior to commit: https://reviews.llvm.org/D48880?vs=154063=154064#toc Repository: rC Clang

[clang-tools-extra] r336248 - [clangd] FileDistance: temporarily disable in CodeComplete, it's behaving badly

2018-07-04 Thread Sam McCall via cfe-commits
Author: sammccall Date: Wed Jul 4 02:01:04 2018 New Revision: 336248 URL: http://llvm.org/viewvc/llvm-project?rev=336248=rev Log: [clangd] FileDistance: temporarily disable in CodeComplete, it's behaving badly Modified: clang-tools-extra/trunk/clangd/CodeComplete.cpp Modified:

[PATCH] D48921: NFC - type fix in test/CodeGenCXX/runtime-dllstorage.cpp

2018-07-04 Thread Gabor Buella via Phabricator via cfe-commits
GBuella created this revision. GBuella added reviewers: compnerd, espindola. Herald added a subscriber: cfe-commits. Repository: rC Clang https://reviews.llvm.org/D48921 Files: test/CodeGenCXX/runtime-dllstorage.cpp Index: test/CodeGenCXX/runtime-dllstorage.cpp

[PATCH] D48903: [VirtualFileSystem] InMemoryFileSystem::status: Return a Status with the requested name

2018-07-04 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a reviewer: ilya-biryukov. ilya-biryukov added a comment. Mimicing RealFS seems like the right thing to do here, so I would vouch for checking this change in. I'm a little worried that there are tests/clients relying on the old behavior, have you run all the tests? Also,

[PATCH] D48628: [AST] Structural equivalence of methods

2018-07-04 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 154073. balazske added a comment. - Updates according to review comments Repository: rC Clang https://reviews.llvm.org/D48628 Files: lib/AST/ASTImporter.cpp lib/AST/ASTStructuralEquivalence.cpp unittests/AST/ASTImporterTest.cpp

[PATCH] D48773: [ASTImporter] Fix import of objects with anonymous types

2018-07-04 Thread Gabor Marton via Phabricator via cfe-commits
martong marked an inline comment as done. martong added inline comments. Comment at: lib/AST/ASTImporter.cpp:2085 } + } else { +if (!IsStructuralMatch(D, FoundRecord, false)) balazske wrote: > martong wrote: > > a_sidorin wrote:

[PATCH] D48881: [clangd] Avoid collecting symbols from broken TUs in global-symbol-builder.

2018-07-04 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov accepted this revision. ilya-biryukov added a comment. This revision is now accepted and ready to land. LGTM with a minor NIT Comment at: clangd/global-symbol-builder/GlobalSymbolBuilderMain.cpp:88 +(CI.getDiagnosticClient().getNumErrors() > 0)) { +

[PATCH] D48881: [clangd] Avoid collecting symbols from broken TUs in global-symbol-builder.

2018-07-04 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clangd/global-symbol-builder/GlobalSymbolBuilderMain.cpp:88 +(CI.getDiagnosticClient().getNumErrors() > 0)) { + llvm::errs() << "Found errors in the translation unit. Igoring " +

[clang-tools-extra] r336253 - [clangd] Cleanup unittest: URIs. NFC.

2018-07-04 Thread Eric Liu via cfe-commits
Author: ioeric Date: Wed Jul 4 02:54:23 2018 New Revision: 336253 URL: http://llvm.org/viewvc/llvm-project?rev=336253=rev Log: [clangd] Cleanup unittest: URIs. NFC. Modified: clang-tools-extra/trunk/unittests/clangd/FileDistanceTests.cpp Modified:

[PATCH] D47537: [clang-tools-extra] Cleanup documentation routine

2018-07-04 Thread Kirill Bobyrev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL336257: [clang-tools-extra] Cleanup documentation routine (authored by omtcyfz, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D48928: [ms] Fix mangling of string literals used to initialize arrays larger or smaller than the literal

2018-07-04 Thread Hans Wennborg via Phabricator via cfe-commits
hans created this revision. hans added reviewers: thakis, majnemer. A Chromium developer reported a bug which turned out to be a mangling collision between these two literals: char s[] = "foo"; char t[32] = "foo"; They may look the same, but for the initialization of t we will (under some

[PATCH] D48314: [Frontend] Cache preamble-related data

2018-07-04 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. I would argue this should be handled by the clients instead. Adding global state and locking is complicated. (And ASTUnit is complicated enough). What are the use-cases of creating multiple `ASTUnit` inside the same process for the same file? Which clients do

[clang-tools-extra] r336246 - [clangd] FileDistance: missing constexpr

2018-07-04 Thread Sam McCall via cfe-commits
Author: sammccall Date: Wed Jul 4 01:52:13 2018 New Revision: 336246 URL: http://llvm.org/viewvc/llvm-project?rev=336246=rev Log: [clangd] FileDistance: missing constexpr Modified: clang-tools-extra/trunk/clangd/FileDistance.cpp Modified: clang-tools-extra/trunk/clangd/FileDistance.cpp

[PATCH] D48917: [SemaCodeComplete] Make sure visited contexts are passed to completion results handler.

2018-07-04 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: lib/Sema/SemaCodeComplete.cpp:3744 AddMacroResults(PP, Results, false, PreferredTypeIsPointer); - HandleCodeCompleteResults(this, CodeCompleter, -CodeCompletionContext(CodeCompletionContext::CCC_Expression,

[PATCH] D48721: Patch to fix pragma metadata for do-while loops

2018-07-04 Thread Deepak Panickal via Phabricator via cfe-commits
deepak2427 added a comment. I encountered the issue while working with the unroller and found that it was not following the pragma info, and traced it back to the issue with metadata. As far as I understood, for for-loops and while-loops, we add the metadata only to the loop back-edge. So it

[clang-tools-extra] r336257 - [clang-tools-extra] Cleanup documentation routine

2018-07-04 Thread Kirill Bobyrev via cfe-commits
Author: omtcyfz Date: Wed Jul 4 03:18:03 2018 New Revision: 336257 URL: http://llvm.org/viewvc/llvm-project?rev=336257=rev Log: [clang-tools-extra] Cleanup documentation routine The following issues are resolved: * Doxygen didn't generate documentation for a bunch of existing tools due to the

[PATCH] D48916: Fix setting of empty implicit-section-name attribute for functions affected by '#pragma clang section'

2018-07-04 Thread Petr Pavlu via Phabricator via cfe-commits
petpav01 created this revision. petpav01 added reviewers: javed.absar, chill, rnk. Herald added subscribers: cfe-commits, kristof.beyls. Code in `CodeGenModule::SetFunctionAttributes()` can set an empty attribute `implicit-section-name` on a function that is affected by `#pragma clang

[PATCH] D48661: [Fixed Point Arithmetic] Fixed Point Constant

2018-07-04 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan added inline comments. Comment at: lib/Basic/FixedPoint.cpp:40 + if (DstWidth > Val.getBitWidth()) +Val = Val.extend(DstWidth); + if (Upscaling) leonardchan wrote: > ebevhan wrote: > > It should be possible to replace this with `extOrTrunc` and

[clang-tools-extra] r336242 - [clangd] FileDistance: don't add duplicate edges

2018-07-04 Thread Sam McCall via cfe-commits
Author: sammccall Date: Wed Jul 4 01:27:28 2018 New Revision: 336242 URL: http://llvm.org/viewvc/llvm-project?rev=336242=rev Log: [clangd] FileDistance: don't add duplicate edges Modified: clang-tools-extra/trunk/clangd/FileDistance.cpp Modified:

[PATCH] D48427: [Analyzer] Fix for D47417 to make the tests pass

2018-07-04 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware updated this revision to Diff 154066. baloghadamsoftware added a comment. Adding of transition removed since it is part of https://reviews.llvm.org/D47417. https://reviews.llvm.org/D48427 Files: lib/StaticAnalyzer/Checkers/IteratorChecker.cpp Index:

[PATCH] D48917: [SemaCodeComplete] Make sure visited contexts are passed to completion results handler.

2018-07-04 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: lib/Sema/SemaCodeComplete.cpp:3744 AddMacroResults(PP, Results, false, PreferredTypeIsPointer); - HandleCodeCompleteResults(this, CodeCompleter, -CodeCompletionContext(CodeCompletionContext::CCC_Expression,

[PATCH] D48881: [clangd] Avoid collecting symbols from broken TUs in global-symbol-builder.

2018-07-04 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clangd/global-symbol-builder/GlobalSymbolBuilderMain.cpp:88 +(CI.getDiagnosticClient().getNumErrors() > 0)) { + llvm::errs() << "Found errors in the translation unit. Igoring " + "collected

[PATCH] D48917: [SemaCodeComplete] Make sure visited contexts are passed to completion results handler.

2018-07-04 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 154077. ioeric added a comment. - Addressed review comment. Repository: rC Clang https://reviews.llvm.org/D48917 Files: lib/Sema/SemaCodeComplete.cpp unittests/Sema/CodeCompleteTest.cpp Index: unittests/Sema/CodeCompleteTest.cpp

[PATCH] D48917: [SemaCodeComplete] Make sure visited contexts are passed to completion results handler.

2018-07-04 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: lib/Sema/SemaCodeComplete.cpp:3744 AddMacroResults(PP, Results, false, PreferredTypeIsPointer); - HandleCodeCompleteResults(this, CodeCompleter, -CodeCompletionContext(CodeCompletionContext::CCC_Expression,

[PATCH] D48928: [ms] Fix mangling of string literals used to initialize arrays larger or smaller than the literal

2018-07-04 Thread Hans Wennborg via Phabricator via cfe-commits
hans added a comment. I couldn't get MSVC to create a symbol with padding at the end; they seem to always insert the padding with a separate loop during initialization, but this does show the truncated case: https://godbolt.org/g/B8ktA3 https://reviews.llvm.org/D48928

[PATCH] D48880: [Sema] Fix crash in getConstructorName.

2018-07-04 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 154063. ilya-biryukov marked an inline comment as done. ilya-biryukov added a comment. - Better recovery for invalid decls that do have an injected class name - Move the test to SemaCXX Repository: rC Clang https://reviews.llvm.org/D48880 Files:

[PATCH] D48880: [Sema] Fix crash in getConstructorName.

2018-07-04 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. Thanks for taking a look! Repository: rC Clang https://reviews.llvm.org/D48880 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D48441: [clangd] Incorporate transitive #includes into code complete proximity scoring.

2018-07-04 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a subscriber: sammccall. ioeric added a comment. Hi Carlos, thanks for letting us know! I sent r336249 to fix the windows test. Repository: rL LLVM https://reviews.llvm.org/D48441 ___ cfe-commits mailing list

[PATCH] D48917: [SemaCodeComplete] Make sure visited contexts are passed to completion results handler.

2018-07-04 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: lib/Sema/SemaCodeComplete.cpp:3744 AddMacroResults(PP, Results, false, PreferredTypeIsPointer); - HandleCodeCompleteResults(this, CodeCompleter, -CodeCompletionContext(CodeCompletionContext::CCC_Expression,

[clang-tools-extra] r336252 - [clangd] Avoid collecting symbols from broken TUs in global-symbol-builder.

2018-07-04 Thread Eric Liu via cfe-commits
Author: ioeric Date: Wed Jul 4 02:43:35 2018 New Revision: 336252 URL: http://llvm.org/viewvc/llvm-project?rev=336252=rev Log: [clangd] Avoid collecting symbols from broken TUs in global-symbol-builder. Summary: For example, template parameter might not be resolved in a broken TU, which can

[PATCH] D48881: [clangd] Avoid collecting symbols from broken TUs in global-symbol-builder.

2018-07-04 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL336252: [clangd] Avoid collecting symbols from broken TUs in global-symbol-builder. (authored by ioeric, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM

r336255 - [SemaCodeComplete] Make sure visited contexts are passed to completion results handler.

2018-07-04 Thread Eric Liu via cfe-commits
Author: ioeric Date: Wed Jul 4 03:01:18 2018 New Revision: 336255 URL: http://llvm.org/viewvc/llvm-project?rev=336255=rev Log: [SemaCodeComplete] Make sure visited contexts are passed to completion results handler. Reviewers: ilya-biryukov Subscribers: cfe-commits Differential Revision:

[PATCH] D48917: [SemaCodeComplete] Make sure visited contexts are passed to completion results handler.

2018-07-04 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC336255: [SemaCodeComplete] Make sure visited contexts are passed to completion results… (authored by ioeric, committed by ). Changed prior to commit:

[PATCH] D48687: [clangd] Avoid duplicates in findDefinitions response

2018-07-04 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. > I think the fixing way is to normalize the file path from AST (making it > absolute). Totally agree. Could we run the code used to get the URI to store in the dynamic index? Should we expose and reuse code in `getSymbolLocation()` from `SymbolCollector.cpp`?

[clang-tools-extra] r336249 - Try to fix FileDistance test on windows.

2018-07-04 Thread Eric Liu via cfe-commits
Author: ioeric Date: Wed Jul 4 02:08:40 2018 New Revision: 336249 URL: http://llvm.org/viewvc/llvm-project?rev=336249=rev Log: Try to fix FileDistance test on windows.

Re: [PATCH] D48441: [clangd] Incorporate transitive #includes into code complete proximity scoring.

2018-07-04 Thread Eric Liu via cfe-commits
Hi Carlos, thanks for letting us know! I sent r336249 to fix the windows test. On Wed, Jul 4, 2018 at 9:51 AM Carlos Alberto Enciso via Phabricator < revi...@reviews.llvm.org> wrote: > CarlosAlbertoEnciso added a comment. > > Hi, > > It seems that your patch is causing an error in the tests for

[PATCH] D46190: For a referenced declaration, mark any associated usings as referenced.

2018-07-04 Thread Carlos Alberto Enciso via Phabricator via cfe-commits
CarlosAlbertoEnciso added a comment. In https://reviews.llvm.org/D46190#1135295, @probinson wrote: > Style comments. > The two new Sema methods (for namespaces and using references) are C++ > specific, so SemaDeclCXX.cpp would seem like a more appropriate home for them. Both functions have

[PATCH] D48628: [AST] Structural equivalence of methods

2018-07-04 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added inline comments. Comment at: lib/AST/ASTImporter.cpp:2454 + if (IsStructuralMatch(D, FoundFunction)) { +const FunctionDecl *Definition = nullptr; +if (D->doesThisDeclarationHaveABody() && This change with

[PATCH] D48941: [ASTImporter] import FunctionDecl end locations

2018-07-04 Thread Rafael Stahl via Phabricator via cfe-commits
r.stahl created this revision. r.stahl added reviewers: martong, a.sidorin, balazske, xazax.hun. Herald added subscribers: cfe-commits, rnkovacs. On constructors that do not take the end source location, it was not imported. Fixes test from https://reviews.llvm.org/D47698 /

[PATCH] D48941: [ASTImporter] import FunctionDecl end locations

2018-07-04 Thread Rafael Stahl via Phabricator via cfe-commits
r.stahl added a comment. In https://reviews.llvm.org/D47698#1141871, @r.stahl wrote: > improved code quality; added nested macro test. it "works", but is disabled > because it revealed another bug: the function end location is not imported. > will send a patch Related to this. Repository:

[PATCH] D48942: [PCH] Add an option to not write comments into PCH

2018-07-04 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov created this revision. ilya-biryukov added a reviewer: sammccall. Herald added a subscriber: ioeric. Will be used in clangd, see the follow-up change. Clangd does not use comments read from PCH to avoid crashes due to changed contents of the file. However, reading them considerably

[PATCH] D48943: [clangd] Do not write comments into Preamble PCH

2018-07-04 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov created this revision. ilya-biryukov added a reviewer: sammccall. Herald added subscribers: jkorous, MaskRay, ioeric. To avoid wasting time deserializing them on code completion and further reparses. We do not use the comments anyway, because we cannot rely on the file contents

[PATCH] D48903: [VirtualFileSystem] InMemoryFileSystem::status: Return a Status with the requested name

2018-07-04 Thread Simon Marchi via Phabricator via cfe-commits
simark added a comment. I ran `ninja clang-test`: Testing Time: 1720.20s Expected Passes: 12472 Expected Failures : 18 Unsupported Tests : 263 Repository: rC Clang https://reviews.llvm.org/D48903 ___ cfe-commits mailing list

[clang-tools-extra] r336283 - [clang-tidy] Fix http://llvm.org/PR38055

2018-07-04 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Wed Jul 4 08:19:49 2018 New Revision: 336283 URL: http://llvm.org/viewvc/llvm-project?rev=336283=rev Log: [clang-tidy] Fix http://llvm.org/PR38055 Modified: clang-tools-extra/trunk/clang-tidy/misc/UnusedParametersCheck.cpp

[PATCH] D48942: [PCH] Add an option to not write comments into PCH

2018-07-04 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. Not sure about two things: - Using PreprocessorOptions for plumbing this setting. I'd rather put it into FrontendOptions, but there seems to be no way to get those in the ASTWriter... Happy to search for the alternatives - Lack of tests. I'm not sure how to

[PATCH] D48903: [VirtualFileSystem] InMemoryFileSystem::status: Return a Status with the requested name

2018-07-04 Thread Simon Marchi via Phabricator via cfe-commits
simark updated this revision to Diff 154118. simark added a comment. - Fixed formatting (ran git-clang-format) - Fixed expectation in TEST_F(InMemoryFileSystemTest, WorkingDirectory) - Added test TEST_F(InMemoryFileSystemTest, StatusName) Repository: rC Clang https://reviews.llvm.org/D48903

[PATCH] D48941: [ASTImporter] import FunctionDecl end locations

2018-07-04 Thread Gabor Marton via Phabricator via cfe-commits
martong added inline comments. Comment at: lib/AST/ASTImporter.cpp:2559 D->isImplicit()); +ToFunction->setRangeEnd(Importer.Import(D->getLocEnd())); } else if (auto *FromConversion = dyn_cast(D)) { Why don't we

[PATCH] D48938: [clangd] Track origins of symbols (various indexes, Sema).

2018-07-04 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. sammccall added a reviewer: ioeric. Herald added subscribers: cfe-commits, jkorous, MaskRay, ilya-biryukov. Surface it in the completion items C++ API, and when a flag is set. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D48938 Files:

[PATCH] D48903: [VirtualFileSystem] InMemoryFileSystem::status: Return a Status with the requested name

2018-07-04 Thread Simon Marchi via Phabricator via cfe-commits
simark added a comment. In https://reviews.llvm.org/D48903#1151866, @ilya-biryukov wrote: > Mimicing RealFS seems like the right thing to do here, so I would vouch for > checking this change in. > I'm a little worried that there are tests/clients relying on the old > behavior, have you run

Re: r335800 - [analyzer] Add support for pre-C++17 copy elision.

2018-07-04 Thread Alexander Kornienko via cfe-commits
We've started seeing assertion failures after this commit. assert.h assertion failed at llvm/tools/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp:485 in static clang::ento::ProgramStateRef clang::ento::ExprEngine::elideDestructor(clang::ento::ProgramStateRef, const clang::CXXBindTemporaryExpr *,

[PATCH] D47946: [ASTmporter] Fix infinite recursion on function import with struct definition in parameters

2018-07-04 Thread Zoltán Gera via Phabricator via cfe-commits
gerazo added a comment. @a.sidorin what do you think? https://reviews.llvm.org/D47946 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D48938: [clangd] Track origins of symbols (various indexes, Sema).

2018-07-04 Thread Eric Liu via Phabricator via cfe-commits
ioeric accepted this revision. ioeric added a comment. This revision is now accepted and ready to land. lgtm. neat! Comment at: clangd/index/Index.cpp:50 +return OS << "unknown"; + static char Sigils[] = "ADSM4567"; + for (unsigned I = 0; I < sizeof(Sigils); ++I)

Re: r335795 - [CFG] [analyzer] Add construction contexts that explain pre-C++17 copy elision.

2018-07-04 Thread Alexander Kornienko via cfe-commits
We've started seeing an assertion failure after this commit: assert.h assertion failed at llvm/tools/clang/lib/Analysis/CFG.cpp:1266 in void (anonymous namespace)::CFGBuilder::findConstructionContexts(const clang::ConstructionContextLayer *, clang::Stmt *): CE->getNumArgs() == 1 The stack trace

[PATCH] D48044: [Power9] Update fp128 as a valid homogenous aggregate base type

2018-07-04 Thread Nemanja Ivanovic via Phabricator via cfe-commits
nemanjai accepted this revision. nemanjai added a comment. This revision is now accepted and ready to land. Other than a few style nits that can be fixed on the commit, this LGTM. Comment at: include/clang/AST/Type.h:1802 bool isFloat16Type() const; // C11 extension

r336269 - [ASTImporter] import macro source locations

2018-07-04 Thread Rafael Stahl via cfe-commits
Author: r.stahl Date: Wed Jul 4 06:34:05 2018 New Revision: 336269 URL: http://llvm.org/viewvc/llvm-project?rev=336269=rev Log: [ASTImporter] import macro source locations Summary: Implement full import of macro expansion info with spelling and expansion locations. Reviewers: a.sidorin,

[PATCH] D47698: [ASTImporter] import macro source locations

2018-07-04 Thread Rafael Stahl via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. r.stahl marked an inline comment as done. Closed by commit rC336269: [ASTImporter] import macro source locations (authored by r.stahl, committed by ). Changed prior to commit:

[PATCH] D48027: [analyzer] Improve `CallDescription` to handle c++ method.

2018-07-04 Thread Henry Wong via Phabricator via cfe-commits
MTC added a comment. Thanks for your review, NoQ! Comment at: lib/StaticAnalyzer/Checkers/BlockInCriticalSectionChecker.cpp:68 : IILockGuard(nullptr), IIUniqueLock(nullptr), - LockFn("lock"), UnlockFn("unlock"), SleepFn("sleep"), GetcFn("getc"), -

[PATCH] D48940: [clangd] Wait for first preamble before code completion

2018-07-04 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov created this revision. ilya-biryukov added a reviewer: sammccall. Herald added subscribers: jkorous, MaskRay, ioeric, javed.absar. To avoid doing extra work of processing headers in the preamble mutilple times in parallel. Repository: rCTE Clang Tools Extra

[PATCH] D48903: [VirtualFileSystem] InMemoryFileSystem::status: Return a Status with the requested name

2018-07-04 Thread Simon Marchi via Phabricator via cfe-commits
simark added a comment. In https://reviews.llvm.org/D48903#1151847, @hokein wrote: > I'm not familiar with this part of code, but the change looks fine to me. I > think @bkramer is the right person to review it. > > Please make sure the style align with LLVM code style. Woops indeed I forgot

[PATCH] D48474: [analyzer][ctu] fix unsortable diagnostics

2018-07-04 Thread Rafael Stahl via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC336275: [analyzer][ctu] fix unsortable diagnostics (authored by r.stahl, committed by ). Changed prior to commit: https://reviews.llvm.org/D48474?vs=152433=154107#toc Repository: rC Clang

r336275 - [analyzer][ctu] fix unsortable diagnostics

2018-07-04 Thread Rafael Stahl via cfe-commits
Author: r.stahl Date: Wed Jul 4 07:12:58 2018 New Revision: 336275 URL: http://llvm.org/viewvc/llvm-project?rev=336275=rev Log: [analyzer][ctu] fix unsortable diagnostics Summary: In the provided test case the PathDiagnostic compare function was not able to find a difference. Reviewers:

[PATCH] D44143: [clang-tidy] Create properly seeded random generator check

2018-07-04 Thread Borsik Gábor via Phabricator via cfe-commits
boga95 added a comment. How can I commit it? Comment at: docs/clang-tidy/checks/cert-msc51-cpp.rst:7 +This check flags all pseudo-random number engines, engine adaptor +instantiations and `srand()` when initialized or seeded with default argument, +constant expression or any

[PATCH] D48027: [analyzer] Improve `CallDescription` to handle c++ method.

2018-07-04 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. In https://reviews.llvm.org/D48027#1142324, @MTC wrote: > - There is possible match the wrong AST node, e.g. for the NamedDecl `foo()`, > if the function body has the `a::b::x`, when we match `a::b::X()`, we will > match `foo()` . Because I'm not familiar with

  1   2   >