[clang-tools-extra] r349132 - [clang-tidy] Remove extra config.h includes

2018-12-13 Thread Ivan Donchevskii via cfe-commits
Author: yvvan Date: Thu Dec 13 23:44:52 2018 New Revision: 349132 URL: http://llvm.org/viewvc/llvm-project?rev=349132&view=rev Log: [clang-tidy] Remove extra config.h includes It's included in a new header ClangTidyForceLinker.h and should not be included the second time. Follow up for the https

[PATCH] D55595: [clang-tidy] Share the forced linking code between clang-tidy tool and plugin

2018-12-13 Thread Ivan Donchevskii via Phabricator via cfe-commits
yvvan marked an inline comment as done. yvvan added inline comments. Comment at: clang-tidy/plugin/ClangTidyPlugin.cpp:11 #include "../ClangTidy.h" +#include "../ClangTidyForceLinker.h" #include "../ClangTidyModule.h" yvvan wrote: > lebedev.ri wrote: > > yvvan

[clang-tools-extra] r349131 - [clang-tidy] Share the forced linking code between clang-tidy tool and plugin

2018-12-13 Thread Ivan Donchevskii via cfe-commits
Author: yvvan Date: Thu Dec 13 23:29:06 2018 New Revision: 349131 URL: http://llvm.org/viewvc/llvm-project?rev=349131&view=rev Log: [clang-tidy] Share the forced linking code between clang-tidy tool and plugin Extract code that forces linking to the separate header and include it in both plugin

[PATCH] D55595: [clang-tidy] Share the forced linking code between clang-tidy tool and plugin

2018-12-13 Thread Ivan Donchevskii via Phabricator via cfe-commits
yvvan marked an inline comment as done. yvvan added inline comments. Comment at: clang-tidy/ClangTidyForceLinker.h:11 +#include "llvm/Support/Compiler.h" + +namespace clang { dyung wrote: > dyung wrote: > > Is there a reason that this header file does not use the

r349125 - Fix up diagnostics.

2018-12-13 Thread Richard Trieu via cfe-commits
Author: rtrieu Date: Thu Dec 13 19:35:10 2018 New Revision: 349125 URL: http://llvm.org/viewvc/llvm-project?rev=349125&view=rev Log: Fix up diagnostics. Move some diagnostics around between Diagnostic*Kinds.td files. Diagnostics used in multiple places were moved to DiagnosticCommonKinds.td. Di

[PATCH] D55672: Mangle calling conventions into function pointer types where GCC does

2018-12-13 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added a comment. This revision is now accepted and ready to land. Thanks, that looks great. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55672/new/ https://reviews.llvm.org/D55672 ___ cfe-commits m

[PATCH] D55482: [clang-tidy] Improve google-objc-function-naming diagnostics 📙

2018-12-13 Thread Stephane Moore via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE349123: [clang-tidy] Improve google-objc-function-naming diagnostics 📙 (authored by stephanemoore, committed by ). Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.

[PATCH] D55685: Update Microsoft name mangling scheme for exception specifiers in the type system

2018-12-13 Thread Zachary Turner via Phabricator via cfe-commits
zturner added a comment. Also we still need to put this behind `-fms-compatibility-version`. Finally, it would be nice if you could also update the demangler (`llvm/lib/Demangle/MicrosoftDemangle.cpp`) Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55685/new/ h

[PATCH] D55685: Update Microsoft name mangling scheme for exception specifiers in the type system

2018-12-13 Thread Zachary Turner via Phabricator via cfe-commits
zturner added a comment. Ahh I read the new test cases, and all of the test cases are about the case where `noexcept` function is a parameter, so maybe this is actually the case I was referring to. Can you add a test case for something like this: void f() noexcept { } I get this: 00A 000

[PATCH] D55685: Update Microsoft name mangling scheme for exception specifiers in the type system

2018-12-13 Thread Zachary Turner via Phabricator via cfe-commits
zturner added inline comments. Comment at: lib/AST/MicrosoftMangle.cpp:2311-2314 + if (FT->canThrow()) +Out << 'Z'; + else +Out << "_E"; I knew that the mangling changed whenever a pointer to a `noexcept` function is passed as an argument, and we don't

[PATCH] D55595: [clang-tidy] Share the forced linking code between clang-tidy tool and plugin

2018-12-13 Thread Douglas Yung via Phabricator via cfe-commits
dyung added inline comments. Comment at: clang-tidy/ClangTidyForceLinker.h:11 +#include "llvm/Support/Compiler.h" + +namespace clang { dyung wrote: > Is there a reason that this header file does not use the standard header > guards? Sorry, this should not have b

[PATCH] D55595: [clang-tidy] Share the forced linking code between clang-tidy tool and plugin

2018-12-13 Thread Douglas Yung via Phabricator via cfe-commits
dyung marked an inline comment as done. dyung added inline comments. Comment at: clang-tidy/ClangTidyForceLinker.h:11 +#include "llvm/Support/Compiler.h" + +namespace clang { Is there a reason that this header file does not use the standard header guards? Repos

[PATCH] D55685: Update Microsoft name mangling scheme for exception specifiers in the type system

2018-12-13 Thread Zachary Henkel via Phabricator via cfe-commits
zahen created this revision. zahen added reviewers: zturner, rnk. Herald added a subscriber: cfe-commits. The msvc exception specifier for noexcept function types has changed from the prior default of "Z" to "_E" if the function cannot throw when compiling with /std:C++17. Repository: rC Cla

[PATCH] D55595: [clang-tidy] Share the forced linking code between clang-tidy tool and plugin

2018-12-13 Thread Douglas Yung via Phabricator via cfe-commits
dyung added a comment. I have reverted this in r349121 as it has been causing the PS4 bots to be red for hours now. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55595/new/ https://reviews.llvm.org/D55595

[PATCH] D55229: [COFF] Statically link certain runtime library functions

2018-12-13 Thread Saleem Abdulrasool via Phabricator via cfe-commits
abdulras added a comment. @rnk, I agree that it is a performance optimization, and it actually is in the hot path. I can understand the motivation for the jump. I think that the trampoline might also be a problem for lldb as it (or used to?) statically analyzes to see if it is jumping to `obj

RE: [clang-tools-extra] r349038 - [clang-tidy] Share the forced linking code between clang-tidy tool and plugin

2018-12-13 Thread via cfe-commits
I have reverted this commit in r349121. Ivan, please do not leave in commits that cause failures as they make the bots red which can mask other failures. Douglas Yung From: cfe-commits On Behalf Of Galina Kistanova via cfe-commits Sent: Thursday, December 13, 2018 17:41 To: ivan.donchevs...@qt

[clang-tools-extra] r349121 - Revert "[clang-tidy] Share the forced linking code between clang-tidy tool and plugin"

2018-12-13 Thread Douglas Yung via cfe-commits
Author: dyung Date: Thu Dec 13 18:04:04 2018 New Revision: 349121 URL: http://llvm.org/viewvc/llvm-project?rev=349121&view=rev Log: Revert "[clang-tidy] Share the forced linking code between clang-tidy tool and plugin" This reverts commit r349038 as it was causing test failures: http://lab.llvm

Re: [clang-tools-extra] r349038 - [clang-tidy] Share the forced linking code between clang-tidy tool and plugin

2018-12-13 Thread Galina Kistanova via cfe-commits
Hello Ivan, This commit broke tests to few our builders: http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast/builds/40886 http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast . . . Failing Tests (2): Clang Tools :: clang-tidy/mpi-buffer-

[PATCH] D55544: Warning: objc-encodings-larger-than=

2018-12-13 Thread Dave MacLachlan via Phabricator via cfe-commits
dmaclach added a comment. Akira/John/Erik - any thoughts? Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55544/new/ https://reviews.llvm.org/D55544 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.

[PATCH] D55640: [clang-tidy] Implement a check for large Objective-C type encodings 🔍

2018-12-13 Thread Dave MacLachlan via Phabricator via cfe-commits
dmaclach added inline comments. Comment at: clang-tidy/objc/TypeEncodingSizeCheck.cpp:53 +diag(Block->getCaretLocation(), + "Objective-C type encoding for block expression exceeds %0 " + "characters") I found it very useful in my diagnostics t

[PATCH] D55382: Make -Wstring-plus-int warns even if when the result is not out of bounds

2018-12-13 Thread Douglas Yung via Phabricator via cfe-commits
dyung added a comment. In D55382#1330668 , @anemet wrote: > Actually this has been failing for 8 hours. So reverted in r349117. Also > reverted your attempt to update the test. It wasn't updating the right test: > r349118 And I was just about to com

[PATCH] D55382: Make -Wstring-plus-int warns even if when the result is not out of bounds

2018-12-13 Thread Adam Nemet via Phabricator via cfe-commits
anemet added a comment. Actually this has been failing for 8 hours. So reverted in r349117. Also reverted your attempt to update the test. It wasn't updating the right test: r349118 Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55382/new/ https://reviews.llvm

r349117 - Revert "Make -Wstring-plus-int warns even if when the result is not out of bounds"

2018-12-13 Thread Adam Nemet via cfe-commits
Author: anemet Date: Thu Dec 13 16:43:34 2018 New Revision: 349117 URL: http://llvm.org/viewvc/llvm-project?rev=349117&view=rev Log: Revert "Make -Wstring-plus-int warns even if when the result is not out of bounds" This reverts commit r349054. It's causing: FAILED: tools/clang/bindings/python

r349118 - Revert "Try to update the test to fix the breakage With the new warning, we are showing one more output in the test."

2018-12-13 Thread Adam Nemet via cfe-commits
Author: anemet Date: Thu Dec 13 16:43:36 2018 New Revision: 349118 URL: http://llvm.org/viewvc/llvm-project?rev=349118&view=rev Log: Revert "Try to update the test to fix the breakage With the new warning, we are showing one more output in the test." This reverts commit r349064. This wasn't upd

[PATCH] D55677: [Builltins][X86] Provide implementations of __lzcnt16, __lzcnt, __lzcnt64 for MS compatibility. Remove declarations from intrin.h and implementations from lzcntintrin.h

2018-12-13 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL349098: [Builltins][X86] Provide implementations of __lzcnt16, __lzcnt, __lzcnt64 for… (authored by ctopper, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://rev

r349098 - [Builltins][X86] Provide implementations of __lzcnt16, __lzcnt, __lzcnt64 for MS compatibility. Remove declarations from intrin.h and implementations from lzcntintrin.h

2018-12-13 Thread Craig Topper via cfe-commits
Author: ctopper Date: Thu Dec 13 16:21:02 2018 New Revision: 349098 URL: http://llvm.org/viewvc/llvm-project?rev=349098&view=rev Log: [Builltins][X86] Provide implementations of __lzcnt16, __lzcnt, __lzcnt64 for MS compatibility. Remove declarations from intrin.h and implementations from lzcntin

[PATCH] D55616: Emit ASM input in a constant context

2018-12-13 Thread Bill Wendling via Phabricator via cfe-commits
void added a comment. In D55616#1329301 , @jyknight wrote: > This seems like a good start, but not complete. > > "n" and "i" both should require that their argument is a constant expression. > For "n", it actually must be an immediate constant integer, so

[PATCH] D55616: Emit ASM input in a constant context

2018-12-13 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 178158. void added a comment. The `n` constriant *requires* a known integer. Therefore, enforce this in both Sema and CodeGen by setting the "requires immediate" flag and evaluating to a known integer instead of random "int".. This doesn't so much address `i`, w

[PATCH] D55677: [Builltins][X86] Provide implementations of __lzcnt16, __lzcnt, __lzcnt64 for MS compatibility. Remove declarations from intrin.h and implementations from lzcntintrin.h

2018-12-13 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 The macro seems like a reasonable solution. It also helps keep the global namespace cleaner for non-windows users. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55677/new/ https://re

[PATCH] D55382: Make -Wstring-plus-int warns even if when the result is not out of bounds

2018-12-13 Thread Adam Nemet via Phabricator via cfe-commits
anemet added a comment. This caused: http://green.lab.llvm.org/green/job/clang-stage1-cmake-RA-incremental/56120/consoleFull#1420996271a1ca8a51-895e-46c6-af87-ce24fa4cd561 Please fix or revert. Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55382/new/ https://rev

[PATCH] D55683: [analyzer] Tests for scan-build?

2018-12-13 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ created this revision. NoQ added reviewers: dcoughlin, xazax.hun, a_sidorin, george.karpenkov, szepet, rnkovacs, Szelethus. Herald added subscribers: cfe-commits, dkrupp, donat.nagy, mikhail.ramalho, a.sidorin, baloghadamsoftware. Add a trivial testing infrastructure that could allow writing

[PATCH] D55677: [Builltins][X86] Provide implementations of __lzcnt16, __lzcnt, __lzcnt64 for MS compatibility. Remove declarations from intrin.h and implementations from lzcntintrin.h

2018-12-13 Thread Craig Topper via Phabricator via cfe-commits
craig.topper updated this revision to Diff 178155. craig.topper added a comment. Replace the versions in lzcntintrin.h with macros that are only defined when _MSC_VER is not defined. This avoids a redefinition error when -ms-extensions is enabled which appears to not set _MSC_VER. I forgot to m

[PATCH] D55640: [clang-tidy] Implement a check for large Objective-C type encodings 🔍

2018-12-13 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore updated this revision to Diff 178152. stephanemoore added a comment. Update check description to match release notes. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55640/new/ https://reviews.llvm.org/D55640 Files: clang-tidy/objc/CM

[PATCH] D55677: [Builltins][X86] Provide implementations of __lzcnt16, __lzcnt, __lzcnt64 for MS compatibility. Remove declarations from intrin.h and implementations from lzcntintrin.h

2018-12-13 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. In D55677#1330559 , @craig.topper wrote: > yeah I'm now realizing that gcc does implement __lzcnt16 and __lzcnt64. How > do I make this work? I tried guarding them with _MSC_VER, but I got > redefinition errors on a couple tests fro

[PATCH] D55388: [analyzer] MoveChecker Pt.8: Add checks for dereferencing a smart pointer after move.

2018-12-13 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. In D55388#1322601 , @xazax.hun wrote: > Hm. I wonder if it would also make sense to model e.g. the get method to > return nullptr for moved from smart ptrs. This could help null dereference > checker and also aid false path prunning.

[PATCH] D55677: [Builltins][X86] Provide implementations of __lzcnt16, __lzcnt, __lzcnt64 for MS compatibility. Remove declarations from intrin.h and implementations from lzcntintrin.h

2018-12-13 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added a comment. yeah I'm now realizing that gcc does implement __lzcnt16 and __lzcnt64. How do I make this work? I tried guarding them with _MSC_VER, but I got redefinition errors on a couple tests from that. Does -ms-extensions not define _MSC_VER? CHANGES SINCE LAST ACTION ht

[PATCH] D55677: [Builltins][X86] Provide implementations of __lzcnt16, __lzcnt, __lzcnt64 for MS compatibility. Remove declarations from intrin.h and implementations from lzcntintrin.h

2018-12-13 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. This has the effect of removing __lzcnt* from non-MSVC targets using immintrin.h. Is that intended? It doesn't seem like these implementations were guarded by ifdef _MSC_VER. Otherwise, yep, makes sense. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55677/new/ ht

[PATCH] D55680: [analyzer] ObjCDealloc: Fix a crash when a class attempts to deallocate another class.

2018-12-13 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ created this revision. NoQ added reviewers: dcoughlin, george.karpenkov. Herald added subscribers: cfe-commits, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, szepet, baloghadamsoftware, xazax.hun. The checker wasn't prepared to see the `dealloc` message sent to the class itself

[PATCH] D55672: Mangle calling conventions into function pointer types where GCC does

2018-12-13 Thread Reid Kleckner via Phabricator via cfe-commits
rnk updated this revision to Diff 178144. rnk added a comment. - Add ms_abi and sysv_abi tests to match GCC CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55672/new/ https://reviews.llvm.org/D55672 Files: clang/lib/AST/ItaniumMangle.cpp clang/test/CodeGenCXX/mangle-win-ccs.cpp cla

[PATCH] D55676: [Modules] Fix decl order for DeclsInPrototype

2018-12-13 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added a comment. This fixes the same problem previously addressed in https://reviews.llvm.org/D54923 CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55676/new/ https://reviews.llvm.org/D55676 ___ cfe-commits mailing list cfe-commits@li

[PATCH] D55673: [darwin] parse the SDK settings from SDKSettings.json if it exists and pass in the -target-sdk-version to the compiler and backend

2018-12-13 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman marked an inline comment as done. arphaman added inline comments. Comment at: include/clang/Driver/DarwinSDKInfo.h:36 +/// SDK has no SDKSettings.json, or a valid \c DarwinSDKInfo otherwise. +Expected> parseDarwinSDKInfo(llvm::vfs::FileSystem &VFS, +

[PATCH] D55677: [Builltins][X86] Provide implementations of __lzcnt16, __lzcnt, __lzcnt64 for MS compatibility. Remove declarations from intrin.h and implementations from lzcntintrin.h

2018-12-13 Thread Craig Topper via Phabricator via cfe-commits
craig.topper created this revision. craig.topper added a reviewer: rnk. intrin.h had forward declarations for these and lzcntintrin.h had implementations that were only available with -mlzcnt or a -march that supported the lzcnt feature. But the 32-bit version was misnamed in lzcntrin.h This pa

[PATCH] D55673: [darwin] parse the SDK settings from SDKSettings.json if it exists and pass in the -target-sdk-version to the compiler and backend

2018-12-13 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman marked an inline comment as done. arphaman added inline comments. Comment at: include/clang/Driver/DarwinSDKInfo.h:1 +//===--- DarwinSDKInfo.h - SDK Information parser for darwin *- C++ -*-===// +// steven_wu wrote: > Can this just be in Toolchains/

[PATCH] D54923: [Modules] Remove non-determinism while serializing DECL_CONTEXT_LEXICAL and DECL_RECORD

2018-12-13 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno abandoned this revision. bruno added a comment. Abandon this one in favor of https://reviews.llvm.org/D55676 CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54923/new/ https://reviews.llvm.org/D54923 ___ cfe-commits mailing list cfe-com

[PATCH] D55676: [Modules] Fix decl order for DeclsInPrototype

2018-12-13 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno created this revision. bruno added reviewers: rsmith, aprantl, v.g.vassilev. Herald added subscribers: dexonsmith, mgrang, jkorous. When a declarator is constructed for a function prototype in `Parser::ParseFunctionDeclarator`, it calls getCurScope()->decls() in order to populate DeclsInProt

[PATCH] D55672: Mangle calling conventions into function pointer types where GCC does

2018-12-13 Thread Reid Kleckner via Phabricator via cfe-commits
rnk updated this revision to Diff 178138. rnk added a comment. - more tests CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55672/new/ https://reviews.llvm.org/D55672 Files: clang/lib/AST/ItaniumMangle.cpp clang/test/CodeGenCXX/mangle-win-ccs.cpp Index: clang/test/CodeGenCXX/mangle

[PATCH] D55672: Mangle calling conventions into function pointer types where GCC does

2018-12-13 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. In D55672#1330460 , @rjmccall wrote: > Thanks. I think you missed these, though: > > - a template argument that's just a function type, not a function pointer or > reference type I think useTemplateFnType is supposed to handle that

[PATCH] D55673: [darwin] parse the SDK settings from SDKSettings.json if it exists and pass in the -target-sdk-version to the compiler and backend

2018-12-13 Thread Steven Wu via Phabricator via cfe-commits
steven_wu added a comment. See comments inline. Comment at: include/clang/Driver/DarwinSDKInfo.h:1 +//===--- DarwinSDKInfo.h - SDK Information parser for darwin *- C++ -*-===// +// Can this just be in Toolchains/Darwin.h? Comment at: inc

[PATCH] D55672: Mangle calling conventions into function pointer types where GCC does

2018-12-13 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In D55672#1330458 , @rnk wrote: > In D55672#1330402 , @rnk wrote: > > > - a specialization of a function template that happens to be declared with > > this calling convention (this also pr

[PATCH] D55672: Mangle calling conventions into function pointer types where GCC does

2018-12-13 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Thanks. I think you missed these, though: - a template argument that's just a function type, not a function pointer or reference type - a specialization of a function template that happens to be declared with this calling convention (this also probably shouldn't inclu

[PATCH] D55672: Mangle calling conventions into function pointer types where GCC does

2018-12-13 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. In D55672#1330402 , @rnk wrote: > - a specialization of a function template that happens to be declared with > this calling convention (this also probably shouldn't include the CC in the > mangling, but it's okay to match GCC if it d

[PATCH] D55413: [ExprConstant] Handle compound assignment when LHS has integral type and RHS has floating point type

2018-12-13 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: clang/lib/AST/ExprConstant.cpp:3441 + Value); +} APSInt LHS = HandleIntToIntCast(Info, E, PromotedLHSType, cpplearner wrote: > rjmccall wrote: > > cpplearner wrote: > > > rjmcca

[PATCH] D55672: Mangle calling conventions into function pointer types where GCC does

2018-12-13 Thread Reid Kleckner via Phabricator via cfe-commits
rnk updated this revision to Diff 178137. rnk added a comment. - add more tests CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55672/new/ https://reviews.llvm.org/D55672 Files: clang/lib/AST/ItaniumMangle.cpp clang/test/CodeGenCXX/mangle-win-ccs.cpp Index: clang/test/CodeGenCXX/ma

[PATCH] D55673: [darwin] parse the SDK settings from SDKSettings.json if it exists and pass in the -target-sdk-version to the compiler and backend

2018-12-13 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman created this revision. arphaman added reviewers: steven_wu, ab, dexonsmith. Herald added subscribers: jkorous, mgorny. This patch is a follow-up to the LLVM SDK Version metadata support: https://reviews.llvm.org/D55612. This patch adds support for reading the `SDKSettings.json` file in

[PATCH] D55672: Mangle calling conventions into function pointer types where GCC does

2018-12-13 Thread Reid Kleckner via Phabricator via cfe-commits
rnk planned changes to this revision. rnk added a comment. I guess that was premature, I suppose I should test these cases John enumerated: > I think some basic validation of that is probably called for before > committing. The obvious places to check: > > - a function pointer type > - a funct

[PATCH] D55672: Mangle calling conventions into function pointer types where GCC does

2018-12-13 Thread Reid Kleckner via Phabricator via cfe-commits
rnk created this revision. rnk added reviewers: rjmccall, efriedma. GCC 5.1 began mangling these Windows calling conventions into function types, since they can be used for overloading. They've always been mangled in the MS ABI, but they are new to the Itanium mangler. Note that the calling conven

[PATCH] D55671: [analyzer] Don't pretend that unknown block calls have one null parameter.

2018-12-13 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ created this revision. NoQ added reviewers: dcoughlin, george.karpenkov. Herald added subscribers: cfe-commits, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, szepet, baloghadamsoftware, kristof.beyls, xazax.hun, javed.absar. `CallEvent::parameters()` returns an `ArrayRef` and us

Re: r349053 - [CodeComplete] Fill preferred type on binary expressions

2018-12-13 Thread Reid Kleckner via cfe-commits
r349086 should take care of it, but you may want to tweak it. On Thu, Dec 13, 2018 at 1:30 PM Reid Kleckner wrote: > This new test doesn't pass on Windows. I think it's an LLP64-ness bug > based on the output: > Note: Google Test filter = PreferredTypeTest.Binar* > [==] Running 1 test fr

[PATCH] D54604: Automatic variable initialization

2018-12-13 Thread JF Bastien via Phabricator via cfe-commits
jfb added a comment. In D54604#1327893 , @rsmith wrote: > For the record: I'm OK with this direction. (I somewhat prefer removing the > `-enable-long-wordy-thing` option and instead automatically disabling the > `zero` option for clang release builds, bu

[PATCH] D54604: Automatic variable initialization

2018-12-13 Thread JF Bastien via Phabricator via cfe-commits
jfb updated this revision to Diff 178129. jfb marked 3 inline comments as done. jfb added a comment. - Don't document 'zero'. - Make drv_trivial_auto_var_init_zero_disabled an error instead of a warning. - Change the parameter: we only have [[clang::uninitialized]] now. Repository: rC Clang C

[PATCH] D55663: [CUDA] Make all host-side shadows of device-side variables undef.

2018-12-13 Thread Artem Belevich via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL349087: [CUDA] Make all host-side shadows of device-side variables undef. (authored by tra, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D55

r349087 - [CUDA] Make all host-side shadows of device-side variables undef.

2018-12-13 Thread Artem Belevich via cfe-commits
Author: tra Date: Thu Dec 13 13:43:04 2018 New Revision: 349087 URL: http://llvm.org/viewvc/llvm-project?rev=349087&view=rev Log: [CUDA] Make all host-side shadows of device-side variables undef. The host-side code can't (and should not) access the values that may only exist on the device side. E

r349086 - Attempt to fix code completion test to handle LLP64 platforms

2018-12-13 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Thu Dec 13 13:41:07 2018 New Revision: 349086 URL: http://llvm.org/viewvc/llvm-project?rev=349086&view=rev Log: Attempt to fix code completion test to handle LLP64 platforms Modified: cfe/trunk/unittests/Sema/CodeCompleteTest.cpp Modified: cfe/trunk/unittests/Sema/CodeCompl

[PATCH] D55663: [CUDA] Make all host-side shadows of device-side variables undef.

2018-12-13 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl accepted this revision. yaxunl added a comment. LGTM. Thanks! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55663/new/ https://reviews.llvm.org/D55663 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-

[PATCH] D54489: Implement -frecord-command-line (-frecord-gcc-switches)

2018-12-13 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In D54489#1330331 , @scott.linder wrote: > In D54489#1330255 , @rjmccall wrote: > > > So we're using the same command line option as GCC to produce something in > > the same section as GC

Re: r349053 - [CodeComplete] Fill preferred type on binary expressions

2018-12-13 Thread Reid Kleckner via cfe-commits
This new test doesn't pass on Windows. I think it's an LLP64-ness bug based on the output: Note: Google Test filter = PreferredTypeTest.Binar* [==] Running 1 test from 1 test case. [--] Global test environment set-up. [--] 1 test from PreferredTypeTest [ RUN ] Preferred

[PATCH] D54489: Implement -frecord-command-line (-frecord-gcc-switches)

2018-12-13 Thread Scott Linder via Phabricator via cfe-commits
scott.linder added a comment. In D54489#1330255 , @rjmccall wrote: > So we're using the same command line option as GCC to produce something in > the same section as GCC but formatting that section incompatibly with GCC? > That combination of choices do

r349085 - Fix test after -Wstring-plus-int warning was enabled

2018-12-13 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Thu Dec 13 13:24:08 2018 New Revision: 349085 URL: http://llvm.org/viewvc/llvm-project?rev=349085&view=rev Log: Fix test after -Wstring-plus-int warning was enabled Use array indexing instead of addition. Modified: cfe/trunk/test/SemaCXX/constant-expression-cxx1y.cpp Modif

[PATCH] D55662: [Sema][ObjC] Do not warn about repeated uses of weak variables when the variables are accessed in an unevaluated context.

2018-12-13 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. I think the right fix here is to call `CheckPlaceholderExpr` in `ActOnDecltypeExpression` / `HandleExprEvaluationContextForTypeof` before the original unevaluated context is exited. You can then change the type-building routines to assert that they aren't given a plac

r349083 - Fix debug-info-abspath.c on Windows by removing /tmp/t.o line

2018-12-13 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Thu Dec 13 13:18:16 2018 New Revision: 349083 URL: http://llvm.org/viewvc/llvm-project?rev=349083&view=rev Log: Fix debug-info-abspath.c on Windows by removing /tmp/t.o line This object seemed unused, so I believe we can just remove this compiler invocation without losing any te

[PATCH] D55433: [clang-tidy] Adding a new modernize use nodiscard checker

2018-12-13 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay marked 3 inline comments as done. MyDeveloperDay added inline comments. Comment at: test/clang-tidy/modernize-use-nodiscard.cpp:126 +template +class Bar +{ MyDeveloperDay wrote: > MyDeveloperDay wrote: > > JonasToth wrote: > > > MyDeveloperDay wrot

Re: r349065 - Reinstate DW_AT_comp_dir support after D55519.

2018-12-13 Thread Adrian Prantl via cfe-commits
> On Dec 13, 2018, at 1:18 PM, Reid Kleckner wrote: > > On Thu, Dec 13, 2018 at 9:56 AM Adrian Prantl via cfe-commits > mailto:cfe-commits@lists.llvm.org>> wrote: > > +// RUN: cd %t/UNIQUEISH_SENTINEL > +// RUN: %clang_cc1 -debug-info-kind=limited -triple %itanium_abi_triple \ > +// RUN: de

Re: r349065 - Reinstate DW_AT_comp_dir support after D55519.

2018-12-13 Thread Reid Kleckner via cfe-commits
On Thu, Dec 13, 2018 at 9:56 AM Adrian Prantl via cfe-commits < cfe-commits@lists.llvm.org> wrote: > > +// RUN: cd %t/UNIQUEISH_SENTINEL > +// RUN: %clang_cc1 -debug-info-kind=limited -triple %itanium_abi_triple \ > +// RUN: debug-info-abspath.c -emit-obj -o /tmp/t.o > Do you need to create thi

[PATCH] D55433: [clang-tidy] Adding a new modernize use nodiscard checker

2018-12-13 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay updated this revision to Diff 178123. MyDeveloperDay added a comment. Add additional constraints on member functions - do not add [[nodiscard]] to variadic function - do not add [[nodiscard]] to std::function templates argument functions - do not add [[nodiscard]] to functions retu

[PATCH] D55665: Output to SARIF from scan-build

2018-12-13 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman closed this revision. aaron.ballman added a comment. Committed in r349082. I left the test file off; it looks like it might work, but given that scan-build puts its output into a temp directory, I wasn't able to see a good way to handle checking the output. Given the simplicity of

[PATCH] D55229: [COFF] Statically link certain runtime library functions

2018-12-13 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added inline comments. Comment at: CodeGenObjC/gnu-init.m:103 +// Make sure we do not have dllimport on the load function +// CHECK-WIN: declare dso_local void @__objc_load theraven wrote: > compnerd wrote: > > rnk wrote: > > > compnerd wrote: > > > > rnk w

r349082 - Update the scan-build to generate SARIF.

2018-12-13 Thread Aaron Ballman via cfe-commits
Author: aaronballman Date: Thu Dec 13 12:55:34 2018 New Revision: 349082 URL: http://llvm.org/viewvc/llvm-project?rev=349082&view=rev Log: Update the scan-build to generate SARIF. This updates the scan-build perl script to allow outputting to sarif in a more natural fashion by specifying -sarif

[PATCH] D55656: [OpenCL] Address space for default class members

2018-12-13 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/AST/ASTContext.cpp:2781 + + return getAddrSpaceQualType(NewT, Orig.getAddressSpace()); } You're trying to handle a method qualifier, not a type a functions that are themselves in some non-standard address space,

Re: r349054 - Make -Wstring-plus-int warns even if when the result is not out of bounds

2018-12-13 Thread Evgenii Stepanov via cfe-commits
Hi, this broke Clang :: SemaCXX/constant-expression-cxx1y.cpp: http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-bootstrap-msan/builds/9144 error: 'warning' diagnostics seen but not expected: File /b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm/tools/clang/test/SemaCXX/constant-expr

[PATCH] D54489: Implement -frecord-command-line (-frecord-gcc-switches)

2018-12-13 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. So we're using the same command line option as GCC to produce something in the same section as GCC but formatting that section incompatibly with GCC? That combination of choices does not seem like a good idea. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D544

[PATCH] D55665: Output to SARIF from scan-build

2018-12-13 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. Thanks, looks perfectly sane to me! When i previously wanted to add tests for scan-build, it seemed fairly straightforward: diff --git a/test/Analysis/scan-build/lit.local.cfg b/test/Analysis/sc

[PATCH] D55665: Output to SARIF from scan-build

2018-12-13 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman created this revision. aaron.ballman added reviewers: NoQ, george.karpenkov. This updates the scan-build perl script to allow outputting to sarif in a more natural fashion by specifying `-sarif` as a command line argument, similar to how `-plist` is already supported. There appear

[PATCH] D55657: [libcxx] [regex] Use distinct __regex_word on NetBSD

2018-12-13 Thread Michał Górny via Phabricator via cfe-commits
mgorny updated this revision to Diff 178113. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55657/new/ https://reviews.llvm.org/D55657 Files: include/regex Index: include/regex === --- include/regex +++ include/regex @@ -

[PATCH] D55595: [clang-tidy] Share the forced linking code between clang-tidy tool and plugin

2018-12-13 Thread Ivan Donchevskii via Phabricator via cfe-commits
yvvan marked an inline comment as done. yvvan added inline comments. Comment at: clang-tidy/plugin/ClangTidyPlugin.cpp:11 #include "../ClangTidy.h" +#include "../ClangTidyForceLinker.h" #include "../ClangTidyModule.h" lebedev.ri wrote: > yvvan wrote: > > It see

[PATCH] D55595: [clang-tidy] Share the forced linking code between clang-tidy tool and plugin

2018-12-13 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: clang-tidy/plugin/ClangTidyPlugin.cpp:11 #include "../ClangTidy.h" +#include "../ClangTidyForceLinker.h" #include "../ClangTidyModule.h" yvvan wrote: > It seems it had to go after #include "clang/Config/config.h" to

[PATCH] D55657: [libcxx] [regex] Use distinct __regex_word on NetBSD

2018-12-13 Thread Kamil Rytarowski via Phabricator via cfe-commits
krytarowski accepted this revision. krytarowski added a comment. This revision is now accepted and ready to land. OK, I got it: `#define _CTYPE_Q0x2000 /* Phonogram */` from /usr/include/sys/ctype_bits.h I propose to mention the symbol name in the description and the header. In the de

[PATCH] D55657: [libcxx] [regex] Use distinct __regex_word on NetBSD

2018-12-13 Thread Kamil Rytarowski via Phabricator via cfe-commits
krytarowski added a comment. Where and what defines 0x2000, what header and what symbol name? Repository: rCXX libc++ CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55657/new/ https://reviews.llvm.org/D55657 ___ cfe-commits mailing list c

[PATCH] D55595: [clang-tidy] Share the forced linking code between clang-tidy tool and plugin

2018-12-13 Thread Ivan Donchevskii via Phabricator via cfe-commits
yvvan marked an inline comment as done. yvvan added inline comments. Comment at: clang-tidy/plugin/ClangTidyPlugin.cpp:11 #include "../ClangTidy.h" +#include "../ClangTidyForceLinker.h" #include "../ClangTidyModule.h" It seems it had to go after #include "clang

[PATCH] D55433: [clang-tidy] Adding a new modernize use nodiscard checker

2018-12-13 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay marked 3 inline comments as done. MyDeveloperDay added inline comments. Comment at: test/clang-tidy/modernize-use-nodiscard.cpp:126 +template +class Bar +{ MyDeveloperDay wrote: > JonasToth wrote: > > MyDeveloperDay wrote: > > > curdeius wrote: > >

[PATCH] D55433: [clang-tidy] Adding a new modernize use nodiscard checker

2018-12-13 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay updated this revision to Diff 178108. MyDeveloperDay marked an inline comment as done. MyDeveloperDay added a comment. Addressing review comments - don't add [[nodiscard]] onto function taking template arguments - add more unit tests to cover other discard possibilities [[clang::w

[PATCH] D53713: Add extension to always default-initialize nullptr_t.

2018-12-13 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. Is there any feedback here? Am I just completely incorrect in how I tried to fix this? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53713/new/ https://reviews.llvm.org/D53713 ___ cfe-commits mailing list cfe-c

[PATCH] D55663: [CUDA] Make all host-side shadows of device-side variables undefined.

2018-12-13 Thread Artem Belevich via Phabricator via cfe-commits
tra created this revision. tra added reviewers: jlebar, yaxunl. Herald added subscribers: bixia, sanjoy. The host-side code can't (and should not) access the values that may only exist on the device side. E.g. address of a __device__ function does not exist on the host side as we don't generate th

[PATCH] D55245: [clang-tidy] Add the abseil-duration-subtraction check

2018-12-13 Thread Hyrum Wright via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL349073: [clang-tidy] Add the abseil-duration-subtraction check (authored by hwright, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D55245?vs=

[PATCH] D55245: [clang-tidy] Add the abseil-duration-subtraction check

2018-12-13 Thread Hyrum Wright via Phabricator via cfe-commits
hwright added a comment. Thanks for reviewing, I'll go ahead and commit. I've also removed the hash specialization, since we moved to `llvm::IndexedMap` instead of `std::unordered_map` inside of `getInverseForScale`. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55245/new/ https://rev

[clang-tools-extra] r349073 - [clang-tidy] Add the abseil-duration-subtraction check

2018-12-13 Thread Hyrum Wright via cfe-commits
Author: hwright Date: Thu Dec 13 11:23:52 2018 New Revision: 349073 URL: http://llvm.org/viewvc/llvm-project?rev=349073&view=rev Log: [clang-tidy] Add the abseil-duration-subtraction check Summary: This check uses the context of a subtraction expression as well as knowledge about the Abseil Time

[PATCH] D55662: [Sema][ObjC] Do not warn about repeated uses of weak variables when the variables are accessed in an unevaluated context.

2018-12-13 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak created this revision. ahatanak added reviewers: erik.pilkington, rjmccall, rsmith. ahatanak added a project: clang. Herald added subscribers: dexonsmith, jkorous. Sema shouldn't record uses of weak variables when they are used in an unevaluated context. For example: decltype([obj we

[PATCH] D55044: [clang-tidy] check for Abseil make_unique

2018-12-13 Thread Andy Zhang via Phabricator via cfe-commits
axzhang added a comment. In D55044#1329604 , @hokein wrote: > In fact, the existing `modernize-make-unique` can be configured to support > `absl::make_unique`, you'd just need to configure the check option > `MakeSmartPtrFunction` to `absl::make_unique`

[PATCH] D55640: [clang-tidy] Implement a check for large Objective-C type encodings 🔍

2018-12-13 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/clang-tidy/checks/objc-type-encoding-size.rst:6 + +Finds Objective-C type encodings that exceed a configured threshold. + Please synchronize with Release Notes. Repository: rCTE Clang Tools Extra CHANGES

[PATCH] D55315: [clangd] Only reduce priority of a thread for indexing.

2018-12-13 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 178094. kadircet marked 2 inline comments as done. kadircet added a comment. - Use std::deque instead of std::list Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55315/new/ https://reviews.llvm.org/D55315 Files

[PATCH] D55315: [clangd] Only reduce priority of a thread for indexing.

2018-12-13 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clangd/index/Background.h:121 bool ShouldStop = false; - std::deque Queue; + std::list> Tasks; std::vector ThreadPool; // FIXME: Abstract this away. ilya-biryukov wrote: > kadircet wrote: > > ilya-biryukov wrote

  1   2   >