[PATCH] D56226: [clang-format] square parens that are followed by '=' are not Objective-C message sends

2019-01-03 Thread Jan Korous via Phabricator via cfe-commits
jkorous added a comment. Hi Alex, thanks for fixing this. I assume chance of testing an Objective-C header with assignment to method result without any other specifically Objective-C (detectable) construct is significantly lower than chance of testing a C99 header with designated

[PATCH] D55994: [clangd] Check preceding char when completion triggers on ':' or '>'

2019-01-03 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. In D55994#1343669 , @jkorous wrote: > This looks like a work around LSP imperfection indeed. Totally. > Are you going to push for change in LSP? Something like > `CompletionOptions/triggerCharacters` ->

[PATCH] D55994: [clangd] Check preceding char when completion triggers on ':' or '>'

2019-01-03 Thread Jan Korous via Phabricator via cfe-commits
jkorous added a comment. @hokein I think you are correct. I meant that it would be possible to make LSP more generic by using trigger strings instead of trigger characters.. @ilya-biryukov Yes, that's true. I would still expect some performance gain in more restrictive filtering on client's

[PATCH] D17741: adds __FILE_BASENAME__ builtin macro

2019-01-03 Thread Karl-Johan Karlsson via Phabricator via cfe-commits
Ka-Ka added a comment. Ping? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D17741/new/ https://reviews.llvm.org/D17741 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D55363: [clangd] Expose FileStatus in LSP.

2019-01-03 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. In D55363#1343611 , @jkorous wrote: > I am a bit late to the discussion but isn't this something to be dealt with > on the client's side? That would mean more complex code in **every** client and more communication

[PATCH] D56241: expose a control flag for interger to pointer ext warning

2019-01-03 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. Looks ok in general. Perhaps there should be a test for this flag specifically? Also, should "pointer-integer-compare" be in some group? Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56241/new/ https://reviews.llvm.org/D56241

[PATCH] D55932: [Sema] Simplfy static_assert diagnostic code.

2019-01-03 Thread Clement Courbet via Phabricator via cfe-commits
courbet marked an inline comment as done. courbet added inline comments. Comment at: test/SemaCXX/static-assert.cpp:130 static_assert(std::is_same()), int>::value, "message"); -// expected-error@-1{{static_assert failed due to requirement 'std::is_same, int>::value'

[PATCH] D55933: [Sema] Do not print default template parameters.

2019-01-03 Thread Clement Courbet via Phabricator via cfe-commits
courbet updated this revision to Diff 180035. courbet marked 2 inline comments as done. courbet added a comment. Add more tests as suggested in the comments. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55933/new/ https://reviews.llvm.org/D55933 Files:

[PATCH] D55933: [Sema] Do not print default template parameters.

2019-01-03 Thread Clement Courbet via Phabricator via cfe-commits
courbet added inline comments. Comment at: test/SemaCXX/static-assert-cxx17.cpp:109 +template +void foo7() { + static_assert(X()); Quuxplusone wrote: > courbet wrote: > > Quuxplusone wrote: > > > None of these new test cases actually involve the default

[PATCH] D55994: [clangd] Check preceding char when completion triggers on ':' or '>'

2019-01-03 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. In D55994#1343669 , @jkorous wrote: > This looks like a work around LSP imperfection indeed. > > Are you going to push for change in LSP? Something like > `CompletionOptions/triggerCharacters` ->

[PATCH] D54309: [AST] Allow limiting the scope of common AST traversals (getParents, RAV).

2019-01-03 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. new years ping on the crash-issue. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54309/new/ https://reviews.llvm.org/D54309 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D55948: Modify DeclaratorChuck::getFunction to use DeclSpec for qualifiers

2019-01-03 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia marked an inline comment as done. Anastasia added inline comments. Comment at: lib/Sema/SemaDeclCXX.cpp:8175 DeclaratorChunk::FunctionTypeInfo = D.getFunctionTypeInfo(); - if (FTI.TypeQuals != 0) { -if (FTI.TypeQuals & Qualifiers::Const) -

[PATCH] D56160: [clang-tidy] modernize-use-trailing-return check

2019-01-03 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. Hi Bernhard, thanks for you patch! You mentioned that this is your first contribution, if you didn't find these docs already they might help you with the LLVM source-code a bit: - https://llvm.org/docs/ProgrammersManual.html -

[PATCH] D56263: [clangd] Always try to build absolute path

2019-01-03 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: ilya-biryukov. Herald added subscribers: cfe-commits, arphaman, jkorous, MaskRay, ioeric. When canonicalizing paths do not look at tryGetRealPathName, which contains the resolved path for files that are symlinks. Instead first build the

[PATCH] D56241: expose a control flag for interger to pointer ext warning

2019-01-03 Thread abdoul-kader keita via Phabricator via cfe-commits
Kader marked 2 inline comments as done. Kader added inline comments. Comment at: test/Sema/ext-typecheck-comparison-of-pointer-integer.c:1 +// RUN: %clang_cc1 -triple x86_64-apple-darwin -fsyntax-only -verify -Wpointer-integer-compare %s + lebedev.ri wrote: >

[PATCH] D56241: expose a control flag for interger to pointer ext warning

2019-01-03 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri accepted this revision. lebedev.ri added a comment. This revision is now accepted and ready to land. ok, LGTM. Comment at: test/Sema/ext-typecheck-comparison-of-pointer-integer.c:1 +// RUN: %clang_cc1 -triple x86_64-apple-darwin -fsyntax-only -verify

[PATCH] D55662: [Sema][ObjC] Do not warn about repeated uses of weak variables when the variables are accessed in an unevaluated context.

2019-01-03 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In D55662#1346059 , @ahatanak wrote: > In D55662#1346055 , @rjmccall wrote: > > > I think you could just disable the diagnostic in an unevaluated context. > > > The call to

[PATCH] D55865: [ObjC] Add a new attribute to opt-out of implicit callee retain/release in ARC

2019-01-03 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Sorry, I keep coming up with small tweaks to the documentation. These should be the last of them, so if Aaron's also satisfied, feel free to commit with those modifications. Comment at: clang/docs/AutomaticReferenceCounting.rst:1788 +// ... +

[PATCH] D55662: [Sema][ObjC] Do not warn about repeated uses of weak variables when the variables are accessed in an unevaluated context.

2019-01-03 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. I think you could just disable the diagnostic in an unevaluated context. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55662/new/ https://reviews.llvm.org/D55662 ___ cfe-commits mailing

[PATCH] D55865: [ObjC] Add a new attribute to opt-out of implicit callee retain/release in ARC

2019-01-03 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington updated this revision to Diff 180196. erik.pilkington marked 3 inline comments as done. erik.pilkington added a comment. Mention `__has_attribute` and the ignored without -fobjc-arc thing. @aaron.ballman: Do you have any more thoughts here? CHANGES SINCE LAST ACTION

[PATCH] D56215: [lld] [ELF] Include default search paths for NetBSD driver

2019-01-03 Thread Michał Górny via Phabricator via cfe-commits
mgorny added a comment. For the record, another option is to actually fix other software not to call LD directly. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56215/new/ https://reviews.llvm.org/D56215 ___ cfe-commits mailing list

[PATCH] D55662: [Sema][ObjC] Do not warn about repeated uses of weak variables when the variables are accessed in an unevaluated context.

2019-01-03 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. In D55662#1346055 , @rjmccall wrote: > I think you could just disable the diagnostic in an unevaluated context. The call to `isUnevaluatedContext` in `ObjCPropertyOpBuilder::complete` returns false when the type of `auto

[clang-tools-extra] r350303 - [clangd] clang-format everything. NFC

2019-01-03 Thread Ilya Biryukov via cfe-commits
Author: ibiryukov Date: Thu Jan 3 05:28:05 2019 New Revision: 350303 URL: http://llvm.org/viewvc/llvm-project?rev=350303=rev Log: [clangd] clang-format everything. NFC Modified: clang-tools-extra/trunk/clangd/AST.cpp clang-tools-extra/trunk/clangd/AST.h

[PATCH] D56263: [clangd] Always try to build absolute path

2019-01-03 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 NIT: a typo in the change description: s/smylinks/symlinks Maybe also add a separate sentence to the description that this should not affect the behavior if file is not a

[PATCH] D17741: adds __FILE_BASENAME__ builtin macro

2019-01-03 Thread Kristina Brooks via Phabricator via cfe-commits
kristina added a comment. I like the idea of just getting the filename reliably, but I think an extension to strip path prefixes is a bit of an overkill especially as yet another compiler flag. I implemented a similar thing in my fork in form of a directive to `__generate(...)` which is my own

[PATCH] D56113: [OpenMP] Replace predetermined shared for const variable

2019-01-03 Thread Joel E. Denny via Phabricator via cfe-commits
jdenny added a comment. In D56113#1345047 , @ABataev wrote: > In D56113#1344210 , @jdenny wrote: > > > In D56113#1342879 , @ABataev wrote: > > > > > But you will need

[PATCH] D55433: [clang-tidy] Adding a new modernize use nodiscard checker

2019-01-03 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added inline comments. Comment at: clang-tidy/modernize/UseNodiscardCheck.cpp:30 +// TODO: Find a better way of detecting a function template. +static bool isFunctionTemplate(const QualType ) { + // Try to catch both std::function and boost::function

[PATCH] D55932: [Sema] Simplfy static_assert diagnostic code.

2019-01-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: test/SemaCXX/static-assert.cpp:130 static_assert(std::is_same()), int>::value, "message"); -// expected-error@-1{{static_assert failed due to requirement 'std::is_same, int>::value' "message"}} +//

[PATCH] D56090: Add a matcher for members of an initializer list expression

2019-01-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a reviewer: klimek. aaron.ballman added a comment. Adding Manuel for the `hasArg()` questions. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56090/new/ https://reviews.llvm.org/D56090 ___ cfe-commits mailing list

[PATCH] D55710: add pragmas to control Software Pipelining optimisation

2019-01-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: test/Sema/pragma-pipeline.cpp:3 + +#pragma clang loop pipeline(disable) /* expected-error {{expected unqualified-id}} */ +int main() { I think this error is pretty unfortunate -- it doesn't really help the user

[PATCH] D56273: Validate -add-plugin arguments.

2019-01-03 Thread Reid Kleckner via Phabricator via cfe-commits
rnk accepted this revision. rnk added a comment. This revision is now accepted and ready to land. lgtm! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56273/new/ https://reviews.llvm.org/D56273 ___ cfe-commits mailing list

[PATCH] D56215: [lld] [ELF] Include default search paths for NetBSD driver

2019-01-03 Thread Kamil Rytarowski via Phabricator via cfe-commits
krytarowski added a comment. In D56215#1345326 , @ruiu wrote: > In D56215#1344279 , @krytarowski > wrote: > > > In D56215#1344233 , @ruiu wrote: > > > > > lld's driver is

[PATCH] D56113: [OpenMP] Replace predetermined shared for const variable

2019-01-03 Thread Joel E. Denny via Phabricator via cfe-commits
jdenny added a comment. In D56113#1345238 , @ABataev wrote: > >>> By the way, is there any value to keeping the predetermined shared for > >>> const if -openmp-version=3.1 or earlier? > >> > >> Yes, you can check for the value of `LangOpts.OpenMP`. For

[PATCH] D56273: Validate -add-plugin arguments.

2019-01-03 Thread Nico Weber via Phabricator via cfe-commits
thakis created this revision. thakis added a reviewer: rnk. -plugin already prints an error if the name of an unknown plugin is passed. -add-plugin used to silently ignore that, now it errors too. https://reviews.llvm.org/D56273 Files: clang/lib/Frontend/CompilerInvocation.cpp Index:

[PATCH] D56113: [OpenMP] Replace predetermined shared for const variable

2019-01-03 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D56113#1345232 , @jdenny wrote: > In D56113#1345047 , @ABataev wrote: > > > In D56113#1344210 , @jdenny wrote: > > > > > In D56113#1342879

[PATCH] D56061: [clang-tools-extra] [clangd] Fix detecting atomics in stand-alone builds

2019-01-03 Thread Michał Górny via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE350329: [clangd] Fix detecting atomics in stand-alone builds (authored by mgorny, committed by ). Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56061/new/

[clang-tools-extra] r350329 - [clangd] Fix detecting atomics in stand-alone builds

2019-01-03 Thread Michal Gorny via cfe-commits
Author: mgorny Date: Thu Jan 3 08:43:27 2019 New Revision: 350329 URL: http://llvm.org/viewvc/llvm-project?rev=350329=rev Log: [clangd] Fix detecting atomics in stand-alone builds Include CheckAtomic CMake module from LLVM in order to detect support for atomics when building stand-alone.

Re: [PATCH] D17741: adds __FILE_BASENAME__ builtin macro

2019-01-03 Thread Ximin Luo via cfe-commits
Hi all, more strict interpretations of reproducible builds want build paths to not appear in the final output *regardless of the build location* and so /tmp/build would not be appropriate. Rough justification is that we want different people building under different starting conditions to be

[PATCH] D56090: Add a matcher for members of an initializer list expression

2019-01-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a subscriber: klimek. aaron.ballman added inline comments. Comment at: include/clang/ASTMatchers/ASTMatchers.h:3527 + return N < Node.getNumInits() && + InnerMatcher.matches(*Node.getInit(N)->IgnoreParenImpCasts(), Finder, +

[PATCH] D56215: [lld] [ELF] Include default search paths for NetBSD driver

2019-01-03 Thread Rui Ueyama via Phabricator via cfe-commits
ruiu added a comment. In D56215#1344279 , @krytarowski wrote: > In D56215#1344233 , @ruiu wrote: > > > lld's driver is intentionally designed to be agnostic of the host that the > > linker is running for the

[PATCH] D56273: Validate -add-plugin arguments.

2019-01-03 Thread Nico Weber via Phabricator via cfe-commits
thakis updated this revision to Diff 180084. thakis added a comment. forgot to add test CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56273/new/ https://reviews.llvm.org/D56273 Files: clang/lib/Frontend/CompilerInvocation.cpp clang/test/Frontend/plugin-unknown.c Index:

Re: [PATCH] D17741: adds __FILE_BASENAME__ builtin macro

2019-01-03 Thread Nolan O'Brien via cfe-commits
I believe reproducible build projects simply move their source to `/tmp/build` or something else that’s consistent to deal with `__FILE__` currently. They’d probably appreciate this to avoid file copying during `make` builds Nolan O'Brien Sent from my iPhone > On Jan 3, 2019, at 7:47 AM,

r350328 - [OPENMP][NVPTX]Use __kmpc_barrier_simple_spmd(nullptr, 0) instead of

2019-01-03 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Thu Jan 3 08:25:35 2019 New Revision: 350328 URL: http://llvm.org/viewvc/llvm-project?rev=350328=rev Log: [OPENMP][NVPTX]Use __kmpc_barrier_simple_spmd(nullptr, 0) instead of nvvm_barrier0. Use runtime functions instead of the direct call to the nvvm intrinsics. It allows

[PATCH] D55382: Make -Wstring-plus-int warns even if when the result is not out of bounds

2019-01-03 Thread serge via Phabricator via cfe-commits
serge-sans-paille resigned from this revision. serge-sans-paille added a comment. Just wanted to review the change to the Python script to ensure it remains compatible with Python2 and Python3, which is indeed the case; so LGTM on that aspect. Repository: rC Clang CHANGES SINCE LAST ACTION

[PATCH] D55948: Modify DeclaratorChuck::getFunction to use DeclSpec for qualifiers

2019-01-03 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/Sema/SemaDeclCXX.cpp:8175 DeclaratorChunk::FunctionTypeInfo = D.getFunctionTypeInfo(); - if (FTI.TypeQuals != 0) { -if (FTI.TypeQuals & Qualifiers::Const) - Diag(D.getIdentifierLoc(),

[PATCH] D56273: Validate -add-plugin arguments.

2019-01-03 Thread Nico Weber via Phabricator via cfe-commits
thakis updated this revision to Diff 180085. thakis added a comment. remove require CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56273/new/ https://reviews.llvm.org/D56273 Files: clang/lib/Frontend/CompilerInvocation.cpp clang/test/Frontend/plugin-unknown.c Index:

[PATCH] D56273: Validate -add-plugin arguments.

2019-01-03 Thread Nico Weber via Phabricator via cfe-commits
thakis marked an inline comment as done. thakis added inline comments. Comment at: clang/test/Frontend/plugin-unknown.c:3 +// RUN: not %clang_cc1 -add-plugin asdf %s 2>&1 | FileCheck --check-prefix=ADD %s +// REQUIRES: plugins + Probably doesn't even require

[PATCH] D47817: [compiler-rt] [sanitizer_common] Remove support for tirpc/rpc/xdr.h

2019-01-03 Thread Michał Górny via Phabricator via cfe-commits
mgorny added a comment. @ygribov, ping. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D47817/new/ https://reviews.llvm.org/D47817 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D55933: [Sema] Do not print default template parameters.

2019-01-03 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone added inline comments. Comment at: lib/AST/TypePrinter.cpp:179 +// `X` gets canonicalized to `X`. We disable +// canonicalization so that `printTag()`` can see the template parameters as +// written. Nit: there's an extra ` on this line.

[PATCH] D56090: Add a matcher for members of an initializer list expression

2019-01-03 Thread Hyrum Wright via Phabricator via cfe-commits
hwright updated this revision to Diff 180089. hwright marked an inline comment as done. hwright added a comment. Added tests, update docs. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56090/new/ https://reviews.llvm.org/D56090 Files: docs/LibASTMatchersReference.html

[PATCH] D56090: Add a matcher for members of an initializer list expression

2019-01-03 Thread Hyrum Wright via Phabricator via cfe-commits
hwright added inline comments. Comment at: include/clang/ASTMatchers/ASTMatchers.h:3527 + return N < Node.getNumInits() && + InnerMatcher.matches(*Node.getInit(N)->IgnoreParenImpCasts(), Finder, + Builder); aaron.ballman

[PATCH] D55382: Make -Wstring-plus-int warns even if when the result is not out of bounds

2019-01-03 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC350335: Make -Wstring-plus-int warns even if when the result is not out of bounds (authored by abien, committed by ). Changed prior to commit: https://reviews.llvm.org/D55382?vs=180075=180093#toc

r350335 - Make -Wstring-plus-int warns even if when the result is not out of bounds

2019-01-03 Thread Arnaud Bienner via cfe-commits
Author: abien Date: Thu Jan 3 09:45:28 2019 New Revision: 350335 URL: http://llvm.org/viewvc/llvm-project?rev=350335=rev Log: Make -Wstring-plus-int warns even if when the result is not out of bounds Summary: Patch by Arnaud Bienner Reviewers: sylvestre.ledru, thakis, serge-sans-paille

[PATCH] D55382: Make -Wstring-plus-int warns even if when the result is not out of bounds

2019-01-03 Thread Arnaud Bienner via Phabricator via cfe-commits
ArnaudBienner added a comment. OK, thanks Serge! :) For the record, I updated the patch one last time after it was accepted to remove my change to constant-expression-cxx1y.cpp since someone else did the same change in a separate commit meanwhile. Repository: rC Clang CHANGES SINCE LAST

[PATCH] D56113: [OpenMP] Replace predetermined shared for const variable

2019-01-03 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D56113#1345336 , @jdenny wrote: > In D56113#1345238 , @ABataev wrote: > > > >>> By the way, is there any value to keeping the predetermined shared for > > >>> const if

[PATCH] D56061: [clang-tools-extra] [clangd] Fix detecting atomics in stand-alone builds

2019-01-03 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. Thanks for the fix. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56061/new/ https://reviews.llvm.org/D56061

r350317 - Diagnose an unused result from a call through a function pointer whose return type is marked [[nodiscard]].

2019-01-03 Thread Aaron Ballman via cfe-commits
Author: aaronballman Date: Thu Jan 3 06:24:31 2019 New Revision: 350317 URL: http://llvm.org/viewvc/llvm-project?rev=350317=rev Log: Diagnose an unused result from a call through a function pointer whose return type is marked [[nodiscard]]. When a function returns a type and that type was

[PATCH] D56113: [OpenMP] Replace predetermined shared for const variable

2019-01-03 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D56113#1344210 , @jdenny wrote: > In D56113#1342879 , @ABataev wrote: > > > But you will need another serie of patches for `reduction` and `linear` > > clauses to update their error

r350319 - Portable Python script across Python version

2019-01-03 Thread Serge Guelton via cfe-commits
Author: serge_sans_paille Date: Thu Jan 3 06:27:05 2019 New Revision: 350319 URL: http://llvm.org/viewvc/llvm-project?rev=350319=rev Log: Portable Python script across Python version Get rid of Python version specific shebang. Differential Revision: https://reviews.llvm.org/D55207 Modified:

[PATCH] D17741: adds __FILE_BASENAME__ builtin macro

2019-01-03 Thread Nolan O'Brien via Phabricator via cfe-commits
NSProgrammer added a comment. To throw in my 2 cents. I don’t really have a preference between a compiler flag vs a different macro that’s just for the file name sans path prefix. But I have a real need for this to get into clang: with 1.2 million lines of code, the regular placement of log

[clang-tools-extra] r350306 - [clangd] Always try to build absolute path

2019-01-03 Thread Kadir Cetinkaya via cfe-commits
Author: kadircet Date: Thu Jan 3 05:46:10 2019 New Revision: 350306 URL: http://llvm.org/viewvc/llvm-project?rev=350306=rev Log: [clangd] Always try to build absolute path Summary: This only changes behavior in cases when the file itself is a symlink. When canonicalizing paths do not look at

[PATCH] D56263: [clangd] Always try to build absolute path

2019-01-03 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL350306: [clangd] Always try to build absolute path (authored by kadircet, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM CHANGES SINCE LAST ACTION

[PATCH] D55949: Correctly handle function pointers returning a type marked nodiscard

2019-01-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman closed this revision. aaron.ballman added a comment. Committed in r350317. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55949/new/ https://reviews.llvm.org/D55949 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

r350318 - Portable Python script across Python version

2019-01-03 Thread Serge Guelton via cfe-commits
Author: serge_sans_paille Date: Thu Jan 3 06:26:56 2019 New Revision: 350318 URL: http://llvm.org/viewvc/llvm-project?rev=350318=rev Log: Portable Python script across Python version StringIO is obsoleted in Python3, replaced by io.BytesIO or io.StringIO depending on the use. Differential

[PATCH] D56226: [clang-format] square parens that are followed by '=' are not Objective-C message sends

2019-01-03 Thread Jan Korous via Phabricator via cfe-commits
jkorous added a comment. I was thinking the same (that we might be able to make the detection more precise) but I got the impression these cases are handled later (L524 and below). Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56226/new/

[PATCH] D56267: [clangd] Interfaces for writing code actions

2019-01-03 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. That's the result of me playing around with writing a small code action for clangd. It's not final yet, e.g. missing tests and example actions, but still wanted to drop the change here to make sure it's not lost, I believe we'll need something like this in the

[PATCH] D55994: [clangd] Check preceding char when completion triggers on ':' or '>'

2019-01-03 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL350304: [clangd] Check preceding char when completion triggers on : or (authored by ibiryukov, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D55994: [clangd] Check preceding char when completion triggers on ':' or '>'

2019-01-03 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. In D55994#1344717 , @jkorous wrote: > @ilya-biryukov Yes, that's true. I would still expect some performance gain > in more restrictive filtering on client's side - not sure how big though. > Anyway, seems like LSP folks

[PATCH] D55433: [clang-tidy] Adding a new modernize use nodiscard checker

2019-01-03 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay updated this revision to Diff 180073. MyDeveloperDay marked 14 inline comments as done. MyDeveloperDay added a comment. Rebase - update to address most review comments from @JonasToth - simplify matcher (with less unless) - remove the need to look for "type-parameter-" string

[PATCH] D55382: Make -Wstring-plus-int warns even if when the result is not out of bounds

2019-01-03 Thread Arnaud Bienner via Phabricator via cfe-commits
ArnaudBienner updated this revision to Diff 180075. ArnaudBienner added a comment. Herald added a reviewer: serge-sans-paille. Make -Wstring-plus-int warns even if when the result is not out of bounds Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55382/new/

[clang-tools-extra] r350324 - [clangd] Bump vscode-clangd v0.0.9

2019-01-03 Thread Haojian Wu via cfe-commits
Author: hokein Date: Thu Jan 3 07:28:38 2019 New Revision: 350324 URL: http://llvm.org/viewvc/llvm-project?rev=350324=rev Log: [clangd] Bump vscode-clangd v0.0.9 Modified: clang-tools-extra/trunk/clangd/clients/clangd-vscode/package.json Modified:

[clang-tools-extra] r350325 - [clangd] Move helpers from global namespace into anonymous namespace, NFC.

2019-01-03 Thread Haojian Wu via cfe-commits
Author: hokein Date: Thu Jan 3 07:36:18 2019 New Revision: 350325 URL: http://llvm.org/viewvc/llvm-project?rev=350325=rev Log: [clangd] Move helpers from global namespace into anonymous namespace, NFC. Modified: clang-tools-extra/trunk/clangd/CodeComplete.cpp Modified:

Re: [PATCH] D17741: adds __FILE_BASENAME__ builtin macro

2019-01-03 Thread Roman Lebedev via cfe-commits
Just a thought: reproducible builds will surely be interested in this. Did gcc already solve this problem? And if yes, it would be best to be compatible. On Thu, Jan 3, 2019 at 6:41 PM Nolan O'Brien via Phabricator via cfe-commits wrote: > > NSProgrammer added a comment. > > To throw in my 2

[clang-tools-extra] r350304 - [clangd] Check preceding char when completion triggers on ':' or '>'

2019-01-03 Thread Ilya Biryukov via cfe-commits
Author: ibiryukov Date: Thu Jan 3 05:37:12 2019 New Revision: 350304 URL: http://llvm.org/viewvc/llvm-project?rev=350304=rev Log: [clangd] Check preceding char when completion triggers on ':' or '>' Summary: Only run completion when we were trigerred on '->' and '::', otherwise send an error

[PATCH] D55433: [clang-tidy] Adding a new modernize use nodiscard checker

2019-01-03 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added inline comments. Comment at: clang-tidy/modernize/UseNodiscardCheck.cpp:30 +// TODO: Find a better way of detecting a function template. +static bool isFunctionTemplate(const QualType ) { + // Try to catch both std::function and boost::function

[PATCH] D56271: [SemaCXX] Fix ICE for unexpanded parameter pack

2019-01-03 Thread Brian Gesiak via Phabricator via cfe-commits
modocache created this revision. modocache added a reviewer: rsmith. The documentation for RecursiveASTVisitor::TraverseDecl states that the Decl being traversed may be null. In fact, this is the case when a CXXCatchStmt with no exception decl is traversed. Because the visitor for diagnosing

[PATCH] D17741: adds __FILE_BASENAME__ builtin macro

2019-01-03 Thread Kristina Brooks via Phabricator via cfe-commits
kristina added a comment. In D17741#1345171 , @NSProgrammer wrote: > To throw in my 2 cents. I don’t really have a preference between a compiler > flag vs a different macro that’s just for the file name sans path prefix. > But I have a real need for

[PATCH] D56267: [clangd] Interfaces for writing code actions

2019-01-03 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov created this revision. ilya-biryukov added reviewers: kadircet, ioeric, hokein, sammccall. Herald added subscribers: arphaman, jkorous, MaskRay, mgorny. The code actions can be run in two stages: - Stage 1. Decides whether the action is available to the user and collects all the

r350305 - [NewPM] Port Msan

2019-01-03 Thread Philip Pfaffe via cfe-commits
Author: pfaffe Date: Thu Jan 3 05:42:44 2019 New Revision: 350305 URL: http://llvm.org/viewvc/llvm-project?rev=350305=rev Log: [NewPM] Port Msan Summary: Keeping msan a function pass requires replacing the module level initialization: That means, don't define a ctor function which calls

[PATCH] D56226: [clang-format] square parens that are followed by '=' are not Objective-C message sends

2019-01-03 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. Note that a message send needs to have two expressions without an operator in between. Can we also rule out all square brackets that just have a single identifier or number token? Repository: rC Clang CHANGES SINCE LAST ACTION

Re: [PATCH] D17741: adds __FILE_BASENAME__ builtin macro

2019-01-03 Thread Roman Lebedev via cfe-commits
No, that is the opposite of the solution, actually, i think. https://tests.reproducible-builds.org/debian/issues/unstable/gcc_captures_build_path_issue.html And: https://gcc.gnu.org/ml/gcc-patches/2017-04/msg00513.html ^ i suspect clang should be compatible with whatever approach is suggested

[PATCH] D56273: Validate -add-plugin arguments.

2019-01-03 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC350340: Validate -add-plugin arguments. (authored by nico, committed by ). Changed prior to commit: https://reviews.llvm.org/D56273?vs=180085=180099#toc Repository: rC Clang CHANGES SINCE LAST

r350340 - Validate -add-plugin arguments.

2019-01-03 Thread Nico Weber via cfe-commits
Author: nico Date: Thu Jan 3 10:26:06 2019 New Revision: 350340 URL: http://llvm.org/viewvc/llvm-project?rev=350340=rev Log: Validate -add-plugin arguments. -plugin already prints an error if the name of an unknown plugin is passed. -add-plugin used to silently ignore that, now it errors too.

[PATCH] D56215: [lld] [ELF] Include default search paths for NetBSD driver

2019-01-03 Thread Kamil Rytarowski via Phabricator via cfe-commits
krytarowski added a comment. It's an option but Joerg insists on using lld standalone. Repository: rLLD LLVM Linker CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56215/new/ https://reviews.llvm.org/D56215 ___ cfe-commits mailing list

[PATCH] D56215: [lld] [ELF] Include default search paths for NetBSD driver

2019-01-03 Thread Kamil Rytarowski via Phabricator via cfe-commits
krytarowski added a comment. We will prepare a patch for i386 x86_64 only for now. Until we will get lld fully functional on NetBSD/amd64 we will skip other architectures. Repository: rLLD LLVM Linker CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56215/new/

[PATCH] D56215: [lld] [ELF] Include default search paths for NetBSD driver

2019-01-03 Thread Michał Górny via Phabricator via cfe-commits
mgorny marked an inline comment as done. mgorny added inline comments. Comment at: ELF/Driver.cpp:369 +void LinkerDriver::appendDefaultSearchPaths() { +#if defined(__NetBSD__) + // NetBSD driver relies on the linker knowing the default search paths. krytarowski

[PATCH] D56215: [lld] [ELF] Include default search paths for NetBSD driver

2019-01-03 Thread Michał Górny via Phabricator via cfe-commits
mgorny updated this revision to Diff 180121. mgorny edited the summary of this revision. mgorny added a comment. Removed non-x86. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56215/new/ https://reviews.llvm.org/D56215 Files: ELF/Driver.cpp ELF/Driver.h Index: ELF/Driver.h

[PATCH] D56288: [ELF] Do not enable 'new dtags' on NetBSD by default

2019-01-03 Thread Michał Górny via Phabricator via cfe-commits
mgorny created this revision. mgorny added reviewers: ruiu, krytarowski, joerg. Herald added subscribers: llvm-commits, arichardson, emaste. Herald added a reviewer: espindola. NetBSD strongly prefers using 'old' dtag (RPATH) over Linux-specific RUNPATH, and did not support the latter until very

[PATCH] D55710: add pragmas to control Software Pipelining optimisation

2019-01-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM! Comment at: test/Sema/pragma-pipeline.cpp:3 + +#pragma clang loop pipeline(disable) /* expected-error {{expected unqualified-id}} */ +int main() {

Re: [PATCH] D56215: [lld] [ELF] Include default search paths for NetBSD driver

2019-01-03 Thread Joerg Sonnenberger via cfe-commits
On Thu, Jan 03, 2019 at 06:58:41PM +, Kamil Rytarowski via Phabricator wrote: > But the result is that we don't have GNU gold either and are stuck with > 40min linking times of LLVM. It's destructive to productivity and > damages any LLVM related development. The reason noone cared much

[PATCH] D56241: expose a control flag for interger to pointer ext warning

2019-01-03 Thread abdoul-kader keita via Phabricator via cfe-commits
Kader added a comment. @lebedev.ri Thanks for the quick review ; > Perhaps there should be a test for this flag specifically? I am not really familiar with this part of the code base, but it seems that the warnings is already tested in both test/Sema/Compare.c and test/SemaCXX/compare.cpp. I

Re: [PATCH] D56215: [lld] [ELF] Include default search paths for NetBSD driver

2019-01-03 Thread Joerg Sonnenberger via cfe-commits
On Thu, Jan 03, 2019 at 08:31:53PM +, Kamil Rytarowski via Phabricator via cfe-commits wrote: > krytarowski added a comment. > > On 03.01.2019 21:19, Joerg Sonnenberger wrote: > > > On Thu, Jan 03, 2019 at 06:34:22PM +, Kamil Rytarowski via Phabricator > > via cfe-commits wrote: > > >

[PATCH] D56113: [OpenMP] Replace predetermined shared for const variable

2019-01-03 Thread Joel E. Denny via Phabricator via cfe-commits
jdenny added a comment. In D56113#1345578 , @ABataev wrote: > >>> By the way, LangOpts.OpenMP currently defaults to 0. Should it? > >> > >> Yes, it means it is disabled by default. > > > > Ah, it becomes 1 when we have `-fopenmp` but not

[PATCH] D54450: Get the correct range of tokens for preprocessor conditions

2019-01-03 Thread Miklos Vajna via Phabricator via cfe-commits
vmiklos added a comment. Could you please review this one? It would be especially helpful, due to the depending other review. Thanks! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54450/new/ https://reviews.llvm.org/D54450 ___ cfe-commits

[PATCH] D56215: [lld] [ELF] Include default search paths for NetBSD driver

2019-01-03 Thread Rui Ueyama via Phabricator via cfe-commits
ruiu added a comment. As you can see, lld doesn't really have any host-dependent knowledge so far, even though there are a few OSes that use lld as the default linker. We've added host-dependent knowledge to the compiler driver instead of to the linker for various operating systems. I guess

[PATCH] D56113: [OpenMP] Replace predetermined shared for const variable

2019-01-03 Thread Joel E. Denny via Phabricator via cfe-commits
jdenny added a comment. In D56113#1345337 , @ABataev wrote: > > In D56113#1345238 , @ABataev wrote: > > > >> In D56113#1345232 , @jdenny wrote: > >> > >> > In

[PATCH] D56215: [lld] [ELF] Include default search paths for NetBSD driver

2019-01-03 Thread Kamil Rytarowski via Phabricator via cfe-commits
krytarowski added a comment. Actually I find it frustrating and unfair as GNU ld doesn't have builtin knowledge either.. it's passed with gross 'super hack' comments from build scripts... but we are forced to push it to lld in order to move on. Repository: rLLD LLVM Linker CHANGES SINCE

[PATCH] D55710: add pragmas to control Software Pipelining optimisation

2019-01-03 Thread Alexey Lapshin via Phabricator via cfe-commits
alexey.lapshin marked an inline comment as done. alexey.lapshin added inline comments. Comment at: test/Sema/pragma-pipeline.cpp:3 + +#pragma clang loop pipeline(disable) /* expected-error {{expected unqualified-id}} */ +int main() { aaron.ballman wrote: > I

[PATCH] D56215: [lld] [ELF] Include default search paths for NetBSD driver

2019-01-03 Thread Michał Górny via Phabricator via cfe-commits
mgorny updated this revision to Diff 180114. mgorny edited the summary of this revision. mgorny added a comment. Herald added subscribers: atanasyan, sdardis. Updated to use clang's libdir logic. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56215/new/ https://reviews.llvm.org/D56215

[PATCH] D56215: [lld] [ELF] Include default search paths for NetBSD driver

2019-01-03 Thread Kamil Rytarowski via Phabricator via cfe-commits
krytarowski added inline comments. Comment at: ELF/Driver.cpp:377 + break; +case EM_MIPS: + if (Config->EKind == ELF64LEKind || Config->EKind == ELF64BEKind) Please drop MIPS/PPC for now. CHANGES SINCE LAST ACTION

  1   2   >