[PATCH] D48716: [clang-format/ObjC] Fix counting selector name parts for ObjC

2018-07-03 Thread Jacek Olesiak via Phabricator via cfe-commits
jolesiak added a comment. In https://reviews.llvm.org/D48716#1149733, @benhamilton wrote: > Phabricator has an `Edit Related Revisions` feature where you can tag other > revisions as being dependencies of or depending upon the current revision: Thanks! That's what I was looking for. Reposito

[PATCH] D42682: [clang-tidy] Add misc-io-functions-misused checker

2018-07-03 Thread Gábor Horváth via Phabricator via cfe-commits
hgabii updated this revision to Diff 153863. hgabii added a comment. Sorry, I forgot about my pull request. I fixed the issues what are identified by reviewers : - Check moved to bugprone module - () and `` added - matchesName replaced with hasAnyName -Unnecessary IDs depracated - clang-tidy/

[PATCH] D44609: [Clang-Format] New option BreakBeforeLambdaBody to manage lambda line break inside function parameter call

2018-07-03 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added inline comments. Herald added a subscriber: acoomans. Comment at: lib/Format/TokenAnnotator.cpp:627 } +if(Style.BraceWrapping.BeforeLambdaBody && Current->is(TT_LambdaLSquare)) { +++Left->BlockParameterCount; Why do we want to increa

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

2018-07-03 Thread Gábor Horváth via Phabricator via cfe-commits
hgabii created this revision. Herald added subscribers: cfe-commits, mgorny. This checker warns for cases when pointer is cast and the pointed to type is incompatible with allocated memory area type. This may lead to access memory based on invalid memory layout. Warn for cases when the pointed t

[clang-tools-extra] r336173 - [clangd] Remove CompletionItem::SymbolScope extension.

2018-07-03 Thread Sam McCall via cfe-commits
Author: sammccall Date: Tue Jul 3 00:21:15 2018 New Revision: 336173 URL: http://llvm.org/viewvc/llvm-project?rev=336173&view=rev Log: [clangd] Remove CompletionItem::SymbolScope extension. This was never serialized, and embedders now have access to the CodeCompletion API, which includes this in

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

2018-07-03 Thread Sam McCall via Phabricator via cfe-commits
sammccall marked an inline comment as done. sammccall added a comment. Sigh... sorry, forgot to send these comments with the last patch. Will measure performance today. Comment at: clangd/FileDistance.cpp:9 +//===

[PATCH] D48601: Added -fcrash-diagnostics-dir flag

2018-07-03 Thread Hans Wennborg via Phabricator via cfe-commits
hans accepted this revision. hans added a comment. This revision is now accepted and ready to land. lgtm Repository: rL LLVM https://reviews.llvm.org/D48601 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mai

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

2018-07-03 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 153867. sammccall added a comment. Rebase Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D48441 Files: clangd/CMakeLists.txt clangd/ClangdServer.cpp clangd/ClangdUnit.cpp clangd/ClangdUnit.h clangd/CodeComplete.cpp clangd/CodeC

[PATCH] D48722: [ASTImporter] Update isUsed flag at Decl import.

2018-07-03 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. Originally this change was made after the patch in https://reviews.llvm.org/D47632 was done. It is here back-ported to the state before it. I like the idea of integrating this change into https://reviews.llvm.org/D47632. (This is a new functionality: Attributes are up

[PATCH] D41458: [libc++][C++17] Elementary string conversions for integral types

2018-07-03 Thread Zhihao Yuan via Phabricator via cfe-commits
lichray updated this revision to Diff 153868. lichray added a comment. Herald added a subscriber: ldionne. A macro-free implementation Repository: rCXX libc++ https://reviews.llvm.org/D41458 Files: .gitignore include/charconv include/module.modulemap src/charconv.cpp test/libcxx/do

r336175 - Revert r336021 "PR33924: merge local declarations that have linkage of some kind within"

2018-07-03 Thread Hans Wennborg via cfe-commits
Author: hans Date: Tue Jul 3 00:51:41 2018 New Revision: 336175 URL: http://llvm.org/viewvc/llvm-project?rev=336175&view=rev Log: Revert r336021 "PR33924: merge local declarations that have linkage of some kind within" This caused test failures in 32-bit builds (PR38015). > merged function def

Re: r336021 - PR33924: merge local declarations that have linkage of some kind within

2018-07-03 Thread Hans Wennborg via cfe-commits
I've reverted in r336175 in the meantime to green the tests. On Mon, Jul 2, 2018 at 5:21 PM, Hans Wennborg wrote: > Hi Richard, > > This introduced test failures on Windows, but for some reason only in > 32-bit builds: https://bugs.llvm.org/show_bug.cgi?id=38015 > > I don't know what's going on y

[PATCH] D41458: [libc++][C++17] Elementary string conversions for integral types

2018-07-03 Thread Zhihao Yuan via Phabricator via cfe-commits
lichray marked an inline comment as done. lichray added inline comments. Comment at: src/charconv.cpp:34 + +#define APPEND1(i) \ +do \ lichray wrote: > mclow.lists wrote: > > I'd really lik

[PATCH] D45045: [DebugInfo] Generate debug information for labels.

2018-07-03 Thread Hsiangkai Wang via Phabricator via cfe-commits
HsiangKai added a comment. In https://reviews.llvm.org/D45045#1114280, @HsiangKai wrote: > In https://reviews.llvm.org/D45045#1092697, @hans wrote: > > > This broke the Chromium build. I've uploaded a reproducer at > > https://bugs.chromium.org/p/chromium/issues/detail?id=841170#c1 > > > > I'm g

[PATCH] D48827: [clang-format ]Extend IncludeCategories regex documentation

2018-07-03 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir requested changes to this revision. krasimir added a comment. This revision now requires changes to proceed. This file is automatically generated from `Format.h` using `clang/docs/tools/dump_format_style.py`. Please update. Repository: rC Clang https://reviews.llvm.org/D48827 ___

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

2018-07-03 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Performance on a transitively big file. Stress test - global scope completion with index turned off. Benchmarking codeComplete() call 100x per trial, trials randomly ordered. Before this patch (427ms 421ms 430ms) After this patch (418ms 420ms 417ms) So it seems this is

[clang-tools-extra] r336177 - [clangd] Incorporate transitive #includes into code complete proximity scoring.

2018-07-03 Thread Sam McCall via cfe-commits
Author: sammccall Date: Tue Jul 3 01:09:29 2018 New Revision: 336177 URL: http://llvm.org/viewvc/llvm-project?rev=336177&view=rev Log: [clangd] Incorporate transitive #includes into code complete proximity scoring. Summary: We now compute a distance from the main file to the symbol header, which

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

2018-07-03 Thread Sam McCall via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL336177: [clangd] Incorporate transitive #includes into code complete proximity scoring. (authored by sammccall, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://revi

[PATCH] D44609: [Clang-Format] New option BreakBeforeLambdaBody to manage lambda line break inside function parameter call

2018-07-03 Thread Francois JEAN via Phabricator via cfe-commits
Wawha added inline comments. Comment at: lib/Format/TokenAnnotator.cpp:627 } +if(Style.BraceWrapping.BeforeLambdaBody && Current->is(TT_LambdaLSquare)) { +++Left->BlockParameterCount; klimek wrote: > Why do we want to increase the parameter count

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

2018-07-03 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan added inline comments. Comment at: include/clang/Basic/FixedPoint.h:67 + // Convert this number to match the semantics provided. + void convert(const struct fixedPointSemantics &DstSema); + If this class is supposed to be used like APInt and APSInt, per

[PATCH] D44609: [Clang-Format] New option BreakBeforeLambdaBody to manage lambda line break inside function parameter call

2018-07-03 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added inline comments. Comment at: lib/Format/TokenAnnotator.cpp:627 } +if(Style.BraceWrapping.BeforeLambdaBody && Current->is(TT_LambdaLSquare)) { +++Left->BlockParameterCount; Wawha wrote: > klimek wrote: > > Why do we want to increase t

[PATCH] D47111: : Implement monotonic_buffer_resource.

2018-07-03 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone updated this revision to Diff 153881. Repository: rCXX libc++ https://reviews.llvm.org/D47111 Files: include/experimental/memory_resource src/experimental/memory_resource.cpp test/libcxx/experimental/memory/memory.resource.monotonic.buffer/monotonic.buffer.mem/allocate_in_ge

[PATCH] D47358: : Implement {un, }synchronized_pool_resource.

2018-07-03 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone updated this revision to Diff 153882. Herald added subscribers: ldionne, christof. Repository: rCXX libc++ https://reviews.llvm.org/D47358 Files: include/experimental/memory_resource src/experimental/memory_resource.cpp test/libcxx/experimental/memory/memory.resource.pool/me

[PATCH] D45045: [DebugInfo] Generate debug information for labels.

2018-07-03 Thread Hans Wennborg via Phabricator via cfe-commits
hans added a comment. In https://reviews.llvm.org/D45045#1150525, @HsiangKai wrote: > In https://reviews.llvm.org/D45045#1114280, @HsiangKai wrote: > > > In https://reviews.llvm.org/D45045#1092697, @hans wrote: > > > > > This broke the Chromium build. I've uploaded a reproducer at > > > https://

[PATCH] D48722: [ASTImporter] Update isUsed flag at Decl import.

2018-07-03 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. > I have a strong feeling of duplication with attribute and flags merging move > in https://reviews.llvm.org/D47632. Maybe it is better to be resolved in that > review by using the same code for attr/flag merging for both newly-created > and mapped decls? Ok, then I'll

[PATCH] D41458: [libc++][C++17] Elementary string conversions for integral types

2018-07-03 Thread Zhihao Yuan via Phabricator via cfe-commits
lichray updated this revision to Diff 153888. lichray added a comment. Install the header file Repository: rCXX libc++ https://reviews.llvm.org/D41458 Files: .gitignore include/CMakeLists.txt include/charconv include/module.modulemap src/charconv.cpp test/libcxx/double_include.sh

[PATCH] D35068: [analyzer] Detect usages of unsafe I/O functions

2018-07-03 Thread Daniel Kolozsvari via Phabricator via cfe-commits
koldaniel added a comment. Herald added a subscriber: mikhail.ramalho. Hi, could you please take a look at this issue? https://reviews.llvm.org/D35068 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/list

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

2018-07-03 Thread Bjorn Pettersson via Phabricator via cfe-commits
bjope added a comment. In https://reviews.llvm.org/D48721#1150361, @hfinkel wrote: > In https://reviews.llvm.org/D48721#1150333, @bjope wrote: > > > Is the fault that the metadata only should be put on the back edge, not the > > branch in the preheader? > > > Yea. Our past thinking has been that

[PATCH] D48873: [AST] Use llvm::TrailingObjects in clang::CXXTryStmt

2018-07-03 Thread Bruno Ricci via Phabricator via cfe-commits
bricci created this revision. bricci added a reviewer: rsmith. bricci added a project: clang. Herald added a subscriber: cfe-commits. Use TrailingObjects for CXXTryStmt instead of hand-rolling it. This hides the reinterpret_casts and make it more consistent with the other classes. Repository:

[PATCH] D48854: Use ExprMutationAnalyzer in performance-for-range-copy

2018-07-03 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added inline comments. Comment at: test/clang-tidy/performance-for-range-copy.cpp:120 +struct Point { + ~Point() {} I feel that `const` methods should be added as a test as well. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D48854

[PATCH] D48831: alpha.unix.cstring.OutOfBounds checker enable/disable fix

2018-07-03 Thread Daniel Krupp via Phabricator via cfe-commits
dkrupp updated this revision to Diff 153905. dkrupp added a comment. The patch has been updated. Changes: -The analysis path is cut if overvlow is detected even if CStringOutOfBounds is disabled The assert(Filter.CheckCStringOutOfBounds || Filter.CheckCStringNullArg); cannot be put back, becau

[PATCH] D48831: alpha.unix.cstring.OutOfBounds checker enable/disable fix

2018-07-03 Thread Daniel Krupp via Phabricator via cfe-commits
dkrupp marked 2 inline comments as done. dkrupp added inline comments. Comment at: lib/StaticAnalyzer/Checkers/CStringChecker.cpp:311 +if (!Filter.CheckCStringOutOfBounds) + return StOutBound; NoQ wrote: > Could we preserve the other portion of the ass

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

2018-07-03 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware updated this revision to Diff 153907. baloghadamsoftware added a comment. Instead of marking the container alive, now we defer deletion of the container data until all its iterators are cleaned up. https://reviews.llvm.org/D48427 Files: lib/StaticAnalyzer/Checkers/Iterator

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

2018-07-03 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. Thanks for doing this! https://reviews.llvm.org/D47537 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bi

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

2018-07-03 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov created this revision. ilya-biryukov added reviewers: bkramer, rsmith. Can happen when getConstructorName is called on invalid decls, specifically the ones that do not have the injected class name. Repository: rC Clang https://reviews.llvm.org/D48880 Files: lib/Sema/SemaExprC

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

2018-07-03 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. ioeric added a reviewer: ilya-biryukov. Herald added subscribers: cfe-commits, jkorous, MaskRay. For example, template parameter might not be resolved in a broken TU, which can result in wrong USR/SymbolID. Repository: rCTE Clang Tools Extra https://reviews.llvm.

[PATCH] D48694: [libc++abi] Limit libc++ header search to specified paths

2018-07-03 Thread Louis Dionne via Phabricator via cfe-commits
ldionne added a comment. In https://reviews.llvm.org/D48694#1148718, @EricWF wrote: > As an aside, libc++abi should really live in the libc++ repository. That way > it would always have the correct headers available. But every time I pitch > that idea I get a ton of push back. FWIW, I think I

[PATCH] D48833: [Driver] Add PPC64 as supported for Scudo

2018-07-03 Thread Kostya Kortchinsky via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC336202: [Driver] Add PPC64 as supported for Scudo (authored by cryptoad, committed by ). Changed prior to commit: https://reviews.llvm.org/D48833?vs=153727&id=153915#toc Repository: rC Clang https:/

r336202 - [Driver] Add PPC64 as supported for Scudo

2018-07-03 Thread Kostya Kortchinsky via cfe-commits
Author: cryptoad Date: Tue Jul 3 07:39:29 2018 New Revision: 336202 URL: http://llvm.org/viewvc/llvm-project?rev=336202&view=rev Log: [Driver] Add PPC64 as supported for Scudo Summary: Scudo works on PPC64 as is, so mark the architecture as supported for it. This will also require a change to co

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

2018-07-03 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 153917. martong marked an inline comment as done. martong added a comment. Remove redundant code and use only StructurlaEquivalence Repository: rC Clang https://reviews.llvm.org/D48773 Files: lib/AST/ASTImporter.cpp unittests/AST/ASTImporterTest.cpp

[clang-tools-extra] r336203 - [clangd] Use default format style and fallback style. NFC

2018-07-03 Thread Eric Liu via cfe-commits
Author: ioeric Date: Tue Jul 3 07:51:23 2018 New Revision: 336203 URL: http://llvm.org/viewvc/llvm-project?rev=336203&view=rev Log: [clangd] Use default format style and fallback style. NFC Modified: clang-tools-extra/trunk/clangd/CodeComplete.cpp Modified: clang-tools-extra/trunk/clangd/Co

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

2018-07-03 Thread Gabor Marton via Phabricator via cfe-commits
martong added inline comments. Comment at: lib/AST/ASTImporter.cpp:2085 } + } else { +if (!IsStructuralMatch(D, FoundRecord, false)) a_sidorin wrote: > Is it possible to use the added code for the entire condition `if (auto > *F

[PATCH] D42682: [clang-tidy] Add io-functions-misused checker

2018-07-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/bugprone/BugproneTidyModule.cpp:84 +CheckFactories.registerCheck( +"bugprone-io-functions-misused"); CheckFactories.registerCheck( This name reads a bit awkwardly because usually "misuse

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

2018-07-03 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. //bugprone// seems to be proper category for this check. Comment at: clang-tidy/misc/IncorrectPointerCastCheck.cpp:35 + const ASTContext &Context = *Result.Context; + const CStyleCastExpr *CastExpr = + Result.Nodes.getNodeAs("cast"); -

[PATCH] D48854: Use ExprMutationAnalyzer in performance-for-range-copy

2018-07-03 Thread Haojian Wu via Phabricator via cfe-commits
hokein accepted this revision. hokein added a comment. This revision is now accepted and ready to land. LGTM. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D48854 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.

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

2018-07-03 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added inline comments. Comment at: lib/AST/ASTImporter.cpp:2085 } + } else { +if (!IsStructuralMatch(D, FoundRecord, false)) martong wrote: > a_sidorin wrote: > > Is it possible to use the added code for the entire condi

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

2018-07-03 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 153924. leonardchan marked 7 inline comments as done. Repository: rC Clang https://reviews.llvm.org/D48661 Files: include/clang/AST/ASTContext.h include/clang/Basic/FixedPoint.h include/clang/Basic/TargetInfo.h lib/AST/ASTContext.cpp lib/Basi

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

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

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

2018-07-03 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. After taking a look closely, I figured why there are two candidates here -- one is from AST (the one with ".." path); the other one is from dynamic index, the deduplication failed because of the different paths :( I think the fixing way is to normalize the file path from

[PATCH] D46919: [libclang] Deprecate CXPrintingPolicy_IncludeTagDefinition

2018-07-03 Thread Joel E. Denny via Phabricator via cfe-commits
jdenny updated this revision to Diff 153930. jdenny added a comment. Ping. Rebased. https://reviews.llvm.org/D46919 Files: include/clang-c/Index.h include/clang/AST/PrettyPrinter.h lib/AST/DeclPrinter.cpp lib/AST/TypePrinter.cpp tools/c-index-test/c-index-test.c Index: tools/c-index

[PATCH] D48886: VS 2017 clang integration

2018-07-03 Thread David Tarditi via Phabricator via cfe-commits
dtarditi created this revision. dtarditi added a reviewer: hans. Herald added subscribers: delcypher, mgorny. Add support for integrating clang as a platform toolset for Visual Studio 2017. In prior versions of Visual Studio, MSBuild was installed separately in its own known directory location a

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

2018-07-03 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: include/clang/Basic/FixedPoint.h:31 + SatNoPadding, +}; + leonardchan wrote: > ebevhan wrote: > > rjmccall wrote: > > > I figured you'd want this to be a struct which include the scale, width, > > > signed-ness, and s

RE: [clang-tools-extra] r336177 - [clangd] Incorporate transitive #includes into code complete proximity scoring.

2018-07-03 Thread via cfe-commits
Hi Sam, This commit is causing failures on windows buildbots. Testing Time: 211.19s Failing Tests (1): Extra Tools Unit Tests :: clangd/Checking/./ClangdTests.exe/FileDistanceTests.URI Example build: http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei

[PATCH] D45898: [SemaCXX] Mark destructor as referenced

2018-07-03 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. LGTM, but I'd like Richard to sign off, too. Repository: rC Clang https://reviews.llvm.org/D45898 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D48395: Added PublicOnly flag

2018-07-03 Thread Annie Cherkaev via Phabricator via cfe-commits
anniecherk marked 11 inline comments as done. anniecherk added inline comments. Comment at: clang-tools-extra/clang-doc/Serialize.cpp:322-324 + if(PublicOnly && ! isPublic(D->getAccess(), D->getLinkageInternal())){ +return ""; + } juliehockett wrote: > Sinc

r336219 - Fix crash in clang.

2018-07-03 Thread Zachary Turner via cfe-commits
Author: zturner Date: Tue Jul 3 11:12:39 2018 New Revision: 336219 URL: http://llvm.org/viewvc/llvm-project?rev=336219&view=rev Log: Fix crash in clang. This happened during a recent refactor. toStringRefArray() returns a vector, which was being implicitly converted to an ArrayRef, and then the

[PATCH] D48249: [analyzer] Add stubs for argument construction contexts for arguments of C++ constructors and Objective-C messages.

2018-07-03 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov requested changes to this revision. george.karpenkov added a comment. This revision now requires changes to proceed. Minor nit: request for code reuse. Comment at: lib/Analysis/CFG.cpp:694 +std::is_same::value || +std::is_same::v

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

2018-07-03 Thread Simon Marchi via Phabricator via cfe-commits
simark added a comment. In https://reviews.llvm.org/D48687#1150960, @hokein wrote: > After taking a look closely, I figured why there are two candidates here -- > one is from AST (the one with ".." path); the other one is from dynamic > index, the deduplication failed because of the different p

[PATCH] D48863: [Sema] Explain coroutine_traits template in diag

2018-07-03 Thread Brian Gesiak via Phabricator via cfe-commits
modocache updated this revision to Diff 153956. modocache added a comment. Oops, apologies, I included a line I shouldn't have in the previous diff. Repository: rC Clang https://reviews.llvm.org/D48863 Files: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaCoroutine.cpp test/Se

Re: r334650 - Implement constexpr __builtin_*_overflow

2018-07-03 Thread Evgenii Stepanov via cfe-commits
Hi, with this change, the following compiles to "ret i32 undef": int main(int argc, char **argv) { constexpr int x = 1; constexpr int y = 2; int z; __builtin_sadd_overflow(x, y, &z); return z; } On Wed, Jun 13, 2018 at 1:43 PM, Erich Keane via cfe-commits < cfe-commits@lists.l

Re: r334650 - Implement constexpr __builtin_*_overflow

2018-07-03 Thread Evgenii Stepanov via cfe-commits
Discovered by MemorySanitizer, btw. On Tue, Jul 3, 2018 at 12:59 PM, Evgenii Stepanov wrote: > Hi, > > with this change, the following compiles to "ret i32 undef": > > int main(int argc, char **argv) { > > constexpr int x = 1; > > constexpr int y = 2; > > int z; > > > > __builtin_sadd_ov

RE: r334650 - Implement constexpr __builtin_*_overflow

2018-07-03 Thread Keane, Erich via cfe-commits
Yikes! Thanks for the heads up! I’ll start looking into this. Thanks for letting me know. From: Evgenii Stepanov [mailto:eugeni.stepa...@gmail.com] Sent: Tuesday, July 3, 2018 12:59 PM To: Keane, Erich Cc: cfe-commits Subject: Re: r334650 - Implement constexpr __builtin_*_overflow Hi, with

[PATCH] D48886: VS 2017 clang integration

2018-07-03 Thread David Tarditi via Phabricator via cfe-commits
dtarditi added a subscriber: hans. dtarditi added a comment. It's great to see your work on Visual Studio extension integration via VSIX. I'm happy to try out your change. I have a few questions: 1. How am I supposed to try this out? Given that actually building a VSIX installer isn't par

[PATCH] D48894: [AST] Rename some Redeclarable functions to reduce confusion

2018-07-03 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. MaskRay added reviewers: rsmith, akyrtzi, Eugene.Zelenko. Herald added a subscriber: cfe-commits. Repository: rC Clang https://reviews.llvm.org/D48894 Files: include/clang/AST/Redeclarable.h Index: include/clang/AST/Redeclarable.h =

r336225 - Fix allocation of Nullability attribute.

2018-07-03 Thread Erich Keane via cfe-commits
Author: erichkeane Date: Tue Jul 3 13:30:34 2018 New Revision: 336225 URL: http://llvm.org/viewvc/llvm-project?rev=336225&view=rev Log: Fix allocation of Nullability attribute. Existing code always allocates for on the declarator's attribute pool, but sometimes adds it to the declspec. This pa

Re: r336225 - Fix allocation of Nullability attribute.

2018-07-03 Thread Aaron Ballman via cfe-commits
On Tue, Jul 3, 2018 at 4:30 PM, Erich Keane via cfe-commits wrote: > Author: erichkeane > Date: Tue Jul 3 13:30:34 2018 > New Revision: 336225 > > URL: http://llvm.org/viewvc/llvm-project?rev=336225&view=rev > Log: > Fix allocation of Nullability attribute. > > Existing code always allocates for

[PATCH] D46845: [libcxx][c++17] P0083R5: Splicing Maps and Sets

2018-07-03 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington updated this revision to Diff 153964. erik.pilkington added a comment. Herald added a subscriber: dexonsmith. Split this up. I'm moving the `merge` stuff to a follow-up, that makes this diff a lot easier to read. https://reviews.llvm.org/D46845 Files: libcxx/include/__hash_ta

[PATCH] D48896: [libcxx][c++17] P0083R5: Splicing Maps and Sets Part 2: merge

2018-07-03 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington created this revision. erik.pilkington added reviewers: EricWF, mclow.lists. Herald added subscribers: dexonsmith, ldionne, christof. This was originally part of https://reviews.llvm.org/D46845, but I decided to split it out to clean up the diff. From that patch's description: >

[clang-tools-extra] r336228 - [clangd] Replace UniqueFunction with llvm::unique_function.

2018-07-03 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Tue Jul 3 13:59:33 2018 New Revision: 336228 URL: http://llvm.org/viewvc/llvm-project?rev=336228&view=rev Log: [clangd] Replace UniqueFunction with llvm::unique_function. One implementation of this ought to be enough for everyone. Modified: clang-tools-extra/trunk/clangd/C

[PATCH] D48845: [Sema] Add fixit for unused lambda captures

2018-07-03 Thread Andrew Comminos via Phabricator via cfe-commits
acomminos updated this revision to Diff 153968. acomminos retitled this revision from "[Sema] Add fixit for -Wno-unused-lambda-capture" to "[Sema] Add fixit for unused lambda captures". acomminos edited the summary of this revision. acomminos changed the visibility from "Custom Policy" to "Public

[PATCH] D48845: [Sema] Add fixit for unused lambda captures

2018-07-03 Thread Benjamin Kramer via Phabricator via cfe-commits
bkramer added inline comments. Comment at: test/FixIt/fixit-unused-lambda-capture.cpp:31 + // CHECK: [=,&i] { return i; }; +} This needs tests for: * capture initializers `[c = foo()] {};` * Capturing this `[this] {};` * Capturing *this `[*this] {};` * VLA capt

r336231 - Factor out Clang's desired 8MB stack size constant from the various

2018-07-03 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Jul 3 14:34:13 2018 New Revision: 336231 URL: http://llvm.org/viewvc/llvm-project?rev=336231&view=rev Log: Factor out Clang's desired 8MB stack size constant from the various places we hardcode it. Added: cfe/trunk/include/clang/Basic/Stack.h Modified: cfe/trunk/

[PATCH] D48395: Added PublicOnly flag

2018-07-03 Thread Julie Hockett via Phabricator via cfe-commits
juliehockett added inline comments. Comment at: clang-tools-extra/clang-doc/Serialize.cpp:322-324 + if(PublicOnly && ! isPublic(D->getAccess(), D->getLinkageInternal())){ +return ""; + } anniecherk wrote: > juliehockett wrote: > > Since this is the same for

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

2018-07-03 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. Looks fine, but please put the test case somewhere more appropriate (under SemaCXX, for instance). Comment at: lib/Sema/SemaExprCXX.cpp:117 } assert(InjectedClassName && "couldn't find injected class name"); We would be able to

[PATCH] D48322: [Sema] Discarded statment should be an evaluatable context

2018-07-03 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. In https://reviews.llvm.org/D48322#1150316, @erik.pilkington wrote: > Is this what you were concerned about? Yes, exactly. Thank you for checking. Repository: rC Clang https://reviews.ll

[PATCH] D45131: [AST] Refactor UnaryTransformType into TransformTraitType supporting non-unary transforms

2018-07-03 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF marked 13 inline comments as done. EricWF added inline comments. Comment at: lib/AST/ItaniumMangle.cpp:3250-3251 - mangleType(T->getBaseType()); + for (auto Ty : T->getArgs()) +mangleType(Ty); } rsmith wrote: > EricWF wrote: > > EricWF wrote: > >

r336233 - [Sema] Discarded statment should be an evaluatable context.

2018-07-03 Thread Erik Pilkington via cfe-commits
Author: epilk Date: Tue Jul 3 15:15:36 2018 New Revision: 336233 URL: http://llvm.org/viewvc/llvm-project?rev=336233&view=rev Log: [Sema] Discarded statment should be an evaluatable context. The constexpr evaluator was erroring out because these templates weren't defined. Despite being used in a

[PATCH] D48322: [Sema] Discarded statment should be an evaluatable context

2018-07-03 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL336233: [Sema] Discarded statment should be an evaluatable context. (authored by epilk, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D48322?

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

2018-07-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. This still LGTM; do you need someone to commit on your behalf? https://reviews.llvm.org/D44143 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D45131: [AST] Refactor UnaryTransformType into TransformTraitType supporting non-unary transforms

2018-07-03 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 154005. EricWF marked 2 inline comments as done. EricWF added a comment. Address main review comments. The `TransformTraitType` is now built early, and the `DeclSpec` refers to it and not the list of argument types. Additionally, the mangling formulation `u

[PATCH] D48734: [Sema] Consider all format_arg attributes.

2018-07-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM! Repository: rC Clang https://reviews.llvm.org/D48734 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.

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

2018-07-03 Thread Simon Marchi via Phabricator via cfe-commits
simark created this revision. Herald added subscribers: cfe-commits, ioeric, ilya-biryukov. InMemoryFileSystem::status behaves differently than RealFileSystem::status. The Name contained in the Status returned by RealFileSystem::status will be the path as requested by the caller, whereas InMemory

[PATCH] D48863: [Sema] Explain coroutine_traits template in diag

2018-07-03 Thread Gor Nishanov via Phabricator via cfe-commits
GorNishanov added inline comments. Comment at: include/clang/Basic/DiagnosticSemaKinds.td:9053 "a coroutine">; +def note_coroutine_types_for_traits_here : Note< + "the coroutine traits class template is being instantiated using the return " I am wondering wha

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

2018-07-03 Thread Simon Marchi via Phabricator via cfe-commits
simark updated this revision to Diff 154010. simark added a comment. Update commit message Repository: rC Clang https://reviews.llvm.org/D48903 Files: lib/Basic/VirtualFileSystem.cpp Index: lib/Basic/VirtualFileSystem.cpp ==

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

2018-07-03 Thread Simon Marchi via Phabricator via cfe-commits
simark added a comment. An update, I traced the difference in behavior to the difference in how `RealFileSystem` and `InMemoryFileSystem` return `Status`es. I uploaded a patch to change `InMemoryFileSystem` to work like `RealFileSystem`: https://reviews.llvm.org/D48903 With this patch applied

[PATCH] D48617: [Builtins][Attributes][X86] Tag all X86 builtins with their required vector width. Add a min_vector_width function attribute and tag all x86 instrinsics with it.

2018-07-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. Aside from a new round of minor doc nits, I think this is looking good. One remaining question I have is whether the attribute should diagnose an argument for a width that's not

[PATCH] D48863: [Sema] Explain coroutine_traits template in diag

2018-07-03 Thread Brian Gesiak via Phabricator via cfe-commits
modocache added inline comments. Comment at: include/clang/Basic/DiagnosticSemaKinds.td:9053 "a coroutine">; +def note_coroutine_types_for_traits_here : Note< + "the coroutine traits class template is being instantiated using the return " GorNishanov wrote: >

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

2018-07-03 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai updated this revision to Diff 154018. vsapsai added a comment. - Clean up functionality not required by the Standard. https://reviews.llvm.org/D48753 Files: libcxx/include/memory libcxx/test/std/containers/sequences/vector/vector.cons/construct_iter_iter_alloc.pass.cpp Index: libc

[PATCH] D48863: [Sema] Explain coroutine_traits template in diag

2018-07-03 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: include/clang/Basic/DiagnosticSemaKinds.td:9053 "a coroutine">; +def note_coroutine_types_for_traits_here : Note< + "the coroutine traits class template is being instantiated using the return " modocache wrote: > GorN

[PATCH] D48863: [Sema] Explain coroutine_traits template in diag

2018-07-03 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: include/clang/Basic/DiagnosticSemaKinds.td:9051 def err_implied_coroutine_type_not_found : Error< "%0 type was not found; include before defining " "a coroutine">; Maybe we should also remove the "%0 type was not

[PATCH] D48845: [Sema] Add fixit for unused lambda captures

2018-07-03 Thread Andrew Comminos via Phabricator via cfe-commits
acomminos planned changes to this revision. acomminos added a comment. Ah yes, thanks for pointing this out. Some additional logic is going to be necessary to handle capture initializers correctly- I'll look into exposing full source ranges in LambdaCapture to make this more consistent across ca

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

2018-07-03 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai updated this revision to Diff 154021. vsapsai added a comment. - Proper support for custom allocators without `construct`. https://reviews.llvm.org/D48342 Files: libcxx/include/memory libcxx/test/std/containers/sequences/vector/vector.cons/construct_iter_iter_alloc.pass.cpp libc

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

2018-07-03 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 154020. leonardchan marked 2 inline comments as done. leonardchan added a comment. - Renamed `fixedPointSemantics` to `FixedPointSemantics` and hid the members behind getters Repository: rC Clang https://reviews.llvm.org/D48661 Files: include/clan

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

2018-07-03 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: > > vsapsai wrote: > > > vsapsai wrote: > > > > erik.pilkington wrote: > > > > > vsapsai wrote: > > > >

[PATCH] D48908: [clang-doc] Pass over function-internal declarations

2018-07-03 Thread Julie Hockett via Phabricator via cfe-commits
juliehockett created this revision. juliehockett added reviewers: ioeric, lebedev.ri. juliehockett added a project: clang-tools-extra. Things declared internally to functions shouldn't be documented, and so bail early if encountered. https://reviews.llvm.org/D48908 Files: clang-tools-extra/c

[PATCH] D48909: [clang-doc] Update BitcodeReader to use llvm::Error

2018-07-03 Thread Julie Hockett via Phabricator via cfe-commits
juliehockett created this revision. juliehockett added reviewers: ioeric, lebedev.ri. juliehockett added a project: clang-tools-extra. Replace booleans with the more descriptive llvm::Error or llvm::Expected https://reviews.llvm.org/D48909 Files: clang-tools-extra/clang-doc/BitcodeReader.cpp

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

2018-07-03 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Thanks, much appreciated. A couple more style changes that I noticed and this will be LGTM, although you should also make sure you have Bevin Hansson's approval. Comment at: include/clang/AST/ASTContext.h:33 #include "clang/Basic/AddressSpaces.h" +

[PATCH] D48734: [Sema] Consider all format_arg attributes.

2018-07-03 Thread Michael Kruse via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC336239: [Sema] Consider all format_arg attributes. (authored by Meinersbur, committed by ). Changed prior to commit: https://reviews.llvm.org/D48734?vs=153643&id=154038#toc Repository: rC Clang http

[PATCH] D47344: LWG 2843 "Unclear behavior of std::pmr::memory_resource::do_allocate()"

2018-07-03 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF accepted this revision. EricWF added a comment. This revision is now accepted and ready to land. LGTM. I'll add a test when I commit this. Repository: rCXX libc++ https://reviews.llvm.org/D47344 ___ cfe-commits mailing list cfe-commits@lis

[PATCH] D48894: [AST] Rename some Redeclarable functions to reduce confusion

2018-07-03 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: include/clang/AST/Redeclarable.h:106 -mutable llvm::PointerUnion Next; +mutable llvm::PointerUnion Prev; I think this is still a confusing name, because it points either to the previous declaration or to the

  1   2   >