[PATCH] D46522: [clang] cmake: resolve symlinks in ClangConfig.cmake

2018-05-12 Thread Kim Gräsman via Phabricator via cfe-commits
kimgr added a comment. I'm interested in this, I've tried for a while to fix the Debian packaging but I'm completely new to the packaging toolchain, so I'm making slow headway. Some of the problems are recorded in: https://bugs.debian.org/cgi-bin/bugreport.cgi?att=1;bug=862328 My (possibly nai

[PATCH] D46522: [clang] cmake: resolve symlinks in ClangConfig.cmake

2018-05-12 Thread Peter Wu via Phabricator via cfe-commits
Lekensteyn added a comment. In https://reviews.llvm.org/D46522#1096847, @kimgr wrote: > I'm interested in this, I've tried for a while to fix the Debian packaging > but I'm completely new to the packaging toolchain, so I'm making slow headway. The Debian clang-5.0 1:5.0.2-2 package already inc

[PATCH] D46740: [Clang Tablegen][RFC] Allow Early Textual Substitutions in `Diagnostic` messages.

2018-05-12 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 146467. EricWF added a comment. @rsmith How does this look? Turns out we have to fully parse the diagnostic text in order to substitute modifier indexes, which is a bit of a complication. This patch does exactly that. There is still some work done to produc

[PATCH] D46522: [clang] cmake: resolve symlinks in ClangConfig.cmake

2018-05-12 Thread Kim Gräsman via Phabricator via cfe-commits
kimgr added a comment. It works! Having to specify `CMAKE_PREFIX_PATH` is at least documentable, so I don't see that as a major drawback, especially if it makes docs for tools using Clang more portable. Thank you for moving this along, now I can vastly simplify our CMake build. Repository:

[PATCH] D46740: [Clang Tablegen][RFC] Allow Early Textual Substitutions in `Diagnostic` messages.

2018-05-12 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added inline comments. Comment at: test/TableGen/text-substitution.td:9 + +// CHECK: AHHH +def AGGG : Warning<"%select{one|two}0 is OK">, InGroup; This test TBD. The `emit-diag-docs.td` test should hit all the major cases. https://reviews.llvm.org/D46740

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

2018-05-12 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 146468. yaxunl marked an inline comment as done. yaxunl added a comment. Revised by John's comments. Also refactored to extract common code. https://reviews.llvm.org/D46643 Files: lib/CodeGen/CGDecl.cpp lib/CodeGen/CodeGenModule.cpp lib/CodeGen/CodeGen

[PATCH] D46740: [Clang Tablegen][RFC] Allow Early Textual Substitutions in `Diagnostic` messages.

2018-05-12 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 146470. EricWF added a comment. - Update tests. The last thing I want to tackle is improving parsing errors to at least name the diagnostic being parsed. Naming *why* it's invalid if we don't provide its name. https://reviews.llvm.org/D46740 Files: incl

[PATCH] D46740: [Clang Tablegen][RFC] Allow Early Textual Substitutions in `Diagnostic` messages.

2018-05-12 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. @rsmith Can select indexes be negative? What's the correct type to represent them? Existing code seems to use `int`, but the LLVM style seems to suggest `unsigned` is more appropriate. Comment at: utils/TableGen/ClangDiagnosticsEmitter.cpp:591 + std::

[PATCH] D46386: Adding __atomic_fetch_min/max intrinsics to clang

2018-05-12 Thread Elena Demikhovsky via Phabricator via cfe-commits
delena added a comment. In https://reviews.llvm.org/D46386#1096833, @rjmccall wrote: > The actual semantic parts of the diff seem to have disappeared from the patch > posted to Phabricator, for what it's worth. It is not disappeared by itself, I removed it. I understood that you don't see any

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

2018-05-12 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman updated this revision to Diff 146472. aaron.ballman added a comment. Addresses review comments. https://reviews.llvm.org/D46112 Files: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaChecking.cpp lib/Sema/SemaType.cpp test/CodeGen/c11atomics.c test/Sema/atomic-ty

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

2018-05-12 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman updated this revision to Diff 146474. aaron.ballman added a comment. Modifications based on review feedback. https://reviews.llvm.org/D46112 Files: include/clang/Basic/DiagnosticSemaKinds.td lib/AST/Type.cpp lib/Sema/SemaChecking.cpp lib/Sema/SemaType.cpp test/CodeGen/c1

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

2018-05-12 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D46112#1091981, @efriedma wrote: > I think the request was that we check that a type is trivially copyable when > we perform an atomic operation? I don't see the code for that anywhere. Sorry about that -- I didn't notice that GNU was

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

2018-05-12 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov created this revision. ilya-biryukov added reviewers: sammccall, ioeric. Herald added subscribers: jkorous, MaskRay, klimek. We used to query the index when completing after class qualifiers, e.g. 'ClassName::^'. We should not do that for the same reasons we don't query the index for

[PATCH] D46740: [Clang Tablegen][RFC] Allow Early Textual Substitutions in `Diagnostic` messages.

2018-05-12 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 146491. EricWF edited the summary of this revision. EricWF added a comment. - Get argument renumbering work as @rsmith requested. - Make the changes to existing diagnostics whitespace correct. - Cleanup `DiagnosticSemaKinds.td` and `SemaOverload.cpp` to take ad

[PATCH] D23041: Un-XFAIL GCC atomics.align

2018-05-12 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. OK, here's what I would do: (1) Split the vector, nullptr, and other weirdly failing tests into their own files. (2) In each file, use `defined(TEST_COMPILER_GCC) && __GXX_ABI_VERSION > 1006` (or w/e version is broken) to define a macro when the test is expected to fail.

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

2018-05-12 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: test/SemaCXX/atomic-type.cpp:5 template struct atomic { - _Atomic(T) value; + _Atomic(T) value; // expected-error {{field has incomplete type '_Atomic(user::inner)'}} This is a bug. You need to teach `RequireComplet

[PATCH] D46740: [Clang Tablegen][RFC] Allow Early Textual Substitutions in `Diagnostic` messages.

2018-05-12 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 146495. EricWF added a comment. Document `%sub` in `InternalsManual.rst` https://reviews.llvm.org/D46740 Files: docs/InternalsManual.rst include/clang/Basic/Diagnostic.td include/clang/Basic/DiagnosticSemaKinds.td lib/Basic/Diagnostic.cpp lib/Sema/

[PATCH] D46740: [Clang Tablegen][RFC] Allow Early Textual Substitutions in `Diagnostic` messages.

2018-05-12 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. Thanks, this is great. In https://reviews.llvm.org/D46740#1096859, @EricWF wrote: > Turns out we have to fully parse the diagnostic text in order to substitute > modifier indexes, which is a bit of a complication. This patch does exactly > that. I like that you were a

[PATCH] D46441: [clang][CodeGenCXX] Noalias attr for copy/move constructor arguments

2018-05-12 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. In https://reviews.llvm.org/D46441#1096874, @AntonBikineev wrote: > Please notice, that this is not the only place where the position of the > `this` pointer is assumed to always be first. As an example, another such > place is here

[PATCH] D46740: [Clang Tablegen][RFC] Allow Early Textual Substitutions in `Diagnostic` messages.

2018-05-12 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF marked 4 inline comments as done. EricWF added a comment. In https://reviews.llvm.org/D46740#1097014, @rsmith wrote: > Thanks, this is great. > > In https://reviews.llvm.org/D46740#1096859, @EricWF wrote: > > > Turns out we have to fully parse the diagnostic text in order to substitute >

[PATCH] D46441: [clang][CodeGenCXX] Noalias attr for copy/move constructor arguments

2018-05-12 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: lib/CodeGen/CodeGenModule.cpp:2513 + cast(D)->isCopyOrMoveConstructor()) +F->addParamAttr(1, llvm::Attribute::NoAlias); + rsmith wrote: > It's not strictly correct to assume that you know the correspondence betwe

[PATCH] D46740: [Clang Tablegen][RFC] Allow Early Textual Substitutions in `Diagnostic` messages.

2018-05-12 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. In https://reviews.llvm.org/D46740#1097014, @rsmith wrote: > Thanks, this is great. > > In https://reviews.llvm.org/D46740#1096859, @EricWF wrote: > > > Turns out we have to fully parse the diagnostic text in order to substitute > > modifier indexes, which is a bit of a c

[PATCH] D46740: [Clang Tablegen][RFC] Allow Early Textual Substitutions in `Diagnostic` messages.

2018-05-12 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 146498. EricWF marked 2 inline comments as done. EricWF added a comment. Address @rsmiths comments. - Prefer `int` to `unsigned`. - Substitute `note_ovl_candidate`. - Fix issues in docs. https://reviews.llvm.org/D46740 Files: docs/InternalsManual.rst in