[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

[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

[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

[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 >

[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

[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

[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:

[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:

[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

[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 :

[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

[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

[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

[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 =

[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

[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:

[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

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=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

[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] 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

[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?

[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

[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:

[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 = ToAST->getASTContext(); +vfs::OverlayFileSystem *OFS = static_cast( + ToCtx.getSourceManager().getFileManager().getVirtualFileSystem().get());

[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...

[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=rev Log: Implement LWG#2518 - Non-member swap for propagate_const should call member swap Modified: libcxx/trunk/include/experimental/propagate_const

[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

[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] 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:

[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] 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

[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

[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));

[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] 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] 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

[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

[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] 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

[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 ___

[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

[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

[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

[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

[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

[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

[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=rev Log: popcount: Provide function implementation rather than intrinsic redirect amdgcn will need to override this Reviewer: Aaron Watry Signed-off-by: Jan

[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=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 older

[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=rev Log: integer/gentype: Add __CLC_VECSIZE macro Reviewer: Aaron Watry Signed-off-by: Jan Vesely Modified:

[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

[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

[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

[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 === ---

[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

[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: > >

[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

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=rev Log: [StaticAnalyzer] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). Modified:

[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

[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=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

[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=137647#toc Repository:

[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

[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. Great, I refactored it to avoid parsing the matching parens, so there's no more danger of O(N^2) parsing behavior. I had to add a new `InCpp11AttributeSpecifier` boolean to `Context` so when parsing the inner `[]` we didn't treat it as an ObjC message send or an

[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 updated this revision to Diff 137696. benhamilton marked 9 inline comments as done. benhamilton added a comment. Refactor to avoid matching open and close parens. Fix @djasper comments. Repository: rC Clang https://reviews.llvm.org/D43902 Files:

r327105 - CodeGen: simplify and validate exception personalities

2018-03-08 Thread Saleem Abdulrasool via cfe-commits
Author: compnerd Date: Thu Mar 8 23:06:42 2018 New Revision: 327105 URL: http://llvm.org/viewvc/llvm-project?rev=327105=rev Log: CodeGen: simplify and validate exception personalities Simplify the dispatching for the personality routines. This really had no test coverage previously, so add

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

2018-03-08 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd closed this revision. compnerd added a comment. SVN r327105 Repository: rC Clang https://reviews.llvm.org/D44278 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[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=rev Log: amdgcn/fmin: fcanonicalize operands v_min instruction needs canonicalized operands. Passes CTS on carrizo Reviewer: Aaron Watry Signed-off-by: Jan

[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=rev Log: amdgcn/fmax: fcanonicalize operands v_max instruction needs canonicalized operands. Passes CTS on carrizo Reviewer: Aaron Watry Signed-off-by: Jan

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=rev Log: Add a debug info testcase for the trvial_abi attribute. Modified: cfe/trunk/test/CodeGenCXX/debug-info-composite-cc.cpp Modified:

[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

[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 =

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

2018-03-08 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 137675. NoQ added a comment. Add the tests to a CFG-oriented test file as well, because it doesn't have much to do with the analyzer. FIXME: `temp-obj-dtors-cfg-output.cpp` is a mess. It'd be great to interleave code and expected output, like other CFG tests

[PATCH] D35103: Expand clang-interpreter with example of throwing in and from the JIT for Windows64.

2018-03-08 Thread Martell Malone via Phabricator via cfe-commits
martell added a comment. Herald added a subscriber: mgrang. ping @marsupial https://reviews.llvm.org/D35103 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[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] 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

[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

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

2018-03-08 Thread Douglas Yung via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL327090: [DOXYGEN] Fix doxygen and content issues in mmintrin.h (authored by dyung, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

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

2018-03-08 Thread Abderrazek Zaafrani via Phabricator via cfe-commits
az 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_laneq",

r327096 - [CFG] [analyzer] Add construction context for implicit constructor conversions.

2018-03-08 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Thu Mar 8 17:39:59 2018 New Revision: 327096 URL: http://llvm.org/viewvc/llvm-project?rev=327096=rev Log: [CFG] [analyzer] Add construction context for implicit constructor conversions. Implicit constructor conversions such as A a = B() are represented by surrounding the

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

2018-03-08 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith accepted this revision. dexonsmith added a comment. This revision is now accepted and ready to land. LGTM. https://reviews.llvm.org/D44263 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D41102: Setup clang-doc frontend framework

2018-03-08 Thread Julie Hockett via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. juliehockett marked 11 inline comments as done. Closed by commit rL327102: [clang-doc] Setup clang-doc frontend framework (authored by juliehockett, committed by ). Herald added a subscriber: llvm-commits. Changed prior to

[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:

[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

r327090 - [DOXYGEN] Fix doxygen and content issues in mmintrin.h

2018-03-08 Thread Douglas Yung via cfe-commits
Author: dyung Date: Thu Mar 8 16:38:51 2018 New Revision: 327090 URL: http://llvm.org/viewvc/llvm-project?rev=327090=rev Log: [DOXYGEN] Fix doxygen and content issues in mmintrin.h - Fix instruction mappings/listings for various intrinsics This patch was made by Craig Flores Differential

[PATCH] D41102: Setup clang-doc frontend framework

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. There's a few places where we can trim some of the boilerplate, which I think is important - it's hard to find the "real code" among all the plumbing in places. Other than that, this

[PATCH] D44250: MmapWriteExecChecker supporting mprotect call

2018-03-08 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ edited reviewers, added: NoQ; removed: dergachev.a. NoQ accepted this revision. NoQ added a comment. This revision is now accepted and ready to land. Looks good, thank you! Repository: rC Clang https://reviews.llvm.org/D44250 ___ cfe-commits

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

2018-03-08 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, thanks! This is nicer. Repository: rC Clang https://reviews.llvm.org/D44278 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D44250: MmapWriteExecChecker supporting mprotect call

2018-03-08 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL327098: [analyzer] MmapWriteExecChecker: Add support for mprotect(). (authored by dergachev, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

r327098 - [analyzer] MmapWriteExecChecker: Add support for mprotect().

2018-03-08 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Thu Mar 8 17:47:24 2018 New Revision: 327098 URL: http://llvm.org/viewvc/llvm-project?rev=327098=rev Log: [analyzer] MmapWriteExecChecker: Add support for mprotect(). mprotect() allows setting memory access flags similarly to mmap(), causing similar security issues if

r327099 - PR36645: Go looking for an appropriate array bound when constant-evaluating a

2018-03-08 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Mar 8 18:00:01 2018 New Revision: 327099 URL: http://llvm.org/viewvc/llvm-project?rev=327099=rev Log: PR36645: Go looking for an appropriate array bound when constant-evaluating a name of an array object. Modified: cfe/trunk/lib/AST/ExprConstant.cpp

[PATCH] D44281: [analyzer] Suppress more MallocChecker positives in reference counting pointer destructors.

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. https://reviews.llvm.org/D43791 wasn't quite enough because we often run out of inlining stack depth limit and for that reason fail to see

[PATCH] D44051: [CFG] [analyzer] Add construction context for implicit constructor conversions.

2018-03-08 Thread Phabricator 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 rL327096: [CFG] [analyzer] Add construction context for implicit constructor conversions. (authored by dergachev, committed

Re: r327099 - PR36645: Go looking for an appropriate array bound when constant-evaluating a

2018-03-08 Thread Richard Smith via cfe-commits
Might be a good candidate for Clang 6.0.1. On 8 March 2018 at 18:00, Richard Smith via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: rsmith > Date: Thu Mar 8 18:00:01 2018 > New Revision: 327099 > > URL: http://llvm.org/viewvc/llvm-project?rev=327099=rev > Log: > PR36645: Go

[PATCH] D44189: [RISCV] Verify the input value of -march=

2018-03-08 Thread Kito Cheng via Phabricator via cfe-commits
kito-cheng updated this revision to Diff 137687. kito-cheng added a comment. This version only update variable name which changed in last version by accident. https://reviews.llvm.org/D44189 Files: lib/Driver/ToolChains/Arch/RISCV.cpp test/Driver/riscv-arch.c Index:

[clang-tools-extra] r327102 - [clang-doc] Setup clang-doc frontend framework

2018-03-08 Thread Julie Hockett via cfe-commits
Author: juliehockett Date: Thu Mar 8 19:16:39 2018 New Revision: 327102 URL: http://llvm.org/viewvc/llvm-project?rev=327102=rev Log: [clang-doc] Setup clang-doc frontend framework Setting up the mapper part of the frontend framework for a clang-doc tool. It creates a series of relevant matchers

Re: r327099 - PR36645: Go looking for an appropriate array bound when constant-evaluating a

2018-03-08 Thread Tom Stellard via cfe-commits
On 03/08/2018 06:03 PM, Richard Smith wrote: > Might be a good candidate for Clang 6.0.1. > Merge request created: https://llvm.org/PR36655 -Tom > On 8 March 2018 at 18:00, Richard Smith via cfe-commits > > wrote: > > Author:

[clang-tools-extra] r327103 - Revert "[clang-doc] Setup clang-doc frontend framework"

2018-03-08 Thread Julie Hockett via cfe-commits
Author: juliehockett Date: Thu Mar 8 19:47:18 2018 New Revision: 327103 URL: http://llvm.org/viewvc/llvm-project?rev=327103=rev Log: Revert "[clang-doc] Setup clang-doc frontend framework" This reverts commit r327102, since it was breaking the linux-abi-test on x86. Removed:

[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

[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

[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

  1   2   >