[PATCH] D42624: [clang-tidy] Add a utility Matcher to match the next statement within a statement sequence

2018-03-08 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru added a comment. @aaron.ballman Hello, Do you think it is ready to land? Thanks Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D42624 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-b

[PATCH] D44226: [clangd] Add -log-lsp-to-stderr option

2018-03-08 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. In https://reviews.llvm.org/D44226#1030639, @simark wrote: > In https://reviews.llvm.org/D44226#1030625, @ilya-biryukov wrote: > > > I would vouch for adding a log level instead. It's a very well understood > > concept that certainly covers this use-case and can be

[PATCH] D44247: [clangd] Use identifier range as the definition range.

2018-03-08 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: sammccall. Herald added subscribers: ioeric, jkorous-apple, ilya-biryukov, klimek. This also matches the range in symbol index. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D44247 Files: clangd/SourceCode.cpp clangd/So

[PATCH] D43821: [SemaCXX] _Pragma("clang optimize off") not affecting lambda.

2018-03-08 Thread Carlos Alberto Enciso via Phabricator via cfe-commits
CarlosAlbertoEnciso added inline comments. Comment at: lib/Sema/SemaDecl.cpp:12598 +// have to apply optnone due to a pragma. +AddRangeBasedOptnone(FD); + erichkeane wrote: > Should thi sonly happen if this is a definition? Additionally, does this > neg

[PATCH] D43821: [SemaCXX] _Pragma("clang optimize off") not affecting lambda.

2018-03-08 Thread Carlos Alberto Enciso via Phabricator via cfe-commits
CarlosAlbertoEnciso updated this revision to Diff 137550. CarlosAlbertoEnciso added a comment. Correct the issues raised by the reviews. Repository: rC Clang https://reviews.llvm.org/D43821 Files: lib/Sema/SemaLambda.cpp test/CodeGenCXX/optnone-pragma-optimize-off.cpp Index: test/CodeG

[PATCH] D44222: [AArch64] Add vmulxh_lane FP16 intrinsics

2018-03-08 Thread Sjoerd Meijer via Phabricator via cfe-commits
SjoerdMeijer added inline comments. Comment at: include/clang/Basic/arm_neon.td:1504 + // Scalar floating point multiply extended (scalar, by element) + def SCALAR_FMULX_LANEH : IOpInst<"vmulx_lane", "ssdi", "Sh", OP_SCALAR_MUL_LN>; + def SCALAR_FMULX_LANEQH : IOpInst<"vmulx_

[PATCH] D44241: Add a check for constructing non-trivial types without assigning to a variable

2018-03-08 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. I'd like to see some more tests void valid() { g(NonTrivial{}); // Should not warn } Have you already tried running it on some C++ codebase (llvm, qt, boost, ...) ? What are the results? Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D44241

[PATCH] D44241: [clang-tidy] Add a check for constructing non-trivial types without assigning to a variable

2018-03-08 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. The check is related to: https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#cp44-remember-to-name-your-lock_guards-and-unique_locks If you want, you can add an alias into the `cppcoreguideline` module. Repository: rCTE Clang Tools Extra h

[PATCH] D44231: [clang-tidy] Check for sizeof that call functions

2018-03-08 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. Please do bother to prefix with the appropriate `[prefix]`, set the appropriate repo, and tags! Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D44231 ___ cfe-commits mailing list cfe-commits@lists.llvm.or

[PATCH] D44217: [clang-tidy] Enable Python 3 support for add_new_check.py

2018-03-08 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clang-tools-extra/clang-tidy/add_new_check.py:24 with open(filename, 'r') as f: -lines = f.readlines() +lines = [x for x in f.readlines()] `readlines()` returns a list in Python3 too. Maybe remove list

r326996 - [clang-format] Use NestedBlockIndent as a 0 column in formatted raw strings

2018-03-08 Thread Krasimir Georgiev via cfe-commits
Author: krasimir Date: Thu Mar 8 03:29:27 2018 New Revision: 326996 URL: http://llvm.org/viewvc/llvm-project?rev=326996&view=rev Log: [clang-format] Use NestedBlockIndent as a 0 column in formatted raw strings Summary: This makes the formatter of raw string literals use NestedBlockIndent for det

[PATCH] D44231: [clang-tidy] Check for sizeof that call functions

2018-03-08 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. Can you elaborate a bit more about this? I think we also need to update the check document (adding proper section of this new behavior, and the new option). Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D44231 _

[PATCH] D44141: [clang-format] Use NestedBlockIndent as a 0 column in formatted raw strings

2018-03-08 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL326996: [clang-format] Use NestedBlockIndent as a 0 column in formatted raw strings (authored by krasimir, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.l

[PATCH] D44088: [clangd] Extract ClangdServer::Options struct.

2018-03-08 Thread Jan Korous via Phabricator via cfe-commits
jkorous-apple added inline comments. Comment at: clang-tools-extra/trunk/clangd/ClangdServer.h:131 + // Features like indexing must be enabled if desired. + static Options optsForTest(); + Shouldn't this be better implemented as a utility function in tests? Al

[PATCH] D44231: [clang-tidy] Check for sizeof that call functions

2018-03-08 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/misc/SizeofExpressionCheck.cpp:220 + Result.Nodes.getNodeAs("sizeof-integer-call")) { +diag(E->getLocStart(), "suspicious usage of 'sizeof(expr)' to an integer"); } else if (const auto *E = Result.Nodes.g

[PATCH] D44241: [clang-tidy] Add a check for constructing non-trivial types without assigning to a variable

2018-03-08 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. How does this differ from misc-unused-raii? Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D44241 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-comm

[PATCH] D43902: [clang-format] Don't detect C++11 attribute specifiers as ObjC

2018-03-08 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton added a comment. I made it longer so the two lines (__attribute__((foo)) vs. [[foo]]) had the same length. If I shorten it much more, everything goes on one line. Repository: rC Clang https://reviews.llvm.org/D43902 ___ cfe-commits m

[PATCH] D44218: Correct the alignment for the PS4 target

2018-03-08 Thread Mailing List "cfe-commits" via Phabricator via cfe-commits
cfe-commits added a subscriber: erichkeane. cfe-commits added a comment. LGTM. - F5880823: msg-22334-27.txt Repository: rC Clang https://reviews.llvm.org/D44218 ___ cfe-commits mailing list cfe-commits@lists.l

[PATCH] D44248: [clangd][cmake] Provide libatomic when there is no native support for 64bit atomics

2018-03-08 Thread Simon Dardis via Phabricator via cfe-commits
sdardis created this revision. Herald added subscribers: ioeric, jkorous-apple, ilya-biryukov, arichardson, mgorny, klimek. This addresses a persistent failure on clang-cmake-mips buildbot. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D44248 Files: clangd/CMakeLists.txt I

[PATCH] D44250: MmapWriteExecChecker supporting mprotect call

2018-03-08 Thread David CARLIER via Phabricator via cfe-commits
devnexen created this revision. devnexen added a reviewer: dergachev.a. Herald added a subscriber: cfe-commits. In addition of checking mmap call, checking as well mprotect to detect possible writable-executable promotions. Repository: rC Clang https://reviews.llvm.org/D44250 Files: lib/S

[PATCH] D44251: [clangd] Early return for #include goto definition.

2018-03-08 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: ilya-biryukov. Herald added subscribers: ioeric, jkorous-apple, klimek. This would save cost of unnecessary parsing, NFC. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D44251 Files: clangd/XRefs.cpp Index: clangd/XRefs.

[PATCH] D44158: [clangd:vscode] Resolve symlinks for file paths from clangd.

2018-03-08 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. LG. Can you expand the comment and fix the formatting changes? Comment at: clangd/clients/clangd-vscode/src/extension.ts:3 import * as vscodelc from 'vscode-languagecl

[PATCH] D43847: [clang-tidy] Add check: replace string::find(...) == 0 with absl::StartsWith

2018-03-08 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. I will commit for you. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D43847 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D43967: [ASTImporter] Add test helper Fixture

2018-03-08 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 137563. martong marked 15 inline comments as done. martong added a comment. Fix code review comments. Repository: rC Clang https://reviews.llvm.org/D43967 Files: unittests/AST/ASTImporterTest.cpp unittests/AST/DeclMatcher.h Index: unittests/AST/Decl

[PATCH] D43967: [ASTImporter] Add test helper Fixture

2018-03-08 Thread Gabor Marton via Phabricator via cfe-commits
martong added inline comments. Comment at: unittests/AST/ASTImporterTest.cpp:170 +ASTContext &ToCtx = ToAST->getASTContext(); +vfs::OverlayFileSystem *OFS = static_cast( + ToCtx.getSourceManager().getFileManager().getVirtualFileSystem().get()); xa

[PATCH] D44158: [clangd:vscode] Resolve symlinks for file paths from clangd.

2018-03-08 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 137564. ioeric marked an inline comment as done. ioeric added a comment. - add context about the workaround. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D44158 Files: clangd/clients/clangd-vscode/src/extension.ts Index: clangd/clients/

[PATCH] D44158: [clangd:vscode] Resolve symlinks for file paths from clangd.

2018-03-08 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clangd/clients/clangd-vscode/src/extension.ts:3 import * as vscodelc from 'vscode-languageclient'; +import { realpathSync } from 'fs'; sammccall wrote: > nit: the braces don't do anything here, right? I'm not sure... t

[libcxx] r327005 - Implement LWG#2518 - Non-member swap for propagate_const should call member swap

2018-03-08 Thread Marshall Clow via cfe-commits
Author: marshall Date: Thu Mar 8 07:01:50 2018 New Revision: 327005 URL: http://llvm.org/viewvc/llvm-project?rev=327005&view=rev Log: Implement LWG#2518 - Non-member swap for propagate_const should call member swap Modified: libcxx/trunk/include/experimental/propagate_const libcxx/trunk/

[PATCH] D44247: [clangd] Use identifier range as the definition range.

2018-03-08 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added a comment. I was going to change the symbol index to do the opposite :) The range of definitions including the bodies of functions, etc is used in a "peek definition" feature by several LSP clients. So for example in VSCode, you can hold Ctrl and hover on a function call and see

r327008 - [OPENMP] Emit sizes/init ptrs etc. data for task reductions before

2018-03-08 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Thu Mar 8 07:24:08 2018 New Revision: 327008 URL: http://llvm.org/viewvc/llvm-project?rev=327008&view=rev Log: [OPENMP] Emit sizes/init ptrs etc. data for task reductions before using. We may emit the code in wrong order because of incorrect implementation of the runtime fu

[PATCH] D44247: [clangd] Use identifier range as the definition range.

2018-03-08 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clangd/SourceCode.cpp:55 + const auto& SM = D->getASTContext().getSourceManager(); + SourceLocation SpellingLoc = SM.getSpellingLoc(D->getLocation()); + if (D->getLocation().isMacroID()) { As discussed offline, this

[clang-tools-extra] r327009 - [clangd:vscode] Resolve symlinks for file paths from clangd.

2018-03-08 Thread Eric Liu via cfe-commits
Author: ioeric Date: Thu Mar 8 07:28:42 2018 New Revision: 327009 URL: http://llvm.org/viewvc/llvm-project?rev=327009&view=rev Log: [clangd:vscode] Resolve symlinks for file paths from clangd. Summary: For features like go-to-definition, clangd can point clients to symlink paths (e.g. in bazel e

[PATCH] D44247: [clangd] Use identifier range as the definition range.

2018-03-08 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. In https://reviews.llvm.org/D44247#1031345, @malaperle wrote: > I was going to change the symbol index to do the opposite :) The range of > definitions including the bodies of functions, etc is used in a "peek > definition" feature by several LSP clients. So for examp

[PATCH] D44158: [clangd:vscode] Resolve symlinks for file paths from clangd.

2018-03-08 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL327009: [clangd:vscode] Resolve symlinks for file paths from clangd. (authored by ioeric, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D44158 F

[PATCH] D44251: [clangd] Early return for #include goto definition.

2018-03-08 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. I think this was part of initial changed and I asked to make it this way, but I don't remember why. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D44251

[PATCH] D44251: [clangd] Early return for #include goto definition.

2018-03-08 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. Sorry, being pedantic here... We're not saving time on parsing, but on walking over the AST :-) Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D44251 ___ cfe-commits mailing list cfe-commits@lists.llvm

[PATCH] D44251: [clangd] Early return for #include goto definition.

2018-03-08 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added a comment. In https://reviews.llvm.org/D44251#1031370, @ilya-biryukov wrote: > LGTM. > I think this was part of initial changed and I asked to make it this way, > but I don't remember why. I think it was just to have a single place that returns. I think it's OK to early retur

[PATCH] D44231: [clang-tidy] Check for sizeof that call functions

2018-03-08 Thread Paul Fultz II via Phabricator via cfe-commits
pfultz2 added a comment. > Can you elaborate a bit more about this? This catches problems when calling `sizeof(f())` when `f` returns an integer(or enum). This is because, most likely, the integer represents the type to be chosen, however, `sizeof` is being computed for an integer and not the t

[PATCH] D44241: [clang-tidy] Add a check for constructing non-trivial types without assigning to a variable

2018-03-08 Thread Paul Fultz II via Phabricator via cfe-commits
pfultz2 added a comment. > How does this differ from misc-unused-raii? Actually, I was unaware of this check. This seems like a better place to start. Whats missing from the misc-unused-raii is that it doesn't catch it when constructing with curly braces(ie `NonTrivial{}`). Let me work on updat

[PATCH] D42624: [clang-tidy] Add a utility Matcher to match the next statement within a statement sequence

2018-03-08 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D42624#1031073, @sylvestre.ledru wrote: > @aaron.ballman Hello, Do you think it is ready to land? Thanks @alexfh was asking to make this matcher local to the check rather than add it to Matchers.h, so I think this patch should be aband

[PATCH] D44226: [clangd] Add -log-lsp-to-stderr option

2018-03-08 Thread Simon Marchi via Phabricator via cfe-commits
simark updated this revision to Diff 137573. simark added a comment. Update - Change switch to -verbose - Add vlog function, do the filtering there Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D44226 Files: clangd/JSONRPCDispatcher.cpp clangd/Logger.cpp clangd/Logger.h

[PATCH] D44226: [clangd] Add -log-lsp-to-stderr option

2018-03-08 Thread Simon Marchi via Phabricator via cfe-commits
simark added a comment. Now, if the client calls a method that we do not support (), clangd just outputs: C/C++: [10:55:16.033] Error -32601: method not found It would be useful to at least print in this error message the name of the method. Because the "unknown method" handler shares the t

[PATCH] D44231: [clang-tidy] Check for sizeof that call functions

2018-03-08 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D44231#1031380, @pfultz2 wrote: > > Can you elaborate a bit more about this? > > This catches problems when calling `sizeof(f())` when `f` returns an > integer(or enum). This is because, most likely, the integer represents the > type to

[PATCH] D44251: [clangd] Early return for #include goto definition.

2018-03-08 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. In https://reviews.llvm.org/D44251#1031373, @ilya-biryukov wrote: > Sorry, being pedantic here... We're not saving time on parsing, but on > walking over the AST :-) Yeah, rephased it. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D44251 __

[PATCH] D43197: [OpenMP] Add flag for linking runtime bitcode library

2018-03-08 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea added inline comments. Comment at: lib/Driver/ToolChains/Cuda.cpp:536-542 + StringRef CompilerPath = env; + while (!CompilerPath.empty()) { +std::pair Split = +CompilerPath.split(llvm::sys::EnvPathSeparator); +LibraryPaths.push_back(

[PATCH] D44226: [clangd] Add -log-lsp-to-stderr option

2018-03-08 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clangd/Logger.cpp:19 Logger *L = nullptr; +bool Verbose_ = false; } // namespace Could we move the flag to implementation of `Logger`? I.e.: ``` class Logger { virtual log(const llvm::Twine &Message, bool Verbo

[PATCH] D44093: [BUILTINS] structure pretty printer

2018-03-08 Thread Paul Semel via Phabricator via cfe-commits
paulsemel marked 12 inline comments as done. paulsemel added inline comments. Comment at: lib/CodeGen/CGBuiltin.cpp:1231 + Types[getContext().VoidPtrTy] = "%p"; + Types[getContext().FloatTy] = "%f"; + Types[getContext().DoubleTy] = "%f"; aaron.ball

[PATCH] D39053: [Bitfield] Add more cases to making the bitfield a separate location

2018-03-08 Thread Petar Jovanovic via Phabricator via cfe-commits
petarj added a comment. Is everyone OK with the patch now? https://reviews.llvm.org/D39053 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] r327019 - [clangd] Bump vscode extension version to 0.0.5

2018-03-08 Thread Eric Liu via cfe-commits
Author: ioeric Date: Thu Mar 8 08:14:11 2018 New Revision: 327019 URL: http://llvm.org/viewvc/llvm-project?rev=327019&view=rev Log: [clangd] Bump vscode extension version to 0.0.5 Modified: clang-tools-extra/trunk/clangd/clients/clangd-vscode/package.json Modified: clang-tools-extra/trunk/c

[PATCH] D44247: [clangd] Use identifier range as the definition range.

2018-03-08 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. In https://reviews.llvm.org/D44247#1031366, @sammccall wrote: > In https://reviews.llvm.org/D44247#1031345, @malaperle wrote: > > > I was going to change the symbol index to do the opposite :) The range of > > definitions including the bodies of functions, etc is used

[PATCH] D44093: [BUILTINS] structure pretty printer

2018-03-08 Thread Paul Semel via Phabricator via cfe-commits
paulsemel updated this revision to Diff 137578. paulsemel marked 3 inline comments as done. paulsemel added a comment. Applied Aaron suggestions Repository: rC Clang https://reviews.llvm.org/D44093 Files: include/clang/Basic/Builtins.def lib/CodeGen/CGBuiltin.cpp lib/Sema/SemaChecking.

[PATCH] D44226: [clangd] Add -log-lsp-to-stderr option

2018-03-08 Thread Simon Marchi via Phabricator via cfe-commits
simark marked an inline comment as done. simark added inline comments. Comment at: clangd/Logger.cpp:19 Logger *L = nullptr; +bool Verbose_ = false; } // namespace ilya-biryukov wrote: > Could we move the flag to implementation of `Logger`? > I.e.: > ``` > clas

[PATCH] D44226: [clangd] Add -log-lsp-to-stderr option

2018-03-08 Thread Simon Marchi via Phabricator via cfe-commits
simark added inline comments. Comment at: clangd/tool/ClangdMain.cpp:79 +static llvm::cl::opt Verbose("verbose", llvm::cl::desc("Be more verbose"), + llvm::cl::init(false)); ilya-biryukov wrote: > Maybe just call it `-v`? I wo

[clang-tools-extra] r327023 - [clangd] Early return for #include goto definition.

2018-03-08 Thread Haojian Wu via cfe-commits
Author: hokein Date: Thu Mar 8 08:28:12 2018 New Revision: 327023 URL: http://llvm.org/viewvc/llvm-project?rev=327023&view=rev Log: [clangd] Early return for #include goto definition. Summary: This would save cost of walking over the AST, NFC. Reviewers: ilya-biryukov Subscribers: klimek, jkor

[PATCH] D44251: [clangd] Early return for #include goto definition.

2018-03-08 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL327023: [clangd] Early return for #include goto definition. (authored by hokein, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D44251 Files: c

[PATCH] D44251: [clangd] Early return for #include goto definition.

2018-03-08 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE327023: [clangd] Early return for #include goto definition. (authored by hokein, committed by ). Changed prior to commit: https://reviews.llvm.org/D44251?vs=137559&id=137581#toc Repository: rCTE Cl

[PATCH] D44226: [clangd] Add -log-lsp-to-stderr option

2018-03-08 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clangd/Logger.cpp:19 Logger *L = nullptr; +bool Verbose_ = false; } // namespace simark wrote: > ilya-biryukov wrote: > > Could we move the flag to implementation of `Logger`? > > I.e.: > > ``` > > class Logger {

[PATCH] D44226: [clangd] Add -log-lsp-to-stderr option

2018-03-08 Thread Simon Marchi via Phabricator via cfe-commits
simark updated this revision to Diff 137582. simark added a comment. Update - Add vlog method to Logger interface - Add method name to "method not found" error message Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D44226 Files: clangd/ClangdLSPServer.cpp clangd/JSONRPCDisp

[PATCH] D44226: [clangd] Add -log-lsp-to-stderr option

2018-03-08 Thread Simon Marchi via Phabricator via cfe-commits
simark marked 2 inline comments as done. simark added inline comments. Comment at: clangd/tool/ClangdMain.cpp:79 +static llvm::cl::opt Verbose("verbose", llvm::cl::desc("Be more verbose"), + llvm::cl::init(false)); ilya-biryuk

[PATCH] D37014: [clang-tidy] Add a checker to remove useless intermediate variables before return statements with comparisons

2018-03-08 Thread Tristan Bourvon via Phabricator via cfe-commits
tbourvon updated this revision to Diff 137588. tbourvon added a comment. Moves the custom matcher to the check instead of having it in `utils/Matchers.h` https://reviews.llvm.org/D37014 Files: clang-tidy/readability/CMakeLists.txt clang-tidy/readability/ReadabilityTidyModule.cpp clang-tid

[PATCH] D44231: [clang-tidy] Check for sizeof that call functions

2018-03-08 Thread Paul Fultz II via Phabricator via cfe-commits
pfultz2 added a comment. > Can you point to some real world code that would benefit from this check? Yes, here: https://github.com/ROCmSoftwarePlatform/MIOpen/blob/master/src/convolution.cpp#L184 It is erroneously calling `sizeof(yDesc.GetType())`. The `GetType` function returns an enum that r

[PATCH] D44218: Correct the alignment for the PS4 target

2018-03-08 Thread Matthew Voss via Phabricator via cfe-commits
ormris abandoned this revision. ormris added a comment. @echristo accepted this revision via cfe-commits. As it's now commited, I'm abandoning this revision. Repository: rC Clang https://reviews.llvm.org/D44218 ___ cfe-commits mailing list cfe-c

[PATCH] D41517: mmintrin.h documentation fixes and updates

2018-03-08 Thread Simon Pilgrim via Phabricator via cfe-commits
RKSimon added a comment. Any more comments? https://reviews.llvm.org/D41517 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D44142: [clangd] Revamp handling of diagnostics.

2018-03-08 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clangd/ClangdLSPServer.cpp:329 + {"title", + llvm::formatv("Apply FixIt {0}", GetFixitMessage(D.message))}, {"command", ExecuteCommandParams::CLANGD_APPLY_FIX_COMMAND}, sammccall wrote

[PATCH] D44142: [clangd] Revamp handling of diagnostics.

2018-03-08 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 137589. ilya-biryukov marked 9 inline comments as done. ilya-biryukov added a comment. This is not final, there are still unadressed comments. - Significantly simplified the implementation by removing the DiagList, etc. - Addressed some of the rest of t

[PATCH] D16403: Add scope information to CFG

2018-03-08 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. Since this affects analysis-based warnings, have you checked if this patch has any effect on compile times? Repository: rL LLVM https://reviews.llvm.org/D16403 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http:

[PATCH] D36836: [clang-tidy] Implement sonarsource-function-cognitive-complexity check

2018-03-08 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In https://reviews.llvm.org/D36836#1021863, @chandlerc wrote: > In https://reviews.llvm.org/D36836#931995, @lebedev.ri wrote: > > > - Rebased > > - As advised by @aaron.ballman, moved into it's own directory/module. > > Please review that, i'm not entirely sure i have

[PATCH] D43660: [OpenMP] Add OpenMP data sharing infrastructure using global memory

2018-03-08 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 137600. gtbercea added a comment. Patch splitting: limit support in this patch to standalone target regions only. Support for combined directives will be fully covered in a subsequent patch. Repository: rC Clang https://reviews.llvm.org/D43660 Files:

[PATCH] D43660: [OpenMP] Add OpenMP data sharing infrastructure using global memory

2018-03-08 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev accepted this revision. ABataev added a comment. LG Repository: rC Clang https://reviews.llvm.org/D43660 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D41517: mmintrin.h documentation fixes and updates

2018-03-08 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added a comment. I'm happy. https://reviews.llvm.org/D41517 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D44231: [clang-tidy] Check for sizeof that call functions

2018-03-08 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D44231#1031503, @pfultz2 wrote: > > Can you point to some real world code that would benefit from this check? > > Yes, here: > > https://github.com/ROCmSoftwarePlatform/MIOpen/blob/master/src/convolution.cpp#L184 > > It is erroneously cal

[PATCH] D44263: Implement LWG 2221 - No formatted output operator for nullptr

2018-03-08 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists created this revision. mclow.lists added reviewers: EricWF, dexonsmith. https://cplusplus.github.io/LWG/issue2221 This is straightforward; I'm putting it up for review because it will add symbols to the dylib https://reviews.llvm.org/D44263 Files: include/ostream test/std/inp

[PATCH] D41976: Low-hanging fruit optimization in string::__move_assign().

2018-03-08 Thread Vedant Kumar via Phabricator via cfe-commits
vsk added a comment. Herald added a subscriber: christof. @mclow.lists is this still fine to commit? I can land it and watch the bots, if you'd like. https://reviews.llvm.org/D41976 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lis

[libclc] r327042 - popcount: Provide function implementation rather than intrinsic redirect

2018-03-08 Thread Jan Vesely via cfe-commits
Author: jvesely Date: Thu Mar 8 10:58:00 2018 New Revision: 327042 URL: http://llvm.org/viewvc/llvm-project?rev=327042&view=rev Log: popcount: Provide function implementation rather than intrinsic redirect amdgcn will need to override this Reviewer: Aaron Watry Signed-off-by: Jan Vesely Adde

[libclc] r327043 - integer/gentype: Add __CLC_VECSIZE macro

2018-03-08 Thread Jan Vesely via cfe-commits
Author: jvesely Date: Thu Mar 8 10:58:05 2018 New Revision: 327043 URL: http://llvm.org/viewvc/llvm-project?rev=327043&view=rev Log: integer/gentype: Add __CLC_VECSIZE macro Reviewer: Aaron Watry Signed-off-by: Jan Vesely Modified: libclc/trunk/generic/include/clc/integer/gentype.inc Mod

[libclc] r327044 - amdgcn, popcount: Workaround broken llvm.ctpop intrinsic on some GCN ASICs

2018-03-08 Thread Jan Vesely via cfe-commits
Author: jvesely Date: Thu Mar 8 10:58:07 2018 New Revision: 327044 URL: http://llvm.org/viewvc/llvm-project?rev=327044&view=rev Log: amdgcn,popcount: Workaround broken llvm.ctpop intrinsic on some GCN ASICs This is only really needed for VI+ ASICs. However, llvm would cast the value to i32 for o

[PATCH] D41976: Low-hanging fruit optimization in string::__move_assign().

2018-03-08 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. In https://reviews.llvm.org/D41976#1031674, @vsk wrote: > @mclow.lists is this still fine to commit? I can land it and watch the bots, > if you'd like. Sure. Please do so. https://reviews.llvm.org/D41976 ___ cfe-comm

[PATCH] D16403: Add scope information to CFG

2018-03-08 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. In https://reviews.llvm.org/D16403#1031567, @thakis wrote: > Since this affects analysis-based warnings, have you checked if this patch > has any effect on compile times? Just in case - this is under an analyzer-only flag, so the actual warnings are not affected. I guess

[PATCH] D44247: [clangd] Use identifier range as the definition range.

2018-03-08 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added a comment. In https://reviews.llvm.org/D44247#1031429, @sammccall wrote: > In https://reviews.llvm.org/D44247#1031366, @sammccall wrote: > > > In https://reviews.llvm.org/D44247#1031345, @malaperle wrote: > > > > > I was going to change the symbol index to do the opposite :) The r

[PATCH] D43184: [WIP] [ItaniunCXXABI] Add an option for loading the type info vtable with dllimport

2018-03-08 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. Ping @rnk - let me reiterate the questions that are open: In https://reviews.llvm.org/D43184#1009355, @rnk wrote: > Here's a case where a local vtable would help: > > struct __declspec(dllimport) A { virtual void a(); }; > struct __declspec(dllimport) B { virtual vo

[PATCH] D41517: mmintrin.h documentation fixes and updates

2018-03-08 Thread Simon Pilgrim via Phabricator via cfe-commits
RKSimon accepted this revision. RKSimon added a comment. This revision is now accepted and ready to land. LGTM - thanks https://reviews.llvm.org/D41517 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/lis

[PATCH] D44217: [clang-tidy] Enable Python 3 support for add_new_check.py

2018-03-08 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe updated this revision to Diff 137646. https://reviews.llvm.org/D44217 Files: clang-tools-extra/clang-tidy/add_new_check.py Index: clang-tools-extra/clang-tidy/add_new_check.py === --- clang-tools-extra/clang-tidy/add_new_che

[libcxx] r327064 - Low-hanging fruit optimization in string::__move_assign().

2018-03-08 Thread Vedant Kumar via cfe-commits
Author: vedantk Date: Thu Mar 8 13:15:26 2018 New Revision: 327064 URL: http://llvm.org/viewvc/llvm-project?rev=327064&view=rev Log: Low-hanging fruit optimization in string::__move_assign(). shrink_to_fit() ends up doing a lot work to get information that we already know since we just called cl

[PATCH] D41976: Low-hanging fruit optimization in string::__move_assign().

2018-03-08 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCXX327064: Low-hanging fruit optimization in string::__move_assign(). (authored by vedantk, committed by ). Changed prior to commit: https://reviews.llvm.org/D41976?vs=130819&id=137647#toc Repository:

[PATCH] D41976: Low-hanging fruit optimization in string::__move_assign().

2018-03-08 Thread Vedant Kumar via Phabricator via cfe-commits
vsk added a comment. Thanks @tvanslyke and @mclow.lists, landed as r327064. Repository: rCXX libc++ https://reviews.llvm.org/D41976 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D44272: [clangd] Support incremental document syncing

2018-03-08 Thread Simon Marchi via Phabricator via cfe-commits
simark created this revision. Herald added subscribers: cfe-commits, ioeric, jkorous-apple, ilya-biryukov, mgorny, klimek. simark added a reviewer: malaperle. This patch adds support for incremental document syncing, as described in the LSP spec. The protocol specifies ranges in terms of Positio

[PATCH] D44093: [BUILTINS] structure pretty printer

2018-03-08 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: lib/CodeGen/CGBuiltin.cpp:1231 + Types[getContext().VoidPtrTy] = "%p"; + Types[getContext().FloatTy] = "%f"; + Types[getContext().DoubleTy] = "%f"; paulsemel wrote: > aaron.ballman wrote: > > paulsem

[PATCH] D44273: [CFG] [analyzer] Fix a crash on finding construction context for an lvalue call expression.

2018-03-08 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ created this revision. NoQ added reviewers: dcoughlin, xazax.hun, a.sidorin, george.karpenkov, szepet. Herald added subscribers: cfe-commits, rnkovacs. The type of the call expression and the return value type of the function are not necessarily the same thing. In the attached example, the fu

[PATCH] D44231: [clang-tidy] Check for sizeof that call functions

2018-03-08 Thread Paul Fultz II via Phabricator via cfe-commits
pfultz2 added a comment. > If the return type of foo() is changed, then the use for s1 will be > automatically updated But usually you write it as: using foo_return = uint16_t; foo_return foo(); ... size_t s1 = sizeof(foo()); size_t s2 = sizeof(foo_return); So you just update the `fo

r327074 - [StaticAnalyzer] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC).

2018-03-08 Thread Eugene Zelenko via cfe-commits
Author: eugenezelenko Date: Thu Mar 8 14:45:13 2018 New Revision: 327074 URL: http://llvm.org/viewvc/llvm-project?rev=327074&view=rev Log: [StaticAnalyzer] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). Modified: cfe/trunk/include/clang/StaticAnal

[libclc] r327075 - amdgcn/fmin: fcanonicalize operands

2018-03-08 Thread Jan Vesely via cfe-commits
Author: jvesely Date: Thu Mar 8 15:00:58 2018 New Revision: 327075 URL: http://llvm.org/viewvc/llvm-project?rev=327075&view=rev Log: amdgcn/fmin: fcanonicalize operands v_min instruction needs canonicalized operands. Passes CTS on carrizo Reviewer: Aaron Watry Signed-off-by: Jan Vesely Added

[libclc] r327076 - amdgcn/fmax: fcanonicalize operands

2018-03-08 Thread Jan Vesely via cfe-commits
Author: jvesely Date: Thu Mar 8 15:01:01 2018 New Revision: 327076 URL: http://llvm.org/viewvc/llvm-project?rev=327076&view=rev Log: amdgcn/fmax: fcanonicalize operands v_max instruction needs canonicalized operands. Passes CTS on carrizo Reviewer: Aaron Watry Signed-off-by: Jan Vesely Added

r327078 - Add a debug info testcase for the trvial_abi attribute.

2018-03-08 Thread Adrian Prantl via cfe-commits
Author: adrian Date: Thu Mar 8 15:11:46 2018 New Revision: 327078 URL: http://llvm.org/viewvc/llvm-project?rev=327078&view=rev Log: Add a debug info testcase for the trvial_abi attribute. Modified: cfe/trunk/test/CodeGenCXX/debug-info-composite-cc.cpp Modified: cfe/trunk/test/CodeGenCXX/deb

[PATCH] D44273: [CFG] [analyzer] Fix a crash on finding construction context for an lvalue call expression.

2018-03-08 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 137662. NoQ added a comment. Fix typo in the comments. https://reviews.llvm.org/D44273 Files: include/clang/Analysis/CFG.h lib/Analysis/CFG.cpp test/Analysis/temporaries.cpp Index: test/Analysis/temporaries.cpp ==

[PATCH] D44273: [CFG] [analyzer] Fix a crash on finding construction context for an lvalue call expression.

2018-03-08 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 137661. NoQ added a comment. Same goes for rvalue references. Hmm, we have a fancy helper method for that exact purpose. But it's not super easy to use, had to sacrifice a sanity check assertion to use it. https://reviews.llvm.org/D44273 Files: include/clan

[PATCH] D44278: CodeGen: simplify and validate exception personalities

2018-03-08 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd created this revision. compnerd added reviewers: rnk, smeenai. Simplify the dispatching for the personality routines. This really had no test coverage previously, so add test coverage for the various cases. This turns out to be pretty complicated as the various languages and models inter

[PATCH] D44278: CodeGen: simplify and validate exception personalities

2018-03-08 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd updated this revision to Diff 137668. compnerd added a comment. add more context Repository: rC Clang https://reviews.llvm.org/D44278 Files: lib/CodeGen/CGException.cpp test/CodeGen/personality.c test/CodeGenCXX/personality.cpp test/CodeGenObjC/personality.m test/CodeGenOb

[PATCH] D43902: [clang-format] Don't detect C++11 attribute specifiers as ObjC

2018-03-08 Thread Daniel Jasper via Phabricator via cfe-commits
djasper added inline comments. Comment at: lib/Format/TokenAnnotator.cpp:329 + return nullptr; +// C++17 '[[using namespace: foo, bar(baz, blech)]]' +bool IsUsingNamespace = Can you make this: // C++17 '[[using : foo, bar(baz, blech)]]' To make

[PATCH] D43494: [Modules] Fix creating fake definition data for lambdas.

2018-03-08 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: clang/lib/Serialization/ASTReaderDecl.cpp:1790 +// set fake one. +D->DefinitionData = DD; ReadCXXDefinitionData(*DD, D); I think it would make sense to "claim" the definition more eagerly here, by also updatin

[PATCH] D43906: [clang-format] Improve detection of Objective-C block types

2018-03-08 Thread Daniel Jasper via Phabricator via cfe-commits
djasper accepted this revision. djasper added a comment. This revision is now accepted and ready to land. Nice.. Removed a lot of complexity :). Let's see whether this heuristic is good enough. Comment at: lib/Format/TokenAnnotator.cpp:210 -bool MightBeFunctionType = !Co

  1   2   >