[PATCH] D35783: Ignore shadowing for declarations coming from within macros.

2017-07-23 Thread Daniel Jasper via Phabricator via cfe-commits
djasper added a comment. I'd be ok, with missing that case, but I am happy to hear more opinions. https://reviews.llvm.org/D35783 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D35783: Ignore shadowing for declarations coming from within macros.

2017-07-23 Thread Kim Gräsman via Phabricator via cfe-commits
kimgr added a comment. I've seen this in the wild: #define LOG(m) \ { \ std::ostringstream os; \ os << m << "\n"; \ LogWrite(os.str()); \ } auto os = GetOSName(); LOG("The OS is " << os); It looks like your patch would miss this case. Not sure if

[PATCH] D35783: Ignore shadowing for declarations coming from within macros.

2017-07-23 Thread Daniel Jasper via Phabricator via cfe-commits
djasper created this revision. The case, I am particularly interested in is: #define A(x) \ ... \ if (...) { \ int SomeVariable = 1; \ ...; \ } Here, SomeVariable never leaves the scope of the macro and at t

[PATCH] D35781: [Sema] Make sure that -Wunguarded-availability emits notes at the right redeclaration

2017-07-23 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington planned changes to this revision. erik.pilkington added a comment. On second thought, I think it makes more sense to do this right before we emit a diagnostic so we have the most recent redecl with all the inherited availability attributes until then. I'll put a diff up for that

[PATCH] D35782: [C++2a][Preprocessor] Implement p0306 __VA_OPT__ (Comma omission and comma deletion)

2017-07-23 Thread Faisal Vali via Phabricator via cfe-commits
faisalv created this revision. faisalv added a project: clang. This patch implements an extension to the preprocessor: __VA_OPT__ which expands into its contents if variadic arguments are supplied, or behaves as an empty token if none. - currently it is only enabled for C++2a (we could always e

Re: [PATCH v3] [PPC64]: Add support for Swift calling convention

2017-07-23 Thread Andrew Jeffery via cfe-commits
Hi Hal, On Sat, 2017-07-22 at 23:26 -0500, Hal Finkel wrote: > On 07/19/2017 10:26 AM, Adrian Prantl wrote: > > > > > > On Jun 21, 2017, at 11:32 PM, Andrew Jeffery > > > > > > wrote: > > > > > > For the tests I've extracted the int5 and int8 cases to cater for > > > different alignments for di

Re: [PATCH v3] [PPC64]: Add support for Swift calling convention

2017-07-23 Thread Andrew Jeffery via cfe-commits
On Wed, 2017-07-19 at 08:26 -0700, Adrian Prantl wrote: > > > > On Jun 21, 2017, at 11:32 PM, Andrew Jeffery wrote: > > > > For the tests I've extracted the int5 and int8 cases to cater for > > different alignments for different platform ABIs. For Linux on POWER the > > 5 and 8 element vectors mu

[PATCH] D34170: [libcxx] Moving compiler specific test infrastructure to compiler.py

2017-07-23 Thread Ben Craig via Phabricator via cfe-commits
bcraig added a comment. ping https://reviews.llvm.org/D34170 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D32411: [libcxx] Provide #include_next alternative for MSVC

2017-07-23 Thread Ben Craig via Phabricator via cfe-commits
bcraig added a comment. ping https://reviews.llvm.org/D32411 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D35780: Introduce -nostdlib++ flag to disable linking the C++ standard library.

2017-07-23 Thread Nico Weber via cfe-commits
On Jul 23, 2017 4:51 PM, "Joerg Sonnenberger" wrote: On Sun, Jul 23, 2017 at 03:17:32PM -0400, Nico Weber via cfe-commits wrote: > On Sun, Jul 23, 2017 at 3:08 PM, Joerg Sonnenberger via Phabricator via > cfe-commits wrote: > > > joerg added a comment. > > > > I don't really like this. > > That'

[PATCH] D35747: [Driver] Fuchsia defaults to -fno-math-errno

2017-07-23 Thread Petr Hosek via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL308855: [Driver] Fuchsia defaults to -fno-math-errno (authored by phosek). Changed prior to commit: https://reviews.llvm.org/D35747?vs=107752&id=107845#toc Repository: rL LLVM https://reviews.llvm.o

r308855 - [Driver] Fuchsia defaults to -fno-math-errno

2017-07-23 Thread Petr Hosek via cfe-commits
Author: phosek Date: Sun Jul 23 15:30:13 2017 New Revision: 308855 URL: http://llvm.org/viewvc/llvm-project?rev=308855&view=rev Log: [Driver] Fuchsia defaults to -fno-math-errno Patch by Roland McGrath Differential Revision: https://reviews.llvm.org/D35747 Modified: cfe/trunk/lib/Driver/Too

[PATCH] D35483: clang-format: fix block OpeningLineIndex around preprocessor

2017-07-23 Thread Francois Ferrand via Phabricator via cfe-commits
Typz updated this revision to Diff 107843. Typz marked 3 inline comments as done. Typz added a comment. Address review commentsx https://reviews.llvm.org/D35483 Files: lib/Format/UnwrappedLineParser.cpp lib/Format/UnwrappedLineParser.h unittests/Format/NamespaceEndCommentsFixerTest.cpp I

[PATCH] D35557: clang-format: merge short case labels with trailing comments

2017-07-23 Thread Francois Ferrand via Phabricator via cfe-commits
Typz updated this revision to Diff 107841. Typz marked 4 inline comments as done. Typz added a comment. Address review comments https://reviews.llvm.org/D35557 Files: lib/Format/UnwrappedLineFormatter.cpp unittests/Format/FormatTest.cpp Index: unittests/Format/FormatTest.cpp ==

[PATCH] D35557: clang-format: merge short case labels with trailing comments

2017-07-23 Thread Francois Ferrand via Phabricator via cfe-commits
Typz added inline comments. Comment at: unittests/Format/FormatTest.cpp:912 + " break;\n" + "}", + Style); krasimir wrote: > I'd suggest adding more cases here, like: > ``` >"case 6: /* comment */ x = 1;

[PATCH] D35781: [Sema] Make sure that -Wunguarded-availability emits notes at the right redeclaration

2017-07-23 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington created this revision. This is done by modifying ShouldDiagnoseAvailabilityOfDecl() so that the OffendingDecl is the one with the original availability attribute. Also, keep track of this availability attribute so we don't have to constantly recompute it via getAttrForPlatform()

Re: [PATCH] D35780: Introduce -nostdlib++ flag to disable linking the C++ standard library.

2017-07-23 Thread Joerg Sonnenberger via cfe-commits
On Sun, Jul 23, 2017 at 03:17:32PM -0400, Nico Weber via cfe-commits wrote: > On Sun, Jul 23, 2017 at 3:08 PM, Joerg Sonnenberger via Phabricator via > cfe-commits wrote: > > > joerg added a comment. > > > > I don't really like this. > > That's cool, you don't need to use the flag. I'm not talk

Re: [PATCH] D35780: Introduce -nostdlib++ flag to disable linking the C++ standard library.

2017-07-23 Thread Nico Weber via cfe-commits
But if you have alternative ideas on how to address this use case (statically linking a custom libc++ without having to duplicate all the default libs, in particular built-in ones like libbuiltin-rt), I'm happy to hear them, or course :-) On Jul 23, 2017 3:17 PM, "Nico Weber" wrote: On Sun, Jul

Re: [PATCH] D35780: Introduce -nostdlib++ flag to disable linking the C++ standard library.

2017-07-23 Thread Nico Weber via cfe-commits
On Sun, Jul 23, 2017 at 3:08 PM, Joerg Sonnenberger via Phabricator via cfe-commits wrote: > joerg added a comment. > > I don't really like this. That's cool, you don't need to use the flag. > The reason why -lm is added explicitly on many targets is because the C++ > STL typically depends on

[PATCH] D35780: Introduce -nostdlib++ flag to disable linking the C++ standard library.

2017-07-23 Thread Joerg Sonnenberger via Phabricator via cfe-commits
joerg added a comment. I don't really like this. The reason why -lm is added explicitly on many targets is because the C++ STL typically depends on it and that means for static linking and broken ELF linkers, it will be necessary to link against it explicitly. There is also the question on whet

[PATCH] D35780: Introduce -nostdlib++ flag to disable linking the C++ standard library.

2017-07-23 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. Most of the patch is unifying all the toolchains to call the newly-introduced ToolChain::ShouldLinkCXXStdlib() instead of all manually checking for `D.CCIsCXX() && !getFlag(nostdlib, nodefaultlibs)`. The actual behavior change is to make that function check the new nostd

[PATCH] D35780: Introduce -nostdlib++ flag to disable linking the C++ standard library.

2017-07-23 Thread Nico Weber via Phabricator via cfe-commits
thakis created this revision. Herald added subscribers: aheejin, jgravelle-google, sbc100, dschuff, jfb, emaste. Projects that want to statically link their own C++ standard library currently need to pass -nostdlib or -nodefaultlibs, which also disables linking of the builtins library, -lm, and

r308848 - Remove Driver::UseStdLib.

2017-07-23 Thread Nico Weber via cfe-commits
Author: nico Date: Sun Jul 23 09:31:47 2017 New Revision: 308848 URL: http://llvm.org/viewvc/llvm-project?rev=308848&view=rev Log: Remove Driver::UseStdLib. All but one place are checking options::OPT_nostdlib instead of looking at this field, so convert that one other place to doing that as well

[PATCH] D35776: clang/Basic/TargetInfo.h: Sink llvm/IR/DataLayout.h into implementations.

2017-07-23 Thread NAKAMURA Takumi via Phabricator via cfe-commits
chapuni created this revision. Herald added a subscriber: nhaehnle. It loosens dependencies of Clang_Basic from LLVM_intrinsic. Repository: rL LLVM https://reviews.llvm.org/D35776 Files: cfe/trunk/include/clang/Basic/TargetInfo.h cfe/trunk/lib/AST/Mangle.cpp cfe/trunk/lib/Basic/TargetI

[PATCH] D26587: [AVX512][inline-asm] Fix AVX512 inline assembly instruction resolution when the size qualifier of a memory operand is not specified explicitly.

2017-07-23 Thread coby via Phabricator via cfe-commits
coby abandoned this revision. coby added a comment. superseded by https://reviews.llvm.org/rL302179 Repository: rL LLVM https://reviews.llvm.org/D26587 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/

[PATCH] D35718: [clang-tidy] Do not issue fixit for explicit template specializations

2017-07-23 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. LG. Thanks! https://reviews.llvm.org/D35718 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinf

[PATCH] D35775: [x86][inline-asm]Extend support for memory reference expression

2017-07-23 Thread coby via Phabricator via cfe-commits
coby created this revision. Herald added a subscriber: eraman. Extend support for expressions which represent a variable access in ms-style inline-asm, to allow the incorporation of both registers and variables. Currently, expression such as '//__asm mov eax, [var + eax]//' would have been reduc

[PATCH] D21767: Fix instantiation of friend function templates

2017-07-23 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 107817. sepavloff added a comment. Reworked patch Used more general way to cope with calculation of instantiation stack, which is suitable for cases represented in PR26512. Added new tests. https://reviews.llvm.org/D21767 Files: include/clang/AST/ASTL