[PATCH] D39159: [analyzer] Improves the logic of GenericTaintChecker identifying stdin.

2018-03-05 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin accepted this revision. a.sidorin added a comment. LGTM. Repository: rC Clang https://reviews.llvm.org/D39159 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r326684 - [Bash-autocompletion] Pass all flags in shell command-line to Clang

2018-03-05 Thread Yuka Takahashi via cfe-commits
Author: yamaguchi Date: Mon Mar 5 00:54:20 2018 New Revision: 326684 URL: http://llvm.org/viewvc/llvm-project?rev=326684&view=rev Log: [Bash-autocompletion] Pass all flags in shell command-line to Clang Previously, we passed "#" to --autocomplete to indicate to enable cc1 flags. For example, whe

[PATCH] D39342: [Bash-autocompletion] Pass all flags in shell command-line to Clang

2018-03-05 Thread Yuka Takahashi via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL326684: [Bash-autocompletion] Pass all flags in shell command-line to Clang (authored by yamaguchi, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm

r326685 - [Bash-autocompletion] Fixed formatting

2018-03-05 Thread Yuka Takahashi via cfe-commits
Author: yamaguchi Date: Mon Mar 5 01:01:31 2018 New Revision: 326685 URL: http://llvm.org/viewvc/llvm-project?rev=326685&view=rev Log: [Bash-autocompletion] Fixed formatting Fixed a trivial formatting and indent. Modified: cfe/trunk/lib/Driver/Driver.cpp Modified: cfe/trunk/lib/Driver/Driv

[PATCH] D44003: [clangd] Fix unintentionally loose fuzzy matching, and the tests masking it.

2018-03-05 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, but note the unreachable code comment Comment at: unittests/clangd/FuzzyMatchTests.cpp:35 + + friend raw_ostream &operator<<(raw_ostream &OS, const Expec

[PATCH] D43814: [x86][CET] Introduce _get_ssp, _inc_ssp intrinsics

2018-03-05 Thread Alexander Ivchenko via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC326689: [x86][CET] Introduce _get_ssp, _inc_ssp intrinsics (authored by aivchenk, committed by ). Repository: rC Clang https://reviews.llvm.org/D43814 Files: lib/Headers/cetintrin.h test/CodeGen/c

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

2018-03-05 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin added a comment. Hello Gabor, Unfortunately, we did same or similar work: https://reviews.llvm.org/D44079. We have to decide what approach is going to be used. It doesn't mean that we should select only one - probably, we can use both approaches together and refactor or change our pa

r326689 - [x86][CET] Introduce _get_ssp, _inc_ssp intrinsics

2018-03-05 Thread Alexander Ivchenko via cfe-commits
Author: aivchenk Date: Mon Mar 5 03:30:28 2018 New Revision: 326689 URL: http://llvm.org/viewvc/llvm-project?rev=326689&view=rev Log: [x86][CET] Introduce _get_ssp, _inc_ssp intrinsics Summary: The _get_ssp intrinsic can be used to retrieve the shadow stack pointer, independent of the current ar

[PATCH] D44087: [msvc] Allow MSVC toolchain driver to find the aarch64 / arm64 cross-compiler.

2018-03-05 Thread Chris January via Phabricator via cfe-commits
arm-chrjan01 created this revision. arm-chrjan01 added reviewers: zturner, rnk. Herald added subscribers: cfe-commits, kristof.beyls, rengolin. arm-chrjan01 added a comment. I don't have commit access. Please commit after approval. Starting with the Fall Creators Update, Windows 10 Desktop can r

[PATCH] D44087: [msvc] Allow MSVC toolchain driver to find the aarch64 / arm64 cross-compiler.

2018-03-05 Thread Chris January via Phabricator via cfe-commits
arm-chrjan01 added a comment. I don't have commit access. Please commit after approval. Repository: rC Clang https://reviews.llvm.org/D44087 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cf

[PATCH] D42730: [clang-tidy]] Add check for use of types/classes/functions from header which are deprecated and removed in C++17

2018-03-05 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/modernize/DeprecatedFunctionalCheck.cpp:48-54 + } else if (const auto *const Call = + Result.Nodes.getNodeAs("ptr_fun_call")) { +diag(Call->getLocStart(), Message) << "'std::ptr_fun'"; + } else if (const a

[PATCH] D44088: [clangd] Extract ClangdServer::Options struct.

2018-03-05 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. sammccall added a reviewer: ilya-biryukov. Herald added subscribers: cfe-commits, ioeric, jkorous-apple, klimek. This subsumes most of the params to ClangdServer and ClangdLSPServer. Adjacent changes: - tests use a consistent set of options, except when testing sp

[PATCH] D35068: [analyzer] Detect usages of unsafe I/O functions

2018-03-05 Thread Daniel Kolozsvari via Phabricator via cfe-commits
koldaniel added inline comments. Comment at: lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp:618 + StringRef Name = FD->getIdentifier()->getName(); + int ArgIndex = llvm::StringSwitch(Name) + .Case("sprintf", 1) george.karpenkov wrot

[PATCH] D42730: [clang-tidy]] Add check for use of types/classes/functions from header which are deprecated and removed in C++17

2018-03-05 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/modernize/DeprecatedFunctionalCheck.cpp:48-54 + } else if (const auto *const Call = + Result.Nodes.getNodeAs("ptr_fun_call")) { +diag(Call->getLocStart(), Message) << "'std::ptr_fun'"; + } else if (

[PATCH] D44088: [clangd] Extract ClangdServer::Options struct.

2018-03-05 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clangd/ClangdServer.h:94 + /// Returns a statically allocated instance. (Stateless, safe to share). + static RealFileSystemProvider *get(); + Maybe return a reference instead of a pointer? Comm

[PATCH] D44088: [clangd] Extract ClangdServer::Options struct.

2018-03-05 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 136991. sammccall marked 3 inline comments as done. sammccall added a comment. address review comments Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D44088 Files: clangd/ClangdLSPServer.cpp clangd/ClangdLSPServer.h clangd/ClangdServ

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

2018-03-05 Thread Francois Ferrand via Phabricator via cfe-commits
Typz added a comment. 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] D43197: [OpenMP] Add flag for linking runtime bitcode library

2018-03-05 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea added a comment. In https://reviews.llvm.org/D43197#1011256, @Hahnfeld wrote: > Looking more closely at the patch, this doesn't seem to look into the `lib` / > `lib64` next to the compiler. I'm not sure if `LIBRARY_PATH` is set for every > installation, so I think we should add this on

r326709 - [analyzer] Improves the logic of GenericTaintChecker identifying stdin.

2018-03-05 Thread Henry Wong via cfe-commits
Author: henrywong Date: Mon Mar 5 07:41:15 2018 New Revision: 326709 URL: http://llvm.org/viewvc/llvm-project?rev=326709&view=rev Log: [analyzer] Improves the logic of GenericTaintChecker identifying stdin. Summary: GenericTaintChecker can't recognize stdin in some cases. The reason is that `if

[PATCH] D39159: [analyzer] Improves the logic of GenericTaintChecker identifying stdin.

2018-03-05 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC326709: [analyzer] Improves the logic of GenericTaintChecker identifying stdin. (authored by henrywong, committed by ). Repository: rC Clang https://reviews.llvm.org/D39159 Files: lib/StaticAnalyzer

[PATCH] D43197: [OpenMP] Add flag for linking runtime bitcode library

2018-03-05 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea added inline comments. Comment at: lib/Driver/ToolChains/Cuda.cpp:536-542 + StringRef CompilerPath = env; + while (!CompilerPath.empty()) { +std::pair Split = +CompilerPath.split(llvm::sys::EnvPathSeparator); +LibraryPaths.push_back(

[PATCH] D43847: [clang-tidy] Add check: replace string::find(...) == 0 with absl::StartsWith

2018-03-05 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. In https://reviews.llvm.org/D43847#1025846, @Eugene.Zelenko wrote: > In https://reviews.llvm.org/D43847#1025833, @niko wrote: > > > Thanks everyone for your comments! I renamed the namespace and filenames to > > 'abseil'. > > > > @Eugene.Zelenko, definitely interested in

[PATCH] D44093: [BUILTINS] structure pretty printer

2018-03-05 Thread Paul Semel via Phabricator via cfe-commits
paulsemel created this revision. paulsemel added a reviewer: aaron.ballman. The purpose of this new builtin is to be able to pretty print any structure at runtime. This might be really useful when debugging is not an option or is fastidious (like for kernel development). Repository: rC Clang

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

2018-03-05 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. Hi Aleksei, I agree that there are some overlapping functionalities in the patches. As far as I see both make it possible to write tests which import from multiple contexts and I think that is the only redundant part. So, I agree, for now we could use both approaches si

[PATCH] D25820: [Sema][Objective-C] Formatting warnings should see through Objective-C message sends

2018-03-05 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton added a comment. Herald added subscribers: llvm-commits, jkorous-apple. This caused a regression where `__attribute__((format_arg(X))` no longer works with ObjC message sends. I filed https://bugs.llvm.org/show_bug.cgi?id=36599 and will write a fix. Repository: rL LLVM https://r

[PATCH] D43847: [clang-tidy] Add check: replace string::find(...) == 0 with absl::StartsWith

2018-03-05 Thread Niko Weh via Phabricator via cfe-commits
niko updated this revision to Diff 137008. niko marked 11 inline comments as done. niko added a comment. Addressed reviewer comments. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D43847 Files: clang-tidy/CMakeLists.txt clang-tidy/abseil/AbseilTidyModule.cpp clang-tidy/ab

[PATCH] D43847: [clang-tidy] Add check: replace string::find(...) == 0 with absl::StartsWith

2018-03-05 Thread Niko Weh via Phabricator via cfe-commits
niko marked an inline comment as done. niko added inline comments. Comment at: clang-tidy/absl/StringFindStartswithCheck.cpp:81 + auto include_hint = include_inserter_->CreateIncludeInsertion( + source.getFileID(expr->getLocStart()), "third_party/absl/strings/match.h", +

[PATCH] D25820: [Sema][Objective-C] Formatting warnings should see through Objective-C message sends

2018-03-05 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton added a comment. Actually, looking more deeply, it's possible this is a bug in the Apple SDK: @interface NSBundle - (NSString *)localizedStringForKey:(NSString *)key value:(nullable NSString *)value table:(nullable NSString *)tableName __attribute__((format_arg(1))); @end Sinc

[PATCH] D44095: [ObjC] Allow declaring __weak pointer fields in C structs in ObjC-ARC

2018-03-05 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak created this revision. ahatanak added reviewers: rjmccall, doug.gregor, rsmith. This patch makes changes that are needed to allow `__weak` fields in C structs when ARC is enabled. Repository: rC Clang https://reviews.llvm.org/D44095 Files: include/clang/AST/Decl.h include/clang

[PATCH] D43197: [OpenMP] Add flag for linking runtime bitcode library

2018-03-05 Thread Jonas Hahnfeld via Phabricator via cfe-commits
Hahnfeld added a comment. In https://reviews.llvm.org/D43197#1027139, @gtbercea wrote: > In https://reviews.llvm.org/D43197#1011256, @Hahnfeld wrote: > > > Looking more closely at the patch, this doesn't seem to look into the `lib` > > / `lib64` next to the compiler. I'm not sure if `LIBRARY_PAT

[PATCH] D25820: [Sema][Objective-C] Formatting warnings should see through Objective-C message sends

2018-03-05 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D25820#1027216, @benhamilton wrote: > Actually, looking more deeply, it's possible this is a bug in the Apple SDK: > > @interface NSBundle > - (NSString *)localizedStringForKey:(NSString *)key value:(nullable > NSString *)value table

[PATCH] D43902: [clang-format] Don't detect C++11 attribute specifiers as ObjC

2018-03-05 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: lib/Format/TokenAnnotator.cpp:323 + const FormatToken *parseCpp11Attribute(const FormatToken *Tok, +

[PATCH] D43902: [clang-format] Don't detect C++11 attribute specifiers as ObjC

2018-03-05 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton updated this revision to Diff 137015. benhamilton marked 7 inline comments as done. benhamilton added a comment. Fixes from @jolesiak Repository: rC Clang https://reviews.llvm.org/D43902 Files: lib/Format/FormatToken.h lib/Format/TokenAnnotator.cpp unittests/Format/FormatTe

[PATCH] D43902: [clang-format] Don't detect C++11 attribute specifiers as ObjC

2018-03-05 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton added a comment. Thanks very much for the code review. I fixed those issues. Comment at: lib/Format/TokenAnnotator.cpp:323 + const FormatToken *parseCpp11Attribute(const FormatToken *Tok, + bool NamespaceAllowed) {

[PATCH] D25820: [Sema][Objective-C] Formatting warnings should see through Objective-C message sends

2018-03-05 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton added a comment. > That does look like a bug in the SDK, to me. OK. I'll file a Radar bug upstream; in the meantime, this means since this diff landed in 2016, clang has been raising `-Wformat-extra-args` when compiling any code which passes the result of `-[NSBundle localizedStri

[clang-tools-extra] r326719 - [clangd] Extract ClangdServer::Options struct.

2018-03-05 Thread Sam McCall via cfe-commits
Author: sammccall Date: Mon Mar 5 09:28:54 2018 New Revision: 326719 URL: http://llvm.org/viewvc/llvm-project?rev=326719&view=rev Log: [clangd] Extract ClangdServer::Options struct. Summary: This subsumes most of the params to ClangdServer and ClangdLSPServer. Adjacent changes: - tests use a co

[PATCH] D44088: [clangd] Extract ClangdServer::Options struct.

2018-03-05 Thread Sam McCall via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL326719: [clangd] Extract ClangdServer::Options struct. (authored by sammccall, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D44088 Files: cla

[PATCH] D43911: [AMDGPU] Clean up old address space mapping and fix constant address space value

2018-03-05 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. Will make recommended changes when committing. https://reviews.llvm.org/D43911 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D44003: [clangd] Fix unintentionally loose fuzzy matching, and the tests masking it.

2018-03-05 Thread Sam McCall via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE326721: [clangd] Fix unintentionally loose fuzzy matching, and the tests masking it. (authored by sammccall, committed by ). Changed prior to commit: https://reviews.llvm.org/D44003?vs=136719&id=13702

[clang-tools-extra] r326721 - [clangd] Fix unintentionally loose fuzzy matching, and the tests masking it.

2018-03-05 Thread Sam McCall via cfe-commits
Author: sammccall Date: Mon Mar 5 09:34:33 2018 New Revision: 326721 URL: http://llvm.org/viewvc/llvm-project?rev=326721&view=rev Log: [clangd] Fix unintentionally loose fuzzy matching, and the tests masking it. Summary: The intent was that [ar] doesn't match "FooBar"; the first character must m

Re: r326324 - [analyzer] Fix a compiler warning

2018-03-05 Thread David Blaikie via cfe-commits
Might be useful in the future to use a more specific commit message such as "add missing override" (or "add missing override to address -Wmissing-override warning"), etc. On Wed, Feb 28, 2018 at 6:03 AM Gabor Horvath via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: xazax > Date: Wed

r326725 - [AMDGPU] Clean up old address space mapping and fix constant address space value

2018-03-05 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Mon Mar 5 09:50:10 2018 New Revision: 326725 URL: http://llvm.org/viewvc/llvm-project?rev=326725&view=rev Log: [AMDGPU] Clean up old address space mapping and fix constant address space value Differential Revision: https://reviews.llvm.org/D43911 Modified: cfe/trunk/lib

[PATCH] D43911: [AMDGPU] Clean up old address space mapping and fix constant address space value

2018-03-05 Thread Yaxun Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL326725: [AMDGPU] Clean up old address space mapping and fix constant address space value (authored by yaxunl, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://re

[PATCH] D44100: [ASTImporter] Reorder fields after structure import is finished

2018-03-05 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin created this revision. a.sidorin added reviewers: xazax.hun, szepet, jingham. Herald added subscribers: martong, rnkovacs. - There are multiple reasons why field structures can be imported in wrong way. The simplest is the ability of field initializers and method bodies to refer fields

[PATCH] D43783: [OpenCL] Remove block invoke function from emitted block literal struct

2018-03-05 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. ping https://reviews.llvm.org/D43783 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D25820: [Sema][Objective-C] Formatting warnings should see through Objective-C message sends

2018-03-05 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton added a comment. I filed rdar://38143508 to track this. The fix won't be easy; I think `__attribute__((format_arg(X)))` isn't enough to capture how `-[NSBundle localizedStringForKey:value:table:]` works: 1. `__attribute__((format_arg(X)))` doesn't support multiple format arguments,

[PATCH] D43902: [clang-format] Don't detect C++11 attribute specifiers as ObjC

2018-03-05 Thread Daniel Jasper via Phabricator via cfe-commits
djasper added inline comments. Comment at: lib/Format/TokenAnnotator.cpp:352 + return false; +if (!Tok.startsSequence(tok::l_square, tok::l_square)) + return false; Just join this if with the previous one. Comment at: lib/Format/T

[PATCH] D43902: [clang-format] Don't detect C++11 attribute specifiers as ObjC

2018-03-05 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added inline comments. Comment at: lib/Format/TokenAnnotator.cpp:323 + const FormatToken *parseCpp11Attribute(const FormatToken &Tok, + bool NamespaceAllowed) { Please inline this into the other function: it's u

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

2018-03-05 Thread Weiming Zhao via Phabricator via cfe-commits
weimingz added a comment. gentle ping? https://reviews.llvm.org/D41316 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D43904: [clang-format] Improve detection of ObjC for-in statements

2018-03-05 Thread Daniel Jasper via Phabricator via cfe-commits
djasper added inline comments. Comment at: lib/Format/TokenAnnotator.cpp:288 +if (MightBeObjCForRangeLoop) { + FormatToken *ForInToken = Left; There can be only one ObjCForIn token in any for loop, right? If that's the case, can we just rememb

[PATCH] D43904: [clang-format] Improve detection of ObjC for-in statements

2018-03-05 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added inline comments. Comment at: unittests/Format/FormatTest.cpp:12002 +TEST_F(FormatTest, GuessLanguageWithForIn) { + EXPECT_EQ(FormatStyle::LK_Cpp, Please also add this instances as formatting tests. Repository: rC Clang https://reviews.llvm.

[PATCH] D43906: [clang-format] Improve detection of Objective-C block types

2018-03-05 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added inline comments. Comment at: unittests/Format/FormatTest.cpp:12027 +TEST_F(FormatTest, GuessLanguageWithCaret) { + EXPECT_EQ(FormatStyle::LK_Cpp, guessLanguage("foo.h", "FOO(^);")); Please also add formatting tests. This might require changes to

[PATCH] D43906: [clang-format] Improve detection of Objective-C block types

2018-03-05 Thread Daniel Jasper via Phabricator via cfe-commits
djasper added a comment. Would it be enough to only add the block type case? With the macro false positive, there won't be an open paren after the closing paren, right? Comment at: lib/Format/TokenAnnotator.cpp:155 + Next->startsSequence(tok::identifier, tok::l_squar

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

2018-03-05 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone added inline comments. Comment at: test/std/numerics/rand/rand.device/lit.local.cfg:1 +# Disable all of the random device tests if the correct feature is not available. +if 'libcpp-has-no-random-device' in config.available_features: EricWF wrote: > T

[PATCH] D42624: [clang-tidy] Add a utility Matcher to match the next statement within a statement sequence

2018-03-05 Thread Tristan Bourvon via Phabricator via cfe-commits
tbourvon added a comment. @alexfh What is your opinion regarding adding this dependency? Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D42624 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mail

[PATCH] D44103: Adding additional UNSUPPORTED platform in libcxx/test/std/strings/basic.string/string.cons/iter_alloc_deduction.fail.cpp

2018-03-05 Thread Mike Edwards via Phabricator via cfe-commits
sqlbyme created this revision. sqlbyme added reviewers: EricWF, dexonsmith. Herald added a subscriber: cfe-commits. I am in the process of upgrading the Green Dragon bots and this test fails because we have not yet included apple-clang-9.0 in the UNSUPPORTED line of this test. This patch addres

[PATCH] D44103: Adding additional UNSUPPORTED platform in libcxx/test/std/strings/basic.string/string.cons/iter_alloc_deduction.fail.cpp

2018-03-05 Thread Vedant Kumar via Phabricator via cfe-commits
vsk added a comment. Is the test expected to pass with clang-902? If not, then it'd be best to use "apple-clang-9" instead of "apple-clang-9.0". Repository: rCXX libc++ https://reviews.llvm.org/D44103 ___ cfe-commits mailing list cfe-commits@lis

r326741 - Fix typo in comment.

2018-03-05 Thread Richard Smith via cfe-commits
Author: rsmith Date: Mon Mar 5 12:54:34 2018 New Revision: 326741 URL: http://llvm.org/viewvc/llvm-project?rev=326741&view=rev Log: Fix typo in comment. Modified: cfe/trunk/lib/Sema/SemaDecl.cpp Modified: cfe/trunk/lib/Sema/SemaDecl.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/li

[PATCH] D43731: [clang-format] Fix documentation for SpaceAfterCStyleCast option

2018-03-05 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir accepted this revision. krasimir added a comment. This revision is now accepted and ready to land. Thank you! https://reviews.llvm.org/D43731 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/list

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

2018-03-05 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone added a comment. @rtrieu (and perhaps @rsmith) ping? The action items I need help with are: - Review and land the refactoring patch https://reviews.llvm.org/D43898 (I don't have commit privs) - Ideally, test compiling a bunch of (e.g. Google) code with https://reviews.llvm.org/D433

r326744 - [msvc] Allow MSVC toolchain driver to find the aarch64 / arm64 cross-compiler.

2018-03-05 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Mon Mar 5 13:36:23 2018 New Revision: 326744 URL: http://llvm.org/viewvc/llvm-project?rev=326744&view=rev Log: [msvc] Allow MSVC toolchain driver to find the aarch64 / arm64 cross-compiler. Starting with the Fall Creators Update, Windows 10 Desktop can run on machines that are

[PATCH] D44087: [msvc] Allow MSVC toolchain driver to find the aarch64 / arm64 cross-compiler.

2018-03-05 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 Repository: rC Clang https://reviews.llvm.org/D44087 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mail

[PATCH] D44087: [msvc] Allow MSVC toolchain driver to find the aarch64 / arm64 cross-compiler.

2018-03-05 Thread Reid Kleckner via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL326744: [msvc] Allow MSVC toolchain driver to find the aarch64 / arm64 cross-compiler. (authored by rnk, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews

[PATCH] D44075: [analyzer] CStringChecker.cpp: Remove the duplicated check about null dereference on dest-buffer or src-buffer.

2018-03-05 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ accepted this revision. NoQ added a comment. This revision is now accepted and ready to land. Making `CStringChecker` smaller is an accomplishment on its own :) Repository: rC Clang https://reviews.llvm.org/D44075 ___ cfe-commits mailing list

[PATCH] D44093: [BUILTINS] structure pretty printer

2018-03-05 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added reviewers: echristo, rsmith. aaron.ballman added a comment. Adding some reviewers. One thing that's missing from this patch are test cases that demonstrate both the semantic checking (builtin accepts proper args, rejects improper ones, etc) and output. Co

[PATCH] D43741: [Analyzer] More accurate modeling about the increment operator of the operand with type bool.

2018-03-05 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ accepted this revision. NoQ added a comment. This revision is now accepted and ready to land. LGTM, thank you for the fix! > I not familiar with Objective-C++, can you provide a appropriate test about > Objective-C++ for me, thank you! Now that the explicit check and the respective code pat

r326746 - [analyzer] AST-matching checker to detect global central dispatch performance anti-pattern

2018-03-05 Thread George Karpenkov via cfe-commits
Author: george.karpenkov Date: Mon Mar 5 14:03:32 2018 New Revision: 326746 URL: http://llvm.org/viewvc/llvm-project?rev=326746&view=rev Log: [analyzer] AST-matching checker to detect global central dispatch performance anti-pattern rdar://37312818 NB: The checker does not care about the order

[PATCH] D44059: [analyzer] AST-matching checker to detect global central dispatch performance anti-pattern

2018-03-05 Thread George Karpenkov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC326746: [analyzer] AST-matching checker to detect global central dispatch performance… (authored by george.karpenkov, committed by ). Herald added a subscriber: cfe-commits. Repository: rC Clang https:

[PATCH] D43731: [clang-format] Fix documentation for SpaceAfterCStyleCast option

2018-03-05 Thread Eric Marti via Phabricator via cfe-commits
EricMarti added a comment. I cannot commit this patch myself, as I do not have commit access. https://reviews.llvm.org/D43731 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D44103: Adding additional UNSUPPORTED platform in libcxx/test/std/strings/basic.string/string.cons/iter_alloc_deduction.fail.cpp

2018-03-05 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. In https://reviews.llvm.org/D44103#1027664, @vsk wrote: > Is the test expected to pass with clang-902? If not, then it'd be best to use > "apple-clang-9" instead of "apple-clang-9.0". That means that most likely it should be `apple-clang-8` instead of 8.0. But on the

[PATCH] D41968: [libunwind][MIPS] Support MIPS floating-point registers for hard-float ABIs.

2018-03-05 Thread John Baldwin via Phabricator via cfe-commits
bsdjhb updated this revision to Diff 137085. bsdjhb added a comment. - Add a comment about using a single FP layout for O32. - Treat 32-bit floating point registers on O32 as plain registers. Repository: rUNW libunwind https://reviews.llvm.org/D41968 Files: include/__libunwind_config.h i

[PATCH] D41968: [libunwind][MIPS] Support MIPS floating-point registers for hard-float ABIs.

2018-03-05 Thread John Baldwin via Phabricator via cfe-commits
bsdjhb marked 2 inline comments as done. bsdjhb added a comment. This version follows the suggestion I made earlier of treating 32-bit floating point registers as a "plain" register for O32 rather than a floating-point register. It seems to work for me though for O32 I've only tested with 32-bi

[PATCH] D43902: [clang-format] Don't detect C++11 attribute specifiers as ObjC

2018-03-05 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton updated this revision to Diff 137089. benhamilton marked 5 inline comments as done. benhamilton added a comment. - Fix comments from @krasimir and @djasper. Repository: rC Clang https://reviews.llvm.org/D43902 Files: lib/Format/ContinuationIndenter.cpp lib/Format/FormatToken.

[PATCH] D43902: [clang-format] Don't detect C++11 attribute specifiers as ObjC

2018-03-05 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton added inline comments. Comment at: lib/Format/TokenAnnotator.cpp:323 + const FormatToken *parseCpp11Attribute(const FormatToken &Tok, + bool NamespaceAllowed) { krasimir wrote: > Please inline this into the o

[PATCH] D43904: [clang-format] Improve detection of ObjC for-in statements

2018-03-05 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton updated this revision to Diff 137092. benhamilton marked an inline comment as done. benhamilton added a comment. - Fix comments from @djasper and @krasimir. Repository: rC Clang https://reviews.llvm.org/D43904 Files: lib/Format/TokenAnnotator.cpp unittests/Format/FormatTest.c

[PATCH] D43904: [clang-format] Improve detection of ObjC for-in statements

2018-03-05 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton updated this revision to Diff 137093. benhamilton added a comment. One more cleanup Repository: rC Clang https://reviews.llvm.org/D43904 Files: lib/Format/TokenAnnotator.cpp unittests/Format/FormatTest.cpp Index: unittests/Format/FormatTest.cpp =

[PATCH] D43904: [clang-format] Improve detection of ObjC for-in statements

2018-03-05 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton added inline comments. Comment at: lib/Format/TokenAnnotator.cpp:288 +if (MightBeObjCForRangeLoop) { + FormatToken *ForInToken = Left; djasper wrote: > There can be only one ObjCForIn token in any for loop, right? If that's the > c

[PATCH] D44120: [CFG] [analyzer] Heavier CFGValueTypedCall elements.

2018-03-05 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. https://reviews.llvm.org/D42672 has added extra context to construction calls in the CFG so that the users, such as the analyzer, di

[PATCH] D43906: [clang-format] Improve detection of Objective-C block types

2018-03-05 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton updated this revision to Diff 137095. benhamilton marked 2 inline comments as done. benhamilton added a comment. - Fix comments from @djasper and @krasimir. Repository: rC Clang https://reviews.llvm.org/D43906 Files: lib/Format/TokenAnnotator.cpp unittests/Format/FormatTest.c

[PATCH] D43906: [clang-format] Improve detection of Objective-C block types

2018-03-05 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton added a comment. > Would it be enough to only add the block type case? With the macro false > positive, there won't be an open paren after the closing paren, right? Are you asking to remove the block variable cases? I was concerned those would no longer be handled correctly if we do

[PATCH] D44122: [AST] Factor out RawComment lookup and caching. (NFC)

2018-03-05 Thread David L. Jones via Phabricator via cfe-commits
dlj created this revision. dlj added a reviewer: rsmith. dlj added a project: clang. Herald added a subscriber: sanjoy. This changes how RawComments are looked up, so that they can be added to the cache or updated independently of parsing. Loosely, the comment cache has two conceptually separate

[PATCH] D44123: [AST] Enhance comment accessing interface. (NFC)

2018-03-05 Thread David L. Jones via Phabricator via cfe-commits
dlj created this revision. dlj added a reviewer: rsmith. dlj added a project: clang. Herald added a subscriber: sanjoy. Previously, these methods were available for looking up comments: 1. getCommentForDecl: returns a FullComment attached to a decl, or any of its redecls, or any of its bases. 2.

[PATCH] D44124: [analyzer] Support destruction and lifetime-extension of inlined function return values.

2018-03-05 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. With https://reviews.llvm.org/D44120 we can find the `CXXBindTemporaryExpr` and `MaterializeTemporaryExpr` that correspond to the temporary o

[PATCH] D44103: Adding additional UNSUPPORTED platform in libcxx/test/std/strings/basic.string/string.cons/iter_alloc_deduction.fail.cpp

2018-03-05 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. I think the correct fix is something like this: https://github.com/llvm-mirror/libcxx/commit/6878e852d1d26cca0abee3013822311cd894ca3e Repository: rCXX libc++ https://reviews.llvm.org/D44103 ___ cfe-commits mailing list cf

[PATCH] D44103: Adding additional UNSUPPORTED platform in libcxx/test/std/strings/basic.string/string.cons/iter_alloc_deduction.fail.cpp

2018-03-05 Thread Mike Edwards via Phabricator via cfe-commits
sqlbyme updated this revision to Diff 137104. sqlbyme added a comment. I copied what Eric did here: https://github.com/llvm-mirror/libcxx/commit/6878e852d1d26cca0abee3013822311cd894ca3e. I have tested this on our bots and the fix works fine. https://reviews.llvm.org/D44103 Files: test/std/

[PATCH] D44124: [analyzer] Support destruction and lifetime-extension of inlined function return values.

2018-03-05 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov added inline comments. Comment at: lib/StaticAnalyzer/Core/ExprEngineCXX.cpp:316 } } break; 5 closing braces is a lot. What about moving the entire block under `CK_Complete` into a static function? Repository: rC Clang http

[PATCH] D44064: [Driver] Automatically disable incompatible default sanitizers

2018-03-05 Thread Vitaly Buka via Phabricator via cfe-commits
vitalybuka added inline comments. Comment at: clang/lib/Driver/SanitizerArgs.cpp:369 // Check that LTO is enabled if we need it. if ((Kinds & NeedsLTO) && !D.isUsingLTO()) { D.Diag(diag::err_drv_argument_only_allowed_with) Is this change needed to avoi

[PATCH] D44124: [analyzer] Support destruction and lifetime-extension of inlined function return values.

2018-03-05 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: lib/StaticAnalyzer/Core/ExprEngineCXX.cpp:316 } } break; george.karpenkov wrote: > 5 closing braces is a lot. What about moving the entire block under > `CK_Complete` into a static function? I'm already on

r326755 - [analyzer] [quickfix] Prevent a crash in NamedDecl::getName()

2018-03-05 Thread George Karpenkov via cfe-commits
Author: george.karpenkov Date: Mon Mar 5 16:18:21 2018 New Revision: 326755 URL: http://llvm.org/viewvc/llvm-project?rev=326755&view=rev Log: [analyzer] [quickfix] Prevent a crash in NamedDecl::getName() Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/GCDAsyncSemaphoreChecker.cpp cfe/tru

[PATCH] D44064: [Driver] Automatically disable incompatible default sanitizers

2018-03-05 Thread Petr Hosek via Phabricator via cfe-commits
phosek added inline comments. Comment at: clang/lib/Driver/SanitizerArgs.cpp:369 // Check that LTO is enabled if we need it. if ((Kinds & NeedsLTO) && !D.isUsingLTO()) { D.Diag(diag::err_drv_argument_only_allowed_with) vitalybuka wrote: > Is this chang

r326757 - [StaticAnalyzer] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC).

2018-03-05 Thread Eugene Zelenko via cfe-commits
Author: eugenezelenko Date: Mon Mar 5 16:47:41 2018 New Revision: 326757 URL: http://llvm.org/viewvc/llvm-project?rev=326757&view=rev Log: [StaticAnalyzer] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). Modified: cfe/trunk/include/clang/StaticAnal

[PATCH] D35068: [analyzer] Detect usages of unsafe I/O functions

2018-03-05 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov added inline comments. Comment at: lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp:618 + StringRef Name = FD->getIdentifier()->getName(); + int ArgIndex = llvm::StringSwitch(Name) + .Case("sprintf", 1) koldaniel wrot

[PATCH] D44120: [CFG] [analyzer] Heavier CFGValueTypedCall elements.

2018-03-05 Thread Devin Coughlin via Phabricator via cfe-commits
dcoughlin accepted this revision. dcoughlin added a comment. This revision is now accepted and ready to land. This looks good to me. I'm not super happy with the name "CFGValueTypedCall" since it doesn't make it obvious that is reflects "a function call that returns a C++ object by value." Is

[PATCH] D44124: [analyzer] Support destruction and lifetime-extension of inlined function return values.

2018-03-05 Thread Devin Coughlin via Phabricator via cfe-commits
dcoughlin accepted this revision. dcoughlin added a comment. This revision is now accepted and ready to land. LGTM! Comment at: test/Analysis/lifetime-extension.cpp:301 + } + // 1. Construct the original temporary within make(), + // 2. Construct return value of make() (eli

[PATCH] D44095: [ObjC] Allow declaring __weak pointer fields in C structs in ObjC-ARC

2018-03-05 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: include/clang/AST/Decl.h:3631 +PassedIndirectly = true; + } + I feel like this flag should be set by Sema for C++ types that have to be passed indirectly as well; it can then become the single point of truth for

[PATCH] D44129: [analyzer] NFC: Refactor the code for obtaining temporary lifetime info into a method.

2018-03-05 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: D44124: [analyzer] Support destruction and lifetime-extension of inlined function return values.. Because @george.kar

[PATCH] D44130: Driver: Add gcc search path for RHEL devtoolset-7

2018-03-05 Thread Tom Stellard via Phabricator via cfe-commits
tstellar created this revision. Repository: rC Clang https://reviews.llvm.org/D44130 Files: lib/Driver/ToolChains/Gnu.cpp Index: lib/Driver/ToolChains/Gnu.cpp === --- lib/Driver/ToolChains/Gnu.cpp +++ lib/Driver/ToolChains/Gnu

[PATCH] D34848: Driver: Don't mix system tools with devtoolset tools on RHEL

2018-03-05 Thread Tom Stellard via Phabricator via cfe-commits
tstellar added a comment. Ping. https://reviews.llvm.org/D34848 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D42608: Driver: Prefer vendor supplied gcc toolchain

2018-03-05 Thread Tom Stellard via Phabricator via cfe-commits
tstellar added a comment. Ping Repository: rC Clang https://reviews.llvm.org/D42608 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D44131: [analyzer] Support temporaries conjured by conservatively evaluated functions.

2018-03-05 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ created this revision. NoQ added reviewers: dcoughlin, xazax.hun, a.sidorin, george.karpenkov, szepet, baloghadamsoftware. Herald added subscribers: cfe-commits, rnkovacs. If a conservatively evaluated function returns a C++ object by value, it no longer returns a conjured symbol. Instead it

  1   2   >