[PATCH] D44559: [Sema] Wrong width of result of mul operation

2018-03-22 Thread Andrew V. Tischenko via Phabricator via cfe-commits
avt77 added a comment. > That's an interesting question. In general, these warnings do try to ignore > the effects of implicit promotion. We would not want -Wsign-conversion to > fire on `unsigned short x = an_unsigned_short + 1;` (or `- 1`, for that > matter), even though formally this coerc

Re: [PATCH] D44691: [CUDA] Disable LTO for device-side compilations.

2018-03-22 Thread Yvan Roux via cfe-commits
Hi Artem, On 21 March 2018 at 23:25, Artem Belevich via Phabricator via cfe-commits wrote: > This revision was automatically updated to reflect the committed changes. > Closed by commit rL328161: [CUDA] Disable LTO for device-side compilations. > (authored by tra, committed by ). > Herald added

[PATCH] D44765: PR36643 Make clang-format support more generic TMarcos

2018-03-22 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh requested changes to this revision. alexfh added a comment. This revision now requires changes to proceed. We can't just treat `anything("")` like the _T macro. There should be a whitelist configurable with an option. By default only _T should be handled. Repository: rC Clang http

[PATCH] D44773: [CMake] Use custom command and target to install libc++ headers

2018-03-22 Thread Petr Hosek via Phabricator via cfe-commits
phosek created this revision. phosek added reviewers: EricWF, beanz. Herald added subscribers: cfe-commits, christof, fedor.sergeev, mgorny, srhines. Using file(COPY FILE...) has several downsides. Since the file command is only executed at configuration time, any changes to headers made after the

[PATCH] D44773: [CMake] Use custom command and target to install libc++ headers

2018-03-22 Thread Petr Hosek via Phabricator via cfe-commits
phosek added a comment. This changes has already revealed some missing libc++ dependencies in sanitizers which were masked by the use of `file(COPY FILE...)`. Repository: rCXX libc++ https://reviews.llvm.org/D44773 ___ cfe-commits mailing list c

[libcxx] r328186 - commit temporary workaround for new Clang exception warning

2018-03-22 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Thu Mar 22 00:53:47 2018 New Revision: 328186 URL: http://llvm.org/viewvc/llvm-project?rev=328186&view=rev Log: commit temporary workaround for new Clang exception warning Modified: libcxx/trunk/utils/libcxx/test/config.py Modified: libcxx/trunk/utils/libcxx/test/config.

[PATCH] D44765: PR36643 Make clang-format support more generic TMarcos

2018-03-22 Thread Francois Ferrand via Phabricator via cfe-commits
Typz added a comment. A generic (or at least extandable) approach to specifying macro behaviors was introduced here: https://reviews.llvm.org/D33440 But this change seem to be on hold, as a configuration based on providing "macro definitions" seem to be preferable and kind-of in the pipe, thoug

Re: r327959 - [ms] Parse #pragma optimize and ignore it behind its own flag

2018-03-22 Thread Hans Wennborg via cfe-commits
This is a bit confusing, I think. We use -Wignored-pragmas for pragmas that clang doesn't parse, and also for ignored #pragma intrinsics. -Wunknown-pragmas isn't used that much, but there is e.g. "pragma STDC FENV_ACCESS ON is not supported, ignoring pragma". Note that the text says it's unsupport

[PATCH] D41458: [libc++][C++17] Elementary string conversions for integral types

2018-03-22 Thread Zhihao Yuan via Phabricator via cfe-commits
lichray marked 3 inline comments as done. lichray added inline comments. Comment at: include/charconv:234 +to_chars(char* __first, char* __last, _Tp __value, int __base) +-> to_chars_result +{ mclow.lists wrote: > Why use the trailing return type here? > I do

[PATCH] D41458: [libc++][C++17] Elementary string conversions for integral types

2018-03-22 Thread Zhihao Yuan via Phabricator via cfe-commits
lichray updated this revision to Diff 139422. lichray added a comment. Reorganize files Repository: rCXX libc++ https://reviews.llvm.org/D41458 Files: .gitignore include/charconv src/charconv.cpp test/std/utilities/charconv/ test/std/utilities/charconv/charconv.from.chars/ test/s

[PATCH] D44774: [Driver] Allow use of -fsyntax-only together with -MJ

2018-03-22 Thread David Stenberg via Phabricator via cfe-commits
dstenb created this revision. dstenb added reviewers: joerg, klimek, rsmith. Herald added a subscriber: cfe-commits. When using -MJ together with -fsyntax-only, clang would hit an assert in DumpCompilationDatabase() when trying to get the filename for the output field. This patch fixes that by ame

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

2018-03-22 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. Thanks for this Kito. A tiny formatting nit, but otherwise this looks good to me. Comment at: lib/Driver/ToolChains/Arch/RISCV.cpp:70 + while (StdExtsItr != StdExts.end() &&

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

2018-03-22 Thread Carlos Alberto Enciso via Phabricator via cfe-commits
CarlosAlbertoEnciso added a comment. Ping. Thanks Repository: rC Clang https://reviews.llvm.org/D43821 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D44602: [clang-tidy] readability-function-size: add VariableThreshold param.

2018-03-22 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added inline comments. Comment at: test/clang-tidy/readability-function-size.cpp:207-212 +void variables_8() { + int a, b; + struct A { +A(int c, int d); + }; +} lebedev.ri wrote: > aaron.ballman wrote: > > lebedev.ri wrote: > > > aaron.ballman w

[PATCH] D44602: [clang-tidy] readability-function-size: add VariableThreshold param.

2018-03-22 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: test/clang-tidy/readability-function-size.cpp:207-212 +void variables_8() { + int a, b; + struct A { +A(int c, int d); + }; +} JonasToth wrote: > lebedev.ri wrote: > > aaron.ballman wrote: > > > lebedev.ri w

[PATCH] D44602: [clang-tidy] readability-function-size: add VariableThreshold param.

2018-03-22 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: test/clang-tidy/readability-function-size.cpp:207-212 +void variables_8() { + int a, b; + struct A { +A(int c, int d); + }; +} aaron.ballman wrote: > JonasToth wrote: > > lebedev.ri wrote: > > > aaron.ballman w

[PATCH] D44727: [RISCV] Implement getTargetDefines, handleTargetFeatures and hasFeature for RISCVTargetInfo

2018-03-22 Thread Alex Bradbury via Phabricator via cfe-commits
asb added subscribers: doug.gregor, rsmith. asb added a comment. Thanks Kito. I've added some comments inline. Nitpicking: the patch description would be more accurate to say it "extends getTargetDefines", as obviously an initial implementation was already present Comment at:

[PATCH] D34260: [StaticAnalyzer] Completely unrolling specific loops with known bound option

2018-03-22 Thread Henry Wong via Phabricator via cfe-commits
MTC added inline comments. Herald added subscribers: dkrupp, rnkovacs. Herald added a reviewer: george.karpenkov. Comment at: lib/StaticAnalyzer/Core/LoopUnrolling.cpp:107 + equalsBoundNode("initVarName"), +

[PATCH] D44602: [clang-tidy] readability-function-size: add VariableThreshold param.

2018-03-22 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: test/clang-tidy/readability-function-size.cpp:207-212 +void variables_8() { + int a, b; + struct A { +A(int c, int d); + }; +} lebedev.ri wrote: > aaron.ballman wrote: > > JonasToth wrote: > > > lebedev.ri w

[PATCH] D44778: [clang-format] Wildcard expansion on Windows.

2018-03-22 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh created this revision. alexfh added reviewers: klimek, djasper. Herald added a subscriber: mgorny. Add support for wildcard expansion in command line arguments on Windows. See https://docs.microsoft.com/en-us/cpp/c-language/expanding-wildcard-arguments Fixes https://bugs.llvm.org/show_bug.

[PATCH] D44764: [clangd] Move GTest printers to separate file

2018-03-22 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov accepted this revision. ilya-biryukov added a comment. This revision is now accepted and ready to land. LGTM. I wonder if there's a mechanism to always include the printers when including `gtest.h`, but having a convention to always include them seems ok for now. Repository: rCT

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

2018-03-22 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. Thanks for addressing the comments. I have just one comment left, about the LSP versions and sanity-checking. Comment at: clangd/DraftStore.h:36 /// Replace contents of the draft for \p File with \p Contents. - void updateDraft(PathRef File,

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

2018-03-22 Thread Carlos Alberto Enciso via Phabricator via cfe-commits
CarlosAlbertoEnciso added a comment. Thanks @erichkeane for your review. Repository: rC Clang https://reviews.llvm.org/D43821 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D44749: [OpenMP][Clang] Add call to global data sharing stack initialization on the workers side

2018-03-22 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev accepted this revision. ABataev added a comment. This revision is now accepted and ready to land. LG Repository: rC Clang https://reviews.llvm.org/D44749 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bi

r328196 - [CodeGen] Emit DWARF "constructor" calling convention

2018-03-22 Thread Jonas Devlieghere via cfe-commits
Author: jdevlieghere Date: Thu Mar 22 06:53:30 2018 New Revision: 328196 URL: http://llvm.org/viewvc/llvm-project?rev=328196&view=rev Log: [CodeGen] Emit DWARF "constructor" calling convention Now that LLVM has support for emitting calling conventions in DWARF (see r328191) have clang emit them.

[PATCH] D44602: [clang-tidy] readability-function-size: add VariableThreshold param.

2018-03-22 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/ReleaseNotes.rst:127 +- Added `VariableThreshold` option to `readability-function-size + `_ check Please rebase from trunk an

[PATCH] D42351: Emit DWARF "constructor" calling convention for every supported Clang CC

2018-03-22 Thread Jonas Devlieghere via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL328196: [CodeGen] Emit DWARF "constructor" calling convention (authored by JDevlieghere, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D42351

[PATCH] D44765: PR36643 Make clang-format support more generic TMarcos

2018-03-22 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. In https://reviews.llvm.org/D44765#1045394, @Typz wrote: > A generic (or at least extandable) approach to specifying macro behaviors was > introduced here: https://reviews.llvm.org/D33440 I believe, that patch solves a significantly different problem and it won't make

[PATCH] D44765: PR36643 Make clang-format support more generic TMarcos

2018-03-22 Thread Francois Ferrand via Phabricator via cfe-commits
Typz added a comment. You are right, I did not mean it would help with the handling of these macros; but it may be related on the configuration-side of things : adding an option for listing these macros may hit the same limitation, and the same mean of storing (in the code) the list of these ma

[clang-tools-extra] r328199 - clang-tidy, modularize: return non-zero exit code on errors

2018-03-22 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Thu Mar 22 07:18:20 2018 New Revision: 328199 URL: http://llvm.org/viewvc/llvm-project?rev=328199&view=rev Log: clang-tidy, modularize: return non-zero exit code on errors When no inputs given, the tools should not only produce the help message, but also return a non-zero exi

r328200 - clang-format: Fix SpacesInParentheses with fully qualified names.

2018-03-22 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Thu Mar 22 07:30:28 2018 New Revision: 328200 URL: http://llvm.org/viewvc/llvm-project?rev=328200&view=rev Log: clang-format: Fix SpacesInParentheses with fully qualified names. When SpacesInParentheses is set to true clang-format does not add a space before fully qualified

Re: [PATCH] D44778: [clang-format] Wildcard expansion on Windows.

2018-03-22 Thread Zachary Turner via cfe-commits
Never seen this PURE_WINDOWS CMake variable. How is it different than MSVC? On Thu, Mar 22, 2018 at 5:30 AM Alexander Kornienko via Phabricator < revi...@reviews.llvm.org> wrote: > alexfh created this revision. > alexfh added reviewers: klimek, djasper. > Herald added a subscriber: mgorny. > > Add

[PATCH] D44778: [clang-format] Wildcard expansion on Windows.

2018-03-22 Thread Zachary Turner via Phabricator via cfe-commits
zturner added subscribers: alexfh, zturner. zturner added a comment. Never seen this PURE_WINDOWS CMake variable. How is it different than MSVC? Repository: rC Clang https://reviews.llvm.org/D44778 ___ cfe-commits mailing list cfe-commits@lists.l

r328201 - clang-format: Narrow down raw string literal line break exception.

2018-03-22 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Thu Mar 22 07:43:54 2018 New Revision: 328201 URL: http://llvm.org/viewvc/llvm-project?rev=328201&view=rev Log: clang-format: Narrow down raw string literal line break exception. For multiline raw string literals, we generally want to respect the author's choice of linebreak

[PATCH] D33844: terminating continue check

2018-03-22 Thread Daniel Kolozsvari via Phabricator via cfe-commits
koldaniel added a comment. In https://reviews.llvm.org/D33844#798900, @alexfh wrote: > Please don't forget to add cfe-commits to `Subscribers:` when initially > sending the patch for review. Otherwise nobody on the list will see it. > > Could you run the check on LLVM+Clang and post a summary of

[PATCH] D39739: [HCC] Add flag to Import Weak Functions in Function Importer

2018-03-22 Thread Aaron En Ye Shi via Phabricator via cfe-commits
ashi1 added a comment. Herald added a subscriber: llvm-commits. Is first one encountered a poor design? Repository: rL LLVM https://reviews.llvm.org/D39739 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mail

[PATCH] D43290: clang-format: tweak formatting of variable initialization blocks

2018-03-22 Thread Francois Ferrand via Phabricator via cfe-commits
Typz added a comment. @djasper : ping? Repository: rC Clang https://reviews.llvm.org/D43290 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D40988: Clang-format: add finer-grained options for putting all arguments on one line

2018-03-22 Thread Russell McClellan via Phabricator via cfe-commits
russellmcc added a comment. Bump again! Any feedback would be quite appreciated. https://reviews.llvm.org/D40988 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D43015: clang-format: Introduce BreakInheritanceList option

2018-03-22 Thread Francois Ferrand via Phabricator via cfe-commits
Typz added a comment. @djasper : ping? Repository: rC Clang https://reviews.llvm.org/D43015 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2018-03-22 Thread Francois Ferrand via Phabricator via cfe-commits
Typz added a comment. @djasper : ping? Repository: rC Clang https://reviews.llvm.org/D42684 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D43290: clang-format: tweak formatting of variable initialization blocks

2018-03-22 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. Generally looks good. Comment at: lib/Format/TokenAnnotator.cpp:2183 return 0; +if (Left.Previous && Left.Previous->is(tok::equal) && +!Style.Cpp11Braced

[PATCH] D39739: [HCC] Add flag to Import Weak Functions in Function Importer

2018-03-22 Thread Brian Sumner via Phabricator via cfe-commits
b-sumner added a comment. In https://reviews.llvm.org/D39739#1045611, @ashi1 wrote: > Is first one encountered a poor design? Strong or first weak is the standard behavior for ISA level linkers. Repository: rL LLVM https://reviews.llvm.org/D39739

[PATCH] D44764: [clangd] Move GTest printers to separate file

2018-03-22 Thread Simon Marchi via Phabricator via cfe-commits
simark added a comment. We could create a file `ClangdTesting.h" which includes everything tested related (gtest, gmock, printers, syncapi, etc). The convention would be that test files would just include that. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D44764 __

[PATCH] D44783: [Targets] Adjust ARM data layout

2018-03-22 Thread Mikhail Maltsev via Phabricator via cfe-commits
miyuki created this revision. miyuki added a reviewer: hfinkel. Herald added subscribers: kristof.beyls, javed.absar, dschuff. The DataLayout structure now includes function pointer alignment, on ARM targets it is set to 8 bits. The front end needs to be adjusted to produce matching data layout st

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

2018-03-22 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun accepted this revision. xazax.hun added a comment. Overall looks good, some minor comments inline. Comment at: unittests/AST/ASTImporterTest.cpp:276 +// This will not create the file more than once. +createVirtualFile(ToAST.get(), It->FileName, It->Code); + --

[PATCH] D33844: [clang-tidy] terminating continue check

2018-03-22 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. I think this check could land in the `bugprone` module. Given this situation won't appear a lot in codebases, did you check other codebases than LLVM? Comment at: clang-tidy/misc/TerminatingContinueCheck.h:19 + +/// Checks if a 'continue' statement

[PATCH] D44764: [clangd] Move GTest printers to separate file

2018-03-22 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added subscribers: sammccall, hokein, bkramer. ilya-biryukov added a comment. In https://reviews.llvm.org/D44764#1045648, @simark wrote: > We could create a file `ClangdTesting.h" which includes everything tested > related (gtest, gmock, printers, syncapi, etc). The convention woul

[PATCH] D44787: Migrate dockerfiles to use multi-stage builds.

2018-03-22 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov created this revision. ilya-biryukov added reviewers: mehdi_amini, klimek. Herald added a subscriber: llvm-commits. We previously emulated multi-staged builds using two dockerfiles, native support from Docker allows us to merge them into one, simplifying our scripts. For more detail

Re: [PATCH] D44691: [CUDA] Disable LTO for device-side compilations.

2018-03-22 Thread Artem Belevich via cfe-commits
On Thu, Mar 22, 2018 at 12:02 AM Yvan Roux wrote: > This patch broke ARM/AArch64 bots, see: > > http://lab.llvm.org:8011/builders/clang-cmake-armv8-full/builds/841/steps/ninja%20check%201/logs/FAIL%3A%20Clang%3A%3Athinlto.cu > > ​Sorry about that. I'll fix it ASAP. ​ -- --Artem Belevich ___

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

2018-03-22 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. Some last comments, but basically looks good. Comment at: include/clang/Format/Format.h:352 - /// \brief If ``true``, always break after the ``template<...>`` of a temp

[PATCH] D44788: Add an option to support debug fission on implicit ThinLTO.

2018-03-22 Thread Yunlian Jiang via Phabricator via cfe-commits
yunlian created this revision. yunlian added reviewers: tejohnson, dblaikie, pcc. Herald added subscribers: cfe-commits, inglorion, mehdi_amini. This adds an option -gthinlto-dwo-dir=. LLVM can create .dwo files in the given directory during the implicit ThinLTO link stage. Repository: rC Cla

[PATCH] D44778: [clang-format] Wildcard expansion on Windows.

2018-03-22 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai added a comment. PURE_WINDOWS is all Windows except Cygwin. It's an LLVM thing, not a CMake thing. I don't know if setargv.obj is available on MinGW, and even if it is it's probably not gonna have the .obj extension, so this should probably be limited to MSVC. Repository: rC Clang

r328213 - [CUDA] add REQUIRES fields for CUDA variants of LTO tests.

2018-03-22 Thread Artem Belevich via cfe-commits
Author: tra Date: Thu Mar 22 09:47:41 2018 New Revision: 328213 URL: http://llvm.org/viewvc/llvm-project?rev=328213&view=rev Log: [CUDA] add REQUIRES fields for CUDA variants of LTO tests. Also relax checking for nvptx triple. This should avoid test failure if the test is executed on 32-bit platf

[PATCH] D44691: [CUDA] Disable LTO for device-side compilations.

2018-03-22 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. The test failure should be fixed by r328213. Repository: rL LLVM https://reviews.llvm.org/D44691 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D44559: [Sema] Wrong width of result of mul operation

2018-03-22 Thread John McCall via Phabricator via cfe-commits
rjmccall requested changes to this revision. rjmccall added a comment. This revision now requires changes to proceed. No, I still oppose this patch. https://reviews.llvm.org/D44559 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists

[PATCH] D44745: [HWASan] Port HWASan to Linux x86-64 (clang)

2018-03-22 Thread Aleksey Shlyapnikov via Phabricator via cfe-commits
alekseyshl added inline comments. Comment at: test/Driver/asan.c:12 -// RUN: %clang -O2 -target aarch64-unknown-linux -fsanitize=hwaddress %s -S -emit-llvm -o - | FileCheck %s --check-prefix=CHECK-HWASAN -// RUN: %clang -O3 -target aarch64-unknown-linux -fsanitize=hwaddress %s -

[PATCH] D33844: [clang-tidy] terminating continue check

2018-03-22 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone added inline comments. Comment at: clang-tidy/misc/TerminatingContinueCheck.cpp:42 + + auto Diag = diag(ContStmt->getLocStart(), "terminating 'continue'"); + Diag << FixItHint::CreateReplacement(ContStmt->getSourceRange(), "break"); It was not clear

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

2018-03-22 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone added a comment. @rtrieu gentle ping! Action items I need help with, cut-and-pasted from above: - Ideally, test compiling a bunch of (e.g. Google) code with https://reviews.llvm.org/D43322, see if there are any rough edges - Decide if `-Wmove` should imply `-Wreturn-std-move` (I hav

[PATCH] D44790: [clang-format] Fix ObjC style guesser to also iterate over child lines

2018-03-22 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton created this revision. benhamilton added reviewers: djasper, jolesiak, Wizard. Herald added subscribers: cfe-commits, klimek. When I wrote `ObjCHeaderStyleGuesser`, I incorrectly assumed the correct way to iterate over all tokens in `AnnotatedLine` was to iterate over the linked list t

[PATCH] D44765: PR36643 Make clang-format support more generic TMarcos

2018-03-22 Thread Teodor Petrov via Phabricator via cfe-commits
obfuscated added a comment. In https://reviews.llvm.org/D44765#1045373, @alexfh wrote: > We can't just treat `anything("")` like the _T macro. There should be a > whitelist configurable with an option. By default only _T should be handled. What cases could break with this version of the pa

[PATCH] D44788: Add an option to support debug fission on implicit ThinLTO.

2018-03-22 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added a comment. Does this depend on another patch? Repository: rC Clang https://reviews.llvm.org/D44788 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D44745: [HWASan] Port HWASan to Linux x86-64 (clang)

2018-03-22 Thread Aleksey Shlyapnikov via Phabricator via cfe-commits
alekseyshl updated this revision to Diff 139469. alekseyshl added a comment. - Add tests to verify that HWASan requires "-pie". Repository: rC Clang https://reviews.llvm.org/D44745 Files: lib/Driver/SanitizerArgs.cpp lib/Driver/ToolChains/Linux.cpp test/Driver/Inputs/resource_dir/lib/l

[PATCH] D44753: [Preprocessor] Rename __is_{target -> host}_* function-like builtin macros

2018-03-22 Thread John Ericson via Phabricator via cfe-commits
Ericson2314 added a comment. OK I'll happily admit that Autoconf's choices of names is terrible, and that, yes, the names can be defined from two differing perspectives. And, I actually do believe the GCC build system is far inferior, too. But on other points I think we're all talking past each

[PATCH] D44790: [clang-format] Fix ObjC style guesser to also iterate over child lines

2018-03-22 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, thank you! Comment at: lib/Format/Format.cpp:1517 -for (auto &Line : AnnotatedLines) { - for (FormatToken *FormatTok = Line->First; FormatTok; +a

[PATCH] D44790: [clang-format] Fix ObjC style guesser to also iterate over child lines

2018-03-22 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton updated this revision to Diff 139471. benhamilton added a comment. CheckLineTokens -> LineContainsObjCCode Repository: rC Clang https://reviews.llvm.org/D44790 Files: lib/Format/Format.cpp unittests/Format/FormatTest.cpp Index: unittests/Format/FormatTest.cpp ==

[PATCH] D44790: [clang-format] Fix ObjC style guesser to also iterate over child lines

2018-03-22 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton marked an inline comment as done. benhamilton added inline comments. Comment at: lib/Format/Format.cpp:1517 -for (auto &Line : AnnotatedLines) { - for (FormatToken *FormatTok = Line->First; FormatTok; +auto CheckLineTokens = [&Keywords](const AnnotatedL

[PATCH] D44749: [OpenMP][Clang] Add call to global data sharing stack initialization on the workers side

2018-03-22 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC328219: [OpenMP][Clang] Add call to global data sharing stack initialization on the… (authored by gbercea, committed by ). Repository: rC Clang https://reviews.llvm.org/D44749 Files: lib/CodeGen/CGO

r328219 - [OpenMP][Clang] Add call to global data sharing stack initialization on the workers side

2018-03-22 Thread Gheorghe-Teodor Bercea via cfe-commits
Author: gbercea Date: Thu Mar 22 10:33:27 2018 New Revision: 328219 URL: http://llvm.org/viewvc/llvm-project?rev=328219&view=rev Log: [OpenMP][Clang] Add call to global data sharing stack initialization on the workers side Summary: The workers also need to initialize the global stack. The call t

r328220 - [clang-format] Fix ObjC style guesser to also iterate over child lines

2018-03-22 Thread Ben Hamilton via cfe-commits
Author: benhamilton Date: Thu Mar 22 10:37:19 2018 New Revision: 328220 URL: http://llvm.org/viewvc/llvm-project?rev=328220&view=rev Log: [clang-format] Fix ObjC style guesser to also iterate over child lines Summary: When I wrote `ObjCHeaderStyleGuesser`, I incorrectly assumed the correct way to

[PATCH] D44790: [clang-format] Fix ObjC style guesser to also iterate over child lines

2018-03-22 Thread Ben Hamilton via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. benhamilton marked an inline comment as done. Closed by commit rL328220: [clang-format] Fix ObjC style guesser to also iterate over child lines (authored by benhamilton, committed by ). Herald added a subscriber: llvm-commit

[PATCH] D44788: Add an option to support debug fission on implicit ThinLTO.

2018-03-22 Thread Yunlian Jiang via Phabricator via cfe-commits
yunlian added a comment. I have another one https://reviews.llvm.org/D44792 on LLVM side. Repository: rC Clang https://reviews.llvm.org/D44788 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/

Re: r328134 - [Builtins] Overload __builtin_operator_new/delete to allow forwarding to usual allocation/deallocation functions.

2018-03-22 Thread Galina Kistanova via cfe-commits
Hello Eric, One of added tests fails on the next builder: http://lab.llvm.org:8011/builders/llvm-clang-x86_64-expensive-checks-win/builds/8624 . . . Failing Tests: . . . Clang :: SemaCXX/builtin-operator-new-delete.cpp Please have a look? It is not good idea to keep the bot red for too l

Re: r328134 - [Builtins] Overload __builtin_operator_new/delete to allow forwarding to usual allocation/deallocation functions.

2018-03-22 Thread Eric Fiselier via cfe-commits
Sorry, I didn't see the failure yesterday. I'll get on it or revert it. On Thu, Mar 22, 2018 at 11:51 AM, Galina Kistanova wrote: > Hello Eric, > > One of added tests fails on the next builder: > http://lab.llvm.org:8011/builders/llvm-clang-x86_64- > expensive-checks-win/builds/8624 > > . . . >

r328224 - Set dso_local on builtin functions.

2018-03-22 Thread Rafael Espindola via cfe-commits
Author: rafael Date: Thu Mar 22 11:03:13 2018 New Revision: 328224 URL: http://llvm.org/viewvc/llvm-project?rev=328224&view=rev Log: Set dso_local on builtin functions. The difference between CreateRuntimeFunction and CreateBuiltinFunction is that CreateBuiltinFunction would not set dllimport or

[PATCH] D44710: Set dso_local on builtin functions

2018-03-22 Thread Rafael Avila de Espindola via Phabricator via cfe-commits
espindola closed this revision. espindola added a comment. 328224 https://reviews.llvm.org/D44710 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libcxx] r328225 - Fix improperly failing test - and the code it was testing. Thanks to Stephan Lavavej for the catch.

2018-03-22 Thread Marshall Clow via cfe-commits
Author: marshall Date: Thu Mar 22 11:27:28 2018 New Revision: 328225 URL: http://llvm.org/viewvc/llvm-project?rev=328225&view=rev Log: Fix improperly failing test - and the code it was testing. Thanks to Stephan Lavavej for the catch. Modified: libcxx/trunk/include/ostream libcxx/trunk/

[PATCH] D44539: [Sema][Objective-C] Add check to warn when property of objc type has assign attribute

2018-03-22 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. We added the `unsafe_unretained` property attribute as part of ARC because we were introducing `__unsafe_retained` as a type qualifier and we wanted all the type qualifiers to have corresponding attribute spellings. `assign` is the much-older attribute, and its non-ow

[PATCH] D44796: Set dso_local on vtables

2018-03-22 Thread Rafael Avila de Espindola via Phabricator via cfe-commits
espindola created this revision. espindola added reviewers: rnk, echristo. https://reviews.llvm.org/D44796 Files: lib/CodeGen/ItaniumCXXABI.cpp test/CodeGenCXX/dllexport.cpp Index: test/CodeGenCXX/dllexport.cpp === --- test/Cod

[PATCH] D44798: [libFuzzer] Use OptForFuzzing attribute with -fsanitize=fuzzer.

2018-03-22 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse created this revision. morehouse added reviewers: kcc, vitalybuka. Disables certain CMP optimizations to improve fuzzing signal under -O1 and -O2. Switches all fuzzer tests to -O2 except for a few leak tests where the leak is optimized out under -O2. https://reviews.llvm.org/D44798 F

[PATCH] D44798: [libFuzzer] Use OptForFuzzing attribute with -fsanitize=fuzzer.

2018-03-22 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added a comment. 16-bit variables are switched to 32-bit variables in SwapCmpTest.cpp and SimpleCmpTest.cpp. This is because those tests rely on libFuzzer's TraceCMP heuristic to pass, but 16-bit compares are not considered for the heuristic. The only reason the test used to pass was

[libcxx] r328229 - Un-XFAIL a test under new GCC version; the GCC bug has been fixed

2018-03-22 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Thu Mar 22 12:18:08 2018 New Revision: 328229 URL: http://llvm.org/viewvc/llvm-project?rev=328229&view=rev Log: Un-XFAIL a test under new GCC version; the GCC bug has been fixed Modified: libcxx/trunk/test/std/utilities/function.objects/comparisons/constexpr_init.pass.cp

[PATCH] D44764: [clangd] Move GTest printers to separate file

2018-03-22 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added a comment. In https://reviews.llvm.org/D44764#1045682, @ilya-biryukov wrote: > In https://reviews.llvm.org/D44764#1045648, @simark wrote: > > > We could create a file `ClangdTesting.h" which includes everything tested > > related (gtest, gmock, printers, syncapi, etc). The conven

Re: r328040 - Set dso_local on string literals.

2018-03-22 Thread Joerg Sonnenberger via cfe-commits
On Tue, Mar 20, 2018 at 05:01:24PM -0700, Rafael Avila de Espindola wrote: > Joerg Sonnenberger via cfe-commits writes: > > > On Tue, Mar 20, 2018 at 08:42:55PM -, Rafael Espindola via cfe-commits > > wrote: > >> Author: rafael > >> Date: Tue Mar 20 13:42:55 2018 > >> New Revision: 328040 >

[PATCH] D44796: Set dso_local on vtables

2018-03-22 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 https://reviews.llvm.org/D44796 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D44801: Add the -fsanitize=shadow-call-stack flag

2018-03-22 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
vlad.tsyrklevich created this revision. vlad.tsyrklevich added a reviewer: pcc. Herald added a subscriber: cfe-commits. Add support for the -fsanitize=shadow-call-stack flag which causes clang to add ShadowCallStack attribute to functions compiled with that flag enabled. Repository: rC Clang

[PATCH] D44295: [clang-tidy] Detects and fixes calls to grand-...parent virtual methods instead of calls to parent's virtual methods

2018-03-22 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis updated this revision to Diff 139496. zinovy.nis added a comment. Aaron, I applied the changes you suggest. I also found and fixed a new case when grandparent method is called via 'typedef'ed or 'using' type. There's also a new test (class C2) for it. Repository: rCTE Clang Tools

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

2018-03-22 Thread Simon Marchi via Phabricator via cfe-commits
simark added inline comments. Comment at: clangd/DraftStore.h:36 /// Replace contents of the draft for \p File with \p Contents. - void updateDraft(PathRef File, StringRef Contents); + void addDraft(PathRef File, StringRef Contents); + ilya-biryukov wrote: >

[PATCH] D44295: [clang-tidy] Detects and fixes calls to grand-...parent virtual methods instead of calls to parent's virtual methods

2018-03-22 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis updated this revision to Diff 139499. zinovy.nis marked an inline comment as done. zinovy.nis added a comment. camelCase last minute fix. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D44295 Files: clang-tidy/bugprone/BugproneTidyModule.cpp clang-tidy/bugprone/CM

[PATCH] D44295: [clang-tidy] Detects and fixes calls to grand-...parent virtual methods instead of calls to parent's virtual methods

2018-03-22 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis marked 9 inline comments as done. zinovy.nis added inline comments. Comment at: docs/clang-tidy/checks/bugprone-parent-virtual-call.rst:6 + +Detects and fixes calls to grand-...parent virtual methods instead of calls +to parent's virtual methods. aaron

[PATCH] D44295: [clang-tidy] Detects and fixes calls to grand-...parent virtual methods instead of calls to parent's virtual methods

2018-03-22 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/ReleaseNotes.rst:73 +- New `bugprone-parent-virtual-call + `_ check Please rebase from trunk and use //:doc:// for link.

[PATCH] D44295: [clang-tidy] Detects and fixes calls to grand-...parent virtual methods instead of calls to parent's virtual methods

2018-03-22 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons added a comment. Please add a test where the parent class is in a differently named namespace. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D44295 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists

[PATCH] D44804: [StaticAnalyzer] Silence an unused variable warning. NFC.

2018-03-22 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang created this revision. mgrang added reviewers: george.karpenkov, dcoughlin, dergachev.a. Herald added subscribers: a.sidorin, szepet. Repository: rC Clang https://reviews.llvm.org/D44804 Files: lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp Index: lib/StaticAnalyzer/Checkers/Ret

[PATCH] D44804: [StaticAnalyzer] Silence an unused variable warning. NFC.

2018-03-22 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov added a comment. Actually, a better change would be to simply change `cast(MR)` to `VR` Repository: rC Clang https://reviews.llvm.org/D44804 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/m

Re: r328134 - [Builtins] Overload __builtin_operator_new/delete to allow forwarding to usual allocation/deallocation functions.

2018-03-22 Thread Eric Fiselier via cfe-commits
Just waiting on a build. It should be fixed shortly. Sorry about the breakage. /Eric On Thu, Mar 22, 2018 at 11:56 AM, Eric Fiselier wrote: > Sorry, I didn't see the failure yesterday. > > I'll get on it or revert it. > > On Thu, Mar 22, 2018 at 11:51 AM, Galina Kistanova > wrote: > >> Hello E

[PATCH] D44804: [StaticAnalyzer] Silence an unused variable warning. NFC.

2018-03-22 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang updated this revision to Diff 139503. mgrang added a comment. Addressed comment. Repository: rC Clang https://reviews.llvm.org/D44804 Files: lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp Index: lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp ===

[PATCH] D44788: Add an option to support debug fission on implicit ThinLTO.

2018-03-22 Thread Paul Robinson via Phabricator via cfe-commits
probinson added a comment. I don't think requiring a new option is a great user interface. In existing use cases the location of the .dwo file matches the location of the output file. Why is this one different? Repository: rC Clang https://reviews.llvm.org/D44788 __

[PATCH] D44804: [StaticAnalyzer] Silence an unused variable warning. NFC.

2018-03-22 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. LGTM, provided it compiles and tests run (`ninja check-clang`) Repository: rC Clang https://reviews.llvm.org/D44804 ___ cf

Re: [PATCH] D44788: Add an option to support debug fission on implicit ThinLTO.

2018-03-22 Thread David Blaikie via cfe-commits
In implicit ThinLTO, the object files are only temporary. Sort of similar to using -gsplit-dwarf when compiling straight to an executable (without using -c): "clang++ x.cpp y.cpp -o a.out" - where should the .dwo files go then? If they go where the .o files go, then they'll be in /tmp/ and get del

[PATCH] D44788: Add an option to support debug fission on implicit ThinLTO.

2018-03-22 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a subscriber: yunlian. dblaikie added a comment. In implicit ThinLTO, the object files are only temporary. Sort of similar to using -gsplit-dwarf when compiling straight to an executable (without using -c): "clang++ x.cpp y.cpp -o a.out" - where should the .dwo files go then? If th

[PATCH] D44804: [StaticAnalyzer] Silence an unused variable warning. NFC.

2018-03-22 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. In https://reviews.llvm.org/D44804#1046086, @george.karpenkov wrote: > LGTM, provided it compiles and tests run (`ninja check-clang`) Thanks! Yes, I have already verified it compiles and ninja check-clang is clean. Repository: rC Clang https://reviews.llvm.org/D4480

  1   2   >