[PATCH] D46033: add check for long double for __builtin_dump_struct

2018-04-25 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! Repository: rC Clang https://reviews.llvm.org/D46033 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.

[PATCH] D45686: [Tooling] Clean up tmp files when creating a fixed compilation database

2018-04-25 Thread David Stenberg via Phabricator via cfe-commits
dstenb added a comment. Ping. It feels a bit nasty that the tools leave behind temporary files, so I think that it would be good to find a fix for that. Repository: rC Clang https://reviews.llvm.org/D45686 ___ cfe-commits mailing list cfe-commit

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

2018-04-25 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. In https://reviews.llvm.org/D42966#1077249, @mikhail.ramalho wrote: > They are declared in some file defined by the line markers; the file are > not registered in the SourceManager as actual files, so getting the > FileEntry will always fail, that's why I changed

[PATCH] D45179: [libc++] Add _LIBCPP_FORCE_NODISCARD define to force-enable nodiscard in pre-C++17

2018-04-25 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: test/libcxx/diagnostics/force_nodiscard.pass.cpp:16 +// MODULES_DEFINES: _LIBCPP_FORCE_NODISCARD +#define _LIBCPP_DISABLE_NODISCARD_AFTER_CXX17 +#define _LIBCPP_FORCE_NODISCARD lebedev.ri wrote: > Quuxplusone wrote: >

[PATCH] D45179: [libc++] Add _LIBCPP_FORCE_NODISCARD define to force-enable nodiscard in pre-C++17

2018-04-25 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri updated this revision to Diff 143872. lebedev.ri marked 8 inline comments as done. lebedev.ri added a comment. Updated based on @mclow.lists review. Repository: rCXX libc++ https://reviews.llvm.org/D45179 Files: include/__config test/libcxx/diagnostics/force_nodiscard.fail.cpp

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

2018-04-25 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. > I assume all examples in the current patch will produce USRs even without > your changes, is this correct or am I missing something? Or is the that whenever there's a `#line` directive we get into a "virtual" file that's not registered in the `SourceManager`?

[PATCH] D46030: [TargetInfo] Sort target features before passing them to the backend

2018-04-25 Thread Florian Hahn via Phabricator via cfe-commits
fhahn accepted this revision. fhahn added a comment. This revision is now accepted and ready to land. Thanks Eli, LGTM! Comment at: lib/Basic/Targets.cpp:641 Opts->Features.push_back((F.getValue() ? "+" : "-") + F.getKey().str()); + llvm::sort(Opts->Features.begin(), Opts

r330802 - Fix buildbot problems after rC330794

2018-04-25 Thread Bjorn Pettersson via cfe-commits
Author: bjope Date: Wed Apr 25 02:04:12 2018 New Revision: 330802 URL: http://llvm.org/viewvc/llvm-project?rev=330802&view=rev Log: Fix buildbot problems after rC330794 Avoiding error: no matching function for call to 'makeArrayRef' at ../tools/clang/lib/Parse/ParseTemplate.cpp:373:17 By usi

[PATCH] D43750: Allow writing calling convention attributes on function types

2018-04-25 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Ping https://reviews.llvm.org/D43750 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D46019: [ASTImporter] Fix isa cast assert

2018-04-25 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. Hi Aleksei, Thanks for the review. We faced this assert during the CTU analysis of protobuf. We tried hard to synthesize a minimal test example both by hand and by executing creduce on multiple files. Unfortunately, we were unable to reduce to such a minimal example,

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

2018-04-25 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. This seems to do what we want for clangd, but we should also get the code owner or someone who knows the code better to take a look. Repository: rC Clang https://reviews.llvm.org/D46001 ___ cfe-commits mailing list cfe-co

[clang-tools-extra] r330803 - [clangd] Minor fixes for C++ standard library header mapping.

2018-04-25 Thread Eric Liu via cfe-commits
Author: ioeric Date: Wed Apr 25 02:17:05 2018 New Revision: 330803 URL: http://llvm.org/viewvc/llvm-project?rev=330803&view=rev Log: [clangd] Minor fixes for C++ standard library header mapping. Modified: clang-tools-extra/trunk/clangd/index/CanonicalIncludes.cpp Modified: clang-tools-extra/

FW: [Diffusion] rC330802: Fix buildbot problems after rC330794

2018-04-25 Thread Björn Pettersson A via cfe-commits
Hello Faisal. Lots of buildbots have failed after your commit "[c++2a] [concepts] Add rudimentary parsing support for template concept declarations" (rC330794) Here is an example from http://lab.llvm.org:8011/builders/clang-x86_64-linux-abi-test/builds/25483/steps/build-unified-tree/logs/stdio

[PATCH] D46035: [clangd] Fix unicode handling, using UTF-16 where LSP requires it.

2018-04-25 Thread Haojian Wu via Phabricator via cfe-commits
hokein accepted this revision. hokein added a comment. This revision is now accepted and ready to land. Cool, the code looks good to me (just a few nits), thanks for the descriptive comments! > This seems likely to cause problems with editors that have the same bug, and > treat the protocol as

[PATCH] D45532: [StaticAnalyzer] Checker to find uninitialized fields after a constructor call

2018-04-25 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus updated this revision to Diff 143875. Szelethus added a comment. In this diff I - added a `Pedantic` flag that is set to false by default to filter out results from objects that don't have a single field initialized, - made it so that fields that are declared in system headers are now

[PATCH] D45719: [clang-Format] Fix indentation of member call after block

2018-04-25 Thread Anders Karlsson via Phabricator via cfe-commits
ank added a comment. ping Repository: rC Clang https://reviews.llvm.org/D45719 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2018-04-25 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. Important: please upload the patch with full context diff Comment at: include/clang-c/Index.h:5278 + /** + * \brief Whether to try dot to arrow correction if arrow operator can be applied. + */ This implies that "dot to arro

[PATCH] D45921: Add getDeserializationListener to ASTReader

2018-04-25 Thread Yuka Takahashi via Phabricator via cfe-commits
yamaguchi added a comment. Do you mean something like `addDeserializationListener` which create a multiplex listener with an existing listener? I think that'll be good as well! https://reviews.llvm.org/D45921 ___ cfe-commits mailing list cfe-commit

[PATCH] D46000: [AST] Added a helper to extract a user-friendly text of a comment.

2018-04-25 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 143881. ilya-biryukov added a comment. Added forgotten bits of the change Repository: rC Clang https://reviews.llvm.org/D46000 Files: include/clang/AST/CommentLexer.h include/clang/AST/RawCommentList.h lib/AST/CommentLexer.cpp lib/AST/RawCo

[PATCH] D46002: [clangd] Parse all comments in Sema and completion.

2018-04-25 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Code looks good/simple, just a couple of design questions Comment at: clangd/ClangdUnit.cpp:362 CI->getFrontendOpts().DisableFree = false; +CI->getLangOpts()->CommentOpts.ParseAllComments = true; } Any idea about whether t

Re: FW: [Diffusion] rC330802: Fix buildbot problems after rC330794

2018-04-25 Thread Faisal Vali via cfe-commits
That should work - although i wonder if we still need makeArrayRef once we explicitly declare an array - either way thank you for fixing it Bjorn!! Faisal Vali On Wed, Apr 25, 2018 at 4:16 AM, Björn Pettersson A wrote: > Hello Faisal. > > Lots of buildbots have failed after your commit "[c++2a]

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

2018-04-25 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 143882. ilya-biryukov added a comment. Remove accidentally added changes that should be part of https://reviews.llvm.org/D46000 Repository: rC Clang https://reviews.llvm.org/D46001 Files: include/clang/Sema/CodeCompleteConsumer.h lib/Sema/Sema

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

2018-04-25 Thread Ivan Donchevskii via Phabricator via cfe-commits
yvvan added inline comments. Comment at: include/clang-c/Index.h:5278 + /** + * \brief Whether to try dot to arrow correction if arrow operator can be applied. + */ ilya-biryukov wrote: > This implies that "dot to arrow" is the only available correction. Ma

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

2018-04-25 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a reviewer: arphaman. ilya-biryukov added a subscriber: arphaman. ilya-biryukov added a comment. In https://reviews.llvm.org/D46001#1077781, @ioeric wrote: > This seems to do what we want for clangd, but we should also get the code > owner or someone who knows the code better

[PATCH] D46049: [OpenCL] Add constant address space to __func__ in AST

2018-04-25 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia created this revision. Anastasia added reviewers: yaxunl, bader. String literals must be in `constant` address space. https://reviews.llvm.org/D46049 Files: lib/Sema/SemaExpr.cpp test/SemaOpenCL/predefind-expr.cl Index: test/SemaOpenCL/predefind-expr.cl =

r330808 - add check for long double for __builtin_dump_struct

2018-04-25 Thread Paul Semel via cfe-commits
Author: paulsemel Date: Wed Apr 25 03:09:20 2018 New Revision: 330808 URL: http://llvm.org/viewvc/llvm-project?rev=330808&view=rev Log: add check for long double for __builtin_dump_struct Modified: cfe/trunk/test/CodeGen/dump-struct-builtin.c Modified: cfe/trunk/test/CodeGen/dump-struct-buil

[PATCH] D46033: add check for long double for __builtin_dump_struct

2018-04-25 Thread Paul Semel via Phabricator via cfe-commits
paulsemel closed this revision. paulsemel added a comment. commited on r330808 Repository: rC Clang https://reviews.llvm.org/D46033 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D46050: [Frontend] Avoid running plugins during code completion parse

2018-04-25 Thread Nikolai Kosjar via Phabricator via cfe-commits
nik created this revision. Herald added a subscriber: cfe-commits. The parsing that is done for code completion is a special case that will discard any generated diagnostics, so avoid running plugins for this case in the first place to avoid performance penalties due to the plugins. Repository:

[PATCH] D46002: [clangd] Parse all comments in Sema and completion.

2018-04-25 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clangd/ClangdUnit.cpp:362 CI->getFrontendOpts().DisableFree = false; +CI->getLangOpts()->CommentOpts.ParseAllComments = true; } sammccall wrote: > Any idea about whether this will affect performance sig

[PATCH] D45719: [clang-Format] Fix indentation of member call after block

2018-04-25 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added inline comments. Comment at: unittests/Format/FormatTest.cpp:4359 + "return 3;\n" + " }).as("");\n" + "}"); What would be interesting is tests that: a) have another value after the closing }; doesn't rea

[PATCH] D46049: [OpenCL] Add constant address space to __func__ in AST

2018-04-25 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh added inline comments. Comment at: lib/Sema/SemaExpr.cpp:3056 + if (LangOpts.OpenCL) + ResTy = Context.getAddrSpaceQualType(ResTy, LangAS::opencl_constant); ResTy = Context.getConstantArrayType(ResTy, LengthI, ArrayType::Normal, Nitpic

[PATCH] D46050: [Frontend] Avoid running plugins during code completion parse

2018-04-25 Thread Nikolai Kosjar via Phabricator via cfe-commits
nik updated this revision to Diff 143894. nik added a comment. only clang-format fixes Repository: rC Clang https://reviews.llvm.org/D46050 Files: lib/Frontend/FrontendAction.cpp Index: lib/Frontend/FrontendAction.cpp === --

[PATCH] D45722: [X86] Lowering SAD (sum of absolute differences) intrinsics to native IR (clang side)

2018-04-25 Thread Mikhail Dvoretckii via Phabricator via cfe-commits
mike.dvoretsky updated this revision to Diff 143893. mike.dvoretsky marked 4 inline comments as done. mike.dvoretsky added a subscriber: ashlykov. mike.dvoretsky added a comment. Updated per comments. https://reviews.llvm.org/D45722 Files: clang/lib/CodeGen/CGBuiltin.cpp clang/test/CodeGen/

[PATCH] D46019: [ASTImporter] Fix isa cast assert

2018-04-25 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin added a comment. > `E->getFoundDecl().getDecl()` can be null when a member expression does not > involve lookup. (Note, it may involve a lookup in case of a using directive > which refers to a member function in a base class template.) Yes, a pretty weird example. Unfortunately, they

[PATCH] D46019: [ASTImporter] Fix isa cast assert

2018-04-25 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun accepted this revision. xazax.hun added a comment. With a sufficiently detailed commit message, i.e.: what version of a project should be cheked out and how the analyzer needs to be ivoked to reproduce the problem I am ok with committing this without a test. Repository: rC Clang h

[PATCH] D44435: CUDA ctor/dtor Module-Unique Symbol Name

2018-04-25 Thread Simeon Ehrig via Phabricator via cfe-commits
SimeonEhrig added inline comments. Comment at: lib/CodeGen/CGCUDANV.cpp:287 +CtorSuffix.append("_"); +CtorSuffix.append(ModuleName); + } tra wrote: > SimeonEhrig wrote: > > tra wrote: > > > There is a general problem with this approach. File name can con

[PATCH] D46000: [AST] Added a helper to extract a user-friendly text of a comment.

2018-04-25 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. Overall looks good. Could you add tests for the new methods? Comment at: lib/AST/CommentLexer.cpp:294 void Lexer::lexCommentText(Token &T) { + if (ParseCommands) +lexCommentTextWithCommands(T); micro-nit: I'd probably ``` return Pa

[PATCH] D43322: Diagnose cases of "return x" that should be "return std::move(x)" for efficiency

2018-04-25 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. This is a cool warning, thanks for adding it. We ran into one thing while enabling this in Chromium that I'd like to mention here. We have code that basically does: struct Foo { using passwords_iterator = std::map, ReverseStr

[PATCH] D46027: [clang-tidy] Fix PR35824

2018-04-25 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. > Which solution do you prefer? If I understand the issue properly: both. :-) Having the AST track information that's been folded away is still useful -- some users are using the AST for purposes other than codegen, and the fact that a construct has been folded a

[PATCH] D46007: [analyzer] Add `TaintBugVisitor` to the ArrayBoundV2, DivideZero and VLASize.

2018-04-25 Thread Henry Wong via Phabricator via cfe-commits
MTC marked an inline comment as done. MTC added inline comments. Comment at: lib/StaticAnalyzer/Checkers/VLASizeChecker.cpp:75 auto report = llvm::make_unique(*BT, os.str(), N); + report->addVisitor(std::move(Visitor)); report->addRange(SizeE->getSourceRange()); --

[PATCH] D46007: [analyzer] Add `TaintBugVisitor` to the ArrayBoundV2, DivideZero and VLASize.

2018-04-25 Thread Henry Wong via Phabricator via cfe-commits
MTC updated this revision to Diff 143908. MTC marked an inline comment as done. MTC added a comment. Since `BugReport::addVisitor()` has checks for the null `Visitor`, remove the checks before `BugReport->addVisitor()`. Repository: rC Clang https://reviews.llvm.org/D46007 Files: lib/Stati

[PATCH] D45284: [RISCV] More validations on the input value of -march=

2018-04-25 Thread Alex Bradbury via Phabricator via cfe-commits
asb accepted this revision. asb added a comment. This revision is now accepted and ready to land. Looks good to me - thanks! https://reviews.llvm.org/D45284 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailma

r330821 - Fix failure in lit test kernel-call.cu due to name mangling

2018-04-25 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Wed Apr 25 06:07:58 2018 New Revision: 330821 URL: http://llvm.org/viewvc/llvm-project?rev=330821&view=rev Log: Fix failure in lit test kernel-call.cu due to name mangling Modified: cfe/trunk/test/CodeGenCUDA/kernel-call.cu Modified: cfe/trunk/test/CodeGenCUDA/kernel-cal

[PATCH] D46056: Move _LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS macro to build system

2018-04-25 Thread Taiju Tsuiki via Phabricator via cfe-commits
tzik created this revision. tzik added reviewers: rsmith, thakis. Herald added subscribers: cfe-commits, mgorny. _LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS is currently used to bring back std::unexpected, which is removed in C++17, but still needed for libc++abi for backward compatibility.

r330824 - [HIP] Add predefined macros __HIPCC__ and __HIP_DEVICE_COMPILE__

2018-04-25 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Wed Apr 25 06:33:19 2018 New Revision: 330824 URL: http://llvm.org/viewvc/llvm-project?rev=330824&view=rev Log: [HIP] Add predefined macros __HIPCC__ and __HIP_DEVICE_COMPILE__ Differential Revision: https://reviews.llvm.org/D45441 Modified: cfe/trunk/lib/Frontend/InitPr

[PATCH] D45441: [HIP] Add predefined macros __HIPCC__ and __HIP_DEVICE_COMPILE__

2018-04-25 Thread Yaxun Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. yaxunl marked an inline comment as done. Closed by commit rC330824: [HIP] Add predefined macros __HIPCC__ and __HIP_DEVICE_COMPILE__ (authored by yaxunl, committed by ). Changed prior to commit: https://reviews.llvm.org/D

[PATCH] D46056: Move _LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS macro to build system

2018-04-25 Thread Taiju Tsuiki via Phabricator via cfe-commits
tzik added a comment. rsmith: Could you PTAL to this? This is an attempt to resolve https://bugs.llvm.org/show_bug.cgi?id=34103. Though we already have a way to bring back std::unexpected to libc++abi, we currently don't apply it properly, IMO. Repository: rCXXA libc++abi https://reviews.ll

[PATCH] D46000: [AST] Added a helper to extract a user-friendly text of a comment.

2018-04-25 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. In https://reviews.llvm.org/D46000#1077926, @ioeric wrote: > Overall looks good. Could you add tests for the new methods? Sure. There are a few tests in https://reviews.llvm.org/D46002, but I haven't (yet) moved them to clang. Repository: rC Clang https://re

[PATCH] D45179: [libc++] Add _LIBCPP_FORCE_NODISCARD define to force-enable nodiscard in pre-C++17

2018-04-25 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added inline comments. Comment at: test/libcxx/diagnostics/force_nodiscard.fail.cpp:22 + +_LIBCPP_NODISCARD_AFTER_CXX17 int foo() { return 6; } + Shouldn't this be just `_LIBCPP_NODISCARD` ? Repository: rCXX libc++ https://reviews.llvm.org/D4517

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

2018-04-25 Thread Strahinja Petrovic via Phabricator via cfe-commits
spetrovic updated this revision to Diff 143918. spetrovic added a comment. Comments addressed https://reviews.llvm.org/D39053 Files: include/clang/Driver/Options.td lib/CodeGen/CGRecordLayoutBuilder.cpp test/CodeGenCXX/finegrain-bitfield-type.cpp Index: test/CodeGenCXX/finegrain-bitfield

[PATCH] D45294: [libcxx] [test] Remove non-portable assertions from filebuf tests

2018-04-25 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists accepted this revision. mclow.lists added a comment. This revision is now accepted and ready to land. This looks OK to me. https://reviews.llvm.org/D45294 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-

[PATCH] D45179: [libc++] Add _LIBCPP_FORCE_NODISCARD define to force-enable nodiscard in pre-C++17

2018-04-25 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: test/libcxx/diagnostics/force_nodiscard.fail.cpp:22 + +_LIBCPP_NODISCARD_AFTER_CXX17 int foo() { return 6; } + mclow.lists wrote: > Shouldn't this be just `_LIBCPP_NODISCARD` ? > I don't think so? I thought we are in

[PATCH] D46049: [OpenCL] Add constant address space to __func__ in AST

2018-04-25 Thread Alexey Bader via Phabricator via cfe-commits
bader added inline comments. Comment at: lib/Sema/SemaExpr.cpp:3059 /*IndexTypeQuals*/ 0); SL = StringLiteral::Create(Context, Str, StringLiteral::Ascii, /*Pascal*/ false, ResTy, Loc); --

[PATCH] D38845: [ASTImporter] Support importing UnresolvedMemberExpr, DependentNameType, DependentScopeDeclRefExpr

2018-04-25 Thread Peter Szecsi via Phabricator via cfe-commits
szepet updated this revision to Diff 143925. szepet added a comment. Rewritten the tests using the newly added TEST_P method. This patch failed earlier when -fdelayed-template-parsing flag was enabled, however, the actual import process was OK but the original AST havent included the checked nod

[PATCH] D45839: [analyzer] Add support for WebKit "unified sources".

2018-04-25 Thread Paul Robinson via Phabricator via cfe-commits
probinson added a comment. In https://reviews.llvm.org/D45839#1077258, @NoQ wrote: > Aha, ok, yeah, that sounds like a lot, thank you. I think i'll follow up with > a separate commit that will enable first-level-code-file-include analysis in > all files under an on-by-default `-analyzer-config`

[PATCH] D45179: [libc++] Add _LIBCPP_FORCE_NODISCARD define to force-enable nodiscard in pre-C++17

2018-04-25 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added inline comments. Comment at: test/libcxx/diagnostics/force_nodiscard.fail.cpp:22 + +_LIBCPP_NODISCARD_AFTER_CXX17 int foo() { return 6; } + lebedev.ri wrote: > mclow.lists wrote: > > Shouldn't this be just `_LIBCPP_NODISCARD` ? > > > I don't th

[PATCH] D45179: [libc++] Add _LIBCPP_FORCE_NODISCARD define to force-enable nodiscard in pre-C++17

2018-04-25 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. BTW, you can gang several failing tests together, and check all the error messages - see libcxx/test/libcxx/containers/unord/unord.set/missing_hash_specialization.fail.cpp for an example. Repository: rCXX libc++ https://reviews.llvm.org/D45179 __

[PATCH] D46000: [AST] Added a helper to extract a user-friendly text of a comment.

2018-04-25 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 143928. ilya-biryukov marked an inline comment as done. ilya-biryukov added a comment. - Attempt to reuse lexing code with/without command parsing. - Get rid of SkipWs. Repository: rC Clang https://reviews.llvm.org/D46000 Files: include/clang/AST

[PATCH] D46000: [AST] Added a helper to extract a user-friendly text of a comment.

2018-04-25 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: lib/AST/CommentLexer.cpp:471 + case '\r': +TokenPtr = skipNewline(TokenPtr, CommentEnd); +formTokenWithChars(T, TokenPtr, tok::newline); ioeric wrote: > Can we share code with `lexCommentTextWi

[PATCH] D46050: [Frontend] Avoid running plugins during code completion parse

2018-04-25 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. Seems reasonable; can you add a test for this (maybe somewhere in clang/test/Frontend/plugin*)? Repository: rC Clang https://reviews.llvm.org/D46050 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llv

[PATCH] D46000: [AST] Added a helper to extract a user-friendly text of a comment.

2018-04-25 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 143929. ilya-biryukov added a comment. - Update a comment after latest changes Repository: rC Clang https://reviews.llvm.org/D46000 Files: include/clang/AST/CommentLexer.h include/clang/AST/RawCommentList.h lib/AST/CommentLexer.cpp lib/AST/

[PATCH] D46000: [AST] Added a helper to extract a user-friendly text of a comment.

2018-04-25 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 143930. ilya-biryukov added a comment. - Fix indentation Repository: rC Clang https://reviews.llvm.org/D46000 Files: include/clang/AST/CommentLexer.h include/clang/AST/RawCommentList.h lib/AST/CommentLexer.cpp lib/AST/RawCommentList.cpp In

[libcxx] r330828 - Fix static initialization of std::atomic_flag; Fixes PR#37226. Thanks to Ricky Zhou for the report and test case.

2018-04-25 Thread Marshall Clow via cfe-commits
Author: marshall Date: Wed Apr 25 07:27:29 2018 New Revision: 330828 URL: http://llvm.org/viewvc/llvm-project?rev=330828&view=rev Log: Fix static initialization of std::atomic_flag; Fixes PR#37226. Thanks to Ricky Zhou for the report and test case. Modified: libcxx/trunk/include/atomic l

[PATCH] D46062: [clang-format] Start formatting cpp code in raw strings in google style

2018-04-25 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir created this revision. krasimir added a reviewer: klimek. Herald added a subscriber: cfe-commits. This adds some delimiters to detect cpp code in raw strings. Repository: rC Clang https://reviews.llvm.org/D46062 Files: lib/Format/Format.cpp Index: lib/Format/Format.cpp =

[PATCH] D46062: [clang-format] Start formatting cpp code in raw strings in google style

2018-04-25 Thread Manuel Klimek via Phabricator via cfe-commits
klimek accepted this revision. klimek added a comment. This revision is now accepted and ready to land. LG Repository: rC Clang https://reviews.llvm.org/D46062 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/

r330832 - [clang-format] Start formatting cpp code in raw strings in google style

2018-04-25 Thread Krasimir Georgiev via cfe-commits
Author: krasimir Date: Wed Apr 25 07:56:19 2018 New Revision: 330832 URL: http://llvm.org/viewvc/llvm-project?rev=330832&view=rev Log: [clang-format] Start formatting cpp code in raw strings in google style Summary: This adds some delimiters to detect cpp code in raw strings. Reviewers: klimek

[PATCH] D46062: [clang-format] Start formatting cpp code in raw strings in google style

2018-04-25 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC330832: [clang-format] Start formatting cpp code in raw strings in google style (authored by krasimir, committed by ). Changed prior to commit: https://reviews.llvm.org/D46062?vs=143931&id=143933#toc R

[PATCH] D46050: [Frontend] Avoid running plugins during code completion parse

2018-04-25 Thread John Brawn via Phabricator via cfe-commits
john.brawn added a comment. I know very little about how code completion works, but it's not immediately obvious to me that disabling plugin ast consumers when code completion is enabled is necessarily correct. In what kind of scenario would we both have a plugin loaded that wants to insert an

[PATCH] D44932: [CodeComplete] Fix completion in the middle of ident in ctor lists.

2018-04-25 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 143935. ilya-biryukov marked an inline comment as done. ilya-biryukov added a comment. - Fix the comment Repository: rC Clang https://reviews.llvm.org/D44932 Files: lib/Lex/Lexer.cpp test/CodeCompletion/ctor-initializer.cpp test/CodeCompletio

[PATCH] D46065: [clangd] Add "str()" method to SymbolID.

2018-04-25 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: ioeric. Herald added subscribers: jkorous, MaskRay, ilya-biryukov, klimek. This is a convenient function when we try to get std::string of SymbolID. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D46065 Files: clangd/globa

[PATCH] D46064: [llvm-objcopy] Add --localize-symbol option

2018-04-25 Thread Paul Semel via Phabricator via cfe-commits
paulsemel created this revision. paulsemel added reviewers: jakehehrlich, echristo. Herald added a subscriber: llvm-commits. This option permit to localize a symbol by given its name. Repository: rL LLVM https://reviews.llvm.org/D46064 Files: test/tools/llvm-objcopy/localize.test tools/l

[PATCH] D46015: [OpenCL] Add separate read_only and write_only pipe IR types

2018-04-25 Thread Stuart Brady via Phabricator via cfe-commits
stuart updated this revision to Diff 143938. stuart edited the summary of this revision. stuart added a comment. Changed new getPipeType() method to have protected visibility. Updated summary to explain the need for the extra builtin implementation functions. https://reviews.llvm.org/D46015 F

r330833 - [CodeComplete] Fix completion in the middle of ident in ctor lists.

2018-04-25 Thread Ilya Biryukov via cfe-commits
Author: ibiryukov Date: Wed Apr 25 08:13:34 2018 New Revision: 330833 URL: http://llvm.org/viewvc/llvm-project?rev=330833&view=rev Log: [CodeComplete] Fix completion in the middle of ident in ctor lists. Summary: The example that was broken before (^ designates completion points): class Foo

[PATCH] D44932: [CodeComplete] Fix completion in the middle of ident in ctor lists.

2018-04-25 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL330833: [CodeComplete] Fix completion in the middle of ident in ctor lists. (authored by ibiryukov, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org

[PATCH] D44932: [CodeComplete] Fix completion in the middle of ident in ctor lists.

2018-04-25 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC330833: [CodeComplete] Fix completion in the middle of ident in ctor lists. (authored by ibiryukov, committed by ). Changed prior to commit: https://reviews.llvm.org/D44932?vs=143935&id=143942#toc Repo

[PATCH] D46065: [clangd] Add "str()" method to SymbolID.

2018-04-25 Thread Eric Liu via Phabricator via cfe-commits
ioeric accepted this revision. ioeric added a comment. This revision is now accepted and ready to land. lgtm with a nit Comment at: clangd/index/Index.h:72 + // Returns a 40-bytes hex encoded string. + std::string str() const; I think Sam wants to reduce th

[PATCH] D46066: [analyzer] Add checker for underflowing unsigned integers

2018-04-25 Thread Paul Fultz II via Phabricator via cfe-commits
pfultz2 created this revision. pfultz2 added reviewers: NoQ, xazax.hun, dkrupp, whisperity, george.karpenkov. pfultz2 added a project: clang. Herald added subscribers: cfe-commits, a.sidorin, rnkovacs, szepet, mgorny. This will check for when assigning a negative value to an unsigned integer, whe

[PATCH] D46015: [OpenCL] Add separate read_only and write_only pipe IR types

2018-04-25 Thread Alexey Sotkin via Phabricator via cfe-commits
AlexeySotkin added a comment. There should not be need for bitcast. Could give an example ? Thanks. https://reviews.llvm.org/D46015 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D46015: [OpenCL] Add separate read_only and write_only pipe IR types

2018-04-25 Thread Stuart Brady via Phabricator via cfe-commits
stuart added a comment. In https://reviews.llvm.org/D46015#1077401, @AlexeySotkin wrote: > It is not clear why we need two versions of get_pipe_num_packets and > get_pipe_max_packets builtins. There is only one instruction per builtin in > the SPIR-V spec. I think splitting the IR type is enoug

[clang-tools-extra] r330835 - [clangd] Add "str()" method to SymbolID.

2018-04-25 Thread Haojian Wu via cfe-commits
Author: hokein Date: Wed Apr 25 08:27:09 2018 New Revision: 330835 URL: http://llvm.org/viewvc/llvm-project?rev=330835&view=rev Log: [clangd] Add "str()" method to SymbolID. Summary: This is a convenient function when we try to get std::string of SymbolID. Reviewers: ioeric Subscribers: klimek,

[PATCH] D46065: [clangd] Add "str()" method to SymbolID.

2018-04-25 Thread Haojian Wu via Phabricator via cfe-commits
hokein marked an inline comment as done. hokein added inline comments. Comment at: clangd/index/Index.h:72 + // Returns a 40-bytes hex encoded string. + std::string str() const; ioeric wrote: > I think Sam wants to reduce the size to 20 bytes. Maybe just drop

[PATCH] D46065: [clangd] Add "str()" method to SymbolID.

2018-04-25 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. hokein marked an inline comment as done. Closed by commit rL330835: [clangd] Add "str()" method to SymbolID. (authored by hokein, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://revie

[PATCH] D46000: [AST] Added a helper to extract a user-friendly text of a comment.

2018-04-25 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: lib/AST/RawCommentList.cpp:380 +SourceMgr.getSpellingColumnNumber(Tok.getLocation(), &LocInvalid); +if (LocInvalid) + TokColumn = 0; ilya-biryukov wrote: > ioeric wrote: > > Explain when this would

[PATCH] D46015: [OpenCL] Add separate read_only and write_only pipe IR types

2018-04-25 Thread Stuart Brady via Phabricator via cfe-commits
stuart added a comment. In https://reviews.llvm.org/D46015#1078217, @AlexeySotkin wrote: > There should not be need for bitcast. Could give an example ? Thanks. If I have a `write_only` pipe as the argument to `get_pipe_max_packets()`, and this uses a single `__get_pipe_num_packets()` function

[PATCH] D46066: [analyzer] Add checker for underflowing unsigned integers

2018-04-25 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. Isn't this case already covered by conversion checker? https://github.com/llvm-mirror/clang/blob/master/lib/StaticAnalyzer/Checkers/ConversionChecker.cpp Repository: rC Clang https://reviews.llvm.org/D46066 ___ cfe-com

[PATCH] D46015: [OpenCL] Add separate read_only and write_only pipe IR types

2018-04-25 Thread Alexey Sotkin via Phabricator via cfe-commits
AlexeySotkin added a comment. In https://reviews.llvm.org/D46015#1078235, @stuart wrote: > In https://reviews.llvm.org/D46015#1078217, @AlexeySotkin wrote: > > > There should not be need for bitcast. Could give an example ? Thanks. > > > If I have a `write_only` pipe as the argument to `get_pipe_

[libcxx] r330838 - Disable the test I just added when testing C++03.

2018-04-25 Thread Marshall Clow via cfe-commits
Author: marshall Date: Wed Apr 25 09:09:47 2018 New Revision: 330838 URL: http://llvm.org/viewvc/llvm-project?rev=330838&view=rev Log: Disable the test I just added when testing C++03. Modified: libcxx/trunk/test/libcxx/atomics/atomics.flag/init_bool.pass.cpp Modified: libcxx/trunk/test/libc

r330839 - Make add_clang_unittest formatting a bit more consistent.

2018-04-25 Thread Nico Weber via cfe-commits
Author: nico Date: Wed Apr 25 09:20:43 2018 New Revision: 330839 URL: http://llvm.org/viewvc/llvm-project?rev=330839&view=rev Log: Make add_clang_unittest formatting a bit more consistent. Modified: cfe/trunk/unittests/ASTMatchers/CMakeLists.txt cfe/trunk/unittests/ASTMatchers/Dynamic/CMa

[PATCH] D40937: [clang-tidy] Infinite loop checker

2018-04-25 Thread Peter Szecsi via Phabricator via cfe-commits
szepet updated this revision to Diff 143949. szepet marked 2 inline comments as done. szepet added a comment. Changes made based on comments. The CFG recreating problem is handled the following (only for this check): Always store the last visited function and its CFG* (in form of the Sequence*) a

[PATCH] D45722: [X86] Lowering SAD (sum of absolute differences) intrinsics to native IR (clang side)

2018-04-25 Thread Craig Topper via Phabricator via cfe-commits
craig.topper accepted this revision. craig.topper added a comment. This revision is now accepted and ready to land. LGTM https://reviews.llvm.org/D45722 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/li

[PATCH] D44387: [x86] Introduce the pconfig/encl[u|s|v] intrinsics

2018-04-25 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: lib/Headers/pconfigintrin.h:28 + +#ifndef _PCONFIGINTRIN_H +#define _PCONFIGINTRIN_H I think all our other headers use double underscore here. Comment at: lib/Headers/sgxintrin.h:28 + +#ifndef _SG

[PATCH] D46015: [OpenCL] Add separate read_only and write_only pipe IR types

2018-04-25 Thread Stuart Brady via Phabricator via cfe-commits
stuart added a comment. In https://reviews.llvm.org/D46015#1078260, @AlexeySotkin wrote: > In https://reviews.llvm.org/D46015#1078235, @stuart wrote: > > > In https://reviews.llvm.org/D46015#1078217, @AlexeySotkin wrote: > > > > > There should not be need for bitcast. Could give an example ? Than

r330842 - [Builtins] Fix typos in a comment. NFC

2018-04-25 Thread Craig Topper via cfe-commits
Author: ctopper Date: Wed Apr 25 09:57:46 2018 New Revision: 330842 URL: http://llvm.org/viewvc/llvm-project?rev=330842&view=rev Log: [Builtins] Fix typos in a comment. NFC Modified: cfe/trunk/include/clang/Basic/Builtins.h Modified: cfe/trunk/include/clang/Basic/Builtins.h URL: http://llvm

[PATCH] D46019: [ASTImporter] Fix isa cast assert

2018-04-25 Thread Peter Szecsi via Phabricator via cfe-commits
szepet accepted this revision. szepet added a comment. Yepp, pretty straightforward check for something we were not aware previously (but unfortunately encountered it). Repository: rC Clang https://reviews.llvm.org/D46019 ___ cfe-commits mailing

[PATCH] D46066: [analyzer] Add checker for underflowing unsigned integers

2018-04-25 Thread Paul Fultz II via Phabricator via cfe-commits
pfultz2 added a comment. > Isn't this case already covered by conversion checker? I was unaware of this. This looks like it only works for binary operators. So `f(-1)` won't get caught. Repository: rC Clang https://reviews.llvm.org/D46066 ___ c

[PATCH] D46022: [OpenCL] Restrict various keywords in OpenCL C++ mode

2018-04-25 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh updated this revision to Diff 143951. svenvh edited the summary of this revision. svenvh added a comment. Implemented most of the restrictions as parser or Sema checks instead. This results in nicer diagnostics too, thanks for the suggestion! For the address space qualifiers such as glob

Re: r329804 - [Sema] Fix built-in decrement operator overload resolution

2018-04-25 Thread Richard Smith via cfe-commits
On 12 April 2018 at 07:20, Jan Korous via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Hi Richard, > > Here you are: > https://reviews.llvm.org/D45569 > > I am now thinking if it makes sense to output this warning for pre-17 > standards: > > warning: incrementing expression of type bool is d

[PATCH] D45416: [analyzer] ExprEngine: model GCC inline asm rvalue cast outputs

2018-04-25 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin updated this revision to Diff 143959. a.sidorin added a comment. Add a test for CFG dump; replace static_cast with an initialization. No test failures on check-all were observed. Repository: rC Clang https://reviews.llvm.org/D45416 Files: include/clang/Analysis/CFG.h lib/Analys

r330847 - [ASTImporter] FriendDecl importing improvements

2018-04-25 Thread Peter Szecsi via cfe-commits
Author: szepet Date: Wed Apr 25 10:28:03 2018 New Revision: 330847 URL: http://llvm.org/viewvc/llvm-project?rev=330847&view=rev Log: [ASTImporter] FriendDecl importing improvements There are only a few cases of importing a frienddecl which is currently supported. This patch aims to improve the f

[libclc] r330851 - relational/select: Condition types for half are short/ushort, not char/uchar

2018-04-25 Thread Jan Vesely via cfe-commits
Author: jvesely Date: Wed Apr 25 10:36:36 2018 New Revision: 330851 URL: http://llvm.org/viewvc/llvm-project?rev=330851&view=rev Log: relational/select: Condition types for half are short/ushort, not char/uchar Signed-off-by: Jan Vesely Reviewed-by: Aaron Watry Modified: libclc/trunk/gener

  1   2   >