[PATCH] D40259: [libcxx] LWG2993: reference_wrapper conversion from T&

2018-01-30 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists accepted this revision. mclow.lists added a comment. Please be sure to update www/cxx2a_status.html to mark 2993 as "Complete". Other than that, looks good to me! Thanks! https://reviews.llvm.org/D40259 ___ cfe-commits mailing list

[PATCH] D41318: Start setting dso_local in clang

2018-01-30 Thread Sean Fertile via Phabricator via cfe-commits
sfertile added a comment. Sorry, I missed that you wanted this reviewed again, I'll make sure to review it today. https://reviews.llvm.org/D41318 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang-tools-extra] r323722 - add prefix with '_' support for property name. Corresponding apple dev doc: https://developer.apple.com/library/content/qa/qa1908/_index.html

2018-01-30 Thread Yan Zhang via cfe-commits
Author: wizard Date: Mon Jan 29 17:44:00 2018 New Revision: 323722 URL: http://llvm.org/viewvc/llvm-project?rev=323722=rev Log: add prefix with '_' support for property name. Corresponding apple dev doc: https://developer.apple.com/library/content/qa/qa1908/_index.html Reviewers: benhamilton,

[clang-tools-extra] r323765 - [clang-tidy] Use a more specific regex

2018-01-30 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Tue Jan 30 06:55:39 2018 New Revision: 323765 URL: http://llvm.org/viewvc/llvm-project?rev=323765=rev Log: [clang-tidy] Use a more specific regex Modified: clang-tools-extra/trunk/clang-tidy/rename_check.py Modified: clang-tools-extra/trunk/clang-tidy/rename_check.py

[clang-tools-extra] r323766 - clang-tidy/rename_check.py misc-string-compare readability-string-compare

2018-01-30 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Tue Jan 30 06:55:50 2018 New Revision: 323766 URL: http://llvm.org/viewvc/llvm-project?rev=323766=rev Log: clang-tidy/rename_check.py misc-string-compare readability-string-compare Added: clang-tools-extra/trunk/clang-tidy/readability/StringCompareCheck.cpp -

[clang-tools-extra] r323768 - clang-tidy/rename_check.py misc-incorrect-roundings bugprone-incorrect-roundings

2018-01-30 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Tue Jan 30 07:12:24 2018 New Revision: 323768 URL: http://llvm.org/viewvc/llvm-project?rev=323768=rev Log: clang-tidy/rename_check.py misc-incorrect-roundings bugprone-incorrect-roundings More specifically, clang-tidy/rename_check.py misc-incorrect-roundings \

[PATCH] D42685: [clang-format] Adds space around braces in text protos

2018-01-30 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. Looks good. Repository: rC Clang https://reviews.llvm.org/D42685 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D42685: [clang-format] Adds space around braces in text protos

2018-01-30 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir created this revision. krasimir added a reviewer: djasper. Herald added subscribers: cfe-commits, klimek. This patch modifies the text proto Google style to add spaces around braces. I investigated using something different than Cpp11BracedListStyle, but it turns out it's what we want

[PATCH] D26418: [clang-tidy] Add '-suppress-checks-filter' option to suppress diagnostics from certain files

2018-01-30 Thread Andrew Peter Marlow via Phabricator via cfe-commits
marlowa added a comment. In https://reviews.llvm.org/D26418#653146, @nkakuev wrote: > Ping. another ping. I am desperate for this enhancement and am really glad that nkakuev has done all the hard development work. I am currently being nobbled in my use of clang-tidy because the project is

[PATCH] D42642: [CUDA] Detect installation in PATH

2018-01-30 Thread Jonas Hahnfeld via Phabricator via cfe-commits
Hahnfeld added a comment. In https://reviews.llvm.org/D42642#991154, @tra wrote: > In https://reviews.llvm.org/D42642#991127, @Hahnfeld wrote: > > > In https://reviews.llvm.org/D42642#990976, @tra wrote: > > > > > Some linux distributions integrate CUDA into the standard directory > > >

[PATCH] D42642: [CUDA] Detect installation in PATH

2018-01-30 Thread Jonas Hahnfeld via Phabricator via cfe-commits
Hahnfeld updated this revision to Diff 131963. Hahnfeld added a comment. Check for `libdevice` in candidates from `PATH`. https://reviews.llvm.org/D42642 Files: include/clang/Driver/Options.td lib/Driver/ToolChains/Cuda.cpp test/Driver/Inputs/CUDA-nolibdevice/usr/local/cuda/bin/ptxas

[PATCH] D42642: [CUDA] Detect installation in PATH

2018-01-30 Thread Jonas Hahnfeld via Phabricator via cfe-commits
Hahnfeld added inline comments. Comment at: lib/Driver/ToolChains/Cuda.cpp:206 // -nocudalib hasn't been specified. -if (LibDeviceMap.empty() && !Args.hasArg(options::OPT_nocudalib)) +if (CheckLibDevice && LibDeviceMap.empty()) continue; tra

[PATCH] D42680: [ThinLTO] Ignore -fthinlto-index= for non-ThinLTO files

2018-01-30 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson added a comment. In https://reviews.llvm.org/D42680#991938, @pcc wrote: > This doesn't seem right to me. In a mixed full/thin LTO link the full LTO > module would be compiled during the indexing phase. We don't want to compile > it again in the backend as it could lead at best to

[PATCH] D41698: [DebugInfo] Enable debug information for C99 VLA types

2018-01-30 Thread Adrian Prantl via Phabricator via cfe-commits
aprantl added inline comments. Comment at: lib/CodeGen/CGDecl.cpp:990 + D.getLocation(), D.getLocation(), , QT, + getContext().CreateTypeSourceInfo(QT), SC_Auto); + sdesmalen wrote: > aprantl wrote: > > I think it does, but can you assert me

[PATCH] D42682: [clang-tidy] Add misc-io-functions-misused checker

2018-01-30 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. May be //bugprone// is better module then //misc//? Comment at: docs/ReleaseNotes.rst:63 + + Check if the fgetwc, getwc, getwchar, istream::get standard iostream C functions + return values incorrectly stored in char type value.

[PATCH] D42680: [ThinLTO] Ignore -fthinlto-index= for non-ThinLTO files

2018-01-30 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson accepted this revision. tejohnson added a comment. This revision is now accepted and ready to land. LGTM (minor comment fix in test needed) Comment at: clang/test/CodeGen/thinlto_backend.ll:23 +; Ensure we don't fail with index and non-ThinLTO object file, and run

[PATCH] D42581: [NVPTX] Emit debug info in DWARF-2 by default for Cuda devices.

2018-01-30 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/Driver/ToolChains/Cuda.cpp:353 CmdArgs.push_back(Args.MakeArgString(Output.getFilename())); + if (mustEmitDebugInfo(Args) && Args.hasArg(options::OPT_g_Flag)) +CmdArgs.push_back("-g"); tra wrote: > ABataev

[PATCH] D42673: [RISCV] Pick the correct RISCV linker instead of calling riscv-gcc to link

2018-01-30 Thread Alex Bradbury via Phabricator via cfe-commits
asb added a comment. My main concern with this patch is that the description doesn't really match what it does. The current in-tree code _doesn't_ call gcc to link for the tested configuration (a multilib toolchain), and this is verified with the tests in test/Driver/riscv32-toolchain.c.

[PATCH] D42680: [ThinLTO] Ignore -fthinlto-index= for non-ThinLTO files

2018-01-30 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc requested changes to this revision. pcc added a comment. This revision now requires changes to proceed. This doesn't seem right to me. In a mixed full/thin LTO link the full LTO module would be compiled during the indexing phase. We don't want to compile it again in the backend as it could

[PATCH] D41698: [DebugInfo] Enable debug information for C99 VLA types

2018-01-30 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen updated this revision to Diff 131990. sdesmalen marked 4 inline comments as done. sdesmalen added a comment. Herald added a subscriber: jholewinski. - Changed return type of getVLASize() to a struct with named members. - EmitDeclare and EmitDeclareOfAutoVariable now return a

[PATCH] D41698: [DebugInfo] Enable debug information for C99 VLA types

2018-01-30 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added inline comments. Comment at: lib/CodeGen/CGDebugInfo.h:474 + CGBuilderTy , + llvm::Metadata **MetadataDecl = nullptr); aprantl wrote: > same here. Why not just use a return value? Initially I thought it would

[PATCH] D42693: [libcxx] Handle invalid escaped characters in POSIX regex

2018-01-30 Thread Mikhail Maltsev via Phabricator via cfe-commits
miyuki created this revision. miyuki added reviewers: EricWF, mclow.lists. Currently when parsing basic POSIX regular expressions libc++ silently skips invalid escaped characters and trailing escapes. This patch changes the behavior, so that a std::regex_error with code set to error_escape is

[PATCH] D42642: [CUDA] Detect installation in PATH

2018-01-30 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. I've thought a bit more about this and there's another quirk -- symlinks. What if we've found /usr/bin/ptxas and is a symlink pointing to the real ptxas in the CUDA installation? If we add /usr to the list of candidates it will not help us at all. We should probably find

[clang-tools-extra] r323792 - [clangd] Trace code completion.

2018-01-30 Thread Sam McCall via cfe-commits
Author: sammccall Date: Tue Jan 30 09:20:54 2018 New Revision: 323792 URL: http://llvm.org/viewvc/llvm-project?rev=323792=rev Log: [clangd] Trace code completion. Context passing is a little messy, but will go away with TLS soon. Modified: clang-tools-extra/trunk/clangd/CodeComplete.cpp

[PATCH] D42642: [CUDA] Detect installation in PATH

2018-01-30 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: lib/Driver/ToolChains/Cuda.cpp:206 // -nocudalib hasn't been specified. -if (LibDeviceMap.empty() && !Args.hasArg(options::OPT_nocudalib)) +if (CheckLibDevice && LibDeviceMap.empty()) continue; I think

[PATCH] D42684: clang-format: Allow optimizer to break template declaration.

2018-01-30 Thread Francois Ferrand via Phabricator via cfe-commits
Typz created this revision. Typz added reviewers: krasimir, djasper, klimek. Introduce ``PenaltyBreakTemplateDeclaration`` to control the penalty, and change ``AlwaysBreakTemplateDeclarations`` to an enum with 3 modes: - ``None`` for automatic (e.g. penalty based) wrapping of template

[PATCH] D42684: clang-format: Allow optimizer to break template declaration.

2018-01-30 Thread Francois Ferrand via Phabricator via cfe-commits
Typz updated this revision to Diff 131946. Typz added a comment. fix commit message Repository: rC Clang https://reviews.llvm.org/D42684 Files: include/clang/Format/Format.h lib/Format/ContinuationIndenter.cpp lib/Format/Format.cpp lib/Format/TokenAnnotator.cpp

[PATCH] D42170: Fixit for 'typedef' instead of 'typename' typo

2018-01-30 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added inline comments. Comment at: FixIt/fixit-typedef-instead-of-typename-typo.cpp:14 +// CHECK: expected-error@-6 {{unknown type name 'a'}} +// CHECK: expected-error@-6 {{expected member name or ';' after declaration specifiers}} You don't need `//

[PATCH] D42581: [NVPTX] Emit debug info in DWARF-2 by default for Cuda devices.

2018-01-30 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In https://reviews.llvm.org/D42581#989760, @probinson wrote: > If you want to force DWARF 2, probably clamping the version in LLVM would be > simpler? Although most of the debug-info tests are architecture-specific and > wouldn't run for an NVPTX target anyway. Hi,

Re: r323360 - [Hexagon] Accept lowercase b in -hvx-length=64b and -hvx-length=128b

2018-01-30 Thread Hans Wennborg via cfe-commits
Merged to 6.0 in r323769. On Wed, Jan 24, 2018 at 7:42 PM, Krzysztof Parzyszek via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: kparzysz > Date: Wed Jan 24 10:42:19 2018 > New Revision: 323360 > > URL: http://llvm.org/viewvc/llvm-project?rev=323360=rev > Log: > [Hexagon] Accept

[PATCH] D41102: Setup clang-doc frontend framework

2018-01-30 Thread Julie Hockett via Phabricator via cfe-commits
juliehockett updated this revision to Diff 132075. juliehockett edited the summary of this revision. juliehockett added a reviewer: jakehehrlich. juliehockett added a comment. 1. Updating and expanding tests 2. Updating output options (can now write to files) 3. Cleaning up pointers and whatnot

[PATCH] D42719: [CFG] [analyzer] Add construction context when constructor is wrapped into ExprWithCleanups.

2018-01-30 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ created this revision. NoQ added reviewers: rsmith, dcoughlin, xazax.hun, a.sidorin, george.karpenkov, szepet. Herald added subscribers: cfe-commits, rnkovacs. As an improvement over https://reviews.llvm.org/D42699 and https://reviews.llvm.org/D42700, this unwraps `ExprWithCleanups`

[PATCH] D42560: [analyzer] dump() ExprEngine's internal traits into the ExplodedGraph view.

2018-01-30 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 132010. NoQ added a comment. Address comments :) https://reviews.llvm.org/D42560 Files: include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h include/clang/StaticAnalyzer/Core/PathSensitive/SubEngine.h lib/StaticAnalyzer/Core/ExprEngine.cpp

[PATCH] D42581: [NVPTX] Emit debug info in DWARF-2 by default for Cuda devices.

2018-01-30 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev updated this revision to Diff 132016. ABataev added a comment. 1. Updated after review. 2. Changed the default behavior of --[no]cuda-noopt-device-debug. If the optimization level is not specified or is O0 and debug info must be emitted, the device debug info is emitted. If optimization

[PATCH] D42560: [analyzer] dump() ExprEngine's internal traits into the ExplodedGraph view.

2018-01-30 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov added a comment. looks good otherwise. Comment at: lib/StaticAnalyzer/Core/ExprEngine.cpp:418 + for (auto I : NewAllocValsMap) { + std::pair Key = I.first; + SVal Value = I.second; indent? actually, an even better

[PATCH] D42560: [analyzer] dump() ExprEngine's internal traits into the ExplodedGraph view.

2018-01-30 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov accepted this revision. george.karpenkov added a comment. This revision is now accepted and ready to land. But that's all bikeshedding though https://reviews.llvm.org/D42560 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

Re: r294872 - CodeGen: annotate ObjC ARC functions with ABI constraints

2018-01-30 Thread Akira Hatanaka via cfe-commits
Hi Saleem, I had to revert this patch since this patch caused crashes in code that was working fine before. As I mentioned in the commit message, I believe this patch is correct, but it causes the objc_retainAutoreleasedReturnValue/objc_autoreleaseReturnValue handshake to fail in some cases

[PATCH] D42645: New simple Checker for mmap calls

2018-01-30 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ edited reviewers, added: NoQ; removed: dergachev.a. NoQ added a comment. Actually, most of our `security` package is off by default (in the driver) for that very reason, so please never mind and just keep it in `security` :) You can also put the checker straight into `security` bypassing

[PATCH] D42560: [analyzer] dump() ExprEngine's internal traits into the ExplodedGraph view.

2018-01-30 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin added a comment. More debug info is always good. Comment at: lib/StaticAnalyzer/Core/ExprEngine.cpp:400 +Out << '(' << I.second << ',' << I.first << ") "; +I.first->printPretty(Out, nullptr, PrintingPolicy(LO)); +Out << NL;

[PATCH] D38943: [ASTImporter] import SubStmt of CaseStmt

2018-01-30 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin added inline comments. Herald added subscribers: llvm-commits, rnkovacs. Comment at: cfe/trunk/unittests/AST/ASTImporterTest.cpp:100 + // This traverses the AST to catch certain bugs like poorly or not + // implemented subtrees. I just saw this

[PATCH] D42693: [libcxx] Handle invalid escaped characters in POSIX regex

2018-01-30 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone added inline comments. Comment at: include/regex:3465 +case '{': +case '}': +break; FWIW, I don't understand what's going on in this switch. Is it intentional that `'('` and `'|'` now take different paths here?

[PATCH] D42581: [NVPTX] Emit debug info in DWARF-2 by default for Cuda devices.

2018-01-30 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: lib/Driver/ToolChains/Cuda.cpp:436-437 assert(Output.isNothing() && "Invalid output."); - if (Args.hasArg(options::OPT_g_Flag)) + if (mustEmitDebugInfo(Args) == FullDebug) CmdArgs.push_back("-g"); Do we need

r323814 - Revert "CodeGen: annotate ObjC ARC functions with ABI constraints"

2018-01-30 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Tue Jan 30 12:19:34 2018 New Revision: 323814 URL: http://llvm.org/viewvc/llvm-project?rev=323814=rev Log: Revert "CodeGen: annotate ObjC ARC functions with ABI constraints" This reverts commit r294872. Although this patch is correct, it caused the

[PATCH] D42642: [CUDA] Detect installation in PATH

2018-01-30 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: lib/Driver/ToolChains/Cuda.cpp:96-105 + if (llvm::ErrorOr ptxas = + llvm::sys::findProgramByName("ptxas")) { +SmallString<256> ptxasAbsolutePath; +llvm::sys::fs::real_path(*ptxas, ptxasAbsolutePath); + +

[PATCH] D42645: New simple Checker for mmap calls

2018-01-30 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. > `// It's somehow an optional checker since for example in JIT libraries it is > pretty common.` Dunno, it seems that most of our security checks are something like that, and i'm not sure how to deal with it. This one sounds like it would probably go to some sort of

[PATCH] D42693: [libcxx] Handle invalid escaped characters in POSIX regex

2018-01-30 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. I like this. One nit and a question. Comment at: include/regex:3490 { switch (*__temp) { Do we need any more cases here? Comment at:

[PATCH] D42642: [CUDA] Detect installation in PATH

2018-01-30 Thread Jonas Hahnfeld via Phabricator via cfe-commits
Hahnfeld added a comment. In https://reviews.llvm.org/D42642#992137, @tra wrote: > I've thought a bit more about this and there's another quirk -- symlinks. > > What if we've found /usr/bin/ptxas and is a symlink pointing to the real > ptxas in the CUDA installation? If we add /usr to the list

[PATCH] D42645: New simple Checker for mmap calls

2018-01-30 Thread David CARLIER via Phabricator via cfe-commits
devnexen updated this revision to Diff 132024. Repository: rC Clang https://reviews.llvm.org/D42645 Files: include/clang/StaticAnalyzer/Checkers/Checkers.td lib/StaticAnalyzer/Checkers/CMakeLists.txt lib/StaticAnalyzer/Checkers/MmapWriteExecChecker.cpp Index:

[PATCH] D42642: [CUDA] Detect installation in PATH

2018-01-30 Thread Jonas Hahnfeld via Phabricator via cfe-commits
Hahnfeld updated this revision to Diff 132029. Hahnfeld added a comment. Follow symlinked `ptxas` executables. https://reviews.llvm.org/D42642 Files: include/clang/Driver/Options.td lib/Driver/ToolChains/Cuda.cpp test/Driver/Inputs/CUDA-nolibdevice/usr/local/cuda/bin/ptxas

[PATCH] D42704: [clang-format] Do not break Objective-C string literals inside array literals

2018-01-30 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton created this revision. benhamilton added reviewers: jolesiak, stephanemoore, djasper. Herald added subscribers: cfe-commits, klimek. Concatenating Objective-C string literals inside an array literal raises the warning -Wobjc-string-concatenation (which is enabled by default).

[PATCH] D42660: [PR32482] Fix bitfield layout for -mms-bitfield and pragma pack

2018-01-30 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. Oops, that logic turned out to be incorrect. We simply have to start a new storage unit when the new bitfield's size is wider than the available bits. Repository: rL LLVM https://reviews.llvm.org/D42660 ___ cfe-commits

[PATCH] D42660: [PR32482] Fix bitfield layout for -mms-bitfield and pragma pack

2018-01-30 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman updated this revision to Diff 132034. arphaman added a comment. Herald added a subscriber: llvm-commits. Fix packing logic. Repository: rL LLVM https://reviews.llvm.org/D42660 Files: lib/AST/RecordLayoutBuilder.cpp test/CodeGen/mms-bitfields.c test/Sema/mms-bitfields.c

[PATCH] D42361: [Tooling] Returns non-zero status code when files are skipped.

2018-01-30 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: lib/Tooling/Tooling.cpp:404 if (CompileCommandsForFile.empty()) { // FIXME: There are two use cases here: doing a fuzzy // "find . -name '*.cc' |xargs tool" match, where as a user I don't care bkramer

[PATCH] D42669: [clangd] Enable completion index by default, limit results to 100.

2018-01-30 Thread Eric Liu via Phabricator via cfe-commits
ioeric accepted this revision. ioeric added a comment. Woohoo! Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D42669 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] r323734 - [clangd] Enable completion index by default, limit results to 100.

2018-01-30 Thread Sam McCall via cfe-commits
Author: sammccall Date: Tue Jan 30 01:21:30 2018 New Revision: 323734 URL: http://llvm.org/viewvc/llvm-project?rev=323734=rev Log: [clangd] Enable completion index by default, limit results to 100. Summary: This should speed up global code completion by avoiding deserializing preamble

[PATCH] D42669: [clangd] Enable completion index by default, limit results to 100.

2018-01-30 Thread Sam McCall via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL323734: [clangd] Enable completion index by default, limit results to 100. (authored by sammccall, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM

[PATCH] D42672: [CFG] [analyzer] Heavier CFGConstructor elements.

2018-01-30 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 132053. NoQ added a comment. Remove the stack of contexts for now. We're not using it anywhere yet, and i'm not sure if it'd be necessary. https://reviews.llvm.org/D42672 Files: include/clang/Analysis/AnalysisDeclContext.h include/clang/Analysis/CFG.h

[libcxx] r323822 - Add LWG3051

2018-01-30 Thread Marshall Clow via cfe-commits
Author: marshall Date: Tue Jan 30 13:49:17 2018 New Revision: 323822 URL: http://llvm.org/viewvc/llvm-project?rev=323822=rev Log: Add LWG3051 Modified: libcxx/trunk/www/upcoming_meeting.html Modified: libcxx/trunk/www/upcoming_meeting.html URL:

[PATCH] D16403: Add scope information to CFG

2018-01-30 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. @szepet: so i see that `LoopExit` goes in the beginning of the cleanup block after the loop, while various `ScopeEnd`s go after the `LoopExit`. Would loop unrolling be significantly broken if you simply subscribe to `ScopeEnd` instead of `LoopExit` and avoid cleaning up

[PATCH] D16403: Add scope information to CFG

2018-01-30 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Thank you, this explanation looks very reasonable. All right, so right after the termination of the loop we have [B1] 1: ForStmt (LoopExit) 2: [B4.5].~A() (Implicit destructor) 3: [B5.3].~A() (Implicit destructor) 4: CFGScopeEnd(a) 5: CFGScopeEnd(b) ... where

[PATCH] D42642: [CUDA] Detect installation in PATH

2018-01-30 Thread Artem Belevich via Phabricator via cfe-commits
tra accepted this revision. tra added a comment. LGTM. Comment at: lib/Driver/ToolChains/Cuda.cpp:96-105 + if (llvm::ErrorOr ptxas = + llvm::sys::findProgramByName("ptxas")) { +SmallString<256> ptxasAbsolutePath; +

[PATCH] D42560: [analyzer] dump() ExprEngine's internal traits into the ExplodedGraph view.

2018-01-30 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 132042. NoQ marked 2 inline comments as done. NoQ added a comment. > More debug info is always good. I know, right?^^ > But that's all bikeshedding though Well, it's great for me because i'd finally learn how to write programs :)

[PATCH] D42560: [analyzer] dump() ExprEngine's internal traits into the ExplodedGraph view.

2018-01-30 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: lib/StaticAnalyzer/Core/ExprEngine.cpp:400 +Out << '(' << I.second << ',' << I.first << ") "; +I.first->printPretty(Out, nullptr, PrintingPolicy(LO)); +Out << NL; a.sidorin wrote: > Why

[PATCH] D42650: [clang-format] New format param BinPackObjCProtocolList

2018-01-30 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton updated this revision to Diff 132046. benhamilton added a comment. Move Google style changes out. Use clearer name for local variable. Repository: rC Clang https://reviews.llvm.org/D42650 Files: include/clang/Format/Format.h lib/Format/ContinuationIndenter.cpp

[PATCH] D42650: [clang-format] New format param BinPackObjCProtocolList

2018-01-30 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton marked 3 inline comments as done. benhamilton added a comment. Thanks for the review! Comment at: lib/Format/Format.cpp:765 GoogleStyle.ColumnLimit = 100; +GoogleStyle.BinPackObjCProtocolList = FormatStyle::BPS_Never; } stephanemoore

[PATCH] D42708: [clang-format] Set BinPackObjCProtocolList to Never for google style

2018-01-30 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton created this revision. benhamilton added reviewers: krasimir, jolesiak, stephanemoore. This is split off from https://reviews.llvm.org/D42650, and sets BinPackObjCProtocolList to Never for the google style. Depends On https://reviews.llvm.org/D42650 Test Plan: New tests added. make

r323827 - [analyzer] Extend SuppressInlineDefensiveChecksVisitor to all macros, including non-function-like ones

2018-01-30 Thread George Karpenkov via cfe-commits
Author: george.karpenkov Date: Tue Jan 30 14:58:06 2018 New Revision: 323827 URL: http://llvm.org/viewvc/llvm-project?rev=323827=rev Log: [analyzer] Extend SuppressInlineDefensiveChecksVisitor to all macros, including non-function-like ones No reason to treat function-like macros differently

[PATCH] D42444: [analyzer] Extend SuppressInlineDefensiveChecksVisitor to all macros, including non-function-like ones

2018-01-30 Thread George Karpenkov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC323827: [analyzer] Extend SuppressInlineDefensiveChecksVisitor to all macros, including… (authored by george.karpenkov, committed by ). Herald added a subscriber: cfe-commits. Repository: rC Clang

[PATCH] D42642: [CUDA] Detect installation in PATH

2018-01-30 Thread Jonas Hahnfeld via Phabricator via cfe-commits
Hahnfeld marked 5 inline comments as done. Hahnfeld added a subscriber: sylvestre.ledru. Hahnfeld added inline comments. Comment at: lib/Driver/ToolChains/Cuda.cpp:96-105 + if (llvm::ErrorOr ptxas = + llvm::sys::findProgramByName("ptxas")) { +

[PATCH] D42650: [clang-format] New format param BinPackObjCProtocolList

2018-01-30 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore requested changes to this revision. stephanemoore added inline comments. This revision now requires changes to proceed. Comment at: lib/Format/ContinuationIndenter.cpp:1232 + +bool BinPackParameters = +(State.Line->Type != LT_ObjCDecl &&

[PATCH] D42641: [MinGW] Emit typeinfo locally for dllimported classes without key functions

2018-01-30 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo updated this revision to Diff 132045. mstorsjo added a comment. Adjusted the fix by moving the change into ShouldUseExternalRTTIDescriptor - this causes less changes to other tests. @majnemer - do you think this is better or worse than having the fix in isVTableExternal?

[PATCH] D42645: New simple Checker for mmap calls

2018-01-30 Thread David CARLIER via Phabricator via cfe-commits
devnexen updated this revision to Diff 132054. Repository: rC Clang https://reviews.llvm.org/D42645 Files: include/clang/StaticAnalyzer/Checkers/Checkers.td lib/StaticAnalyzer/Checkers/CMakeLists.txt lib/StaticAnalyzer/Checkers/MmapWriteExecChecker.cpp Index:

[PATCH] D42174: [clangd] Refactored threading in ClangdServer

2018-01-30 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. Ship it! Comment at: clangd/ClangdServer.cpp:37 +template +Ret waitForASTAction(Scheduler , PathRef File, Func &) { + std::packaged_task Task(

[PATCH] D41102: Setup clang-doc frontend framework

2018-01-30 Thread Jake Ehrlich via Phabricator via cfe-commits
jakehehrlich added inline comments. Comment at: tools/clang-doc/ClangDocReporter.cpp:55 +Docs.Namespaces[Name] = std::move(I); +populateBasicInfo(*Docs.Namespaces[Name], Name, D->getNameAsString(), + getParentNamespace(D)); If you

[PATCH] D42660: [PR32482] Fix bitfield layout for -mms-bitfield and pragma pack

2018-01-30 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added a comment. This revision is now accepted and ready to land. Oh, that makes much more sense, thanks. Repository: rL LLVM https://reviews.llvm.org/D42660 ___ cfe-commits mailing list

[PATCH] D42174: [clangd] Refactored threading in ClangdServer

2018-01-30 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 132100. ilya-biryukov added a comment. - Properly ignore errors. - Run all requests to completion when destroying ThreadPool. - Added simple tests for TUScheduler. - Fixed include guards. Repository: rCTE Clang Tools Extra

[PATCH] D42174: [clangd] Refactored threading in ClangdServer

2018-01-30 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov marked 2 inline comments as done. ilya-biryukov added a comment. All comments should be addressed now. Let me know if I missed anything else. Comment at: clangd/threading/TUScheduler.h:1 +//===--- TUScheduler.h

[PATCH] D41102: Setup clang-doc frontend framework

2018-01-30 Thread Jake Ehrlich via Phabricator via cfe-commits
jakehehrlich added a comment. If its possible to split VisitEnumDecl, and VisitRecordDecl into separate methods and the same is possible for VisitFunctionDecl and VisitCXXMethodDecl then I think all of your methods will look like the following VisitNamespaceDecl. That being the case you might

[PATCH] D41102: Setup clang-doc frontend framework

2018-01-30 Thread Jake Ehrlich via Phabricator via cfe-commits
jakehehrlich added inline comments. Comment at: tools/clang-doc/ClangDocReporter.cpp:53-54 + if (Pair == Docs.Namespaces.end()) { +std::unique_ptr I = make_unique(); +Docs.Namespaces[Name] = std::move(I); +populateBasicInfo(*Docs.Namespaces[Name], Name,

[PATCH] D42721: [analyzer] NFC: Use construction contexts for finding the target region for the construction.

2018-01-30 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. NoQ added a dependency: D42719: [CFG] [analyzer] Add construction context when constructor is wrapped into ExprWithCleanups.. Previously, we

[PATCH] D42719: [CFG] [analyzer] Add construction context when constructor is wrapped into ExprWithCleanups.

2018-01-30 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. > With this change, we're fully ready to make use of construction contexts in > the analyzer (in the next patch). The next patch is https://reviews.llvm.org/D42721. Repository: rC Clang https://reviews.llvm.org/D42719 ___

Re: r294872 - CodeGen: annotate ObjC ARC functions with ABI constraints

2018-01-30 Thread Saleem Abdulrasool via cfe-commits
Thanks for the note here. I’ll try to take a look at that, but, yes, the frontend change itself is correct. I’ve seen many, many places where the ObjCARC passes break down in the backend, and I’ve filed a few bugs on it in the hope that someone from Apple would take a look at some point. I’m

Re: [PATCH] D26418: [clang-tidy] Add '-suppress-checks-filter' option to suppress diagnostics from certain files

2018-01-30 Thread P F via cfe-commits
> On Jan 30, 2018, at 7:50 AM, Andrew Peter Marlow via Phabricator via > cfe-commits wrote: > > marlowa added a comment. > > In https://reviews.llvm.org/D26418#653146, @nkakuev wrote: > >> Ping. > > > another ping. I am desperate for this enhancement and am

[PATCH] D41316: [libcxx] Allow random_device to be built optionally

2018-01-30 Thread Weiming Zhao via Phabricator via cfe-commits
weimingz updated this revision to Diff 132089. weimingz added a comment. Herald added a subscriber: hintonda. Disable tests that depend on random_device. filesystem tests rely on random_device as seed to create random path. Although it's possible to avoid the random_device but if the build

[PATCH] D42725: IRGen: Move vtable load after argument evaluation.

2018-01-30 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc created this revision. pcc added reviewers: vlad.tsyrklevich, rsmith. This change reduces the live range of the loaded function pointer, resulting in a slight code size decrease (~10KB in clang), and also improves the security of CFI for virtual calls by making it less likely that the

[PATCH] D37831: [WebAssembly] Don't pass -ffunction-section/-fdata-sections by default

2018-01-30 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 updated this revision to Diff 132098. sbc100 added a comment. Herald added subscribers: cfe-commits, sunfish. - update tests Repository: rC Clang https://reviews.llvm.org/D37831 Files: lib/Driver/ToolChains/CommonArgs.cpp test/Driver/wasm-toolchain.c

[PATCH] D37831: [WebAssembly] Don't pass -ffunction-section/-fdata-sections

2018-01-30 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added a comment. After a little discussion about this and the -gc-sections linker flag, the augments for the tools having sensible defaults seem to be winning. This means we don't need the driver to pass these options, which makes our commands lines shorter, and it also means that

[PATCH] D42174: [clangd] Refactored threading in ClangdServer

2018-01-30 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Can you please remove the `threading/` subdirectory? It seems premature for these two files, and `TUScheduler` doesn't fit. It's unclear that there will be more. I'd suggest renaming `Threadpool.h` -> `Threading.h`, CancellationFlag might fit in there, though up to

Re: r322245 - [X86] Make -mavx512f imply -mfma and -mf16c in the frontend like it does in the backend.

2018-01-30 Thread Hans Wennborg via cfe-commits
Merged to 6.0 in r323741. On Thu, Jan 11, 2018 at 2:37 AM, Craig Topper via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: ctopper > Date: Wed Jan 10 17:37:59 2018 > New Revision: 322245 > > URL: http://llvm.org/viewvc/llvm-project?rev=322245=rev > Log: > [X86] Make -mavx512f imply

Re: r323485 - [Driver] Add an -fexperimental-isel driver option to enable/disable GlobalISel.

2018-01-30 Thread Hans Wennborg via cfe-commits
Merged in r323745. On Mon, Jan 29, 2018 at 10:46 PM, Amara Emerson wrote: > Hi Hans, > > Can we have this for the 6.0 branch? I'm also going to send a patch to add > the release notes clang and LLVM about this flag and GISel being enabled at > -O0. > > Cheers, > Amara >

[PATCH] D42680: [ThinLTO] Ignore -fthinlto-index= for non-ThinLTO files

2018-01-30 Thread Vitaly Buka via Phabricator via cfe-commits
vitalybuka created this revision. vitalybuka added reviewers: pcc, tejohnson. Herald added subscribers: eraman, inglorion, mehdi_amini. Sometimes -flto=thin can produce regular LTO object files. Then backend may receive them with -fthinlto-index= flag. Previous behavior was to report error in

[PATCH] D42682: [clang-tidy] Add misc-io-functions-misused checker

2018-01-30 Thread Gábor Horváth via Phabricator via cfe-commits
hgabii created this revision. hgabii added a reviewer: clang-tools-extra. hgabii added a project: clang-tools-extra. Herald added subscribers: cfe-commits, hintonda, mgorny, srhines. Add misc-io-functions-misused checker to warns for cases when the return value of certain standard iostream C

[PATCH] D42174: [clangd] Refactored threading in ClangdServer

2018-01-30 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 131941. ilya-biryukov added a comment. - Remove threading/ dir, moved everything to the top-level - Rename ThreadPool.h to Threading.h Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D42174 Files: clangd/CMakeLists.txt

[PATCH] D42493: [clang-format] Fix ObjC message arguments formatting.

2018-01-30 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added inline comments. Comment at: unittests/Format/FormatTestObjC.cpp:678 + " a = 42;\n" + "}\n" + "secondBlock:^{\n" Can you put a test with a non-block between two blocks please Repository:

[clang-tools-extra] r323751 - [clangd] Fix windows path manipulation

2018-01-30 Thread Sam McCall via cfe-commits
Author: sammccall Date: Tue Jan 30 03:23:11 2018 New Revision: 323751 URL: http://llvm.org/viewvc/llvm-project?rev=323751=rev Log: [clangd] Fix windows path manipulation Modified: clang-tools-extra/trunk/clangd/Protocol.cpp Modified: clang-tools-extra/trunk/clangd/Protocol.cpp URL:

[PATCH] D42682: [clang-tidy] Add misc-io-functions-misused checker

2018-01-30 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons added a comment. Why only the wide versions? Even narrow versions return an int so that you can check for EOF. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D42682 ___ cfe-commits mailing list

[PATCH] D42174: [clangd] Refactored threading in ClangdServer

2018-01-30 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. As discussed offline, basically the only thing to do for testing ThreadPool is to bash it with a workload, and some sort of whole-program stress test seems ideal for this and will also give some coverage to other components (and we should run under tsan!).

[PATCH] D42493: [clang-format] Fix ObjC message arguments formatting.

2018-01-30 Thread Jacek Olesiak via Phabricator via cfe-commits
jolesiak updated this revision to Diff 131943. jolesiak added a comment. - Add test Repository: rC Clang https://reviews.llvm.org/D42493 Files: lib/Format/ContinuationIndenter.cpp lib/Format/FormatToken.h lib/Format/TokenAnnotator.cpp unittests/Format/FormatTestObjC.cpp Index:

Re: [libclc] r323677 - math.h: Set HAVE_HW_FMA32 based on compiler provided macro

2018-01-30 Thread Roman Lebedev via cfe-commits
On Tue, Jan 30, 2018 at 2:38 AM, Jan Vesely wrote: > On Mon, 2018-01-29 at 22:15 +0300, Roman Lebedev via cfe-commits wrote: >> On Mon, Jan 29, 2018 at 10:05 PM, Jan Vesely via cfe-commits >> wrote: >> > Author: jvesely >> > Date: Mon Jan 29