[PATCH] D43764: [clang-apply-replacements] Convert tooling::Replacements to tooling::AtomicChange for conflict resolving of changes, code cleanup, and code formatting.

2018-03-20 Thread Jeremy Demeule via Phabricator via cfe-commits
jdemeule updated this revision to Diff 139082. jdemeule added a comment. Update after review. Change error reporting to use `ReplacementError` message. https://reviews.llvm.org/D43764 Files: clang-apply-replacements/include/clang-apply-replacements/Tooling/ApplyReplacements.h clang-apply-r

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

2018-03-20 Thread Hans Wennborg via cfe-commits
Author: hans Date: Tue Mar 20 01:53:11 2018 New Revision: 327959 URL: http://llvm.org/viewvc/llvm-project?rev=327959&view=rev Log: [ms] Parse #pragma optimize and ignore it behind its own flag This allows users to turn off warnings about this pragma specifically, while still receiving warnings ab

[PATCH] D44630: [ms] Parse #pragma optimize and ignore it behind its own flag

2018-03-20 Thread Hans Wennborg via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. hans marked an inline comment as done. Closed by commit rL327959: [ms] Parse #pragma optimize and ignore it behind its own flag (authored by hans, committed by ). Herald added a subscriber: llvm-commits. Changed prior to co

[PATCH] D44630: [ms] Parse #pragma optimize and ignore it behind its own flag

2018-03-20 Thread Hans Wennborg via Phabricator via cfe-commits
hans marked an inline comment as done. hans added inline comments. Comment at: include/clang/Basic/DiagnosticParseKinds.td:973 +def warn_pragma_optimize : Warning< + "'#pragma optimize' is not supported; use '#pragma clang optimize on|off' instead">, + InGroup; ---

[PATCH] D44632: [clang-format] Add a few more Core Graphics identifiers to ObjC heuristic

2018-03-20 Thread Jacek Olesiak via Phabricator via cfe-commits
jolesiak requested changes to this revision. jolesiak added inline comments. This revision now requires changes to proceed. Comment at: unittests/Format/FormatTest.cpp:12099 EXPECT_EQ(FormatStyle::LK_ObjC, guessLanguage("foo", "@interface Foo\n@end\n")); + EXPECT_EQ(FormatSt

[PATCH] D43764: [clang-apply-replacements] Convert tooling::Replacements to tooling::AtomicChange for conflict resolving of changes, code cleanup, and code formatting.

2018-03-20 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. This looks great! Just a few nits left. Comment at: clang-apply-replacements/include/clang-apply-replacements/Tooling/ApplyReplacements.h:75 +/// \brief Deduplicate, check for conflicts, and convert all Replacements stored +/// in \c TUs to AtomicChang

r327962 - [analyzer] Fix the crash in IteratorChecker.cpp when 'SymbolConjured' has a null Stmt.

2018-03-20 Thread Henry Wong via cfe-commits
Author: henrywong Date: Tue Mar 20 02:27:02 2018 New Revision: 327962 URL: http://llvm.org/viewvc/llvm-project?rev=327962&view=rev Log: [analyzer] Fix the crash in IteratorChecker.cpp when 'SymbolConjured' has a null Stmt. When the loop has a null terminator statement and sets 'widen-loops=true'

[PATCH] D44606: [analyzer] Fix the crash in `IteratorChecker.cpp` when `SymbolConjured` has a null Stmt.

2018-03-20 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL327962: [analyzer] Fix the crash in IteratorChecker.cpp when 'SymbolConjured' has a… (authored by henrywong, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://rev

[PATCH] D44634: [clang-format] Detect Objective-C for #import

2018-03-20 Thread Daniel Jasper via Phabricator via cfe-commits
djasper added a comment. I'd really like to not parse include/import statements this way. Can you send me examples of headers where we fail to recognize them as ObjC and this matters (happy for you to send me examples offline). Repository: rC Clang https://reviews.llvm.org/D44634 ___

[PATCH] D44628: Backport changes from llvm/.clang_tidy to clang/.clang_tidy configs

2018-03-20 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: .clang-tidy:8 - key: readability-identifier-naming.FunctionCase -value: lowerCase +value: camelBack + - key: readability-identifier-naming.MemberCase simark w

[PATCH] D44632: [clang-format] Add a few more Core Graphics identifiers to ObjC heuristic

2018-03-20 Thread Daniel Jasper via Phabricator via cfe-commits
djasper added inline comments. Comment at: lib/Format/Format.cpp:1450 // Keep this array sorted, since we are binary searching over it. static constexpr llvm::StringLiteral FoundationIdentifiers[] = { "CGFloat", I have concerns about this growi

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

2018-03-20 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clangd/ClangdLSPServer.cpp:164 + if (!Contents) { +log(llvm::toString(Contents.takeError())); +return; simark wrote: > ilya-biryukov wrote: > > We should signal an error to the client by calling `replyErro

[PATCH] D44632: [clang-format] Add a few more Core Graphics identifiers to ObjC heuristic

2018-03-20 Thread Jacek Olesiak via Phabricator via cfe-commits
jolesiak added inline comments. Comment at: lib/Format/Format.cpp:1450 // Keep this array sorted, since we are binary searching over it. static constexpr llvm::StringLiteral FoundationIdentifiers[] = { "CGFloat", djasper wrote: > I have concern

[PATCH] D41808: Rename clang link from clang-X.Y to clang-X

2018-03-20 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru updated this revision to Diff 139100. sylvestre.ledru marked an inline comment as done. sylvestre.ledru added a reviewer: dim. https://reviews.llvm.org/D41808 Files: CMakeLists.txt Index: CMakeLists.txt === --- CM

[PATCH] D44673: Make positionToOffset return llvm::Expected

2018-03-20 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clangd/ClangdServer.cpp:196 +return Begin.takeError(); + + llvm::Expected End = positionToOffset(Code, Rng.end); NIT: maybe remove empty lines? they don't seem to add much to readability, since when prev line

[PATCH] D44381: [mips] Change the way how Clang chooses relocation mode

2018-03-20 Thread Aleksandar Beserminji via Phabricator via cfe-commits
abeserminji updated this revision to Diff 139102. abeserminji added a comment. Herald added a subscriber: llvm-commits. Resolved a comment. Repository: rL LLVM https://reviews.llvm.org/D44381 Files: lib/Driver/ToolChains/CommonArgs.cpp test/Driver/mips-as.c test/Driver/mips-features.c

[PATCH] D44381: [mips] Force PIC to level 1

2018-03-20 Thread Aleksandar Beserminji via Phabricator via cfe-commits
abeserminji updated this revision to Diff 139110. abeserminji retitled this revision from "[mips] Change the way how Clang chooses relocation mode" to "[mips] Force PIC to level 1". abeserminji edited the summary of this revision. abeserminji added a comment. Updated the patch. Now this patch onl

[PATCH] D44628: Backport changes from llvm/.clang_tidy to clang/.clang_tidy configs

2018-03-20 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh accepted this revision. alexfh added a comment. Thanks! I don't know how useful is the support of cfe being checked out somewhere else than into llvm/tools/clang. If we could give up on that, we could just kill this file and rely on clang-tidy to pick up llvm/.clang-tidy. Anyways, LG.

[PATCH] D43766: [clang-tidy][modernize-make-unique] Checks c++14 flag before using std::make_unique

2018-03-20 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. Frederic, do you need someone to commit the patch for you? https://reviews.llvm.org/D43766 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D44628: Backport changes from llvm/.clang_tidy to clang/.clang_tidy configs

2018-03-20 Thread Phabricator via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Revision". This revision was automatically updated to reflect the committed changes. Closed by commit rL327984: Backport changes from llvm/.clang_tidy to clang/.clang_tidy configs (authored by ibiryukov, committed by ). Hera

r327984 - Backport changes from llvm/.clang_tidy to clang/.clang_tidy configs

2018-03-20 Thread Ilya Biryukov via cfe-commits
Author: ibiryukov Date: Tue Mar 20 07:39:12 2018 New Revision: 327984 URL: http://llvm.org/viewvc/llvm-project?rev=327984&view=rev Log: Backport changes from llvm/.clang_tidy to clang/.clang_tidy configs Summary: LLVM .clang_tidy seems to be more up-to-date. Reviewers: alexfh, simark Reviewed B

r327985 - [OPENMP, NVPTX] Globalization of the private redeclarations.

2018-03-20 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Tue Mar 20 07:45:59 2018 New Revision: 327985 URL: http://llvm.org/viewvc/llvm-project?rev=327985&view=rev Log: [OPENMP, NVPTX] Globalization of the private redeclarations. If the generic codegen is enabled and private copy of the original variable escapes the declaration co

r327986 - [clang-format] Fix ObjC selectors with multiple params passed to macro

2018-03-20 Thread Ben Hamilton via cfe-commits
Author: benhamilton Date: Tue Mar 20 07:53:25 2018 New Revision: 327986 URL: http://llvm.org/viewvc/llvm-project?rev=327986&view=rev Log: [clang-format] Fix ObjC selectors with multiple params passed to macro Summary: Objective-C selectors with arguments take the form of: foo: foo:bar: foo:bar:b

[PATCH] D44638: [clang-format] Fix ObjC selectors with multiple params passed to macro

2018-03-20 Thread Ben Hamilton via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL327986: [clang-format] Fix ObjC selectors with multiple params passed to macro (authored by benhamilton, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llv

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

2018-03-20 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/bugprone/ParentVirtualCallCheck.cpp:24 + +static bool IsParentOf(const CXXRecordDecl &Parent, + const CXXRecordDecl &ThisClass) { http://llvm.org/docs/CodingStandards.html says: "Function

[PATCH] D44632: [clang-format] Add a few more Core Graphics identifiers to ObjC heuristic

2018-03-20 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton updated this revision to Diff 139125. benhamilton marked 2 inline comments as done. benhamilton added a comment. clang-format Repository: rC Clang https://reviews.llvm.org/D44632 Files: lib/Format/Format.cpp unittests/Format/FormatTest.cpp Index: unittests/Format/FormatTest

[PATCH] D44632: [clang-format] Add a few more Core Graphics identifiers to ObjC heuristic

2018-03-20 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton added a subscriber: krasimir. benhamilton added a comment. @krasimir, can you answer @djasper's question about hash set vs. binary search? Comment at: lib/Format/Format.cpp:1450 // Keep this array sorted, since we are binary searching over it. static const

[PATCH] D44634: [clang-format] Detect Objective-C for #import

2018-03-20 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton updated this revision to Diff 139127. benhamilton added a comment. clang-format Repository: rC Clang https://reviews.llvm.org/D44634 Files: lib/Format/Format.cpp unittests/Format/FormatTest.cpp Index: unittests/Format/FormatTest.cpp ==

[PATCH] D44632: [clang-format] Add a few more Core Graphics identifiers to ObjC heuristic

2018-03-20 Thread Daniel Jasper via Phabricator via cfe-commits
djasper added inline comments. Comment at: lib/Format/Format.cpp:1450 // Keep this array sorted, since we are binary searching over it. static constexpr llvm::StringLiteral FoundationIdentifiers[] = { "CGFloat", benhamilton wrote: > jolesiak wr

r327990 - [OPENMP, NVPTX] Codegen for target distribute parallel combined

2018-03-20 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Tue Mar 20 08:41:05 2018 New Revision: 327990 URL: http://llvm.org/viewvc/llvm-project?rev=327990&view=rev Log: [OPENMP, NVPTX] Codegen for target distribute parallel combined constructs in generic mode. Fixed codegen for distribute parallel combined constructs. We have to p

[PATCH] D44684: [mips] Improve handling of -fno-[pic/PIC] option

2018-03-20 Thread Aleksandar Beserminji via Phabricator via cfe-commits
abeserminji created this revision. abeserminji added reviewers: petarj, sdardis. Herald added subscribers: llvm-commits, arichardson. - On N64 ABI, -mno-abicalls is needed to disable PIC. Warning is reported when only -fno-pic/-fno-PIC is used. This is how GCC behaves. - An error is reported when

r327991 - Set dso_local for guid decls.

2018-03-20 Thread Rafael Espindola via cfe-commits
Author: rafael Date: Tue Mar 20 08:42:58 2018 New Revision: 327991 URL: http://llvm.org/viewvc/llvm-project?rev=327991&view=rev Log: Set dso_local for guid decls. Modified: cfe/trunk/lib/CodeGen/CodeGenModule.cpp cfe/trunk/test/CodeGenCXX/microsoft-templ-uuidof.cpp Modified: cfe/trunk/li

[PATCH] D44649: Set dso_local for guid decls

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

r327993 - Set dso_local for CFConstantStringClassReference.

2018-03-20 Thread Rafael Espindola via cfe-commits
Author: rafael Date: Tue Mar 20 08:48:00 2018 New Revision: 327993 URL: http://llvm.org/viewvc/llvm-project?rev=327993&view=rev Log: Set dso_local for CFConstantStringClassReference. This one cannot use setGVProperties since it has special logic for when it is dllimport or not. Modified: cfe

[PATCH] D44491: Set dso_local for CFConstantStringClassReference

2018-03-20 Thread Rafael Avila de Espindola via Phabricator via cfe-commits
espindola added a comment. 327993 https://reviews.llvm.org/D44491 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D44632: [clang-format] Add a few more Core Graphics identifiers to ObjC heuristic

2018-03-20 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton updated this revision to Diff 139136. benhamilton added a comment. Add assert(std::is_sorted(...)). (We can't static_assert on is_sorted until C++2x.) Repository: rC Clang https://reviews.llvm.org/D44632 Files: lib/Format/Format.cpp unittests/Format/FormatTest.cpp Index: u

[PATCH] D44645: [test] Fix Cross-DSO CFI Android sanitizer test for -rtlib=compiler-rt

2018-03-20 Thread Michał Górny via Phabricator via cfe-commits
mgorny updated this revision to Diff 139135. mgorny edited the summary of this revision. https://reviews.llvm.org/D44645 Files: test/Driver/sanitizer-ld.c Index: test/Driver/sanitizer-ld.c === --- test/Driver/sanitizer-ld.c +++ t

[PATCH] D44645: [test] Fix Cross-DSO CFI Android sanitizer test for -rtlib=compiler-rt

2018-03-20 Thread Michał Górny via Phabricator via cfe-commits
mgorny marked 2 inline comments as done. mgorny added a comment. @eugenis, updated. https://reviews.llvm.org/D44645 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D44634: [clang-format] Detect Objective-C for #import

2018-03-20 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton updated this revision to Diff 139137. benhamilton added a comment. Add assert(std::is_sorted(...)). (We can't static_assert on is_sorted until C++2x.) Repository: rC Clang https://reviews.llvm.org/D44634 Files: lib/Format/Format.cpp unittests/Format/FormatTest.cpp Index: un

[PATCH] D44632: [clang-format] Add a few more Core Graphics identifiers to ObjC heuristic

2018-03-20 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton marked 4 inline comments as done. benhamilton added inline comments. Comment at: lib/Format/Format.cpp:1450 // Keep this array sorted, since we are binary searching over it. static constexpr llvm::StringLiteral FoundationIdentifiers[] = { "CGFloat",

[PATCH] D44093: [BUILTINS] structure pretty printer

2018-03-20 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: lib/Sema/SemaChecking.cpp:1122 +!PtrArgType->getPointeeType()->isRecordType()) { + this->Diag(PtrArg->getLocStart(), + diag::err_typecheck_convert_incompatible) Drop all instances of `t

[PATCH] D44632: [clang-format] Add a few more Core Graphics identifiers to ObjC heuristic

2018-03-20 Thread Jacek Olesiak via Phabricator via cfe-commits
jolesiak accepted this revision. jolesiak added inline comments. This revision is now accepted and ready to land. Comment at: lib/Format/Format.cpp:1450 // Keep this array sorted, since we are binary searching over it. static constexpr llvm::StringLiteral FoundationIden

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

2018-03-20 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/readability/FunctionSizeCheck.cpp:30-31 + bool VisitDecompositionDecl(DecompositionDecl *) { +// DecompositionDecl was already visited as VarDecl. Don't count it twice. +Info.Variables--; +return true; -

[PATCH] D44688: Set dso_local for runtime functions

2018-03-20 Thread Rafael Avila de Espindola via Phabricator via cfe-commits
espindola created this revision. espindola added reviewers: rnk, echristo. This is another case where there is special logic for adding dllimport and so we cannot use setGVProperties. https://reviews.llvm.org/D44688 Files: lib/CodeGen/CodeGenModule.cpp test/CodeGenCXX/runtime-dllstorage.cp

[PATCH] D40737: [clang-tidy] Resubmit hicpp-multiway-paths-covered without breaking test

2018-03-20 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/hicpp/MultiwayPathsCoveredCheck.cpp:68 +} +/// This function calculate 2 ** Bits and returns +/// numeric_limits::max() if an overflow occured. Add some vertical whitespace before the comments. ===

[PATCH] D38455: [clang-tidy] new cppcoreguidelines-narrowing-conversions check.

2018-03-20 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/cppcoreguidelines/NarrowingConversionsCheck.cpp:26 + binaryOperator( + anyOf(hasOperatorName("+="), hasOperatorName("-=")), + hasLHS(hasType(isInteger())), Why only these two opera

[PATCH] D38455: [clang-tidy] new cppcoreguidelines-narrowing-conversions check.

2018-03-20 Thread Clement Courbet via Phabricator via cfe-commits
courbet added inline comments. Comment at: clang-tidy/cppcoreguidelines/NarrowingConversionsCheck.cpp:26 + binaryOperator( + anyOf(hasOperatorName("+="), hasOperatorName("-=")), + hasLHS(hasType(isInteger())), aaron.ballman wrote: > Why onl

[PATCH] D38455: [clang-tidy] new cppcoreguidelines-narrowing-conversions check.

2018-03-20 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/cppcoreguidelines/NarrowingConversionsCheck.cpp:26 + binaryOperator( + anyOf(hasOperatorName("+="), hasOperatorName("-=")), + hasLHS(hasType(isInteger())), courbet wrote: > aaron.b

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

2018-03-20 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman edited reviewers, added: rjmccall; removed: aaron.ballman. aaron.ballman added a subscriber: rjmccall. aaron.ballman added a comment. I don't know enough about ObjC to feel comfortable reviewing this, but I've added @rjmccall who may have opinions. Repository: rC Clang https://

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

2018-03-20 Thread Artem Belevich via Phabricator via cfe-commits
tra created this revision. tra added reviewers: tejohnson, jlebar. Herald added subscribers: eraman, inglorion, mehdi_amini, sanjoy. This fixes host-side LTO during CUDA compilation. Before, LTO pipeline construction was clashing with CUDA pipeline construction. At the moment there's no point doi

[PATCH] D44576: [clangd] Fix undefined behavior due to misaligned type cast

2018-03-20 Thread Jan Korous via Phabricator via cfe-commits
jkorous-apple added a comment. I commited the patch but forgot to quote this review. git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@327902 91177308-0d34-0410-b5e6-96231b3b80d8 Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D44576 __

[PATCH] D44575: [clangd][nfc] Give name to a magic constant

2018-03-20 Thread Jan Korous via Phabricator via cfe-commits
jkorous-apple added a comment. I commited the patch but forgot to quote this review. git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@327901 91177308-0d34-0410-b5e6-96231b3b80d8 Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D44575 __

r328006 - [NVPTX] Make tensor load/store intrinsics overloaded.

2018-03-20 Thread Artem Belevich via cfe-commits
Author: tra Date: Tue Mar 20 10:18:59 2018 New Revision: 328006 URL: http://llvm.org/viewvc/llvm-project?rev=328006&view=rev Log: [NVPTX] Make tensor load/store intrinsics overloaded. This way we can support address-space specific variants without explicitly encoding the space in the name of the

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

2018-03-20 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: clang-tidy/readability/FunctionSizeCheck.cpp:30-31 + bool VisitDecompositionDecl(DecompositionDecl *) { +// DecompositionDecl was already visited as VarDecl. Don't count it twice. +Info.Variables--; +return true;

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

2018-03-20 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri updated this revision to Diff 139154. lebedev.ri marked 5 inline comments as done. lebedev.ri added a comment. Address @aaron.ballman's review notes. I'm not sure the change re `ParmVarDecl` handling is actually correct, see testcase. Repository: rCTE Clang Tools Extra https://re

[PATCH] D44692: [clang-format] Don't insert space between r_paren and 'new' in ObjC decl

2018-03-20 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton created this revision. benhamilton added reviewers: djasper, jolesiak. Herald added subscribers: cfe-commits, klimek. Previously, clang-format would insert a space between the closing parenthesis and 'new' in the following valid Objective-C declaration: + (instancetype)new; This wa

[PATCH] D44435: Add the module name to __cuda_module_ctor and __cuda_module_dtor for unique function names

2018-03-20 Thread Simeon Ehrig via Phabricator via cfe-commits
SimeonEhrig added inline comments. Comment at: unittests/CodeGen/IncrementalProcessingTest.cpp:176-178 + +// In CUDA incremental processing, a CUDA ctor or dtor will be generated for +// every statement if a fatbinary file exists. tra wrote: > SimeonEhrig wrote:

[PATCH] D44673: Make positionToOffset return llvm::Expected

2018-03-20 Thread Simon Marchi via Phabricator via cfe-commits
simark updated this revision to Diff 139157. simark marked 9 inline comments as done. simark added a comment. Herald added a subscriber: mgorny. Address review comments Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D44673 Files: clangd/ClangdServer.cpp clangd/SourceCode.cpp

[PATCH] D44646: Sema: in msvc compatibility mode, don't allow forceinline on variadics

2018-03-20 Thread Dustin L. Howett via Phabricator via cfe-commits
DHowett-MSFT added inline comments. Comment at: test/Sema/ms-forceinline-on-variadic.cpp:1 +// RUN: %clang_cc1 -emit-llvm -o - -triple i686-windows -verify -fms-extensions %s \ +// RUN:| FileCheck %s compnerd wrote: > Personally, I prefer the fully c

[PATCH] D44541: [OpenMP][Clang] Move device global stack init before master-workers split

2018-03-20 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 139159. gtbercea added a comment. Fix test. Repository: rC Clang https://reviews.llvm.org/D44541 Files: lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp test/OpenMP/nvptx_data_sharing.cpp test/OpenMP/nvptx_target_teams_distribute_parallel_for_generic_mode_co

r328007 - Basic: support PreserveMost and PreserveAll on Windows ARM

2018-03-20 Thread Saleem Abdulrasool via cfe-commits
Author: compnerd Date: Tue Mar 20 10:33:26 2018 New Revision: 328007 URL: http://llvm.org/viewvc/llvm-project?rev=328007&view=rev Log: Basic: support PreserveMost and PreserveAll on Windows ARM Do not ignore these calling conventions on Windows ARM. They are used by the swift runtime for certain

[PATCH] D44541: [OpenMP][Clang] Move device global stack init before master-workers split

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

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

2018-03-20 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/bugprone/ParentVirtualCallCheck.cpp:128 + diag(Member->getQualifierLoc().getSourceRange().getBegin(), + "'%0' is a grand-parent's method, not parent's. Did you mean %1?") + << CalleeName << ParentsStr

[PATCH] D44671: [libcxx] Enable static libcxxabi linking on Darwin

2018-03-20 Thread Petr Hosek via Phabricator via cfe-commits
phosek updated this revision to Diff 139163. phosek marked an inline comment as done. Repository: rCXX libc++ https://reviews.llvm.org/D44671 Files: libcxx/CMakeLists.txt Index: libcxx/CMakeLists.txt === --- libcxx/CMakeLists.

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

2018-03-20 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); + }; +} I think the current behavior here is correct and the previous behavior was inco

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

2018-03-20 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: > I think the current behavior here is correct and the previou

[PATCH] D44694: [clang-tidy] Use :doc: for check links in Release Notes

2018-03-20 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko created this revision. Eugene.Zelenko added reviewers: alexfh, hokein, aaron.ballman. Eugene.Zelenko added a project: clang-tools-extra. Herald added a subscriber: xazax.hun. I learned from https://reviews.llvm.org/D44636 of shorter links to documentation, which could be used for C

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

2018-03-20 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: > > I think the current behavior here i

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

2018-03-20 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: > lebedev.ri wrote: > > aaron.ballman wrote: > > > I think the

[PATCH] D44672: [CodeGen] Disable UBSan for coroutine functions

2018-03-20 Thread Vedant Kumar via Phabricator via cfe-commits
vsk added a comment. The "Cannot represent a difference across sections" error is almost certainly related to -fsanitize=function. Time permitting, could you file a separate PR for that and attach the IR? It'd be great to know whether the issue reproduces without coroutines involved. Also, cou

[PATCH] D44695: [clang-format] Partially revert r322749, replacing array with DenseSet

2018-03-20 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir created this revision. Herald added subscribers: cfe-commits, klimek. The array + binary_search requires the initializer list of identifiers to be sorted. I can imagine how this list might change frequently while the support for ObjectiveC improves (https://reviews.llvm.org/D44632). The a

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

2018-03-20 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: > > lebedev.ri wrote: > > > aaron.ballm

[PATCH] D44632: [clang-format] Add a few more Core Graphics identifiers to ObjC heuristic

2018-03-20 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added inline comments. Comment at: lib/Format/Format.cpp:1450 // Keep this array sorted, since we are binary searching over it. static constexpr llvm::StringLiteral FoundationIdentifiers[] = { "CGFloat", jolesiak wrote: > benhamilton w

[PATCH] D44695: [clang-format] Partially revert r322749, replacing array with DenseSet

2018-03-20 Thread Benjamin Kramer via Phabricator via cfe-commits
bkramer accepted this revision. bkramer added a comment. This revision is now accepted and ready to land. I wouldn't say that this is more maintainable, but I'm not the maintainer of clang-format. Repository: rC Clang https://reviews.llvm.org/D44695 ___

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

2018-03-20 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: > lebedev.ri wrote: > > aaron.ballman wrote: > > > lebedev.ri

[PATCH] D44597: [CFG] [analyzer] Add C++17-specific variable and return value construction contexts.

2018-03-20 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, subject to minor nits Comment at: include/clang/Analysis/CFG.h:172 /// by value. This, like constructor, requires a construction context, which -//

[PATCH] D44689: Set dso_local on string literals

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

[PATCH] D44688: Set dso_local for runtime functions

2018-03-20 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 We don't assume these are `dso_local` on Linux, right? https://reviews.llvm.org/D44688 ___ cfe-commits mailing list cfe-commits@lists.llvm.org ht

[PATCH] D44695: [clang-format] Partially revert r322749, replacing array with DenseSet

2018-03-20 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton added a comment. I'm fine with whichever approach we use, but I'll defer to @krasimir here. (I'm not fully sure why `llvm::DenseSet` is better than `std::unsorted_set`, but I'm sure you and @krasimir understand the subtleties better than I do.) Repository: rC Clang https://revie

[PATCH] D44673: Make positionToOffset return llvm::Expected

2018-03-20 Thread Simon Marchi via Phabricator via cfe-commits
simark added inline comments. Comment at: clangd/SourceCode.h:24 -/// Turn a [line, column] pair into an offset in Code. -size_t positionToOffset(llvm::StringRef Code, Position P); +/// Turn a [line, column] pair into an offset in Code according to the LSP +/// definition of a

[PATCH] D44695: [clang-format] Partially revert r322749, replacing array with DenseSet

2018-03-20 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. One way in which `DenseSet` is better is that it supports `StringRef`s - we don't have to define `hash`. Seems like the lack of this override in core LLVM suggests that `unordered_set` is not commonly used with `StringRef`s. Repository: rC Clang https://reviews.llv

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

2018-03-20 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: > > lebedev.ri wrote: > > > aaron.ballm

[PATCH] D44695: [clang-format] Partially revert r322749, replacing array with DenseSet

2018-03-20 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton added a comment. > One way in which DenseSet is better is that it supports StringRefs - we don't > have to define hash. Seems like the lack of this override in core LLVM > suggests that unordered_set is not commonly used with StringRefs. Makes sense, thanks. Repository: rC Clang

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

2018-03-20 Thread Alfred Zien via Phabricator via cfe-commits
QF5690 added a comment. In https://reviews.llvm.org/D44539#1041993, @benhamilton wrote: > I wonder if this wouldn't be better as a clang-tidy check: > > https://github.com/llvm-mirror/clang-tools-extra/tree/master/clang-tidy/objc Border between clang-tidy checks and compiler diagnostics is not

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

2018-03-20 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 139181. martong marked 14 inline comments as done. martong added a comment. Update based on Alexei's comments. - Use createVirtualFile in testImport - Add minimal style changes - Use DeclCounter - Add hasFieldOrder matcher - Add parameterized tests Reposito

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

2018-03-20 Thread Gabor Marton via Phabricator via cfe-commits
martong added inline comments. Comment at: unittests/AST/ASTImporterTest.cpp:198 + Language ToLang, StringRef Identifier = "declToImport") { +ArgVector FromArgs = getBasicRunOptionsForLanguage(FromLang), + ToArgs = getBasicRunOptionsForLanguage(T

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

2018-03-20 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton added a comment. I think the problem is there are valid places to use assign on object types (especially delegates). There are a lot of special cases to deal with here, and it's really up to each team to decide the rules for when assign on object types are OK, so I don't think a co

[PATCH] D43766: [clang-tidy][modernize-make-unique] Checks c++14 flag before using std::make_unique

2018-03-20 Thread Frederic Tingaud via Phabricator via cfe-commits
ftingaud added a comment. Hi, Yes please! https://reviews.llvm.org/D43766 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D44694: [clang-tidy] Use :doc: for check links in Release Notes

2018-03-20 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: rCTE Clang Tools Extra https://reviews.llvm.org/D44694 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

r328036 - Set dso_local for runtime function.

2018-03-20 Thread Rafael Espindola via cfe-commits
Author: rafael Date: Tue Mar 20 13:27:30 2018 New Revision: 328036 URL: http://llvm.org/viewvc/llvm-project?rev=328036&view=rev Log: Set dso_local for runtime function. This is another case where there is special logic for adding dllimport and so we cannot use setGVProperties. Modified: cfe/

[PATCH] D44688: Set dso_local for runtime functions

2018-03-20 Thread Rafael Avila de Espindola via Phabricator via cfe-commits
espindola added a comment. In https://reviews.llvm.org/D44688#1043575, @rnk wrote: > lgtm > > We don't assume these are `dso_local` on Linux, right? Depends on shouldAssumeDSOLocal. We do if there is no -fPIC or -fPIE for example. https://reviews.llvm.org/D44688 __

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

2018-03-20 Thread Alfred Zien via Phabricator via cfe-commits
QF5690 added a comment. > I think the problem is there are valid places to use assign on object types > (especially delegates). Isn't it better to have unsafe_unretained there? I thought unsafe_unretained keyword is introduced specifically for that kinds of things. Ok, here is my last point :)

[PATCH] D44688: Set dso_local for runtime functions

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

Re: r328006 - [NVPTX] Make tensor load/store intrinsics overloaded.

2018-03-20 Thread Rafael Avila de Espindola via cfe-commits
With this clang/test/CodeGen/builtins-nvptx-sm_70.cu is crashing: lib/IR/Instructions.cpp:299: void llvm::CallInst::init(llvm::FunctionType *, llvm::Value *, ArrayRef, ArrayRef, const llvm::Twine &): Assertion `(i >= FTy->getNumParams()|| FTy->getParamType(i) == Args[i]->getType()) && "Calling a f

r328038 - [AArch64] Add vmulxh_lane fp16 vector intrinsic

2018-03-20 Thread Abderrazek Zaafrani via cfe-commits
Author: az Date: Tue Mar 20 13:37:31 2018 New Revision: 328038 URL: http://llvm.org/viewvc/llvm-project?rev=328038&view=rev Log: [AArch64] Add vmulxh_lane fp16 vector intrinsic https://reviews.llvm.org/D44591 Modified: cfe/trunk/include/clang/Basic/arm_neon.td cfe/trunk/lib/CodeGen/CGBui

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

2018-03-20 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton added a comment. > Isn't it better to have unsafe_unretained there? That is a good question for the author of that property attribute. I'm not sure of the entire history. Repository: rC Clang https://reviews.llvm.org/D44539 ___ cfe-

Re: r328006 - [NVPTX] Make tensor load/store intrinsics overloaded.

2018-03-20 Thread Artem Belevich via cfe-commits
Thanks for the heads up. Which buildbot shows the failure? I don't see the failure on the cuda buildbot, nor do I see it on my machine locally. It may be due to llvm/clang being out of sync. The commit had changes for both sides and if clang and llvm are out of sync, you may see this kind of erro

r328040 - Set dso_local on string literals.

2018-03-20 Thread Rafael Espindola via cfe-commits
Author: rafael Date: Tue Mar 20 13:42:55 2018 New Revision: 328040 URL: http://llvm.org/viewvc/llvm-project?rev=328040&view=rev Log: Set dso_local on string literals. Modified: cfe/trunk/lib/CodeGen/CodeGenModule.cpp cfe/trunk/test/CodeGen/c-strings.c cfe/trunk/test/CodeGen/string-lit

r328041 - [format] Initialize regex lazily

2018-03-20 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Tue Mar 20 13:43:12 2018 New Revision: 328041 URL: http://llvm.org/viewvc/llvm-project?rev=328041&view=rev Log: [format] Initialize regex lazily No need to pay for this on program startup, and also no need to destroy it on process end. Modified: cfe/trunk/lib/Format/Namespa

[PATCH] D44689: Set dso_local on string literals

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

  1   2   >