[PATCH] D49719: [ClangFormat] Editor integrations inherit default style from clang-format binary

2018-07-24 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. sammccall added a reviewer: ioeric. Herald added a subscriber: cfe-commits. This allows downstream customizations to the default style to work without needing to also modify the editor integrations. Repository: rC Clang https://reviews.llvm.org/D49719 Files:

Re: [libcxx] r337669 - Use possibly cached directory entry values when performing recursive directory iteration.

2018-07-24 Thread Jonas Hahnfeld via cfe-commits
Thanks for your work, the test is now passing on my system. Cheers, Jonas On 2018-07-24 01:00, Eric Fiselier wrote: Sorry for the repeated emails. I did more digging and we were indeed handling DT_UNKNOWN incorrectly. I've fixed that in r337768. /Eric On Mon, Jul 23, 2018 at 4:43 PM Eric Fise

[libcxx] r337814 - Reland "[CMake] Support statically linking dependencies only to shared or static library"

2018-07-24 Thread Petr Hosek via cfe-commits
Author: phosek Date: Tue Jul 24 00:06:17 2018 New Revision: 337814 URL: http://llvm.org/viewvc/llvm-project?rev=337814&view=rev Log: Reland "[CMake] Support statically linking dependencies only to shared or static library" This is a reland of commit r337668. Modified: libcxx/trunk/CMakeList

[libcxxabi] r337814 - Reland "[CMake] Support statically linking dependencies only to shared or static library"

2018-07-24 Thread Petr Hosek via cfe-commits
Author: phosek Date: Tue Jul 24 00:06:17 2018 New Revision: 337814 URL: http://llvm.org/viewvc/llvm-project?rev=337814&view=rev Log: Reland "[CMake] Support statically linking dependencies only to shared or static library" This is a reland of commit r337668. Modified: libcxxabi/trunk/CMakeL

Re: [libcxx] r337669 - Use possibly cached directory entry values when performing recursive directory iteration.

2018-07-24 Thread Eric Fiselier via cfe-commits
Great, thanks for letting me know. On Tue, Jul 24, 2018, 1:05 AM Jonas Hahnfeld, wrote: > Thanks for your work, the test is now passing on my system. > > Cheers, > Jonas > > On 2018-07-24 01:00, Eric Fiselier wrote: > > Sorry for the repeated emails. I did more digging and we were indeed > > han

[PATCH] D46230: For x86_64, gcc 7.2 under Amazon Linux AMI sets its paths to x86_64-amazon-linux

2018-07-24 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. The test fails here: FAIL: Clang :: Driver/linux-ld.c (4670 of 12944) TEST 'Clang :: Driver/linux-ld.c' FAILED Script: -- : 'RUN: at line 4'; /build/llvm-build-GCC-release/bin/clang -no-canonical-prefixes /build/c

[PATCH] D49718: [CodeGen][ObjC] Make block copy/dispose helper function exception-safe.

2018-07-24 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In https://reviews.llvm.org/D49718#1173038, @ahatanak wrote: > Note that in order to destruct C++ objects, I'm using pushDestroy which > pushes a NormalCleanup when exception handling isn't enabled. This is > different from PushDestructorCleanup which always pushes a

[PATCH] D46230: For x86_64, gcc 7.2 under Amazon Linux AMI sets its paths to x86_64-amazon-linux

2018-07-24 Thread Jiading Gai via Phabricator via cfe-commits
gaijiading added a comment. Hi Roman, The cause of it was that, during committing the patch (r337811), svn skipped over an empty directory that was required for my test case. I've submitted a fix in a follow-up commit (r337813). Thanks. In https://reviews.llvm.org/D46230#1173063, @lebedev.ri w

[PATCH] D49719: [ClangFormat] Editor integrations inherit default style from clang-format binary

2018-07-24 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: tools/clang-format/clang-format-sublime.py:35 regions = [] command = [binary, '-style', style] +if style: Should we remove `'-style ', style` elements from the list here? Repository: rC Clang htt

[PATCH] D49667: [clangd] Tune down quality score for class constructors so that it's ranked after class types.

2018-07-24 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 156973. ioeric marked 2 inline comments as done. ioeric added a comment. - revert unintended changes. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D49667 Files: clangd/Quality.cpp clangd/Quality.h unittests/clangd/QualityTests.cpp In

[PATCH] D49667: [clangd] Tune down quality score for class constructors so that it's ranked after class types.

2018-07-24 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: unittests/clangd/QualityTests.cpp:273 }); - SymbolRelevanceSignals Ctor; - Ctor.merge(CodeCompletionResult(CtorDecl, /*Priority=*/0)); - - EXPECT_EQ(Cls.Scope, SymbolRelevanceSignals::GlobalScope); - EXPECT_EQ(Ctor.Scope, SymbolRel

[PATCH] D49719: [ClangFormat] Editor integrations inherit default style from clang-format binary

2018-07-24 Thread Sam McCall via Phabricator via cfe-commits
sammccall marked an inline comment as done. sammccall added a comment. Thanks, good catch! Repository: rC Clang https://reviews.llvm.org/D49719 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo

[PATCH] D49719: [ClangFormat] Editor integrations inherit default style from clang-format binary

2018-07-24 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 156974. sammccall added a comment. Remove one last -style flag. Repository: rC Clang https://reviews.llvm.org/D49719 Files: tools/clang-format/clang-format-sublime.py tools/clang-format/clang-format-test.el tools/clang-format/clang-format.el to

r337815 - [Sema] Mark implicitly-inserted ICE's as being part of explicit cast (PR38166)

2018-07-24 Thread Roman Lebedev via cfe-commits
Author: lebedevri Date: Tue Jul 24 01:16:50 2018 New Revision: 337815 URL: http://llvm.org/viewvc/llvm-project?rev=337815&view=rev Log: [Sema] Mark implicitly-inserted ICE's as being part of explicit cast (PR38166) Summary: As discussed in [[ https://bugs.llvm.org/show_bug.cgi?id=38166 | PR38166

[PATCH] D49508: [Sema] Mark implicitly-inserted ICE's as being part of explicit cast (PR38166)

2018-07-24 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC337815: [Sema] Mark implicitly-inserted ICE's as being part of explicit cast (PR38166) (authored by lebedevri, committed by ). Repository: rC Clang https://reviews.llvm.org/D49508 Files: include/cla

[PATCH] D49508: [Sema] Mark implicitly-inserted ICE's as being part of explicit cast (PR38166)

2018-07-24 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL337815: [Sema] Mark implicitly-inserted ICE's as being part of explicit cast (PR38166) (authored by lebedevri, committed by ). Changed prior to commit: https://reviews.llvm.org/D49508?vs=156705&id=15697

[PATCH] D49667: [clangd] Tune down quality score for class constructors so that it's ranked after class types.

2018-07-24 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clangd/Quality.cpp:211 + case Constructor: +Score *= 1.0f; // Rank class constructors after class types. +break; ioeric wrote: > ilya-biryukov wrote: > > NIT: This does not seem to change the score, right?

[clang-tools-extra] r337816 - [clangd] Tune down quality score for class constructors so that it's ranked after class types.

2018-07-24 Thread Eric Liu via cfe-commits
Author: ioeric Date: Tue Jul 24 01:51:52 2018 New Revision: 337816 URL: http://llvm.org/viewvc/llvm-project?rev=337816&view=rev Log: [clangd] Tune down quality score for class constructors so that it's ranked after class types. Summary: Currently, class constructors have the same score as the cl

[PATCH] D49667: [clangd] Tune down quality score for class constructors so that it's ranked after class types.

2018-07-24 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE337816: [clangd] Tune down quality score for class constructors so that it's ranked… (authored by ioeric, committed by ). Changed prior to commit: https://reviews.llvm.org/D49667?vs=156980&id=156981#t

[PATCH] D49667: [clangd] Tune down quality score for class constructors so that it's ranked after class types.

2018-07-24 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 156980. ioeric marked an inline comment as done. ioeric added a comment. - Make constructor boost no-op. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D49667 Files: clangd/Quality.cpp clangd/Quality.h unittests/clangd/QualityTests.cpp

[PATCH] D46230: For x86_64, gcc 7.2 under Amazon Linux AMI sets its paths to x86_64-amazon-linux

2018-07-24 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In https://reviews.llvm.org/D46230#1173074, @gaijiading wrote: > Hi Roman, > > The cause of it was that, during committing the patch (r337811), svn skipped > over an empty directory that was required for my test case. I've submitted a > fix in a follow-up commit (r33

[libcxx] r337817 - Fix use of incorrect _LIBCXX macro (should be _LIBCPP).

2018-07-24 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Tue Jul 24 02:15:03 2018 New Revision: 337817 URL: http://llvm.org/viewvc/llvm-project?rev=337817&view=rev Log: Fix use of incorrect _LIBCXX macro (should be _LIBCPP). Modified: libcxx/trunk/include/future Modified: libcxx/trunk/include/future URL: http://llvm.org/viewv

[PATCH] D49719: [ClangFormat] Editor integrations inherit default style from clang-format binary

2018-07-24 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/D49719 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.l

[PATCH] D49722: [CStringSyntaxChecker] Check strlcat sizeof check

2018-07-24 Thread David CARLIER via Phabricator via cfe-commits
devnexen created this revision. devnexen added reviewers: george.karpenkov, NoQ. devnexen created this object with visibility "All Users". Herald added a subscriber: cfe-commits. - Assuming strlcat is used with strlcpy we check as we can if the last argument does not equal os not larger than the

[PATCH] D49546: [clangd] Implement query iterators for Dex symbol index

2018-07-24 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 156997. kbobyrev marked 19 inline comments as done. kbobyrev added a comment. Herald added a subscriber: jfb. As discussed offline: I simplified the implementation and cleaned up unit tests. Should look better now. The next step is to document the implement

[PATCH] D49546: [clangd] Implement query iterators for Dex symbol index

2018-07-24 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added inline comments. Comment at: clang-tools-extra/clangd/index/dex/QueryIterator.cpp:175 +// FIXME(kbobyrev): This compares IDs of two iterators... +auto CompareIterators = [](std::unique_ptr &Left, + std::unique_ptr &Right) -> bool { ---

[PATCH] D49114: [clang-tidy] Add a check for "magic numbers"

2018-07-24 Thread Florin Iucha via Phabricator via cfe-commits
0x8000- updated this revision to Diff 157000. 0x8000- added a comment. Bail out early if a [grand-]parent node is a declaration, but not a constant declaration. Search for enumerations and declarations in the same tree traversal. Repository: rCTE Clang Tools Extra https://reviews.llv

[PATCH] D49723: [OpenCL] Check for invalid kernel arguments in array types

2018-07-24 Thread Andrew Savonichev via Phabricator via cfe-commits
asavonic created this revision. Herald added subscribers: cfe-commits, Anastasia, yaxunl. OpenCL specification forbids use of several types as kernel arguments. This patch improves existing diagnostic to look through arrays. Repository: rC Clang https://reviews.llvm.org/D49723 Files: lib/S

[PATCH] D49724: [VFS] Cleanups to VFS interfaces.

2018-07-24 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. sammccall added a reviewer: klimek. Herald added a subscriber: cfe-commits. - add comments clarifying semantics - Status::copyWithNewName(Status, Name) --> instance method - Status::copyWithNewName(fs::file_status, Name) --> constructor (it's not a copy) - File::g

[PATCH] D49725: [OpenCL] Forbid size dependent types used as kernel arguments

2018-07-24 Thread Andrew Savonichev via Phabricator via cfe-commits
asavonic created this revision. Herald added subscribers: cfe-commits, Anastasia, yaxunl. Size_t, intptr_t, uintptr_t and ptrdiff_t cannot be used as kernel arguments, according to OpenCL Specification s6.9k: The size in bytes of these types are implementation-defined and in addition can also

[PATCH] D49546: [clangd] Implement query iterators for Dex symbol index

2018-07-24 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 157004. kbobyrev added a comment. Refactored unit tests in few places. https://reviews.llvm.org/D49546 Files: clang-tools-extra/clangd/CMakeLists.txt clang-tools-extra/clangd/index/dex/Iterator.cpp clang-tools-extra/clangd/index/dex/Iterator.h clan

r337811 - For x86_64, gcc 7.2 under Amazon Linux AMI sets its path to x86_64-amazon-linux.

2018-07-24 Thread Jiading Gai via cfe-commits
Author: jiadinggai Date: Mon Jul 23 23:07:22 2018 New Revision: 337811 URL: http://llvm.org/viewvc/llvm-project?rev=337811&view=rev Log: For x86_64, gcc 7.2 under Amazon Linux AMI sets its path to x86_64-amazon-linux. gcc 7.2 under Amazon Linux AMI sets its paths to x86_64-amazon-linux. Adding t

r337800 - [DebugInfo] Generate debug information for labels. (Fix PR37395)

2018-07-24 Thread Shiva Chen via cfe-commits
Author: shiva Date: Mon Jul 23 19:23:59 2018 New Revision: 337800 URL: http://llvm.org/viewvc/llvm-project?rev=337800&view=rev Log: [DebugInfo] Generate debug information for labels. (Fix PR37395) Generate DILabel metadata and call llvm.dbg.label after label statement to associate the metadata wi

r337803 - Revert "[DebugInfo] Generate debug information for labels. (Fix PR37395)"

2018-07-24 Thread Shiva Chen via cfe-commits
Author: shiva Date: Mon Jul 23 19:57:11 2018 New Revision: 337803 URL: http://llvm.org/viewvc/llvm-project?rev=337803&view=rev Log: Revert "[DebugInfo] Generate debug information for labels. (Fix PR37395)" This reverts commit 4288dd3bf082482e02c8a044c611c18168cb0180. Removed: cfe/trunk/test/

r337807 - [Test commit] Fix a spelling error.

2018-07-24 Thread Jiading Gai via cfe-commits
Author: jiadinggai Date: Mon Jul 23 20:34:15 2018 New Revision: 337807 URL: http://llvm.org/viewvc/llvm-project?rev=337807&view=rev Log: [Test commit] Fix a spelling error. Modified: cfe/trunk/unittests/Basic/FileManagerTest.cpp Modified: cfe/trunk/unittests/Basic/FileManagerTest.cpp URL: h

r337813 - Add a .keep file to prevent svn from skipping over an empty folder.

2018-07-24 Thread Jiading Gai via cfe-commits
Author: jiadinggai Date: Mon Jul 23 23:49:27 2018 New Revision: 337813 URL: http://llvm.org/viewvc/llvm-project?rev=337813&view=rev Log: Add a .keep file to prevent svn from skipping over an empty folder. Added: cfe/trunk/test/Driver/Inputs/ami_linux_tree/lib/.keep Added: cfe/trunk/test/Driv

[PATCH] D48958: [clang][ubsan] Implicit Cast Sanitizer - integer truncation - clang part

2018-07-24 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri updated this revision to Diff 156983. lebedev.ri added a comment. Rebased on top of svn tip / git master, now that https://reviews.llvm.org/D49508 has landed, which means there shouldn't be any more false-positives (and it's a bit faster to detect that the check shouldn't be emitted,

[PATCH] D49724: [VFS] Cleanups to VFS interfaces.

2018-07-24 Thread Manuel Klimek via Phabricator via cfe-commits
klimek accepted this revision. klimek added a comment. This revision is now accepted and ready to land. lg Repository: rC Clang https://reviews.llvm.org/D49724 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/

[PATCH] D49267: [clangd] Watch for changes in compile_commands.json

2018-07-24 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. In https://reviews.llvm.org/D49267#1171932, @simark wrote: > I guess you mean language client here, not language server. In our case we > already have a client capable of file watching, so it's convenient for us to > do that (plus, this is what the LSP specificat

[PATCH] D49723: [OpenCL] Check for invalid kernel arguments in array types

2018-07-24 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia accepted this revision. Anastasia added a comment. This revision is now accepted and ready to land. LGTM! Thanks! Repository: rC Clang https://reviews.llvm.org/D49723 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.

[PATCH] D48436: [analyzer][UninitializedObjectChecker] Fixed a false negative by no longer filtering out certain constructor calls

2018-07-24 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus added a comment. Polite ping :) https://reviews.llvm.org/D48436 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D49267: [clangd] Watch for changes in compile_commands.json

2018-07-24 Thread Simon Marchi via Phabricator via cfe-commits
simark added a comment. In https://reviews.llvm.org/D49267#1173266, @ilya-biryukov wrote: > The approach is not ideal, but may be a good middle ground before we figure > out how we approach file watching in clangd. Note that there are other things > that won't force the updates currently, e.g.

[PATCH] D49067: Stop wrapping __has_include in another macro

2018-07-24 Thread Alexander Richardson via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCXX337824: Stop wrapping __has_include in another macro (authored by arichardson, committed by ). Changed prior to commit: https://reviews.llvm.org/D49067?vs=154566&id=157011#toc Repository: rL LLVM

[PATCH] D49067: Stop wrapping __has_include in another macro

2018-07-24 Thread Alexander Richardson via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL337824: Stop wrapping __has_include in another macro (authored by arichardson, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D49067 Files: lib

[PATCH] D49723: [OpenCL] Check for invalid kernel arguments in array types

2018-07-24 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl accepted this revision. yaxunl added a comment. LGTM Repository: rC Clang https://reviews.llvm.org/D49723 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libcxx] r337824 - Stop wrapping __has_include in another macro

2018-07-24 Thread Alexander Richardson via cfe-commits
Author: arichardson Date: Tue Jul 24 05:40:56 2018 New Revision: 337824 URL: http://llvm.org/viewvc/llvm-project?rev=337824&view=rev Log: Stop wrapping __has_include in another macro Summary: This is not guaranteed to work since the characters after '__has_include(' have special lexing rules that

[PATCH] D49725: [OpenCL] Forbid size dependent types used as kernel arguments

2018-07-24 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. This patch also adds check for array of structs. Can you include this in title or split to a separate patch? Comment at: lib/Sema/SemaDecl.cpp:8065 +std::find(Names.begin(), Names.end(), DesugaredTy.getAsString()); +if (Names.end() != Match)

[PATCH] D49267: [clangd] Watch for changes in compile_commands.json

2018-07-24 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. In https://reviews.llvm.org/D49267#1173291, @simark wrote: > Ok, I agree that having clangd watch files itself could be necessary at some > point (when the client does not support it), but it would have to be > configurable. In our case, we have efficient enough

[PATCH] D49591: [clangd] Introduce search Tokens and trigram generation algorithms

2018-07-24 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 157020. kbobyrev marked 12 inline comments as done. kbobyrev added a comment. Address all comments, refine tests. https://reviews.llvm.org/D49591 Files: clang-tools-extra/clangd/CMakeLists.txt clang-tools-extra/clangd/index/dex/Token.cpp clang-tools-

[PATCH] D49591: [clangd] Introduce search Tokens and trigram generation algorithms

2018-07-24 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added inline comments. Comment at: clang-tools-extra/clangd/index/dex/Trigram.cpp:38 + llvm::makeMutableArrayRef(Roles.data(), Identifier.size())); + std::transform(begin(Identifier), end(Identifier), begin(Identifier), + ::tolower);

[PATCH] D49725: [OpenCL] Forbid size dependent types used as kernel arguments

2018-07-24 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: lib/Sema/SemaDecl.cpp:8186 - const RecordDecl *PD = PT->castAs()->getDecl(); - VisitStack.push_back(PD); + // At this point we already handled everything except of a RecordType or + // an ArrayType[RecordType]. I

[PATCH] D49723: [OpenCL] Check for invalid kernel arguments in array types

2018-07-24 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. Btw, has this restriction been removed from CL 2.0? Repository: rC Clang https://reviews.llvm.org/D49723 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D49546: [clangd] Implement query iterators for Dex symbol index

2018-07-24 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. This looks really nice. Iterator implementations can be simplified a bit I think. Comment at: clang-tools-extra/clangd/index/dex/Iterator.cpp:50 + OS << Documents[Index]; + if (Index + 1 != Documents.size()) +OS << ", "; ---

[PATCH] D49223: [AST] Check described template at structural equivalence check.

2018-07-24 Thread Gabor Marton via Phabricator via cfe-commits
martong added a reviewer: a_sidorin. martong added a comment. Ping. Repository: rC Clang https://reviews.llvm.org/D49223 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D49728: diff space

2018-07-24 Thread Bruno Ricci via Phabricator via cfe-commits
bricci created this revision. Herald added a subscriber: cfe-commits. Repository: rC Clang https://reviews.llvm.org/D49728 Files: stat Index: stat === --- stat +++ stat @@ -66,54 +66,54 @@ 665/34195 implicit move assignment o

[PATCH] D49591: [clangd] Introduce search Tokens and trigram generation algorithms

2018-07-24 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added a comment. This revision is now accepted and ready to land. Thanks for the polish! Last few nits, but feel free to land once you're happy. Comment at: clang-tools-extra/clangd/index/dex/Token.cpp:21 + +Token::Token(Kind TokenKin

[PATCH] D49580: [clang-format] Adding style option for absolute formatting

2018-07-24 Thread Jacek Olesiak via Phabricator via cfe-commits
jolesiak added a comment. Sorry for the delay, I'll comment on that tomorrow. https://reviews.llvm.org/D49580 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D49729: [AST][1/4] Move the bit-fields from TagDecl, EnumDecl and RecordDecl into DeclContext

2018-07-24 Thread Bruno Ricci via Phabricator via cfe-commits
bricci created this revision. bricci added a project: clang. Herald added a subscriber: cfe-commits. DeclContext has a little less than 8 bytes free due to the alignment requirements on 64 bits archs. This set of patches moves the bit-fields from classes deriving from DeclContext into DeclContext.

[PATCH] D48412: [RISCV] Add support for interrupt attribute

2018-07-24 Thread Alex Bradbury via Phabricator via cfe-commits
asb accepted this revision. asb added a comment. Looks good to me. https://reviews.llvm.org/D48412 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D49267: [clangd] Watch for changes in compile_commands.json

2018-07-24 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added inline comments. Comment at: clangd/ClangdLSPServer.cpp:430 CDB.clear(); - -reparseOpenedFiles(); +compileCommandsChangePost(CCChangeData); } ilya-biryukov wrote: > Maybe keep the old logic of reparsing all open files? This would m

[PATCH] D49732: [AST][2/4] Move the bit-fields from FunctionDecl and CXXConstructorDecl into DeclContext

2018-07-24 Thread Bruno Ricci via Phabricator via cfe-commits
bricci created this revision. bricci added a project: clang. Herald added a subscriber: cfe-commits. This patch follows https://reviews.llvm.org/D49729 and moves the bits from FunctionDecl and CXXConstructorDecl into DeclContext. Repository: rC Clang https://reviews.llvm.org/D49732 Files:

[PATCH] D49267: [clangd] Watch for changes in compile_commands.json

2018-07-24 Thread Simon Marchi via Phabricator via cfe-commits
simark added inline comments. Comment at: clangd/ClangdLSPServer.cpp:430 CDB.clear(); - -reparseOpenedFiles(); +compileCommandsChangePost(CCChangeData); } malaperle wrote: > ilya-biryukov wrote: > > Maybe keep the old logic of reparsing all open f

[PATCH] D49711: [CMake] Fix the setting of LIBCXX_HEADER_DIR in standalone build

2018-07-24 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. Testing this on my system (Mac OS 10.13.6, using system libc++abi), I get a lot of files in my build's `include/c++/v1` folder. Previously, there were two (`__cxxabi_config.h` and`ccxxabi.h`). Now there are 131 files - all the libc++ header files. Why? The cmake co

[PATCH] D49733: [AST][3/4] Move the bit-fields from BlockDecl, LinkageSpecDecl and OMPDeclareReductionDecl into DeclContext

2018-07-24 Thread Bruno Ricci via Phabricator via cfe-commits
bricci created this revision. bricci added a project: clang. Herald added a subscriber: cfe-commits. This patch follows https://reviews.llvm.org/D49729 and https://reviews.llvm.org/D49732, Move the bits from BlockDecl, LinkageSpecDecl and OMPDeclareReductionDecl into DeclContext. Repository:

[PATCH] D49267: [clangd] Watch for changes in compile_commands.json

2018-07-24 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Just a couple of high-level comments here: - I'm not sure we can/should commit to supporting editor-based file watching forever. - One natural long-term direction would be to get this functionality into `JSONCompilationDatabase`, and clients of that don't have an LS

Re: r337703 - [ASTMatchers] add matcher for decltypeType and its underlyingType

2018-07-24 Thread Alexander Kornienko via cfe-commits
Let's not forget to regenerate LibASTMatchersReference.html (see clang/docs/tools/dump_ast_matchers.py). On Mon, Jul 23, 2018 at 5:59 PM Jonas Toth via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: jonastoth > Date: Mon Jul 23 08:59:27 2018 > New Revision: 337703 > > URL: http://llvm

[PATCH] D49734: [AST][4/4] Move the bit-fields from ObjCMethodDecl and ObjCContainerDecl into DeclContext

2018-07-24 Thread Bruno Ricci via Phabricator via cfe-commits
bricci created this revision. bricci added a project: clang. Herald added a subscriber: cfe-commits. This patch follows https://reviews.llvm.org/D49729, https://reviews.llvm.org/D49732 and https://reviews.llvm.org/D49733. Move the bits from ObjCMethodDecl and ObjCContainerDecl into DeclContext.

[PATCH] D49711: [CMake] Fix the setting of LIBCXX_HEADER_DIR in standalone build

2018-07-24 Thread Petr Hosek via Phabricator via cfe-commits
phosek updated this revision to Diff 157043. Repository: rCXX libc++ https://reviews.llvm.org/D49711 Files: libcxx/CMakeLists.txt libcxx/cmake/Modules/HandleLibCXXABI.cmake Index: libcxx/cmake/Modules/HandleLibCXXABI.cmake =

[PATCH] D49652: Apply -fdebug-prefix-map in reverse of command line order

2018-07-24 Thread Paul Robinson via Phabricator via cfe-commits
probinson added a comment. In https://reviews.llvm.org/D49652#1172498, @alxu wrote: > my general theory is that it's better to have tests that test everything at > once if possible, but I guess it's unlikely enough that the debug info path > will be correct in the IR and then not correct in the

[PATCH] D49492: Run bounds checking sanitizer earlier to make it easier to optimize away its checks.

2018-07-24 Thread Joel Galenson via Phabricator via cfe-commits
jgalenson abandoned this revision. jgalenson added a comment. I just committed https://reviews.llvm.org/rL337830, which solves this problem the way eugenis suggested. Repository: rC Clang https://reviews.llvm.org/D49492 ___ cfe-commits mailing l

[PATCH] D49736: [Basic] Emit warning flag suggestion only in case there's *similar* existing flag for given unknown one

2018-07-24 Thread Jan Korous via Phabricator via cfe-commits
jkorous created this revision. jkorous added reviewers: arphaman, vsapsai, bruno, JDevlieghere. Herald added subscribers: cfe-commits, dexonsmith. In case user specified non-existent warning flag clang was suggesting an existing on that was in some cased very different. This patch should ensure

[PATCH] D49711: [CMake] Fix the setting of LIBCXX_HEADER_DIR in standalone build

2018-07-24 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. > phosek updated this revision to Diff 157043. This fixes the problem with copying all the include files. This *also* fixes my broken build (that was broken by r337630 wanting to copy `cxxabi.h` to `/include/c++/v1/`). LG for my configuration. Repository: rCXX l

[PATCH] D49729: [AST][1/4] Move the bit-fields from TagDecl, EnumDecl and RecordDecl into DeclContext

2018-07-24 Thread Bruno Ricci via Phabricator via cfe-commits
bricci added a comment. added some inline comments Comment at: include/clang/AST/DeclBase.h:1662 + enum { NumBlockDeclBits = 5 }; /// Pointer to the data structure used to lookup declarations uint64_t is used here because we will always store more than 32

[PATCH] D49711: [CMake] Fix the setting of LIBCXX_HEADER_DIR in standalone build

2018-07-24 Thread Petr Hosek via Phabricator via cfe-commits
phosek updated this revision to Diff 157050. Repository: rCXX libc++ https://reviews.llvm.org/D49711 Files: libcxx/CMakeLists.txt libcxx/cmake/Modules/HandleLibCXXABI.cmake Index: libcxx/cmake/Modules/HandleLibCXXABI.cmake =

[libcxx] r337833 - [CMake] Fix the setting of LIBCXX_HEADER_DIR in standalone build

2018-07-24 Thread Petr Hosek via cfe-commits
Author: phosek Date: Tue Jul 24 08:49:29 2018 New Revision: 337833 URL: http://llvm.org/viewvc/llvm-project?rev=337833&view=rev Log: [CMake] Fix the setting of LIBCXX_HEADER_DIR in standalone build This is an alternative approach to r337727 which broke the build because libc++ headers were copied

[PATCH] D49711: [CMake] Fix the setting of LIBCXX_HEADER_DIR in standalone build

2018-07-24 Thread Petr Hosek via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rL337833: [CMake] Fix the setting of LIBCXX_HEADER_DIR in standalone build (authored by phosek, committed by ). Herald added

[PATCH] D49729: [AST][1/4] Move the bit-fields from TagDecl, EnumDecl and RecordDecl into DeclContext

2018-07-24 Thread Bruno Ricci via Phabricator via cfe-commits
bricci updated this revision to Diff 157052. bricci added a comment. updated some some comments in DeclContext Repository: rC Clang https://reviews.llvm.org/D49729 Files: include/clang/AST/Decl.h include/clang/AST/DeclBase.h lib/AST/Decl.cpp lib/AST/DeclBase.cpp lib/AST/DeclCXX.cpp

r337834 - [VFS] Cleanups to VFS interfaces.

2018-07-24 Thread Sam McCall via cfe-commits
Author: sammccall Date: Tue Jul 24 09:00:55 2018 New Revision: 337834 URL: http://llvm.org/viewvc/llvm-project?rev=337834&view=rev Log: [VFS] Cleanups to VFS interfaces. Summary: - add comments clarifying semantics - Status::copyWithNewName(Status, Name) --> instance method - Status::copyWithNewN

[PATCH] D49724: [VFS] Cleanups to VFS interfaces.

2018-07-24 Thread Sam McCall via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL337834: [VFS] Cleanups to VFS interfaces. (authored by sammccall, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D49724 Files: cfe/trunk/includ

r337835 - Remove stale documentation from InternalsManual.rst

2018-07-24 Thread Erich Keane via cfe-commits
Author: erichkeane Date: Tue Jul 24 09:11:30 2018 New Revision: 337835 URL: http://llvm.org/viewvc/llvm-project?rev=337835&view=rev Log: Remove stale documentation from InternalsManual.rst The DuplicatesAllowedWhileMerging was removed a while ago, but the documentation remained. Modified: cf

[PATCH] D49729: [AST][1/4] Move the bit-fields from TagDecl, EnumDecl and RecordDecl into DeclContext

2018-07-24 Thread Bruno Ricci via Phabricator via cfe-commits
bricci marked an inline comment as done. bricci added a comment. remove the inline comment about uint64_t. Repository: rC Clang https://reviews.llvm.org/D49729 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/

[PATCH] D49729: [AST][1/4] Move the bit-fields from TagDecl, EnumDecl and RecordDecl into DeclContext

2018-07-24 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. This seems like a patch with a good direction, I generally think that this change doesn't change the readability of the code (and generally matches the structure of other code in clang). It is generally a mechanical change, though I'd suggest running clang-format (

[PATCH] D49729: [AST][1/4] Move the bit-fields from TagDecl, EnumDecl and RecordDecl into DeclContext

2018-07-24 Thread Bruno Ricci via Phabricator via cfe-commits
bricci updated this revision to Diff 157063. bricci added a comment. - removed some unrelated change - add a comment about why uint64_t instead of unsigned Repository: rC Clang https://reviews.llvm.org/D49729 Files: include/clang/AST/Decl.h include/clang/AST/DeclBase.h lib/AST/Decl.cpp

[PATCH] D49267: [clangd] Watch for changes in compile_commands.json

2018-07-24 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. > if/when we have a native implementation, supporting multiple mechanisms with > different layering requirements to get at most a 2x win in watcher resource > usage seems like a dubious way to spend our complexity budget. I guess the only think that might force us

[PATCH] D49732: [AST][2/4] Move the bit-fields from FunctionDecl and CXXConstructorDecl into DeclContext

2018-07-24 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. Anotherone in need of clang-format, otherwise seems alright to me. Comment at: include/clang/AST/Decl.h:1809 + // and setMultiVersion do not simply set/read the corresponding bit. + void setPureImpl(bool isPure) { FunctionDeclBits.IsPure = isPure;

[PATCH] D49733: [AST][3/4] Move the bit-fields from BlockDecl, LinkageSpecDecl and OMPDeclareReductionDecl into DeclContext

2018-07-24 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. Another one in need of clang-format, but generally seems pretty mechanical. Comment at: include/clang/AST/DeclCXX.h:2844 + + bool hasBracesImpl() const { return LinkageSpecDeclBits.HasBraces; } + void setBracesImpl(bool B = true) { LinkageSpecDeclB

[PATCH] D49734: [AST][4/4] Move the bit-fields from ObjCMethodDecl and ObjCContainerDecl into DeclContext

2018-07-24 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. Same comment as the other 3. Comment at: include/clang/AST/DeclObjC.h:190 + /// InvalidObjCMethodFamily cast into an ObjCMethodFamily. + ObjCMethodFamily getFamilyImpl() const { +return static_cast(ObjCMethodDeclBits.Family); I

[PATCH] D49745: Generate fundamental type info with weak linkage

2018-07-24 Thread Tom Anderson via Phabricator via cfe-commits
thomasanderson created this revision. thomasanderson added a reviewer: pcc. https://reviews.llvm.org/D49745 Files: lib/CodeGen/ItaniumCXXABI.cpp test/CodeGenCXX/rtti-fundamental.cpp test/CodeGenCXX/windows-itanium-type-info.cpp Index: test/CodeGenCXX/windows-itanium-type-info.cpp =

[PATCH] D49745: Generate fundamental type info with weak linkage

2018-07-24 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc requested changes to this revision. pcc added a comment. This revision now requires changes to proceed. As I mentioned in https://bugs.llvm.org/show_bug.cgi?id=38281 I don't see a good reason to do this. Also extern_weak is not an appropriate linkage for definitions, only declarations. htt

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

2018-07-24 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. Does this check destructors of nested aggregate initializations in the case where brace elision occurs? I don't think just checking the top level of the SK_ListInitialization is enough. Perhaps it would make more sense to mark the dtors used from InitListChecker (in non-

[PATCH] D48958: [clang][ubsan] Implicit Cast Sanitizer - integer truncation - clang part

2018-07-24 Thread Vedant Kumar via Phabricator via cfe-commits
vsk accepted this revision. vsk added a comment. This revision is now accepted and ready to land. LGTM, although I think it'd be helpful to have another +1 just to be safe. I did two small experiments with this using a Stage1 Rel+Asserts compiler: Stage2 Rel+Asserts build of llvm-tblgen: ninja l

[PATCH] D49718: [CodeGen][ObjC] Make block copy/dispose helper function exception-safe.

2018-07-24 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 157095. ahatanak marked 2 inline comments as done. ahatanak added a comment. Address review comments. I think I should be able to merge pushBlockObjectRelease and enterByrefCleanup, but the BlockFieldFlags that are passed are different. We set BLOCK_FIELD_

[PATCH] D49718: [CodeGen][ObjC] Make block copy/dispose helper function exception-safe.

2018-07-24 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added inline comments. Comment at: lib/CodeGen/CGBlocks.cpp:1905 +case BlockCaptureEntityKind::None: + llvm_unreachable("unexpected BlockCaptureEntityKind"); } rjmccall wrote: > These two switches differ only in (1) what kind of cleanup the

[PATCH] D49715: [analyzer] CallEvent: Add partially working methods for obtaining the callee stack frame.

2018-07-24 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 nits mostly. Comment at: include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h:411 + /// for bad reasons, returning null, even in p

[PATCH] D49589: [UBSan] Strengthen pointer checks in 'new' expressions

2018-07-24 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 157102. sepavloff added a comment. Updated patch - Modified check generation. Now for each 'new' expression compiler tries to generate the checks. It solves problem of 'nested' new expressions, which appear when 'new' is used in default arguments. - Field

[PATCH] D49749: [analyzer] Admit that we can't simplify the newly produced mixed Loc/NonLoc expressions.

2018-07-24 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ created this revision. NoQ added reviewers: dcoughlin, xazax.hun, a.sidorin, george.karpenkov, szepet, rnkovacs, mikhail.ramalho. Herald added subscribers: cfe-commits, baloghadamsoftware. Add one more defensive check to prevent crashes on trying to simplify a `SymSymExpr` with different `Lo

[PATCH] D48958: [clang][ubsan] Implicit Cast Sanitizer - integer truncation - clang part

2018-07-24 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In https://reviews.llvm.org/D48958#1173860, @vsk wrote: > LGTM, although I think it'd be helpful to have another +1 just to be safe. Thank you for the review! It would indeed be great if someone else could take a look, especially since we are **so** close to the bra

[PATCH] D49589: [UBSan] Strengthen pointer checks in 'new' expressions

2018-07-24 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added inline comments. Comment at: lib/CodeGen/CodeGenFunction.h:380 + /// True if sanitizer checks for current pointer value are generated. + bool PointerChecksAreEmitted = false; + rjmccall wrote: > I don't think this is a good way of doing this. U

[PATCH] D48862: [OpenEmbedded] Fix lib paths for OpenEmbedded targets

2018-07-24 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang updated this revision to Diff 157106. mgrang added a comment. Thanks @rsmith. I have addressed your comments. https://reviews.llvm.org/D48862 Files: lib/Driver/ToolChains/Gnu.cpp lib/Driver/ToolChains/Linux.cpp test/Driver/Inputs/openembedded_aarch64_linux_tree/usr/include/c++/6.3

[PATCH] D49749: [analyzer] Admit that we can't simplify the newly produced mixed Loc/NonLoc expressions.

2018-07-24 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov requested changes to this revision. george.karpenkov added inline comments. This revision now requires changes to proceed. Comment at: lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp:1300 + Loc::isLocType(S->getRHS()->getType())) { +SVal V = SVB.ma

  1   2   >