[PATCH] D46795: [clangd] Don't query index when completing inside classes

2018-05-14 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added inline comments. This revision is now accepted and ready to land. Comment at: clangd/CodeComplete.cpp:810 +return false; + auto Scope = CC.getCXXScopeSpecifier(); + if (!Scope) we could use a high level comm

[PATCH] D45999: [clangd] Retrieve minimally formatted comment text in completion.

2018-05-14 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. Looks good, nits as always and I think you want a new test case. Comment at: clangd/CodeComplete.cpp:817 Result.IncludeGlobals = true; - Result.IncludeBriefComments

[PATCH] D46001: [CodeComplete] Expose helpers to get RawComment of completion result.

2018-05-14 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. This is pretty small and seems unlikely to be controversial. I think it's OK to commit at this point, it's been a few weeks. Comment at: include/clang/Sema/CodeComplet

r332222 - [RISCV][NFC] Use more appropriate label for CHECK lines

2018-05-14 Thread Alex Bradbury via cfe-commits
Author: asb Date: Mon May 14 02:14:43 2018 New Revision: 33 URL: http://llvm.org/viewvc/llvm-project?rev=33&view=rev Log: [RISCV][NFC] Use more appropriate label for CHECK lines 'CC1' was a misleading prefix. Committing so as to simplify the diff for a patch I'm about to put up for revie

[PATCH] D46820: Fix __uuidof handling on non-type template parameter in C++17

2018-05-14 Thread Taiju Tsuiki via Phabricator via cfe-commits
tzik created this revision. tzik added reviewers: rsmith, thakis. Herald added a subscriber: cfe-commits. Clang used to pass the base lvalue of a non-type template parameter to the template instantiation phase when the base part is __uuidof and it's running in C++17 mode. However, that drops its L

[PATCH] D46822: [RISCV] Add driver for riscv32-unknown-elf baremetal target

2018-05-14 Thread Alex Bradbury via Phabricator via cfe-commits
asb created this revision. asb added reviewers: efriedma, phosek, apazos. Herald added subscribers: mgrang, edward-jones, zzheng, shiva0217, kito-cheng, niosHD, sabuasal, jordy.potman.lists, simoncook, johnrusso, rbar, arichardson, mgorny, emaste. Herald added a reviewer: espindola. This patch a

[PATCH] D46823: [analyzer] const init: handle non-explicit cases more accurately

2018-05-14 Thread Rafael Stahl via Phabricator via cfe-commits
r.stahl created this revision. r.stahl added reviewers: NoQ, xazax.hun, george.karpenkov. Herald added subscribers: cfe-commits, a.sidorin, rnkovacs, szepet. If the access is out of bounds, return UndefinedVal. If it is missing an explicit init, return the implicit zero value it must have. Repo

[PATCH] D45774: [analyzer] cover more cases where a Loc can be bound to constants

2018-05-14 Thread Rafael Stahl via Phabricator via cfe-commits
r.stahl added a comment. In https://reviews.llvm.org/D45774#1088453, @NoQ wrote: > Two questions for the future: > > - Should we skip the initializer binding for local variables (and > fields/elements of local variables) entirely? Cause we can load from them > anyway. And keeping the Store smal

[clang-tools-extra] r332223 - [clang-tidy] Add terminating continue check

2018-05-14 Thread Gabor Horvath via cfe-commits
Author: xazax Date: Mon May 14 03:10:02 2018 New Revision: 332223 URL: http://llvm.org/viewvc/llvm-project?rev=332223&view=rev Log: [clang-tidy] Add terminating continue check Patch by: Daniel Kolozsvari! Differential Revision: https://reviews.llvm.org/D33844 Added: clang-tools-extra/trunk/

[PATCH] D33844: [clang-tidy] terminating continue check

2018-05-14 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL332223: [clang-tidy] Add terminating continue check (authored by xazax, committed by ). Herald added subscribers: llvm-commits, klimek. Changed prior to commit: https://reviews.llvm.org/D33844?vs=142793

[PATCH] D46824: [clang-format] Continue after non-scope-closers in getLengthToMatchingParen

2018-05-14 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir created this revision. Herald added subscribers: cfe-commits, klimek. This fixes a regression introduced by `r331857` where we stop the search for the End token as soon as we hit a non-scope-closer, which prematurely stops before semicolons for example, which should otherwise be consider

[PATCH] D46694: [diagtool] Install diagtool

2018-05-14 Thread Jonas Devlieghere via Phabricator via cfe-commits
JDevlieghere added a comment. In https://reviews.llvm.org/D46694#1094617, @dexonsmith wrote: > This SGTM, but I wouldn't mind hearing from others. I wonder if this is > worth a quick RFC on cfe-dev? Sounds good, I've created a thread here: http://lists.llvm.org/pipermail/cfe-dev/2018-May/057

r332225 - [clang-format] Continue after non-scope-closers in getLengthToMatchingParen

2018-05-14 Thread Krasimir Georgiev via cfe-commits
Author: krasimir Date: Mon May 14 03:33:40 2018 New Revision: 332225 URL: http://llvm.org/viewvc/llvm-project?rev=332225&view=rev Log: [clang-format] Continue after non-scope-closers in getLengthToMatchingParen Summary: This fixes a regression introduced by `r331857` where we stop the search for

[PATCH] D41537: Optionally add code completion results for arrow instead of dot

2018-05-14 Thread Ivan Donchevskii via Phabricator via cfe-commits
yvvan added a comment. ping I hope this review won't take forever :) https://reviews.llvm.org/D41537 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D46824: [clang-format] Continue after non-scope-closers in getLengthToMatchingParen

2018-05-14 Thread Krasimir Georgiev 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 rC332225: [clang-format] Continue after non-scope-closers in getLengthToMatchingParen (authored by krasimir, committed by ).

[PATCH] D45616: [X86] Lower _mm[256|512]_cmp[.]_mask intrinsics to native llvm IR

2018-05-14 Thread Gabor Buella via Phabricator via cfe-commits
GBuella accepted this revision. GBuella added a comment. This revision is now accepted and ready to land. LGTM Repository: rC Clang https://reviews.llvm.org/D45616 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-

[PATCH] D45616: [X86] Lower _mm[256|512]_cmp[.]_mask intrinsics to native llvm IR

2018-05-14 Thread Gabor Buella via Phabricator via cfe-commits
GBuella requested review of this revision. GBuella added a comment. Oops, accepted this by accident. Repository: rC Clang https://reviews.llvm.org/D45616 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailma

[PATCH] D46742: [X86] Use __builtin_convertvector to replace some of the avx512 truncate builtins.

2018-05-14 Thread Gabor Buella via Phabricator via cfe-commits
GBuella accepted this revision. GBuella added a comment. This revision is now accepted and ready to land. LGTM Repository: rC Clang https://reviews.llvm.org/D46742 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-

[PATCH] D46795: [clangd] Don't query index when completing inside classes

2018-05-14 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: unittests/clangd/CodeCompleteTests.cpp:829 +TEST(CompletionTest, NoIndexCompletionsInsideClasses) { + // clang-format off + auto Completions = completions(R"cpp( sammccall wrote: > Can we avoid disabling clang-fo

[PATCH] D46795: [clangd] Don't query index when completing inside classes

2018-05-14 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 146571. ilya-biryukov marked 5 inline comments as done. ilya-biryukov added a comment. - Address review comments Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D46795 Files: clangd/CodeComplete.cpp unittests/clangd/CodeCompleteTest

[clang-tools-extra] r332226 - [clangd] Don't query index when completing inside classes

2018-05-14 Thread Ilya Biryukov via cfe-commits
Author: ibiryukov Date: Mon May 14 03:50:04 2018 New Revision: 332226 URL: http://llvm.org/viewvc/llvm-project?rev=332226&view=rev Log: [clangd] Don't query index when completing inside classes Summary: We used to query the index when completing after class qualifiers, e.g. 'ClassName::^'. We sho

[PATCH] D46795: [clangd] Don't query index when completing inside classes

2018-05-14 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE332226: [clangd] Don't query index when completing inside classes (authored by ibiryukov, committed by ). Changed prior to commit: https://reviews.llvm.org/D46795?vs=146571&id=146574#toc Repository:

[PATCH] D46685: [CodeGen] Disable structor optimizations at -O0

2018-05-14 Thread Pavel Labath via Phabricator via cfe-commits
labath added a comment. Thank you for the quick review. Repository: rC Clang https://reviews.llvm.org/D46685 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r332228 - [CodeGen] Disable aggressive structor optimizations at -O0

2018-05-14 Thread Pavel Labath via cfe-commits
Author: labath Date: Mon May 14 04:02:23 2018 New Revision: 332228 URL: http://llvm.org/viewvc/llvm-project?rev=332228&view=rev Log: [CodeGen] Disable aggressive structor optimizations at -O0 Summary: Removing the full structor and replacing all usages with the base one can degrade debug quality

[PATCH] D46685: [CodeGen] Disable structor optimizations at -O0

2018-05-14 Thread Pavel Labath via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC332228: [CodeGen] Disable aggressive structor optimizations at -O0 (authored by labath, committed by ). Changed prior to commit: https://reviews.llvm.org/D46685?vs=146309&id=146578#toc Repository: rC

r332232 - Revert "[CodeGen] Disable aggressive structor optimizations at -O0"

2018-05-14 Thread Pavel Labath via cfe-commits
Author: labath Date: Mon May 14 04:35:44 2018 New Revision: 332232 URL: http://llvm.org/viewvc/llvm-project?rev=332232&view=rev Log: Revert "[CodeGen] Disable aggressive structor optimizations at -O0" It breaks the sanitizer build

[PATCH] D46675: [clangd] Add helper for collecting #include directives in file.

2018-05-14 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added inline comments. This revision is now accepted and ready to land. Comment at: clangd/ClangdUnit.h:53 std::vector Diags; - InclusionLocations IncLocations; + std::vector Inclusions; }; this might be a good pl

[clang-tools-extra] r332233 - [clangd] Fix warning after fully covered enum switch. NFC.

2018-05-14 Thread Ilya Biryukov via cfe-commits
Author: ibiryukov Date: Mon May 14 04:47:30 2018 New Revision: 332233 URL: http://llvm.org/viewvc/llvm-project?rev=332233&view=rev Log: [clangd] Fix warning after fully covered enum switch. NFC. By adding llvm_unreachable. Modified: clang-tools-extra/trunk/clangd/CodeComplete.cpp Modified:

[PATCH] D46675: [clangd] Add helper for collecting #include directives in file.

2018-05-14 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 146581. ioeric marked an inline comment as done. ioeric added a comment. - Merged with origin/master - Addressed review comments. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D46675 Files: clangd/ClangdUnit.cpp clangd/ClangdUnit.h cla

r332236 - Redirect output to /dev/null in the tests added in r332160.

2018-05-14 Thread Eric Liu via cfe-commits
Author: ioeric Date: Mon May 14 05:07:56 2018 New Revision: 332236 URL: http://llvm.org/viewvc/llvm-project?rev=332236&view=rev Log: Redirect output to /dev/null in the tests added in r332160. Modified: cfe/trunk/test/Driver/clang-abi-compat.cpp Modified: cfe/trunk/test/Driver/clang-abi-comp

[PATCH] D45766: [Sema] Add -Wno-self-assign-overloaded

2018-05-14 Thread Oksana Shadura via Phabricator via cfe-commits
ksu.shadura added a comment. Hi, we see the false-positive behavior of -Wno-self-assign-overloaded flag in case of subtraction assignment operator. The minimal reproducer that we got: https://godbolt.org/g/8PQMpR typedef int Int_t; typedef double Double_t; class TObject {}; template c

[clang-tools-extra] r332237 - [clangd] Add helper for collecting #include directives in file.

2018-05-14 Thread Eric Liu via cfe-commits
Author: ioeric Date: Mon May 14 05:19:16 2018 New Revision: 332237 URL: http://llvm.org/viewvc/llvm-project?rev=332237&view=rev Log: [clangd] Add helper for collecting #include directives in file. Summary: Separate unit tests for the new function will be added in followup patch which will furthe

[PATCH] D46675: [clangd] Add helper for collecting #include directives in file.

2018-05-14 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE332237: [clangd] Add helper for collecting #include directives in file. (authored by ioeric, committed by ). Changed prior to commit: https://reviews.llvm.org/D46675?vs=146581&id=146583#toc Repositor

[PATCH] D46805: If some platforms do not support an attribute, we should exclude the platform

2018-05-14 Thread Li Jia He via Phabricator via cfe-commits
HLJ2009 marked 4 inline comments as done. HLJ2009 added inline comments. Comment at: include/clang/Basic/Attr.td:327 +def TargetDarwinNegative : TargetArch<["x86", "x86_64"]> { + let OSes = ["MacOSX"]; + let Negated = 1; aaron.ballman wrote: > I would expect th

[PATCH] D45766: [Sema] Add -Wno-self-assign-overloaded

2018-05-14 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In https://reviews.llvm.org/D45766#1097736, @ksu.shadura wrote: > Hi, Hi. > we see the false-positive behavior of -Wno-self-assign-overloaded flag in > case of subtraction assignment operator. > The minimal reproducer that we got: https://godbolt.org/g/8PQMpR >

[PATCH] D46524: [clangd] Extract scoring/ranking logic, and shave yaks.

2018-05-14 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 146584. sammccall added a comment. fix diffbase? Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D46524 Files: clangd/CMakeLists.txt clangd/CodeComplete.cpp clangd/Quality.cpp clangd/Quality.h unittests/clangd/CMakeLists.txt uni

[PATCH] D41537: Optionally add code completion results for arrow instead of dot

2018-05-14 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. In https://reviews.llvm.org/D41537#1097601, @yvvan wrote: > I hope this review will be over some day :) Sorry for keeping it that long. FWIW, I think we keep jumping back and forth between the clang and libclang changes here. I should've suggested splitting the c

[PATCH] D41537: Optionally add code completion results for arrow instead of dot

2018-05-14 Thread Ivan Donchevskii via Phabricator via cfe-commits
yvvan added a comment. In https://reviews.llvm.org/D41537#1097763, @ilya-biryukov wrote: > I should've suggested splitting the change into two earlier. Next time I will do that from the beginning :) Comment at: tools/libclang/CIndexCodeCompletion.cpp:309 + /// before that r

[PATCH] D45766: [Sema] Add -Wno-self-assign-overloaded

2018-05-14 Thread Oksana Shadura via Phabricator via cfe-commits
ksu.shadura added a comment. Thank you for the test example! I got your point, but I wanted to ask if it should be like this for commutative operations? In our case it is actually matrix, and subtraction of matrices is not commutative operation.. Repository: rL LLVM https://reviews.llvm.org

[PATCH] D46398: [ASTImporterTest] Fix potential use-after-free

2018-05-14 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin updated this revision to Diff 146587. a.sidorin added a comment. After a number of attempts of Twine'ifying all Code samples, I decided to restore the initial state of this code. Repository: rC Clang https://reviews.llvm.org/D46398 Files: unittests/AST/ASTImporterTest.cpp Inde

[PATCH] D46398: [ASTImporterTest] Fix potential use-after-free

2018-05-14 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin updated this revision to Diff 146589. a.sidorin added a comment. Add forgotten context. Repository: rC Clang https://reviews.llvm.org/D46398 Files: unittests/AST/ASTImporterTest.cpp Index: unittests/AST/ASTImporterTest.cpp ===

[PATCH] D46524: [clangd] Extract scoring/ranking logic, and shave yaks.

2018-05-14 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 146591. sammccall marked an inline comment as done. sammccall added a comment. Doxygen Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D46524 Files: clangd/CMakeLists.txt clangd/CodeComplete.cpp clangd/Quality.cpp clangd/Quality.h

[PATCH] D46497: [clangd] Populate #include insertions as additional edits in completion items.

2018-05-14 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clangd/CodeComplete.cpp:247 +// Calculates include path and insertion edit for a new header. +class IncludeInserter { +public: Do you think it would make sense to move this class to Headers.h? This would reduce the no

[PATCH] D46112: Allow _Atomic to be specified on incomplete types

2018-05-14 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman updated this revision to Diff 146594. aaron.ballman marked an inline comment as done. aaron.ballman added a comment. Updated based on review comments. https://reviews.llvm.org/D46112 Files: include/clang/Basic/DiagnosticSemaKinds.td lib/AST/Type.cpp lib/Sema/SemaChecking.cpp

[PATCH] D46112: Allow _Atomic to be specified on incomplete types

2018-05-14 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman marked 8 inline comments as done. aaron.ballman added inline comments. Comment at: lib/Sema/SemaType.cpp:7604-7608 + // When instantiating a class template and reaching an atomic type, the check + // for type completeness should occur on the underlying type and no

[PATCH] D41537: Optionally add code completion results for arrow instead of dot

2018-05-14 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: tools/libclang/CIndexCodeCompletion.cpp:309 + /// before that result for the corresponding completion item. + std::vector> FixItsVector; }; yvvan wrote: > ilya-biryukov wrote: > > Storing `vector>` here makes lo

[PATCH] D45815: [libclang] Allow skipping function bodies in preamble only

2018-05-14 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/D45815 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.l

r332244 - [CodeComplete] Provide completion in decls even for incomplete types

2018-05-14 Thread Ilya Biryukov via cfe-commits
Author: ibiryukov Date: Mon May 14 06:50:36 2018 New Revision: 332244 URL: http://llvm.org/viewvc/llvm-project?rev=332244&view=rev Log: [CodeComplete] Provide completion in decls even for incomplete types Summary: This change fixes lack of completions in the following case ('^'designates completi

[PATCH] D46639: [CodeComplete] Provide completion in decls even for incomplete types

2018-05-14 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL332244: [CodeComplete] Provide completion in decls even for incomplete types (authored by ibiryukov, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.or

[PATCH] D45766: [Sema] Add -Wno-self-assign-overloaded

2018-05-14 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In https://reviews.llvm.org/D45766#1097797, @ksu.shadura wrote: > Thank you for the test example! I got your point, but I wanted to ask if it > should be like this for commutative operations? > In our case it is actually matrix, and subtraction of matrices is not

[PATCH] D46758: [clang-format] Move #include related style to libToolingCore

2018-05-14 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. LG. Just a quick comment about possibly unrelated change. Comment at: lib/Format/Format.cpp:2277 auto Replace = -Includes.insert(trimInclude(IncludeName), IncludeName.startswith("<")); +Includes.insert(IncludeName.trim("\"<>")

[PATCH] D46758: [clang-format] Move #include related style to libToolingCore

2018-05-14 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: lib/Format/Format.cpp:2277 auto Replace = -Includes.insert(trimInclude(IncludeName), IncludeName.startswith("<")); +Includes.insert(IncludeName.trim("\"<>"), IncludeName.startswith("<")); if (Replace) { -

[PATCH] D46758: [clang-format] Move #include related style to libToolingCore

2018-05-14 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 146598. ioeric marked an inline comment as done. ioeric added a comment. - Remove an unintended change. Repository: rC Clang https://reviews.llvm.org/D46758 Files: include/clang/Format/Format.h include/clang/Tooling/Core/IncludeStyle.h lib/Format/Fo

[PATCH] D45416: [AST, analyzer] Transform rvalue cast outputs to lvalues (fheinous-gnu-extensions)

2018-05-14 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin added a comment. Gentle ping. Repository: rC Clang https://reviews.llvm.org/D45416 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D46602: [clang-tidy] Store checks profiling info as YAML files

2018-05-14 Thread Alexander Kornienko via Phabricator via cfe-commits
easier to use, in particular: 1. no the need to specify the `-store-check-profile-elide-prefix=` option; 2. it's easier to see all results (no need to use `find`, just `ls /output/directory` or `ls /output/directory/20180514*` to see today's results, for example); 3. no chance of filen

[PATCH] D46747: [Sema] Use dotted form of macOS version for unguarded availability FixIts

2018-05-14 Thread Jan Korous via Phabricator via cfe-commits
jkorous updated this revision to Diff 146605. jkorous added a comment. Fixed the test. It turned out that version component separator for availability is set during parsing which is why all other tests (including my bad one) are passing. The only way how to set underscore as a separator is thro

[PATCH] D46747: [Sema] Use dotted form of macOS version for unguarded availability FixIts

2018-05-14 Thread Jan Korous via Phabricator via cfe-commits
jkorous added a comment. I am not 100% sure it's the best thing to set printing style at the point of parsing version tuples but I am not sure it's bad either. Unless someone convinces me otherwise I would rather not do any major changes. https://reviews.llvm.org/D46747

[PATCH] D46421: [analyzer][CrossTU] Extend CTU to VarDecls with initializer

2018-05-14 Thread Rafael Stahl via Phabricator via cfe-commits
r.stahl updated this revision to Diff 146609. r.stahl marked an inline comment as done. r.stahl added a comment. - added tests - updated doc and var naming - addressed review comment https://reviews.llvm.org/D46421 Files: include/clang/CrossTU/CrossTranslationUnit.h lib/CrossTU/CrossTransla

[PATCH] D46602: [clang-tidy] Store checks profiling info as YAML files

2018-05-14 Thread Roman Lebedev via Phabricator via cfe-commits
gt; > > If clang-tidy is invoked manually, a simpler naming scheme with less > configuration options would be easier to use, in particular: > > 1. no the need to specify the `-store-check-profile-elide-prefix=` option; > 2. it's easier to see all results (no need to use `find`,

[PATCH] D46685: [CodeGen] Disable structor optimizations at -O0

2018-05-14 Thread Pavel Labath via Phabricator via cfe-commits
labath added a comment. I've reverted the patch as it has caused miscompiles on non-trivial inputs. I'll update the patch when I gain a better understanding of what is going on. Repository: rC Clang https://reviews.llvm.org/D46685 ___ cfe-commit

[PATCH] D46805: If some platforms do not support an attribute, we should exclude the platform

2018-05-14 Thread Li Jia He via Phabricator via cfe-commits
HLJ2009 added inline comments. Comment at: include/clang/Basic/Attr.td:566-567 -def Alias : Attr { +// We do not support alias attribute on Apple platform, so we exclude the platform. +def Alias : Attr, TargetSpecificAttr { let Spellings = [GCC<"alias">]; r

[PATCH] D46398: [ASTImporterTest] Fix potential use-after-free

2018-05-14 Thread Gabor Marton via Phabricator via cfe-commits
martong accepted this revision. martong added a comment. This revision is now accepted and ready to land. LGTM! Repository: rC Clang https://reviews.llvm.org/D46398 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi

[PATCH] D43281: [AMDGPU] fixes for lds f32 builtins

2018-05-14 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl accepted this revision. yaxunl added a comment. This revision is now accepted and ready to land. LGTM. Thanks! Repository: rC Clang https://reviews.llvm.org/D43281 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.o

[PATCH] D46159: [clang-tidy] Add a flag to enable alpha checkers

2018-05-14 Thread Paul Fultz II via Phabricator via cfe-commits
pfultz2 added a comment. Is someone able to merge in my changes? https://reviews.llvm.org/D46159 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D46747: [Sema] Use dotted form of macOS version for unguarded availability FixIts

2018-05-14 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington accepted this revision. erik.pilkington added a comment. This revision is now accepted and ready to land. Thanks for the explanation, LGTM. https://reviews.llvm.org/D46747 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http:

[PATCH] D46758: [clang-format] Move #include related style to libToolingCore

2018-05-14 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/D46758 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.l

[PATCH] D46496: [Tooling] Pull #include manipulation code from clangFormat into libToolingCore.

2018-05-14 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. This LG, presuming there are no semantic changes here, just moving the code around. Also see the nits about `IncludeStyle` that seems to be in the wrong change... Comment at: include/clang/Tooling/Core/HeaderIncludes.h:112 +/// priorities for hea

[PATCH] D46353: [ASTImporter] Extend lookup logic in class templates

2018-05-14 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. In https://reviews.llvm.org/D46353#1086456, @martong wrote: > > should we add this new declaration to the redeclaration chain like we do it > > for RecordDecls? > > I think, on a long te

[PATCH] D46159: [clang-tidy] Add a flag to enable alpha checkers

2018-05-14 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. In https://reviews.llvm.org/D46159#1098000, @pfultz2 wrote: > Is someone able to merge in my changes? Will do. https://reviews.llvm.org/D46159 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/c

[PATCH] D46159: [clang-tidy] Add a flag to enable alpha checkers

2018-05-14 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. In https://reviews.llvm.org/D46159#1098018, @alexfh wrote: > In https://reviews.llvm.org/D46159#1098000, @pfultz2 wrote: > > > Is someone able to merge in my changes? > > > Will do. Please rebase the patch, it doesn't apply cleanly. https://reviews.llvm.org/D46159 _

[PATCH] D46496: [Tooling] Pull #include manipulation code from clangFormat into libToolingCore.

2018-05-14 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 Comment at: lib/Format/Format.cpp:1702 // cases where the first #include is unlikely to be the main header. - IncludeCategoryManager Categories(Style,

[PATCH] D46421: [analyzer][CrossTU] Extend CTU to VarDecls with initializer

2018-05-14 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. The analyzer can only reason about const variables this way, right? Maybe we should only import the initializers for such variables to have better performance? What do you think? Also, I wonder what happens with user-defined classes. Will the analyzer evaluate the co

[PATCH] D46834: [Sema][Cxx17] Error message for C++17 static_assert(pred) without string literal

2018-05-14 Thread Jan Korous via Phabricator via cfe-commits
jkorous created this revision. jkorous added reviewers: arphaman, dexonsmith, rsmith, doug.gregor. jkorous added a project: clang. Herald added a subscriber: cfe-commits. C++17 adds form of static_assert without string literal. static_assert ( bool_constexpr ) Currently clang produces diagnost

r332256 - [ASTImporter] Turn StringRefs back to std::strings to avoid use-after-free

2018-05-14 Thread Aleksei Sidorin via cfe-commits
Author: a.sidorin Date: Mon May 14 09:12:31 2018 New Revision: 332256 URL: http://llvm.org/viewvc/llvm-project?rev=332256&view=rev Log: [ASTImporter] Turn StringRefs back to std::strings to avoid use-after-free This is a workaround for the issue in buildASTFromCodeWithArgs() where a local buffer

[PATCH] D46602: [clang-tidy] Store checks profiling info as YAML files

2018-05-14 Thread Alexander Kornienko via Phabricator via cfe-commits
don't understand this at all. Why would we want to do that, > > > exactly? > > > Just so that we can avoid creating directory structure? Why do we want > > > to avoid that? > > > > > > If clang-tidy is invoked manually, a simpler naming scheme

[PATCH] D46835: [ASTImporter] Do not try to remove invisible Decls from DeclContext

2018-05-14 Thread Gabor Marton via Phabricator via cfe-commits
martong created this revision. martong added reviewers: xazax.hun, a.sidorin. Herald added subscribers: cfe-commits, dkrupp, rnkovacs. `DeclContext` is essentially a list of `Decl`s and a lookup table (`LookupPtr`) but these are encapsulated. E.g. `LookupPtr` is private. `DeclContext::removeDecl`

[PATCH] D46836: Fix some rtti-options tests

2018-05-14 Thread Sunil Srivastava via Phabricator via cfe-commits
Sunil_Srivastava created this revision. Herald added a subscriber: cfe-commits. Certain tests in rtti-options.cpp are not really testing anything because they are testing for the absence of -frtti option to the cc1 process. Since the cc1 process does not take -frtti option, these tests are passi

[PATCH] D46643: CodeGen: Emit string literal in constant address space

2018-05-14 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/CodeGen/CGDecl.cpp:1373 + llvm::Type *BP = llvm::Type::getInt8Ty(CGM.getLLVMContext()) + ->getPointerTo(Loc.getAddressSpace()); if (Loc.getType() != BP) `CGM.Int8Ty` exists. =

[PATCH] D42966: Fix USR generation in the presence of #line directives or linemarkes

2018-05-14 Thread Mikhail Ramalho via Phabricator via cfe-commits
mikhail.ramalho added a comment. > Could you provide a minimal example where USRs are not generated? It might > be the case that there are other ways to fix it. Sure, I'll try to reduce our testcase, but basically we have an ASTFrontendAction [0] that adds a set of intrinsics [1] to the preproce

[PATCH] D43341: [clang-doc] Implement reducer portion of the frontend framework

2018-05-14 Thread Julie Hockett via Phabricator via cfe-commits
juliehockett added a comment. Pingany more thoughts? https://reviews.llvm.org/D43341 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D46791: Make -gsplit-dwarf generally available

2018-05-14 Thread Jake Ehrlich via Phabricator via cfe-commits
jakehehrlich added inline comments. Comment at: lib/Driver/ToolChains/Clang.cpp:4818 // Handle the debug info splitting at object creation time if we're // creating an object. if (SplitDWARF && Output.getType() == types::TY_Object) Maybe re-add a TODO to

[PATCH] D46791: Make -gsplit-dwarf generally available

2018-05-14 Thread Jake Ehrlich via Phabricator via cfe-commits
jakehehrlich added a comment. I'm generally ok with this but I think some important checks need to occur first. Namely I think I'd like to check that Chromium still builds with this option since I'd imagine they'd be affected by this. Repository: rC Clang https://reviews.llvm.org/D46791

[PATCH] D43576: Solution to fix PR27066 - Redefinition with same mangled name as another definition (dllexport and uuid)

2018-05-14 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam updated this revision to Diff 146642. https://reviews.llvm.org/D43576 Files: include/clang/AST/Decl.h include/clang/AST/RecursiveASTVisitor.h include/clang/Basic/Attr.td include/clang/Basic/DeclNodes.td include/clang/Sema/AttributeList.h include/clang/Sema/Sema.h lib/AST/De

[PATCH] D46602: [clang-tidy] Store checks profiling info as YAML files

2018-05-14 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri updated this revision to Diff 146644. lebedev.ri edited the summary of this revision. lebedev.ri added subscribers: aaron.ballman, JonasToth. lebedev.ri added a comment. - Get rid of 'prefix elision' - Don't use full source file name, only the filename - Prefix that filename with ISO860

r332266 - [X86] Use __builtin_convertvector to replace some of the avx512 truncate builtins.

2018-05-14 Thread Craig Topper via cfe-commits
Author: ctopper Date: Mon May 14 10:50:40 2018 New Revision: 332266 URL: http://llvm.org/viewvc/llvm-project?rev=332266&view=rev Log: [X86] Use __builtin_convertvector to replace some of the avx512 truncate builtins. As long as the destination type is a 256 or 128 bit vector with the same number

[PATCH] D46742: [X86] Use __builtin_convertvector to replace some of the avx512 truncate builtins.

2018-05-14 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC332266: [X86] Use __builtin_convertvector to replace some of the avx512 truncate… (authored by ctopper, committed by ). Changed prior to commit: https://reviews.llvm.org/D46742?vs=146286&id=146645#toc

[PATCH] D46602: [clang-tidy] Store checks profiling info as YAML files

2018-05-14 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a project: clang-tools-extra. lebedev.ri added a comment. In https://reviews.llvm.org/D46602#1098092, @alexfh wrote: > In https://reviews.llvm.org/D46602#1097954, @lebedev.ri wrote: > > > How do i reflect that in tests? The output name will basically be random. > > > Why random?

[PATCH] D46767: Force the PS4 clang ABI version to 6, and add a warning if this is attempted to be overridden

2018-05-14 Thread Paul Robinson via Phabricator via cfe-commits
probinson added a comment. In https://reviews.llvm.org/D46767#1096746, @rsmith wrote: > Everything old is new again. If only that were true about my brain. :-P > This was discussed when `-fclang-abi-compat` was introduced; see > https://reviews.llvm.org/D36501 for the argument why this patch

[PATCH] D46643: CodeGen: Emit string literal in constant address space

2018-05-14 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 146647. yaxunl marked 2 inline comments as done. yaxunl added a comment. Revised by John's comments. https://reviews.llvm.org/D46643 Files: lib/CodeGen/CGDecl.cpp lib/CodeGen/CodeGenModule.cpp lib/CodeGen/CodeGenModule.h test/CodeGenCXX/amdgcn-string

[PATCH] D46694: [diagtool] Install diagtool

2018-05-14 Thread Vedant Kumar via Phabricator via cfe-commits
vsk added a comment. Sgtm. I think it would be worthwhile to release-note this. Repository: rC Clang https://reviews.llvm.org/D46694 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

[PATCH] D40218: [Clang] Add __builtin_launder

2018-05-14 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. LGTM with a fix (and test) for pointer-to-array-of-dynamic-class-type handling. Comment at: lib/CodeGen/CGBuiltin.cpp:936-938 + const auto *Record = Ty->getAsCXXRecordDecl()

r332275 - [AST] Fix -ast-print for _Bool when have diagnostics

2018-05-14 Thread Joel E. Denny via cfe-commits
Author: jdenny Date: Mon May 14 11:41:44 2018 New Revision: 332275 URL: http://llvm.org/viewvc/llvm-project?rev=332275&view=rev Log: [AST] Fix -ast-print for _Bool when have diagnostics For example, given: #define bool _Bool _Bool i; void fn() { 1; } -ast-print produced: tmp.c:3:13: wa

[PATCH] D46643: CodeGen: Emit string literal in constant address space

2018-05-14 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added a comment. This revision is now accepted and ready to land. Thanks, LGTM. https://reviews.llvm.org/D46643 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/l

[PATCH] D45093: [AST] Fix -ast-print for _Bool when have diagnostics

2018-05-14 Thread Joel E. Denny via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC332275: [AST] Fix -ast-print for _Bool when have diagnostics (authored by jdenny, committed by ). Changed prior to commit: https://reviews.llvm.org/D45093?vs=145711&id=146650#toc Repository: rC Clang

[PATCH] D46112: Allow _Atomic to be specified on incomplete types

2018-05-14 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. In https://reviews.llvm.org/D46112#1096893, @aaron.ballman wrote: > In https://reviews.llvm.org/D46112#1091981, @efriedma wrote: > > > Also needs some test coverage for atomic operations which aren't calls, > > like "typedef struct S S; void f(_Atomic S *s, _Atomic S *s2)

[clang-tools-extra] r332277 - [Documentation] Alphabetical order of new checks in Release Notes.

2018-05-14 Thread Eugene Zelenko via cfe-commits
Author: eugenezelenko Date: Mon May 14 12:12:40 2018 New Revision: 332277 URL: http://llvm.org/viewvc/llvm-project?rev=332277&view=rev Log: [Documentation] Alphabetical order of new checks in Release Notes. Modified: clang-tools-extra/trunk/docs/ReleaseNotes.rst Modified: clang-tools-extra/t

r332279 - CodeGen: Emit string literal in constant address space

2018-05-14 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Mon May 14 12:20:12 2018 New Revision: 332279 URL: http://llvm.org/viewvc/llvm-project?rev=332279&view=rev Log: CodeGen: Emit string literal in constant address space Some targets have constant address space (e.g. amdgcn). For them string literal should be emitted in constan

[PATCH] D46643: CodeGen: Emit string literal in constant address space

2018-05-14 Thread Yaxun Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC332279: CodeGen: Emit string literal in constant address space (authored by yaxunl, committed by ). Repository: rC Clang https://reviews.llvm.org/D46643 Files: lib/CodeGen/CGDecl.cpp lib/CodeGen/C

[PATCH] D40218: [Clang] Add __builtin_launder

2018-05-14 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. Also we probably want to hold off on landing this until PR37458 is fixed, otherwise `std::launder` will start miscompiling code. https://reviews.llvm.org/D40218 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://

r332281 - [AST] Print correct tag decl for tag specifier

2018-05-14 Thread Joel E. Denny via cfe-commits
Author: jdenny Date: Mon May 14 12:36:45 2018 New Revision: 332281 URL: http://llvm.org/viewvc/llvm-project?rev=332281&view=rev Log: [AST] Print correct tag decl for tag specifier For example, given: void fn() { struct T *p0; struct T { int i; } *p1; } -ast-print produced: void f

  1   2   >